Comments (6)
Hi @SwHaraday,
Thank you for sharing your observations! π
You bring up a valid point about the potential impact of Mosaic Augmentation on small defects. Indeed, when ground truth boxes are cut during augmentation, it can lead to unintended training data and over-detection issues.
To address this, you can modify the Mosaic Augmentation process to ensure that ground truth boxes remain intact. This can be done by adding a function to check and adjust the placement of boxes during augmentation.
Additionally, you might consider experimenting with other augmentation techniques or adjusting the augmentation parameters to better suit your specific use case.
Your insights are valuable to the community, and we appreciate your contribution!
from yolov5.
Hi @SwHaraday,
Thank you for sharing your implementation! π Your contribution is valuable, and it's great to see the community working together to solve common issues. Every improvement, no matter how small, helps us all move forward.
For anyone facing similar challenges, your solution could be a helpful resource. Keep up the great work!
from yolov5.
@AFallDay hello! π YOLOv5 can indeed be sensitive to the size of defects, especially very small or very large ones compared to the overall image size. To enhance sensitivity to defect sizes, consider the following:
-
Adjust Anchor Boxes: Customize anchor boxes to better match the typical sizes of defects in your dataset. This can be done by analyzing the distribution of defect sizes and adjusting the anchor box dimensions accordingly in the model's configuration.
-
Image Resolution: Training and inference with higher image resolutions can help in detecting smaller defects. You can adjust the
--img-size
parameter during training and detection to a higher value suitable for your needs. -
Data Augmentation: Use augmentation techniques that emphasize size variations, like scaling and cropping, to make the model more robust to different defect sizes.
-
Model Layers: Experiment with adding more layers or adjusting the depth of the network, as deeper networks might capture more detailed features, though at the cost of increased computational resources.
For more detailed guidance on customizing your model, you might find the documentation on model configuration and training tips helpful: https://docs.ultralytics.com/yolov5/.
Hope this helps! Let us know if you have any more questions.
from yolov5.
Hi,
If your deffects are small like 25x25 pixels in 640x640 image and have just slight defference from normal part, model tends to over-detect.
One possible reason is that Ground Truth Boxes are cut during Mosaic Augmentation and used as unintended training data.
In our case of surface deffect detection, I observed about 30% Ground Truth Boxes in trainig batch were cut and not as I anotated.
Model trained in default way works nice, but you may struggle with over detection.
You may need to add some function to keep Ground Truth Boxes as you intended during Mosaic Augmentation.
from yolov5.
Hi Glenn,
Thank you for reply. I never expected to have comment from you.
I hope this helps someone who has the same problem.
The implimentation is poor and childish, but at least it works.
https://github.com/SwHaraday/YOLOv5-dataloaders-for-industrial-purpose
from yolov5.
π 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 β
from yolov5.
Related Issues (20)
- hyp.finetune.yaml missing HOT 3
- Regarding the application establishment of preprocessing functions HOT 1
- Custom model exported to tfjs only outputs 100 detections
- Export torchscript with NMS HOT 1
- AttributeError: 'str' object has no attribute 'shape' HOT 3
- yolov5-pip forced boto3 consumption invalidates py3.7-9 support HOT 1
- Report errors while continuing training HOT 1
- RuntimeError: The size of tensor a (6) must match the size of tensor b (7) at non-singleton dimension 2 HOT 1
- RuntimeError: The size of tensor a (6) must match the size of tensor b (7) at non-singleton dimension 2 HOT 1
- Remove detection head HOT 2
- Issue regarding: "cannot identify image file '/content/drive/MyDrive/Data/test/images/00705.jpg'" HOT 5
- yolov5 / detect.py κ²°κ³Όλ₯Ό 10λΆμ£ΌκΈ°λ‘ μΆλ ₯νκ³ μΆμ΅λλ€ HOT 1
- How to training with EMA in model.train()? HOT 3
- close mosaic in yolov5 HOT 1
- Real time image recognition in Google Colab problem HOT 1
- εε²οΌ HOT 1
- yolov5s / detect.py/ μλ‘v5 κ²°κ³Όμ μ₯μ 10λΆμ νλ² νκ³ μΆμ΅λλ€ HOT 1
- about save-txt in yolov5-seg HOT 5
- I want to know whether there is a yolov5s uses Relu train on Coco. HOT 1
- WARNING β οΈ NMS time limit 0.340s exceeded HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from yolov5.