Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

memory leaking #21

Open
kingloo2014 opened this issue Dec 16, 2015 · 5 comments
Open

memory leaking #21

kingloo2014 opened this issue Dec 16, 2015 · 5 comments

Comments

@kingloo2014
Copy link

when running the simpleCLM exectable example, it seem to exsit some memory leaking.

@TadasBaltrusaitis
Copy link
Owner

Can you provide me with more details? What setup leads to a memory leak? Why do you believe there's a memory leak?

@jjongun
Copy link

jjongun commented Apr 22, 2016

Never going down memory size.
How to reset or clear data ?

thanks.

@TadasBaltrusaitis
Copy link
Owner

Can you provide me with the details? When does the memory not go down? What functions what objects? What models are you running on what type of data?

Thanks,
Tadas

@jjongun
Copy link

jjongun commented Apr 22, 2016

Thanks for your response!

I was video capture , and upload to youtube for detail explaination.
captured video

It is example code in your [SimpleCLM] project. (location : CLM-framework/exe/SimpleCLM/)

*describe of video time line *

  • [00:00:11] Start stable memory was 237MB
  • [00:00:15] Start CLM tracked with open scene and tracking success of some faces.
  • [00:00:56] Increasing memory up to 347MB.
  • [00:01:10] I was made black blank screen for releasing process memory itself.
    But, nothing happened. It didn't releasing process memory. just stay go on.

That's Ok I understanding, why It need much of process memory space for fast face tracking and machine learning.

But I want less using memory or recycling memory.
Because,My project need multi face tracking. So I was running with [clm_model] x6. (It was nice work.)
But application's memory graph was almost up to 1GB increased in a few minutes. And never going down like captured video. That's Critical some of system occupied 1GB for single application, I think.
It is unusual Isn't it?

So, I was tried exploration in your source code for lower memory spend and releasing memory point.
I'm not sure, who is spending memory continuously.

But I found one of issues.
" CLM Call [CLMTracker::DetectLandmarksInVideo] when change face or change face size.
And It is start point of increasing memory form starting application through close application. "

I need some of reset memory function. What should I do?
I can make solution myself , If you throw some of hint to me. and I will share solutions about this issue.

Thanks.

@TadasBaltrusaitis
Copy link
Owner

Thanks for such a detailed analysis.

The reason for increasing of the memory is not a memory leak, but rather the algorithm precomputing certain values when it needs to and keeping them if it will ever need them again (the actual values it preallocates if you're interested are kde_resp_precalc which are computed as the model executes as they allow for much faster processing, but need to be stored in memory)

What do you mean by running clm_model x6? Are you running six instances? If so each of them will preallocate what it needs, but that information could be shared by the models. Alternatively, you can always reuse the same model instead of running multiple of them. Finally you could remove the dependence on kde_resp_precalc, but the model will be slower.

I need some of reset memory function. What should I do?
You can always clear kde_resp_precalc after it reaches a certain amount of memory used.

Also are you sure it uses this much memory? I haven't observed that problem before myself, are you running it without debugger attached? (CTRL+F5), Also are you running it in Release mode rather than debug.

Let me know if that helps.

Thanks,
Tadas

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants