Update Loggers (#9760)
* Update * Update tutorial.ipynb Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com> * Update tutorial.ipynb Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com> * Update tutorial.ipynb Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com> * Update requirements.txt Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com> * Update * Update README.md Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com> * Update Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>pull/9792/head
parent
2f1eb21ad6
commit
7a69035eb8
16
README.md
16
README.md
|
@ -155,7 +155,6 @@ python train.py --data coco.yaml --cfg yolov5n.yaml --weights '' --batch-size 12
|
||||||
- [Hyperparameter Evolution](https://github.com/ultralytics/yolov5/issues/607)
|
- [Hyperparameter Evolution](https://github.com/ultralytics/yolov5/issues/607)
|
||||||
- [Transfer Learning with Frozen Layers](https://github.com/ultralytics/yolov5/issues/1314)
|
- [Transfer Learning with Frozen Layers](https://github.com/ultralytics/yolov5/issues/1314)
|
||||||
- [Architecture Summary](https://github.com/ultralytics/yolov5/issues/6998) 🌟 NEW
|
- [Architecture Summary](https://github.com/ultralytics/yolov5/issues/6998) 🌟 NEW
|
||||||
- [Weights & Biases Logging](https://github.com/ultralytics/yolov5/issues/1289)
|
|
||||||
- [Roboflow for Datasets, Labeling, and Active Learning](https://github.com/ultralytics/yolov5/issues/4975) 🌟 NEW
|
- [Roboflow for Datasets, Labeling, and Active Learning](https://github.com/ultralytics/yolov5/issues/4975) 🌟 NEW
|
||||||
- [ClearML Logging](https://github.com/ultralytics/yolov5/tree/master/utils/loggers/clearml) 🌟 NEW
|
- [ClearML Logging](https://github.com/ultralytics/yolov5/tree/master/utils/loggers/clearml) 🌟 NEW
|
||||||
- [Deci Platform](https://github.com/ultralytics/yolov5/wiki/Deci-Platform) 🌟 NEW
|
- [Deci Platform](https://github.com/ultralytics/yolov5/wiki/Deci-Platform) 🌟 NEW
|
||||||
|
@ -171,23 +170,20 @@ python train.py --data coco.yaml --cfg yolov5n.yaml --weights '' --batch-size 12
|
||||||
<div align="center">
|
<div align="center">
|
||||||
<a href="https://bit.ly/yolov5-readme-comet">
|
<a href="https://bit.ly/yolov5-readme-comet">
|
||||||
<img src="https://github.com/ultralytics/yolov5/releases/download/v1.0/logo-comet.png" width="10%" /></a>
|
<img src="https://github.com/ultralytics/yolov5/releases/download/v1.0/logo-comet.png" width="10%" /></a>
|
||||||
<img src="https://github.com/ultralytics/assets/raw/master/social/logo-transparent.png" width="9%" height="0" alt="" />
|
<img src="https://github.com/ultralytics/assets/raw/master/social/logo-transparent.png" width="15%" height="0" alt="" />
|
||||||
<a href="https://bit.ly/yolov5-deci-platform">
|
<a href="https://bit.ly/yolov5-deci-platform">
|
||||||
<img src="https://github.com/ultralytics/yolov5/releases/download/v1.0/logo-deci.png" width="10%" /></a>
|
<img src="https://github.com/ultralytics/yolov5/releases/download/v1.0/logo-deci.png" width="10%" /></a>
|
||||||
<img src="https://github.com/ultralytics/assets/raw/master/social/logo-transparent.png" width="9%" height="0" alt="" />
|
<img src="https://github.com/ultralytics/assets/raw/master/social/logo-transparent.png" width="15%" height="0" alt="" />
|
||||||
<a href="https://cutt.ly/yolov5-readme-clearml">
|
<a href="https://cutt.ly/yolov5-readme-clearml">
|
||||||
<img src="https://github.com/ultralytics/yolov5/releases/download/v1.0/logo-clearml.png" width="10%" /></a>
|
<img src="https://github.com/ultralytics/yolov5/releases/download/v1.0/logo-clearml.png" width="10%" /></a>
|
||||||
<img src="https://github.com/ultralytics/assets/raw/master/social/logo-transparent.png" width="9%" height="0" alt="" />
|
<img src="https://github.com/ultralytics/assets/raw/master/social/logo-transparent.png" width="15%" height="0" alt="" />
|
||||||
<a href="https://roboflow.com/?ref=ultralytics">
|
<a href="https://roboflow.com/?ref=ultralytics">
|
||||||
<img src="https://github.com/ultralytics/yolov5/releases/download/v1.0/logo-roboflow.png" width="10%" /></a>
|
<img src="https://github.com/ultralytics/yolov5/releases/download/v1.0/logo-roboflow.png" width="10%" /></a>
|
||||||
<img src="https://github.com/ultralytics/assets/raw/master/social/logo-transparent.png" width="9%" height="0" alt="" />
|
|
||||||
<a href="https://wandb.ai/site?utm_campaign=repo_yolo_readme">
|
|
||||||
<img src="https://github.com/ultralytics/yolov5/releases/download/v1.0/logo-wb.png" width="10%" /></a>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|Comet ⭐ NEW|Deci ⭐ NEW|ClearML ⭐ NEW|Roboflow|Weights & Biases
|
|Comet ⭐ NEW|Deci ⭐ NEW|ClearML ⭐ NEW|Roboflow|
|
||||||
|:-:|:-:|:-:|:-:|:-:|
|
|:-:|:-:|:-:|:-:|
|
||||||
|Visualize model metrics and predictions and upload models and datasets in realtime with [Comet](https://bit.ly/yolov5-readme-comet)|Automatically compile and quantize YOLOv5 for better inference performance in one click at [Deci](https://bit.ly/yolov5-deci-platform)|Automatically track, visualize and even remotely train YOLOv5 using [ClearML](https://cutt.ly/yolov5-readme-clearml) (open-source!)|Label and export your custom datasets directly to YOLOv5 for training with [Roboflow](https://roboflow.com/?ref=ultralytics) |Automatically track and visualize all your YOLOv5 training runs in the cloud with [Weights & Biases](https://wandb.ai/site?utm_campaign=repo_yolo_readme)
|
|Visualize model metrics and predictions and upload models and datasets in realtime with [Comet](https://bit.ly/yolov5-readme-comet)|Automatically compile and quantize YOLOv5 for better inference performance in one click at [Deci](https://bit.ly/yolov5-deci-platform)|Automatically track, visualize and even remotely train YOLOv5 using [ClearML](https://cutt.ly/yolov5-readme-clearml) (open-source!)|Label and export your custom datasets directly to YOLOv5 for training with [Roboflow](https://roboflow.com/?ref=ultralytics)|
|
||||||
|
|
||||||
|
|
||||||
## <div align="center">Why YOLOv5</div>
|
## <div align="center">Why YOLOv5</div>
|
||||||
|
|
|
@ -16,8 +16,8 @@ tqdm>=4.64.0
|
||||||
|
|
||||||
# Logging -------------------------------------
|
# Logging -------------------------------------
|
||||||
tensorboard>=2.4.1
|
tensorboard>=2.4.1
|
||||||
# wandb
|
|
||||||
# clearml
|
# clearml
|
||||||
|
# comet
|
||||||
|
|
||||||
# Plotting ------------------------------------
|
# Plotting ------------------------------------
|
||||||
pandas>=1.1.4
|
pandas>=1.1.4
|
||||||
|
|
|
@ -655,7 +655,7 @@
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"source": [
|
"source": [
|
||||||
"#@title Select YOLOv5 🚀 logger {run: 'auto'}\n",
|
"#@title Select YOLOv5 🚀 logger {run: 'auto'}\n",
|
||||||
"logger = 'TensorBoard' #@param ['TensorBoard', 'Comet', 'ClearML', 'W&B']\n",
|
"logger = 'TensorBoard' #@param ['TensorBoard', 'Comet', 'ClearML']\n",
|
||||||
"\n",
|
"\n",
|
||||||
"if logger == 'TensorBoard':\n",
|
"if logger == 'TensorBoard':\n",
|
||||||
" %load_ext tensorboard\n",
|
" %load_ext tensorboard\n",
|
||||||
|
@ -664,10 +664,7 @@
|
||||||
" %pip install -q comet_ml\n",
|
" %pip install -q comet_ml\n",
|
||||||
" import comet_ml; comet_ml.init()\n",
|
" import comet_ml; comet_ml.init()\n",
|
||||||
"elif logger == 'ClearML':\n",
|
"elif logger == 'ClearML':\n",
|
||||||
" %pip install -q clearml && clearml-init\n",
|
" %pip install -q clearml && clearml-init"
|
||||||
"elif logger == 'W&B':\n",
|
|
||||||
" %pip install -q wandb\n",
|
|
||||||
" import wandb; wandb.login()"
|
|
||||||
],
|
],
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"id": "i3oKtE4g-aNn"
|
"id": "i3oKtE4g-aNn"
|
||||||
|
@ -699,7 +696,7 @@
|
||||||
"YOLOv5 🚀 v6.2-56-g30e674b Python-3.7.13 torch-1.12.1+cu113 CUDA:0 (Tesla V100-SXM2-16GB, 16160MiB)\n",
|
"YOLOv5 🚀 v6.2-56-g30e674b Python-3.7.13 torch-1.12.1+cu113 CUDA:0 (Tesla V100-SXM2-16GB, 16160MiB)\n",
|
||||||
"\n",
|
"\n",
|
||||||
"\u001b[34m\u001b[1mhyperparameters: \u001b[0mlr0=0.01, lrf=0.01, momentum=0.937, weight_decay=0.0005, warmup_epochs=3.0, warmup_momentum=0.8, warmup_bias_lr=0.1, box=0.05, cls=0.5, cls_pw=1.0, obj=1.0, obj_pw=1.0, iou_t=0.2, anchor_t=4.0, fl_gamma=0.0, hsv_h=0.015, hsv_s=0.7, hsv_v=0.4, degrees=0.0, translate=0.1, scale=0.5, shear=0.0, perspective=0.0, flipud=0.0, fliplr=0.5, mosaic=1.0, mixup=0.0, copy_paste=0.0\n",
|
"\u001b[34m\u001b[1mhyperparameters: \u001b[0mlr0=0.01, lrf=0.01, momentum=0.937, weight_decay=0.0005, warmup_epochs=3.0, warmup_momentum=0.8, warmup_bias_lr=0.1, box=0.05, cls=0.5, cls_pw=1.0, obj=1.0, obj_pw=1.0, iou_t=0.2, anchor_t=4.0, fl_gamma=0.0, hsv_h=0.015, hsv_s=0.7, hsv_v=0.4, degrees=0.0, translate=0.1, scale=0.5, shear=0.0, perspective=0.0, flipud=0.0, fliplr=0.5, mosaic=1.0, mixup=0.0, copy_paste=0.0\n",
|
||||||
"\u001b[34m\u001b[1mWeights & Biases: \u001b[0mrun 'pip install wandb' to automatically track and visualize YOLOv5 🚀 runs in Weights & Biases\n",
|
"\u001b[34m\u001b[1mComet: \u001b[0mrun 'pip install comet' to automatically track and visualize YOLOv5 🚀 runs with Comet\n",
|
||||||
"\u001b[34m\u001b[1mClearML: \u001b[0mrun 'pip install clearml' to automatically track, visualize and remotely train YOLOv5 🚀 in ClearML\n",
|
"\u001b[34m\u001b[1mClearML: \u001b[0mrun 'pip install clearml' to automatically track, visualize and remotely train YOLOv5 🚀 in ClearML\n",
|
||||||
"\u001b[34m\u001b[1mTensorBoard: \u001b[0mStart with 'tensorboard --logdir runs/train', view at http://localhost:6006/\n",
|
"\u001b[34m\u001b[1mTensorBoard: \u001b[0mStart with 'tensorboard --logdir runs/train', view at http://localhost:6006/\n",
|
||||||
"\n",
|
"\n",
|
||||||
|
@ -905,22 +902,6 @@
|
||||||
"id": "Lay2WsTjNJzP"
|
"id": "Lay2WsTjNJzP"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"cell_type": "markdown",
|
|
||||||
"metadata": {
|
|
||||||
"id": "DLI1JmHU7B0l"
|
|
||||||
},
|
|
||||||
"source": [
|
|
||||||
"## Weights & Biases Logging\n",
|
|
||||||
"\n",
|
|
||||||
"[Weights & Biases](https://wandb.ai/site?utm_campaign=repo_yolo_notebook) (W&B) is integrated with YOLOv5 for real-time visualization and cloud logging of training runs. This allows for better run comparison and introspection, as well improved visibility and collaboration for teams. To enable W&B `pip install wandb`, and then train normally (you will be guided through setup on first use). \n",
|
|
||||||
"\n",
|
|
||||||
"During training you will see live updates at [https://wandb.ai/home](https://wandb.ai/home?utm_campaign=repo_yolo_notebook), and you can create and share detailed [Reports](https://wandb.ai/glenn-jocher/yolov5_tutorial/reports/YOLOv5-COCO128-Tutorial-Results--VmlldzozMDI5OTY) of your results. For more information see the [YOLOv5 Weights & Biases Tutorial](https://github.com/ultralytics/yolov5/issues/1289). \n",
|
|
||||||
"\n",
|
|
||||||
"<a href=\"https://wandb.ai/glenn-jocher/yolov5_tutorial\">\n",
|
|
||||||
"<img alt=\"Weights & Biases dashboard\" src=\"https://user-images.githubusercontent.com/26833433/182482859-288a9622-4661-48db-99de-650d1dead5c6.jpg\" width=\"1280\"/></a>"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"cell_type": "markdown",
|
"cell_type": "markdown",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
|
|
|
@ -16,7 +16,7 @@ RUN apt update && apt install --no-install-recommends -y zip htop screen libgl1-
|
||||||
COPY requirements.txt .
|
COPY requirements.txt .
|
||||||
RUN python -m pip install --upgrade pip wheel
|
RUN python -m pip install --upgrade pip wheel
|
||||||
RUN pip uninstall -y Pillow torchtext torch torchvision
|
RUN pip uninstall -y Pillow torchtext torch torchvision
|
||||||
RUN pip install --no-cache -r requirements.txt albumentations wandb gsutil notebook Pillow>=9.1.0 \
|
RUN pip install --no-cache -r requirements.txt albumentations comet clearml gsutil notebook Pillow>=9.1.0 \
|
||||||
'opencv-python<4.6.0.66' \
|
'opencv-python<4.6.0.66' \
|
||||||
--extra-index-url https://download.pytorch.org/whl/cu113
|
--extra-index-url https://download.pytorch.org/whl/cu113
|
||||||
|
|
||||||
|
|
|
@ -84,10 +84,10 @@ class Loggers():
|
||||||
self.csv = True # always log to csv
|
self.csv = True # always log to csv
|
||||||
|
|
||||||
# Messages
|
# Messages
|
||||||
if not wandb:
|
# if not wandb:
|
||||||
prefix = colorstr('Weights & Biases: ')
|
# prefix = colorstr('Weights & Biases: ')
|
||||||
s = f"{prefix}run 'pip install wandb' to automatically track and visualize YOLOv5 🚀 runs in Weights & Biases"
|
# s = f"{prefix}run 'pip install wandb' to automatically track and visualize YOLOv5 🚀 runs in Weights & Biases"
|
||||||
self.logger.info(s)
|
# self.logger.info(s)
|
||||||
if not clearml:
|
if not clearml:
|
||||||
prefix = colorstr('ClearML: ')
|
prefix = colorstr('ClearML: ')
|
||||||
s = f"{prefix}run 'pip install clearml' to automatically track, visualize and remotely train YOLOv5 🚀 in ClearML"
|
s = f"{prefix}run 'pip install clearml' to automatically track, visualize and remotely train YOLOv5 🚀 in ClearML"
|
||||||
|
@ -110,9 +110,9 @@ class Loggers():
|
||||||
self.opt.hyp = self.hyp # add hyperparameters
|
self.opt.hyp = self.hyp # add hyperparameters
|
||||||
self.wandb = WandbLogger(self.opt, run_id)
|
self.wandb = WandbLogger(self.opt, run_id)
|
||||||
# temp warn. because nested artifacts not supported after 0.12.10
|
# temp warn. because nested artifacts not supported after 0.12.10
|
||||||
if pkg.parse_version(wandb.__version__) >= pkg.parse_version('0.12.11'):
|
# if pkg.parse_version(wandb.__version__) >= pkg.parse_version('0.12.11'):
|
||||||
s = "YOLOv5 temporarily requires wandb version 0.12.10 or below. Some features may not work as expected."
|
# s = "YOLOv5 temporarily requires wandb version 0.12.10 or below. Some features may not work as expected."
|
||||||
self.logger.warning(s)
|
# self.logger.warning(s)
|
||||||
else:
|
else:
|
||||||
self.wandb = None
|
self.wandb = None
|
||||||
|
|
||||||
|
|
|
@ -135,7 +135,7 @@ class WandbLogger():
|
||||||
# Temporary-fix
|
# Temporary-fix
|
||||||
if opt.upload_dataset:
|
if opt.upload_dataset:
|
||||||
opt.upload_dataset = False
|
opt.upload_dataset = False
|
||||||
LOGGER.info("Uploading Dataset functionality is not being supported temporarily due to a bug.")
|
# LOGGER.info("Uploading Dataset functionality is not being supported temporarily due to a bug.")
|
||||||
|
|
||||||
# Pre-training routine --
|
# Pre-training routine --
|
||||||
self.job_type = job_type
|
self.job_type = job_type
|
||||||
|
|
Loading…
Reference in New Issue