yolov3 icon indicating copy to clipboard operation
yolov3 copied to clipboard

Weights & Biases with YOLOv3 ⭐

Open glenn-jocher opened this issue 3 years ago • 3 comments

⭐ This guide explains how to use Weights & Biases (W&B) with YOLOv3.

About Weights & Biases

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:

Before You Start

Clone this repo and install requirements.txt dependencies, including Python>=3.8 and PyTorch>=1.7. Also install the W&B pip package wandb.

$ git clone https://github.com/ultralytics/yolov3  # clone repo
$ cd yolov3
$ pip install wandb -qr requirements.txt  # install dependencies

First-Time Setup

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 YOLOv3 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

Viewing Runs

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:

  • Training losses
  • Validation losses
  • Metrics: Precision, Recall, [email protected], [email protected]:0.95
  • Learning Rate over time
  • GPU: Type, GPU Utilization, power, temperature, CUDA memory usage
  • System: Disk I/0, CPU utilization, RAM memory usage
  • Environment: OS and Python types, Git repository and state, training command

Reports

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).

Environments

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

Status

CI CPU testing

If this badge is green, all YOLOv3 GitHub Actions Continuous Integration (CI) tests are currently passing. CI tests verify correct operation of YOLOv3 training (train.py), testing (test.py), inference (detect.py) and export (export.py) on MacOS, Windows, and Ubuntu every 24 hours and on every commit.

glenn-jocher avatar Nov 27 '20 12:11 glenn-jocher

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Dec 28 '20 00:12 github-actions[bot]

where can I insert the key? to be used by the train.py

Moh-Abdulkarim avatar Mar 29 '21 10:03 Moh-Abdulkarim

@ShahadBakhsh you can login to W&B like this, and you will be given a website to go to for your API key.

pip install wandb
wandb login

glenn-jocher avatar Mar 29 '21 11:03 glenn-jocher