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

Issue with the unMatchedFrameTolerance setting #474

Open
dennbas opened this issue Nov 5, 2021 · 5 comments
Open

Issue with the unMatchedFrameTolerance setting #474

dennbas opened this issue Nov 5, 2021 · 5 comments

Comments

@dennbas
Copy link

dennbas commented Nov 5, 2021

How to adjust the configuration in Opendatacam so that it tracks an object without interruption?
In my case I am counting driving cars in a video. I noticed under pathfinder that the tracker loses the cars in the video and recognizes them as a new one a few frames later. (The line of the drawn path is interrupted and after a short pause it is drawn again with a new color).

On this page was it recommend to increase "unMatchedFrameTolerance" from value. So I changed it from 5 to 20 and even higher values. Unfortunately, this did not bring any improvements, the error still occurs and does not change.

config.json (for upload as txt file):
config.txt

Screenshot:
grafik

@munsterlander
Copy link
Contributor

munsterlander commented Nov 5, 2021

Maybe a dumb question, so apologies, but did you build after changing the config?

@vsaw
Copy link
Collaborator

vsaw commented Nov 6, 2021

I also had the feeling that this sometimes does not work. But have never confirmed it yet.

What I can offer as an alternative is changing the iouOverlap to a lower value. This could allow the tracker to keep an eye on faster moving cars. Have you tried tweaking this value as well?

Btw. You can find the source code for the tracker here if you want to dig deeper. https://github.com/opendatacam/node-moving-things-tracker

@dennbas
Copy link
Author

dennbas commented Nov 7, 2021

I just restarted docker-compose after changing the config. I try once with the build after changing the config.

Regarding the alternative with iouOverlap, I tried smaller values for IouLimit. The same results.

Thanks.I will have a look at the source code

@parthapp
Copy link

I have had a similar issue as well. I will describe my project below. I am using Jetson Nano 2gb.

I have a video recording from the corner of a traffic intersection with 4 approaches visible. I have labeled the approaches N, S, E and W for the detection lines. When a vehicle enters an intersection, it registers with a unique ID and timestamp. When it exits, it often registers with the same ID but with a different timestamp and a different line crossed. For a given length of video, I list all unique ID's, count the number of occurrences for each ID, and then list the Min and Max timestamp for each ID as well as the corresponding detection lines. This gives me a full count of all all vehicles entering an approach (N,S,E or W) exiting to a different departure direction.

Ideally, number of unique ID's should be twice the vehicle count, and every ID should only show up twice. In my sample video, I had 20 double counts and 29 single counts. All single counts were vehicles that lost their initial ID and got assigned another on exit. I have increased unMatchedFrameTolerance and computeTrajectoryBasedOnNbOfPastFrame values alternatively and did a sudo docker-compose restart after every change, and compared against 20 double and 29 single counts that I get with default config.json. Those values dont change. I am either

  1. adjusting the wrong parameters or
  2. not letting ODC know that parameters are changed (incorrect "build"?)
  3. parameters may not be working properly.

I have not changed IOU settings, but I have seen tracker lose vehicles that were not occluded from beginning till end.

Any suggestions?

@vsaw
Copy link
Collaborator

vsaw commented Nov 25, 2021

Have you tried adjusting the iouLimit? It might be that the object is moving to fast for the tracker to follow its trajectory, a lower iouLimit could work with fast moving objects but might lead to false trajectories in crowded intersections as object may get merged.

Also I don't know if sudo docker-compose restart refreshes changes to the config.json just to be safe I recommend fully stopping and starting ODC.

Last, which version are you running? Did you check if development behaves the same way?

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

No branches or pull requests

4 participants