yolov5
yolov5 copied to clipboard
Similar objects in object detection
Search before asking
- [X] I have searched the YOLOv5 issues and discussions and found no similar questions.
Question
Hi,
We are struggling with a situation regarding detecting objects that are similar with other objetcs. We are trying to detect smoke, but clouds are similar to it. We trained a model using only smoke images, but we are getting lots of false positives whenever we show the model clouds. We know that adding background images without labels can reduce false alarms. So, we tried to train again with background images (with clouds). However the confidence level dropped, and the metrics are worse compared with the model that only had smoke objects in the training. I have a theory that, since the smoke and clouds are very similar, we are teaching the model "contradictory" information. You see, in some frames we have clouds similar to smoke and the model is learning that smoke is smoke and "similar/identical to smoke" not smoke. Is this behaviour expected? Do you know how to tell the model to differentiate clouds from smoke?
Thanks
Additional
No response
@Pedro-Leitek hi there,
Great question! Differentiating between similar objects like smoke and clouds can indeed be challenging. Your observation about the model learning contradictory information is insightful. When you introduce negative examples (like clouds without labels), the model may struggle if the negative examples are too similar to the positive ones.
Here are a few suggestions to improve differentiation:
-
Fine-grained Labeling: If possible, label some cloud images as a separate class and retrain the model. This can help the model learn the subtle differences between smoke and clouds.
-
Data Augmentation: Use data augmentation techniques that emphasize the differences between smoke and clouds, such as varying the contrast or color balance.
-
Focused Dataset: Ensure your dataset for smoke is diverse and includes various smoke scenarios. This can help the model generalize better.
-
Post-processing: Implement post-processing steps that consider the context in which smoke typically appears, which might be different from clouds.
-
Transfer Learning: If you're not already, start with a pre-trained model on a large dataset and fine-tune on your specific smoke and cloud images.
-
Model Architecture: Experiment with different model architectures or hyperparameters that might be more sensitive to the features differentiating smoke from clouds.
Remember, it's a complex task, and improvements may come incrementally. Keep iterating on your dataset and model, and consider reaching out to the community for more ideas.
For more detailed guidance, please refer to our documentation at https://docs.ultralytics.com/yolov5/.
Best of luck with your model training! 🚀
— Glenn Jocher
👋 Hello there! We wanted to give you a friendly reminder that this issue has not had any recent activity and may be closed soon, but don't worry - you can always reopen it if needed. If you still have any questions or concerns, please feel free to let us know how we can help.
For additional resources and information, please see the links below:
- Docs: https://docs.ultralytics.com
- HUB: https://hub.ultralytics.com
- Community: https://community.ultralytics.com
Feel free to inform us of any other issues you discover or feature requests that come to mind in the future. Pull Requests (PRs) are also always welcomed!
Thank you for your contributions to YOLO 🚀 and Vision AI ⭐