ultralytics / yolov5

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

Using yolov5(m) to train custom data, resulting in high misidentification #8964

Closed qybing closed 2 years ago

qybing commented 2 years ago

Search before asking

Question

Using yolov5(m) to train custom data, resulting in high misidentification, do you have any good suggestions?

Additional

no

github-actions[bot] commented 2 years ago

👋 Hello @qybing, thank you for your interest in YOLOv5 🚀! Please visit our ⭐️ Tutorials to get started, where you can find quickstart guides for simple tasks like Custom Data Training all the way to advanced concepts like Hyperparameter Evolution.

If this is a 🐛 Bug Report, please provide screenshots and minimum viable code to reproduce your issue, otherwise we can not help you.

If this is a custom training ❓ Question, please provide as much information as possible, including dataset images, training logs, screenshots, and a public link to online W&B logging if available.

For business inquiries or professional support requests please visit https://ultralytics.com or email support@ultralytics.com.

Requirements

Python>=3.7.0 with all requirements.txt installed including PyTorch>=1.7. To get started:

git clone https://github.com/ultralytics/yolov5  # clone
cd yolov5
pip install -r requirements.txt  # install

Environments

YOLOv5 may be run in any of the following up-to-date verified environments (with all dependencies including CUDA/CUDNN, Python and PyTorch preinstalled):

Status

CI CPU testing

If this badge is green, all YOLOv5 GitHub Actions Continuous Integration (CI) tests are currently passing. CI tests verify correct operation of YOLOv5 training (train.py), validation (val.py), inference (detect.py) and export (export.py) on macOS, Windows, and Ubuntu every 24 hours and on every commit.

MartinPedersenpp commented 2 years ago

Add more training data perhaps? I think you need to provide some more information about what you are training to detect and how big your dataset is before anyone can help you.

qybing commented 2 years ago

👋你好@qybing,感谢您对YOLOv5的关注🚀!请访问我们的⭐️ 入门教程,您可以在其中找到自定义数据训练等简单任务的快速入门指南,一直到超参数进化等高级概念。

如果这是一个🐛错误报告,请提供截图和最小可行代码来重现您的问题,否则我们无法帮助您。

如果这是自定义培训❓问题,请提供尽可能多的信息,包括数据集图像、训练日志、屏幕截图以及在线W&B 日志记录的公共链接(如果有)。

有关业务查询或专业支持请求,请访问https://ultralytics.com或发送电子邮件至support@ultralytics.com

要求

Python>=3.7.0安装了所有requirements.txt,包括PyTorch>=1.7。开始:

git clone https://github.com/ultralytics/yolov5  # clone
cd yolov5
pip install -r requirements.txt  # install

环境

YOLOv5 可以在以下任何经过验证的最新环境中运行(预装所有依赖项,包括CUDA / CUDNNPythonPyTorch):

地位

CI CPU 测试

如果此标志为绿色,则所有YOLOv5 GitHub Actions持续集成 (CI) 测试当前均通过。CI 测试每 24 小时在 macOS、Windows 和 Ubuntu 上验证YOLOv5 训练 ( train.py )、验证 ( val.py )、推理 ( detect.py ) 和导出 ( export.py ) 的正确操作,并在每次提交时验证一次。 I sent you an email

glenn-jocher commented 2 years ago

@qybing 👋 Hello! Thanks for asking about improving YOLOv5 🚀 training results.

Most of the time good results can be obtained with no changes to the models or training settings, provided your dataset is sufficiently large and well labelled. If at first you don't get good results, there are steps you might be able to take to improve, but we always recommend users first train with all default settings before considering any changes. This helps establish a performance baseline and spot areas for improvement.

If you have questions about your training results we recommend you provide the maximum amount of information possible if you expect a helpful response, including results plots (train losses, val losses, P, R, mAP), PR curve, confusion matrix, training mosaics, test results and dataset statistics images such as labels.png. All of these are located in your project/name directory, typically yolov5/runs/train/exp.

We've put together a full guide for users looking to get the best results on their YOLOv5 trainings below.

Dataset

COCO Analysis

Model Selection

Larger models like YOLOv5x and YOLOv5x6 will produce better results in nearly all cases, but have more parameters, require more CUDA memory to train, and are slower to run. For mobile deployments we recommend YOLOv5s/m, for cloud deployments we recommend YOLOv5l/x. See our README table for a full comparison of all models.

YOLOv5 Models

Training Settings

Before modifying anything, first train with default settings to establish a performance baseline. A full list of train.py settings can be found in the train.py argparser.

Further Reading

If you'd like to know more a good place to start is Karpathy's 'Recipe for Training Neural Networks', which has great ideas for training that apply broadly across all ML domains: http://karpathy.github.io/2019/04/25/recipe/

Good luck 🍀 and let us know if you have any other questions!

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 ⭐!