英文:
The training results of YOLOv5 are marked incorrectly
问题
我是YOLOv5的初学者,正在训练一个自定义模型。
我使用Roboflow创建了一个数据集,其中包括一个包含2000张图片的训练集,一个包含183张图片的验证集,以及一个包含115张图片的测试集。
训练结果不理想,如下图所示,球杆位置总是明显偏差。我不知道为什么会发生这种情况,想知道是否有任何改进方法。
result1
\
result2
这是我在训练过程中使用的命令。
python train.py --img 416 --batch 32 --epochs 500 --data data.yaml --weights yolov5l.pt --cache
我尝试过使用其他YOLOv5模型,但结果仍然相同。我还不断地向数据集中添加数据,但结果没有改善。我想问问是否有人知道我应该继续训练,或者是否有其他方法可以改善结果?
以下是有关数据集的一些指标数据。虽然我有5类别,但在训练时我只使用了球杆和球这两个类别。
英文:
I am a beginner in YOLOv5, and I am training a custom model.
I used Roboflow to create a dataset, which includes a Training Set with 2,000 images, a Validation Set with 183 images, and a Testing Set with 115 images.
The results I get from training are not satisfactory, as seen in the image below, the position of the cueball is always significantly off. I don't know why this is happening and I am wondering if there are any ways to improve this.
result1
\
result2
This is the command I use during training.
python train.py --img 416 --batch 32 --epochs 500 --data data.yaml --weights yolov5l.pt --cache
I have tried using other YOLOv5 models, but the results are still the same. I have also continuously added data to my dataset, but there has been no improvement in the results. I would like to ask if anyone knows whether I should continue training or if there are other methods to improve the results?
The following are some indicator data about the dataset. Although I have 5 classes, I only used two of them, cue and cueball, during training.
答案1
得分: 1
球杆的位置实际上相当准确。如果您注意到实际球杆的边界框对于结果1有高置信度(0.76),对于结果2有0.82的置信度。其余的都是置信度较低的检测结果。从这两个图像来看,我猜测你的召回率非常高,但精度稍低。您可以应用更高的阈值(基本上是要过滤掉低于一定置信度的输出)。您可以设置一个默认阈值为0.5,然后根据您的用例测试它是否有效,然后根据您的需求降低或提高它。
英文:
The position of the cue ball is actually pretty spot on. If you notice the bounding box for the actual cue has a high confidence (0.76) for result 1 and 0.82 for result 2. And the rest are detections with low confidence. Judging from those two images, i guess that your recall is very high, but your precision is a bit low. You can apply a higher threshold (basically saying to filter out the ouputs under a certain confidence). You can set a default threshold of 0.5, and see if it works for your use case or not, then decrease it or increase it depending on what you want.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论