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

Train to ignore? #124

Closed
bertelschmitt opened this issue May 8, 2020 · 7 comments
Closed

Train to ignore? #124

bertelschmitt opened this issue May 8, 2020 · 7 comments

Comments

@bertelschmitt
Copy link

Is there a possibility to train a model with objects it should NOT RECOGNIZE, i.e. ignore? I use YOLO to monitor a video feed from outside a door, and the model keeps erroneously recognizing the opening door as one of the trained objects. I’d like to feed the model with images of the opening door, along with the instruction to ignore the door. Any ideas?

@AntonMu
Copy link
Owner

AntonMu commented May 8, 2020

Hi @bertelschmitt - currently this feature is not implemented but it is definitely a good addition. There is a discussion on this already -> #43

@bertelschmitt
Copy link
Author

Great,, thanks, I'll be looking for it

@bertelschmitt
Copy link
Author

Here is one of those cases. This model is trained on cats. Every afternoon, the model thinks the concrete pad is one of the cats, a very black MrKuro. Most likely because the pad was a background of one of the training images. Of course. the sudden shadow introduces another level of difficulty. I could filter it out in post-processing by looking for a close overlap with a defined rectangle. But if the matter is already on the to-do list, I'll leave it to the experts.

Speaking of close overlap: Sometimes,. the model mis-identifies two classes in very close vicinity within the same frame. Usually, this is solved via Non Maximum Suppression, where the box with the higher confidence wins, and where the lower-confidence box is thrown out. I could not find this feature in the code.
falsekuro

@AntonMu
Copy link
Owner

AntonMu commented May 9, 2020

Hi @bertelschmitt - thank you for the detailed example of your use case. To improve performance you could always increase your training set and then make your threshold value higher. For the non-max suppression, every (reasonable) YOLO implementation has non-max suppression. You can find it in the model.py file. I hope this helps!

@bertelschmitt
Copy link
Author

Thanks, @AntonMu. I will look for the NMS, and possibly play with the threshold. As for the training set, I'm already at >7K images for this very limited (but tricky) domain (1 camera, 1 view, 7 cats, 4 of them black ...) but a training set is never done. I'm working with video, and started to re-train just the frames with low confidence, or with wrong classification. A very tedious job :)

@bertelschmitt
Copy link
Author

Hi, @AntonMu. I looked at the model.py code, and the variable that seems to gear NMS is iou_threshold, right? It's set in the code at 0.5, and I will tighten it up a bit to see what happens. I'm not much concerned with overlapping objects in my use-case,I'm worried more about multiple detection.

@AntonMu
Copy link
Owner

AntonMu commented Jun 7, 2021

Closing this to have a single discussion.

@AntonMu AntonMu closed this as completed Jun 7, 2021
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