Browse Source

Created using Colaboratory

modifyDataloader
Glenn Jocher 3 years ago
parent
commit
3764277f95
1 changed files with 11 additions and 53 deletions
  1. +11
    -53
      tutorial.ipynb

+ 11
- 53
tutorial.ipynb View File

@@ -1036,28 +1036,8 @@
"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",
@@ -1065,38 +1045,16 @@
"`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>"
]
},
{

Loading…
Cancel
Save