Comments (2)
Adding tmp_idx_img->Free()
after line 87 in gSLICr_seg_engine_GPU.cu resolves the issue.
It's also worth noting that this only arises if you are allocating new input and output images to the GPU in successive calls. That is, these lines in my code:
// Instantiate a core_engine
gSLICr::engines::core_engine* gSLICr_engine = new gSLICr::engines::core_engine(_settings);
// gSLICr takes gSLICr::UChar4Image as input and output
gSLICr::UChar4Image* in_img = new gSLICr::UChar4Image(_settings.img_size, true, true);
gSLICr::UChar4Image* out_img = new gSLICr::UChar4Image(_settings.img_size, true, true);
For example, when I wrote a video SLIC-segmenting script (where the frames were all the same resolution), this was a non-issue as I only have to allocate once. However, if I recurse through a directory of images that may have different resolutions, I need to allocate whenever the image size has changed. In those circumstances, the memory leak appears.
from gslicr.
On a related note, there is a memory leak when the seg_engine is being repeatedly created and destroyed. I was wrong about the location, will update if/when I find out.
--Edit
I was gonna post a quick PR about tmp_idx_img
, just so people are aware, only to find out there is one already.
#18
These need to be wrapped into smart pointers for more extensive usage.
from gslicr.
Related Issues (15)
- Superpixel components are disconnected HOT 6
- why the demo gives three copies of image HOT 2
- How to access superpixel information HOT 2
- Segmented image where each super pixel has median value HOT 4
- Suggested minor bugfix?
- cudaSafeCall() Runtime API error : no CUDA-capable device is detected. HOT 1
- Can you write an implementation of metal or OpenGL?
- TensorFlow op
- Can it be written compatibly with 64bit compilation? HOT 1
- when local_id<32 , the code is different from local_id < 64;
- Retrieve super pixels as cv::Contours
- Build failing with error: βmemcpyβ was not declared in this scope HOT 1
- There is an error in the VS2017 compiler. Can you help me
- Issue with different size of superpixel HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gslicr.