preprocessing.ipynb script allows me to create the desired data/folder structure to use train.py
├── train_data
├── images
├── train
└── val
├── labels
├── train
└── val
I saved the google colab that I worked as a .ipynb, you can check baseball_ball_detection_w_yolov5.ipynb for that.
Here are some of the results of fine-tuning yolov5.
![]() |
---|
Ball Detection 1 |
![]() |
---|
Ball Detection 2 |
![]() |
---|
Ball Detection 3 |
![]() |
---|
Ball Detection 4 |
![]() |
---|
Results |
More results at results.zip
Python 3.8 or later with all requirements.txt dependencies installed, including torch>=1.7
. To install run:
$ pip install -r requirements.txt
- Train Custom Data 🚀 RECOMMENDED
- Weights & Biases Logging 🌟 NEW
- Multi-GPU Training
- PyTorch Hub ⭐ NEW
- ONNX and TorchScript Export
- Test-Time Augmentation (TTA)
- Model Ensembling
- Model Pruning/Sparsity
- Hyperparameter Evolution
- Transfer Learning with Frozen Layers ⭐ NEW
- TensorRT Deployment
Training times for YOLOv5s/m/l/x are 2/4/6/8 days on a single V100 (multi-GPU times faster). Use the largest --batch-size
your GPU allows (batch sizes shown for 16 GB devices).
$ python train.py --img 640 --batch 16 --epochs 50 --data baseball.yaml --weights yolov5s.pt --nosave --cache