ultralytics / ultralytics

NEW - YOLOv8 🚀 in PyTorch > ONNX > OpenVINO > CoreML > TFLite
https://docs.ultralytics.com
GNU Affero General Public License v3.0
28.53k stars 5.67k forks source link

YOLOv8 stop without reporting an error #13009

Closed zekien closed 3 months ago

zekien commented 4 months ago

Search before asking

Question

20240522-123410 20240522-123419

Use this command (yolo detect train data=D:\animal_target model=yolov8x-cls.pt epochs=100 imgsz=640 cache=ram) batch=12) to train wildlife photos, the total number of photos is more than a dozen, why does it stop without reporting an error?

Additional

No response

github-actions[bot] commented 4 months ago

👋 Hello @MaDingK, thank you for your interest in Ultralytics YOLOv8 🚀! We recommend a visit to the Docs for new users where you can find many Python and CLI usage examples and where many of the most common questions may already be answered.

If this is a 🐛 Bug Report, please provide a minimum reproducible example to help us debug it.

If this is a custom training ❓ Question, please provide as much information as possible, including dataset image examples and training logs, and verify you are following our Tips for Best Training Results.

Join the vibrant Ultralytics Discord 🎧 community for real-time conversations and collaborations. This platform offers a perfect space to inquire, showcase your work, and connect with fellow Ultralytics users.

Install

Pip install the ultralytics package including all requirements in a Python>=3.8 environment with PyTorch>=1.8.

pip install ultralytics

Environments

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

Status

Ultralytics CI

If this badge is green, all Ultralytics CI tests are currently passing. CI tests verify correct operation of all YOLOv8 Modes and Tasks on macOS, Windows, and Ubuntu every 24 hours and on every commit.

glenn-jocher commented 3 months ago

Hello! Thanks for reaching out. It seems like your training might be stopping due to insufficient data. YOLOv8 typically requires a larger dataset to effectively train without issues. A dozen photos might not be enough, which could potentially cause the training to halt unexpectedly.

To troubleshoot, you could try the following:

  1. Increase your dataset size significantly.
  2. Monitor system resources (like GPU and RAM usage) during training to check if there's a resource bottleneck.
  3. Run with a smaller batch_size or lower imgsz to reduce memory demand.

Here's a modified command to try with a smaller batch size:

yolo detect train data=D:\\animal_target model=yolov8x-cls.pt epochs=100 imgsz=640 cache=ram batch=4

If the issue persists, please provide any logs or error messages that might appear in your console. This will help in diagnosing the problem more effectively. 🛠️

zekien commented 3 months ago

Thank you for your reply, the problem has been solved, thank you

glenn-jocher commented 3 months ago

Great to hear that your issue is resolved! If you have any more questions in the future, feel free to reach out. Happy coding! 😊