YOLOv5 ↗
noOriginal Documentation
Documentation Index#
Fetch the complete documentation index at: https://docs.wandb.ai/llms.txt Use this file to discover all available pages before exploring further.
export const ColabLink = ({url}) => Try in Colab ;
Ultralytics’ YOLOv5 (“You Only Look Once”) model family enables real-time object detection with convolutional neural networks without all the agonizing pain.
W&B is directly integrated into YOLOv5, providing experiment metric tracking, model and dataset versioning, rich model prediction visualization, and more. It’s as easy as running a single pip install before you run your YOLO experiments.
All W&B logging features are compatible with data-parallel multi-GPU training, such as with PyTorch DDP.
Track core experiments#
Simply by installing wandb, you’ll activate the built-in W&B logging features: system metrics, model metrics, and media logged to interactive Dashboards.
pip install wandb
git clone https://github.com/ultralytics/yolov5.git
python yolov5/train.py # train a small network on a small datasetJust follow the links printed to the standard out by wandb.
Customize the integration#
By passing a few simple command line arguments to YOLO, you can take advantage of even more W&B features.
- If you pass a number to
--save_period, W&B saves a model version at the end of everysave_periodepochs. The model version includes the model weights and tags the best-performing model in the validation set. - Turning on the
--upload_datasetflag will also upload the dataset for data versioning. - Passing a number to
--bbox_intervalwill turn on data visualization. At the end of everybbox_intervalepochs, the outputs of the model on the validation set will be uploaded to W&B.
python yolov5/train.py --epochs 20 --save_period 1
```
<span class="tab-end"></span>
<span class="tab-start" data-tab-title="Model Versioning and Data Visualization"></span>
```python
python yolov5/train.py --epochs 20 --save_period 1 \
--upload_dataset --bbox_interval 1
```
<span class="tab-end"></span>
<span class="tab-group-end"></span>
<span class="callout-start" data-callout-type="note"></span>
Every W\&B account comes with 100 GB of free storage for datasets and models.
<span class="callout-end"></span>
Here's what that looks like.
<img src="https://mintcdn.com/wb-21fd5541/w-lBKSCruauC3-2f/images/integrations/yolov5_model_versioning.png?fit=max&auto=format&n=w-lBKSCruauC3-2f&q=85&s=3a25b11f41892c377508bc0fb6969485" alt="Model versioning" data-og-width="852" width="852" data-og-height="328" height="328" data-path="images/integrations/yolov5_model_versioning.png" data-optimize="true" data-opv="3" srcset="https://mintcdn.com/wb-21fd5541/w-lBKSCruauC3-2f/images/integrations/yolov5_model_versioning.png?w=280&fit=max&auto=format&n=w-lBKSCruauC3-2f&q=85&s=e8247d38045bf5d72a272067b2327be8 280w, https://mintcdn.com/wb-21fd5541/w-lBKSCruauC3-2f/images/integrations/yolov5_model_versioning.png?w=560&fit=max&auto=format&n=w-lBKSCruauC3-2f&q=85&s=8ce5d8709e61c8a4787b8c0ce9c57890 560w, https://mintcdn.com/wb-21fd5541/w-lBKSCruauC3-2f/images/integrations/yolov5_model_versioning.png?w=840&fit=max&auto=format&n=w-lBKSCruauC3-2f&q=85&s=bf68b2b631b11f3997916ee80b3aedda 840w, https://mintcdn.com/wb-21fd5541/w-lBKSCruauC3-2f/images/integrations/yolov5_model_versioning.png?w=1100&fit=max&auto=format&n=w-lBKSCruauC3-2f&q=85&s=947af3ee8577750a2ea4637f680e7281 1100w, https://mintcdn.com/wb-21fd5541/w-lBKSCruauC3-2f/images/integrations/yolov5_model_versioning.png?w=1650&fit=max&auto=format&n=w-lBKSCruauC3-2f&q=85&s=c627a39cc0e75a268fc3863026a5d1d1 1650w, https://mintcdn.com/wb-21fd5541/w-lBKSCruauC3-2f/images/integrations/yolov5_model_versioning.png?w=2500&fit=max&auto=format&n=w-lBKSCruauC3-2f&q=85&s=3c6e9deb905da18ee789e2f45f1f5337 2500w" />
<img src="https://mintcdn.com/wb-21fd5541/w-lBKSCruauC3-2f/images/integrations/yolov5_data_visualization.png?fit=max&auto=format&n=w-lBKSCruauC3-2f&q=85&s=c3985f3851ac8af2ddac95561e8e5715" alt="Data visualization" data-og-width="1277" width="1277" data-og-height="736" height="736" data-path="images/integrations/yolov5_data_visualization.png" data-optimize="true" data-opv="3" srcset="https://mintcdn.com/wb-21fd5541/w-lBKSCruauC3-2f/images/integrations/yolov5_data_visualization.png?w=280&fit=max&auto=format&n=w-lBKSCruauC3-2f&q=85&s=5769afa160d1d29fd6d6b1eaa840f5ce 280w, https://mintcdn.com/wb-21fd5541/w-lBKSCruauC3-2f/images/integrations/yolov5_data_visualization.png?w=560&fit=max&auto=format&n=w-lBKSCruauC3-2f&q=85&s=5928e9f2f01a5eb63bb4051e8ad4cba9 560w, https://mintcdn.com/wb-21fd5541/w-lBKSCruauC3-2f/images/integrations/yolov5_data_visualization.png?w=840&fit=max&auto=format&n=w-lBKSCruauC3-2f&q=85&s=2a44030099e3f40f56983d01c08e8cf6 840w, https://mintcdn.com/wb-21fd5541/w-lBKSCruauC3-2f/images/integrations/yolov5_data_visualization.png?w=1100&fit=max&auto=format&n=w-lBKSCruauC3-2f&q=85&s=cd71bfa49df430723b272938875744c1 1100w, https://mintcdn.com/wb-21fd5541/w-lBKSCruauC3-2f/images/integrations/yolov5_data_visualization.png?w=1650&fit=max&auto=format&n=w-lBKSCruauC3-2f&q=85&s=42f4c612867a64422ba61f0df8d4290d 1650w, https://mintcdn.com/wb-21fd5541/w-lBKSCruauC3-2f/images/integrations/yolov5_data_visualization.png?w=2500&fit=max&auto=format&n=w-lBKSCruauC3-2f&q=85&s=280aedf854445cce15aecc5795946cc8 2500w" />
<span class="callout-start" data-callout-type="note"></span>
With data and model versioning, you can resume paused or crashed experiments from any device, no setup necessary. Check out [the Colab ](https://wandb.me/yolo-colab) for details.
<span class="callout-end"></span>