Skip to content

Commit

Permalink
Created using Colaboratory
Browse files Browse the repository at this point in the history
  • Loading branch information
glenn-jocher committed Jul 25, 2021
1 parent 58ee4dc commit 7a762c4
Showing 1 changed file with 11 additions and 53 deletions.
64 changes: 11 additions & 53 deletions tutorial.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1036,67 +1036,25 @@
"source": [
"## Local Logging\n",
"\n",
"All results are logged by default to `runs/train`, with a new experiment directory created for each new training as `runs/train/exp2`, `runs/train/exp3`, etc. View train and val jpgs to see mosaics, labels, predictions and augmentation effects. Note a **Mosaic Dataloader** is used for training (shown below), a new concept developed by Ultralytics and first featured in [YOLOv4](https://arxiv.org/abs/2004.10934)."
]
},
{
"cell_type": "code",
"metadata": {
"id": "riPdhraOTCO0"
},
"source": [
"Image(filename='runs/train/exp/train_batch0.jpg', width=800) # train batch 0 mosaics and labels\n",
"Image(filename='runs/train/exp/test_batch0_labels.jpg', width=800) # val batch 0 labels\n",
"Image(filename='runs/train/exp/test_batch0_pred.jpg', width=800) # val batch 0 predictions"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "markdown",
"metadata": {
"id": "OYG4WFEnTVrI"
},
"source": [
"All results are logged by default to `runs/train`, with a new experiment directory created for each new training as `runs/train/exp2`, `runs/train/exp3`, etc. View train and val jpgs to see mosaics, labels, predictions and augmentation effects. Note an Ultralytics **Mosaic Dataloader** is used for training (shown below), which combined each original image with 3 additional random training images.\n",
"\n",
"> <img src=\"https://user-images.githubusercontent.com/26833433/124931219-48bf8700-e002-11eb-84f0-e05d95b118dd.jpg\" width=\"700\"> \n",
"`train_batch0.jpg` shows train batch 0 mosaics and labels\n",
"\n",
"> <img src=\"https://user-images.githubusercontent.com/26833433/124931217-4826f080-e002-11eb-87b9-ae0925a8c94b.jpg\" width=\"700\"> \n",
"`test_batch0_labels.jpg` shows val batch 0 labels\n",
"\n",
"> <img src=\"https://user-images.githubusercontent.com/26833433/124931209-46f5c380-e002-11eb-9bd5-7a3de2be9851.jpg\" width=\"700\"> \n",
"`test_batch0_pred.jpg` shows val batch 0 _predictions_"
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "7KN5ghjE6ZWh"
},
"source": [
"Training results are automatically logged to [Tensorboard](https://www.tensorflow.org/tensorboard) and `runs/train/exp/results.txt`, which is plotted as `results.png` (below) after training completes. You can also plot any `results.txt` file manually:"
]
},
{
"cell_type": "code",
"metadata": {
"id": "MDznIqPF7nk3"
},
"source": [
"`test_batch0_pred.jpg` shows val batch 0 _predictions_\n",
"\n",
"Training results are automatically logged to [Tensorboard](https://www.tensorflow.org/tensorboard) and [CSV](https://github.com/ultralytics/yolov5/pull/4148) as `results.csv`, which is plotted as `results.png` (below) after training completes. You can also plot any `results.csv` file manually:\n",
"\n",
"```python\n",
"from utils.plots import plot_results \n",
"plot_results(save_dir='runs/train/exp') # plot all results*.txt files in 'runs/train/exp'\n",
"Image(filename='runs/train/exp/results.png', width=800)"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "markdown",
"metadata": {
"id": "lfrEegCSW3fK"
},
"source": [
"<p align=\"left\"><img width=\"800\" alt=\"COCO128 Training Results\" src=\"https://user-images.githubusercontent.com/26833433/125273596-6300aa00-e30d-11eb-8dc4-70a960c53013.png\"></p>"
"plot_results('path/to/results.csv') # plot 'results.csv' as 'results.png'\n",
"```\n",
"\n",
"<p align=\"left\"><img width=\"800\" alt=\"COCO128 Training Results\" src=\"https://user-images.githubusercontent.com/26833433/126906780-8c5e2990-6116-4de6-b78a-367244a33ccf.png\"></p>"
]
},
{
Expand Down

0 comments on commit 7a762c4

Please sign in to comment.