yolov3
yolov3 copied to clipboard
Weights & Biases with YOLOv3 ⭐
⭐ 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:
- Debug model performance in real time
- GPU usage, visualized automatically
- Custom charts for powerful, extensible visualization
- Share insights interactively with collaborators
- Optimize hyperparameters efficiently
- Track datasets, pipelines, and production models
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
![](https://user-images.githubusercontent.com/26833433/98183367-4acbc600-1f08-11eb-9a23-7266a4192355.jpg)
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
![](https://user-images.githubusercontent.com/26833433/98184457-bd3da580-1f0a-11eb-8461-95d908a71893.jpg)
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).
![](https://user-images.githubusercontent.com/26833433/98185222-794ba000-1f0c-11eb-850f-3e9c45ad6949.jpg)
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):
-
Google Colab Notebook with free GPU:
- Kaggle Notebook with free GPU: https://www.kaggle.com/ultralytics/yolov3
- Google Cloud Deep Learning VM. See GCP Quickstart Guide
-
Docker Image https://hub.docker.com/r/ultralytics/yolov3. See Docker Quickstart Guide
Status
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.
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.
where can I insert the key? to be used by the train.py
@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