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

What are the tracked objects? #319

Closed
CassielMapersive opened this issue May 8, 2024 · 6 comments
Closed

What are the tracked objects? #319

CassielMapersive opened this issue May 8, 2024 · 6 comments
Labels
help wanted Extra attention is needed

Comments

@CassielMapersive
Copy link

CassielMapersive commented May 8, 2024

Describe the situation you are working on
First of all, great library you have created I am impressed and I hope you are as happy with your library as I am using it.
So i am working on a way to track cars and pedestrians and creating a csv file for them using both detectron2 demo and the yolov7 demo to test between them.

Describe what is it that you need help with
There are a lot of different colored bboxes eg this image. I wonder what the difference is between the colored ones (which i assume to be the tracked objects) and the black bboxes (which i assume to be too low confidence to be used as a tracked object)?

I would like some clarity on that and if its possible to include the black bboxes into tracked objects as well.

Additional context
This frame has picked up 4 Objects but clearly there are many more bboxes and most of them are quite useful and I would like to add it to tracked objects.
Screenshot from 2024-05-08 10-29-46

@CassielMapersive CassielMapersive added the help wanted Extra attention is needed label May 8, 2024
@facundo-lezama
Copy link
Collaborator

Hi @CassielMapersive, thanks for those words!

Can you send a snippet of the code you're using? I believe those black boxes are detections, and the colored ones are the actual tracked objects. But I can't be sure unless you send some code, and I can see how you're calling the drawing functions.

@CassielMapersive
Copy link
Author

Thank you @facundo-lezama for the quick reply!

I barely changed anything to the demo, here is what happens for every frame. Also I am not sure if this is relevant but

DISTANCE_THRESHOLD_BBOX: float = 5
DISTANCE_THRESHOLD_CENTROID: int = 30
MAX_DISTANCE: int = 5000
video sizes are usually (7000,3500).

Also I realise that the detections tend to be more accurate to than the tracked objects. Which in theory does not make sense since norfair uses the detections. Is there a way to improve the accuracy and sensitivity of the tracked objects?

Sorry for the confusion, I am quite new with this. :)
Screenshot from 2024-05-09 09-40-24

@facundo-lezama
Copy link
Collaborator

Thanks for the information!

There are a lot of different colored bboxes eg this image. I wonder what the difference is between the colored ones (which i assume to be the tracked objects) and the black bboxes (which i assume to be too low confidence to be used as a tracked object)?

The black boxes are detections, the instances created by the object detector for that specific frame. The colored ones are the tracked objects that Norfair has created based on previous detections.

Also I realise that the detections tend to be more accurate to than the tracked objects. Which in theory does not make sense since norfair uses the detections. Is there a way to improve the accuracy and sensitivity of the tracked objects?

Detections are usually more accurate than tracked objects. The reason is simple: detections are outputs from the object detector model for the specific frame, while tracked objects' positions are estimated using, most commonly, a Kalman Filter based on previous positions. If an object is detected often throughout the video, Norfair should be able to track it with high accuracy. But there are also circumstances such as occlusions, low frame rate, moving cameras and other hard scenarios, where the estimations for new positions of the objects are less accurate.

@CassielMapersive
Copy link
Author

@facundo-lezama Thank you, I understand now.

Last questions to this thread: Is there a way to integrate another tracking algo? or change the Kalman filter for another one for example? Improve the tracking in some way or use a different approach entirely like deep sort for example?

@facundo-lezama
Copy link
Collaborator

@CassielMapersive, I would suggest you go over some of the typical knobs that you need to tune to get the tracker to work. Our Getting Started guide has some pointers to start with.

In our experience, this is an iterative process (and not a simple one) that requires you to tune things until you're comfortable with the results.

Norfair's tracking strategy was built on top of known algorithms like SORT, but Norfair is not a library that integrates different algorithms.

@CassielMapersive
Copy link
Author

Thank you for the help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants