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

How can I ignore the cat I don't want to detect. #13

Closed
sushant1727 opened this issue Jun 13, 2018 · 3 comments
Closed

How can I ignore the cat I don't want to detect. #13

sushant1727 opened this issue Jun 13, 2018 · 3 comments

Comments

@sushant1727
Copy link

I have trained my model using Darknet yolo-tiny model and I would like to ignore the objects I don't want to detect.
Is there a way to do that?

Also, is there a way to track the object after it is detected, any suggestion would be appreciated.

Thanks

@madhawav
Copy link
Owner

Hi,
You can filter unwanted labels in results by post-processing results like below.

            exclusions = ["cat"]
            results = net.detect(dark_frame)
            results = [r for r in results if r[0] not in exclusions]

The labels in exclusions list will be removed from results.

Regarding object tracking, You can try out the trackers available with OpenCV.
This tutorial should be a good starting point - https://www.learnopencv.com/object-tracking-using-opencv-cpp-python/.

PS- You will need to have opencv installed with contrib modules in order to use trackers.

@sushant1727
Copy link
Author

sushant1727 commented Jun 15, 2018

You're awesome thanks for all the suggestions.

Is it possible to label two same cats when detected like cat[1], cat [2]?

@madhawav
Copy link
Owner

@sushant1727 That would require tracking of cats. You can get the idea from following tutorial.
https://www.learnopencv.com/object-tracking-using-opencv-cpp-python/

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

2 participants