glenn-jocher commited on
Commit
3764277
1 Parent(s): 6e4358f

Created using Colaboratory

Browse files
Files changed (1) hide show
  1. tutorial.ipynb +11 -53
tutorial.ipynb CHANGED
@@ -1036,28 +1036,8 @@
1036
  "source": [
1037
  "## Local Logging\n",
1038
  "\n",
1039
- "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)."
1040
- ]
1041
- },
1042
- {
1043
- "cell_type": "code",
1044
- "metadata": {
1045
- "id": "riPdhraOTCO0"
1046
- },
1047
- "source": [
1048
- "Image(filename='runs/train/exp/train_batch0.jpg', width=800) # train batch 0 mosaics and labels\n",
1049
- "Image(filename='runs/train/exp/test_batch0_labels.jpg', width=800) # val batch 0 labels\n",
1050
- "Image(filename='runs/train/exp/test_batch0_pred.jpg', width=800) # val batch 0 predictions"
1051
- ],
1052
- "execution_count": null,
1053
- "outputs": []
1054
- },
1055
- {
1056
- "cell_type": "markdown",
1057
- "metadata": {
1058
- "id": "OYG4WFEnTVrI"
1059
- },
1060
- "source": [
1061
  "> <img src=\"https://user-images.githubusercontent.com/26833433/124931219-48bf8700-e002-11eb-84f0-e05d95b118dd.jpg\" width=\"700\"> \n",
1062
  "`train_batch0.jpg` shows train batch 0 mosaics and labels\n",
1063
  "\n",
@@ -1065,38 +1045,16 @@
1065
  "`test_batch0_labels.jpg` shows val batch 0 labels\n",
1066
  "\n",
1067
  "> <img src=\"https://user-images.githubusercontent.com/26833433/124931209-46f5c380-e002-11eb-9bd5-7a3de2be9851.jpg\" width=\"700\"> \n",
1068
- "`test_batch0_pred.jpg` shows val batch 0 _predictions_"
1069
- ]
1070
- },
1071
- {
1072
- "cell_type": "markdown",
1073
- "metadata": {
1074
- "id": "7KN5ghjE6ZWh"
1075
- },
1076
- "source": [
1077
- "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:"
1078
- ]
1079
- },
1080
- {
1081
- "cell_type": "code",
1082
- "metadata": {
1083
- "id": "MDznIqPF7nk3"
1084
- },
1085
- "source": [
1086
  "from utils.plots import plot_results \n",
1087
- "plot_results(save_dir='runs/train/exp') # plot all results*.txt files in 'runs/train/exp'\n",
1088
- "Image(filename='runs/train/exp/results.png', width=800)"
1089
- ],
1090
- "execution_count": null,
1091
- "outputs": []
1092
- },
1093
- {
1094
- "cell_type": "markdown",
1095
- "metadata": {
1096
- "id": "lfrEegCSW3fK"
1097
- },
1098
- "source": [
1099
- "<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>"
1100
  ]
1101
  },
1102
  {
 
1036
  "source": [
1037
  "## Local Logging\n",
1038
  "\n",
1039
+ "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",
1040
+ "\n",
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1041
  "> <img src=\"https://user-images.githubusercontent.com/26833433/124931219-48bf8700-e002-11eb-84f0-e05d95b118dd.jpg\" width=\"700\"> \n",
1042
  "`train_batch0.jpg` shows train batch 0 mosaics and labels\n",
1043
  "\n",
 
1045
  "`test_batch0_labels.jpg` shows val batch 0 labels\n",
1046
  "\n",
1047
  "> <img src=\"https://user-images.githubusercontent.com/26833433/124931209-46f5c380-e002-11eb-9bd5-7a3de2be9851.jpg\" width=\"700\"> \n",
1048
+ "`test_batch0_pred.jpg` shows val batch 0 _predictions_\n",
1049
+ "\n",
1050
+ "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",
1051
+ "\n",
1052
+ "```python\n",
 
 
 
 
 
 
 
 
 
 
 
 
 
1053
  "from utils.plots import plot_results \n",
1054
+ "plot_results('path/to/results.csv') # plot 'results.csv' as 'results.png'\n",
1055
+ "```\n",
1056
+ "\n",
1057
+ "<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>"
 
 
 
 
 
 
 
 
 
1058
  ]
1059
  },
1060
  {