ultralytics / yolov5

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

Why is there a sudden drop in accuracy? #13422

Open lqh964165950 opened 23 hours ago

lqh964165950 commented 23 hours ago

Search before asking

Question

I have made some improvements in yolov5, but when training the improved model,sometimes there is a sudden drop in mAP50, precision and recall.I want to know why this happend. ![Uploading 曲线.png…]()

Additional

No response

UltralyticsAssistant commented 23 hours ago

👋 Hello @lqh964165950, thank you for reaching out about YOLOv5 🚀! This is an automated response to help guide you through resolving your issue. An Ultralytics engineer will also assist you soon.

For your question regarding the sudden drop in mAP50, precision, and recall, here are some general considerations:

Requirements

Ensure you have Python>=3.8.0 installed and all necessary dependencies are included as per the requirements for YOLOv5.

Environments

YOLOv5 can run in multiple environments, such as Notebooks with free GPU, Google Cloud Deep Learning VMs, Amazon Deep Learning AMIs, or using the Docker Image.

Status

Check the YOLOv5 CI (Continuous Integration) tests to ensure all operations like training, validation, inference, export, and benchmarks are functioning correctly. These tests occur every 24 hours and on every commit across different operating systems such as macOS, Windows, and Ubuntu.

Feel free to follow these steps, and let us know if you need more specific support based on your detailed findings! 😊

lqh964165950 commented 22 hours ago

plot

pderrenger commented 8 hours ago

@lqh964165950 a sudden drop in mAP, precision, and recall during training can be due to several factors such as changes in dataset quality, learning rate fluctuations, or model overfitting. Ensure your dataset annotations are accurate and consistent. You might also want to experiment with different learning rates or utilize techniques like data augmentation to improve model generalization. If the issue persists, consider using pretrained weights as a starting point to stabilize training. You can find more details on these topics in the YOLO Common Issues guide.

lqh964165950 commented 4 hours ago

Since I am utilizing the public dataset VisDrone, I believe the dataset itself is not the source of the issue. Assuming the problem lies in model overfitting, how can I address this? Additionally, I would like to inquire whether running multiple tasks on the same GPU could be a factor. I've observed that when a server executes only one task, the recall rate remains normal. However, when other tasks are also run on the server, the recall rate drops rapidly, even nearing zero.

lqh964165950 commented 4 hours ago

Snipaste_2024-11-20_17-10-17