ultralytics / yolov5

YOLOv5 πŸš€ in PyTorch > ONNX > CoreML > TFLite
https://docs.ultralytics.com
GNU Affero General Public License v3.0
50.12k stars 16.19k forks source link

How to improve the accuracy of some of the 80 classes for YoloV5? #10938

Closed MarcoPrassel closed 1 year ago

MarcoPrassel commented 1 year ago

Search before asking

Question

I would like to have better accuracy for the bus and person classes of the COCO Dataset. I am using yolov5m network, I would not like to use other types of network like yolovx because they are not good for performance. Can samples be added to improve accuracy without doing retraining from scratch ? What’s the best way to do it? p.s: I collected a lot of new images with persons and bus.

Additional

No response

github-actions[bot] commented 1 year ago

πŸ‘‹ Hello @MarcoPrassel, 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

YOLOv5 CI

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

sunling583 commented 1 year ago

I am in a smilar situation where I am trying to obtain better accuracy for the 'sports ball' class. Are there any technques for custom training that could probably make use of the pretrained knowledge of 'sports ball', rather than train a new detection class from scratch? Thanks for any advice.

github-actions[bot] commented 1 year 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 ⭐!

glenn-jocher commented 10 months ago

@sunling583 you can improve accuracy for specific classes via transfer learning. You can initiate training from a pretrained model such as YOLOv3 or YOLOv4 before continuing with your custom dataset. Additionally, you can further optimize your model using the COCO pretraining by adding your labeled sports ball images to the preexisting COCO dataset. This could help refine 'sports ball' detection without training from scratch. For more specifics, check out the Ultralytics documentation. Good luck!