๐ This guide explains how to use Weights & Biases (W&B) with YOLOv5.
Think of W&B like GitHub for machine learning models. With a few lines of code, save everything you need to debug, compare and reproduce your models โ architecture, hyperparameters, git commits, model weights, GPU usage, and even datasets and predictions.
W&Bโs lightweight integrations work with any Python script, and you can sign up for a free account and start tracking and visualizing models in 5 minutes.
Used by top researchers including teams at OpenAI, Lyft, Github, and MILA, W&B is part of the new standard of best practices for machine learning. How W&B can help you optimize your machine learning workflows:
Clone this repo and install requirements.txt dependencies, including Python>=3.8 and PyTorch>=1.6. Also install the W&B pip package wandb.
$ git clone https://github.com/ultralytics/yolov5 # clone repo
$ cd yolov5
$ pip install wandb -qr requirements.txt # install dependencies
When you first train, W&B will prompt you to create a new account. Afterwards you are given an API key (you can retrieve your key from https://wandb.ai/authorize), and then this key is used to tell W&B where to log your data. You only need to supply your key once, and then it is remembered on the same device.
W&B will create a cloud Project called YOLOv5 for your training runs, and each new training run will be provided a unique run name. You can also set a run name manually using
$ python train.py --logdir my_run_name

Run information streams from your environment to the W&B cloud console as you train. This allows you to monitor and even cancel runs in realtime. All important information is logged:

W&B Reports can be created from your saved runs for sharing online. Once a report is created you will receive a link you can use to publically share your results. Here is an example report created from the COCO128 tutorial trainings of all four YOLOv5 models (link).

YOLOv5 may be run in any of the following up-to-date verified environments (with all dependencies including CUDA/CUDNN, Python and PyTorch preinstalled):
Really cool, I suffer from delaying update due to the google drive file system on Colab. Can't wait to try this method.
@ChristopherSTAN yes, this is similar to the Google Drive with Colab trick you discovered earlier. It adds a few useful features also like public sharing of your runs, and GPU monitoring:

And also good metadata saving, allowing for better reproducibility:

@ChristopherSTAN yes, this is similar to the Google Drive with Colab trick you discovered earlier. It adds a few useful features also like public sharing of your runs, and GPU monitoring:
And also good metadata saving, allowing for better reproducibility:
A stupid question. How can you produce the picture with shadow, it looks elegant.
@bamboosdu It is a screenshot with extra white background. Shadow is already included.
@sithu31296 yes, you to take the screenshot at just the right time of day to get the correct shadow.
Hello @glenn-jocher, and thanks for this really useful tool.
I face two issues though :
The only think i could think of regarding these issues is that i am still running my trainings under Python 3.6.5 that, if i'm not mistaken, was still recent enough a few weeks back.
What do you think ?
Thanks in advance !
J.
@codename5281 default directories have been updated in _Unified '/project/name' results saving_ #1377. See Custom Training Tutorial and Colab notebook for new examples.
https://github.com/ultralytics/yolov5#tutorials
Most helpful comment
@sithu31296 yes, you to take the screenshot at just the right time of day to get the correct shadow.