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 problem with GOTURN tracker #2589
Comments
Can reproduce the problem. May I ask to run a tracker on this video and show how it will track between after 190th frame with the following changes. It's interesting to see the dynamics how it started grow beyond the edges. --- a/modules/tracking/src/gtrTracker.cpp
+++ b/modules/tracking/src/gtrTracker.cpp
@@ -137,11 +137,18 @@ bool TrackerGOTURNImpl::updateImpl(const Mat& image, Rect2d& boundingBox)
targetPatchRect.x = (float)(prevCenter.x - prevBB.width*padTargetPatch / 2.0 + targetPatchRect.width);
targetPatchRect.y = (float)(prevCenter.y - prevBB.height*padTargetPatch / 2.0 + targetPatchRect.height);
+ targetPatchRect.width = std::min(targetPatchRect.width, (float)prevFrame.cols);
+ targetPatchRect.height = std::min(targetPatchRect.height, (float)prevFrame.rows);
+ targetPatchRect.x = std::max(-prevFrame.cols * 0.5f, std::min(targetPatchRect.x, prevFrame.cols * 1.5f));
+ targetPatchRect.y = std::max(-prevFrame.rows * 0.5f, std::min(targetPatchRect.y, prevFrame.rows * 1.5f)); |
I added these lines, use 'make -j8' command in build_dir, and the problem is still here. UPD: Sorry, my bad. It is actually working. IoU is really low when it is reached frame 220 (equal 0 on the frame 225), but after initialization on the 250th frame, it starts tracking with a good accuracy again. I will try to figure out your solution. Thank you for your help! |
I tried to use this fix to measure GOTURN with the benchmark from PR#2516 and faced a new problem: tracker trying to get the ROI out of the image plane on some of LaSOT`s videos. I will think about how to fix it and for now, leave this issue open if you do not mind. |
I think this issue can be closed - the ROI problem is not related to the GOTURN tracker. @dkurt solution is working for the tracker (tested on the LaSOT dataset videos). |
Issue is not solved. |
System information (version)
Detailed description
Hello! I tried to use GOTURN tracker and face the problem with memory:
if tracker lose the object or even see some sort of hard obstacles, tracker starting to use too much memory.
I saw that issues only on several videos in the LaSOT dataset`s testing part, for example - 'coin-3' and 'airplane-15' videos.
For detecting the problem I tried to use psutil module for Python 3, but when tracker starts using too much memory and the module doesn't work properly and does not show anything. So, for detecting the problem, I just looked at Task Manager in Win 10 and saw how tracker starts to use 100% of the memory and after a few seconds, PC was frozen. In Ubuntu process is just killed after few seconds.
As I understand, this issue is about that, but it is closed without some kind of direct solution.
Link to archive with 'coin-3' video: https://drive.google.com/file/d/12YJnAc9Hbf45aT7mbFsrmBfdylC1WGOR/view?usp=sharing.
Link to GOTURN model: https://drive.google.com/file/d/1OARDpmA6zdpuAfQkdLAbrMHDF9PVJ3l_/view?usp=sharing.
Link to prototxt file: https://drive.google.com/file/d/1n02YeFW5_usZzPfXws4LvsVbsj1_TMSk/view?usp=sharing.
Also, here are similar questions from the answers.opencv.org :
Steps to reproduce
Python 3 script for reproducing:
Issue submission checklist
answers.opencv.org, Stack Overflow, etc and have not found solution
The text was updated successfully, but these errors were encountered: