-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
Bounding box fixes for GOTURN tracker #2620
Conversation
Hi! Please create a test with 2-3 images where we can catch observed error. |
Hi! Is it OK if I will use for reproducing the problem a video from the LaSOT dataset and provide drive.google link to it? |
You need to select minimal number of images where this error is reproduced. You need to open a separate pull request at https://github.com/opencv/opencv_extra/tree/master/testdata/cv/tracking (BTW, please check if existing videos can trigger it). |
We should reuse existing videos if possible. Other way is to generate sequence of frames in the test. |
Sorry, but what do you mean by "generate a sequence of frames"? For reproducing I need a video, where an object is leaving the border of the frame, so it can not be random generated "dummy input".
UPD: I looked at three existing videos in the repository: |
For example, this generator: https://github.com/opencv/opencv_contrib/blob/master/modules/bgsegm/src/synthetic_seq.cpp, creates frames with waves on background and moving object (just an image) on foreground. It is used in some bgsegm tests. Another example is here: https://github.com/opencv/opencv/blob/a2f7ef9d210e5be5741c6e3109c233672534a1ed/modules/videoio/test/test_precomp.hpp#L40-L58. It generates a sequence of frames with a moving background, static text and moving object (circle). Used in VideoWriter tests. You can create similar generator (some static background) and an object (can be simple geometric figure) moving on whatever trajectory you want (leaving the frame). |
In the last few days, I tried again to use the videos from https://github.com/opencv/opencv_extra/tree/master/testdata/cv/tracking with 3.4 branch and find out that I was wrong in my last comment - with using tracker.py script, video "david" and 3.4 branch without any patches I successfully reproduced memory issue for GOTURN tracker. |
@ieliz , benchmark is nothing but one of possible tracker applications. Please fix a problem completely in this PR including a test. Thanks! |
OK, I will leave all changes in this PR. |
@ieliz, you need to run an algorithm on this video as a test application. Add your code in https://github.com/opencv/opencv_contrib/tree/master/modules/tracking/test. |
I think I make this test work, but I have some concerns. UPD 12.08.20: Also, I think it is worth mentioning - it is necessary to add environment variable OPENCV_TEST_DATA_PATH (path to |
To be sure, that all changes are working properly I rebuild
so |
For now, failed builds on win64 and win32:
@mshabunin , @alalek is it possible that these hosts do not have |
Commit was green, but the test was unfinished. So, green build for this commit is not significant.
But Windows hosts can not find the file. Is it possible that files are not there? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like you have broken serialization process.
Can't open ""
"%YAML:1.0\n" | ||
"---\n" | ||
"prototxt: " + model + "\n" | ||
"caffemodel: " + weights + "\n"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Avoid that. We don't testing parameters serialization here.
Use existed straightforward approach:
opencv_contrib/modules/tracking/test/test_trackerParametersIO.cpp
Lines 11 to 19 in e502f30
TrackerMedianFlow::Params parameters; | |
parameters.maxLevel = 10; | |
parameters.maxMedianLengthOfDisplacementDifference = 11; | |
parameters.pointsInGrid = 12; | |
parameters.winSize = Size(6, 5); | |
parameters.winSizeNCC = Size(41, 40); | |
parameters.termCriteria.maxCount = 100; | |
parameters.termCriteria.epsilon = 0.1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But I implemented usage of the paths via cv::FileNode. So, this is gonna be no used for the test?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test must be simple and straightforward.
this is gonna be no used for the test
At least not in this test with the name "memory_usage".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, check last changes:
I was forced to remove cv::FileNode, but instead used cv::TrackerGOTURN::Params params;
, as @alalek said.
Win32/win64 builds are passed, so I think this test is ready.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Thanks!
Pull Request Readiness Checklist
See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request
Patch to opencv_extra has the same branch name.
Me and @dkurt trying to fix GOTURN tracker issues:
Related links:
Memory problem with GOTURN tracker #2589
Goturn tracker fails to allocate 95GB of RAM #2426