ultralytics / yolov5

YOLOv5 🚀 in PyTorch > ONNX > CoreML > TFLite
https://docs.ultralytics.com
GNU Affero General Public License v3.0
50.66k stars 16.33k forks source link

如何标注负样本,并且能够正常训练 #6201

Closed Wanghe1997 closed 2 years ago

Wanghe1997 commented 2 years ago

Search before asking

Question

您好,目前我们的模型yolov5m误检率较高,一是容易把背景检测为目标,二是容易把一些当前类别检测为其他容易混淆的类别。有什么建议吗? 请问如何把这些误检的图片标注为负样本,并能正常训练?负样本的生成是只需要生成一个和图片名一样的,空的txt文件吗?还是有其他的一些操作呢?谢谢

Additional

No response

zhiqwang commented 2 years ago

You can check the tips of datasets at https://docs.ultralytics.com/guides/model-training-tips/#dataset

No labels are required for background images.

As I remember, it's also OK if you set an empty file with the same name as the background images.

github-actions[bot] commented 2 years ago

👋 Hello, this issue has been automatically marked as stale because it has not had recent activity. Please note it will be closed if no further activity occurs.

Access additional YOLOv5 🚀 resources:

Access additional Ultralytics ⚡ resources:

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 YOLOv5 🚀 and Vision AI ⭐!

pderrenger commented 2 weeks ago

@zhiqwang to handle negative samples in YOLOv5, you can indeed use empty .txt files with the same name as your background images. This indicates no objects are present in those images. For more details, you can refer to the custom data tutorial.