I am trying to train YOLO to recognize helmet and safety jackets and so I have made weights file by following the instructions.
But it has somehow got mistrained. it is now recognizing helmets as safety jackets and safety jacket as a helmet.
what have I done wrong? and how do I fix this?
I used 0 for helmet class and 1 for safety jacket class in the .txt files of images.
please help and let me know if you need any more info.
Thanks.
Show the contents of one of the text files.
Just change obj.names file:
safety jacket
Thank you AlexeyAB it works fine now.
But now as it seems it only detects either helmet or a jacket in a picture. It won't detect both of them in the same picture at the same time.
I don't have a Nvidia GPU so I trained for like 300 iterations only using the 300.weights file (4 days and 5 nights continue training on my CPU -_- ).
Is it happening because I haven't trained enough or am I missing something here?
Also is there any way for to integrate these custom weights into the VOC weights/ COCO weights so that i can detect other things along with helmets and safety jakcets?
Yes, you should train about 4000 iterations for 2 objects. Also your image dataset probably is not enough good.
Increase network resolution in cfg-file:
width=608
height=608
I made the changed to .cfg file and now its takes 10 sec per image instead of 4 sec.
How do I make my trained custom objects detectable with other normal already provided objects like dog, person, car etc.
What I basically want to achieve is to detect a man wearing a helmet and a safety jacket as 3 different objects:
1) helmet
2) jacket
3) person
Can I do it? Please let me know.
I can retrain the objects till 4000 iterations with good training data if your answer is yes(advice on how to select good training images would be great so that I have greater accuracy).
P.S - I will get a CUDA supported GPU soon.
Okay I will now try to train for 4000 images and 4000 iterations
@neospeed83 hi, Could you describe your idea of recognizing helmet and safety jacket please. For example, are you recognizing from video, how about the camera position, where did you get your dataset, etc? It'd be helpful for me. And we can collaborate for further improvements. You can reach me personally any time, thanks.
Hi, @neospeed83 I run into the same issue here. May I ask how did you make your custom model to detect provided objects, such as dog, car, and person?
Thanks!
How do I make my trained custom objects detectable with other normal already provided objects like dog, person, car etc.
What I basically want to achieve is to detect a man wearing a helmet and a safety jacket as 3 different objects:
- helmet
- jacket
- person
Can I do it? Please let me know.
Hi @tongxinw!
Hope this helps! Good luck with your model.
P.S. Sorry for not closing this issue earlier.