Unified '/project/name' results saving (#1377)

* Project/name update

* Update ci-testing.yml

* address project with path separator failure mode

* Project/name update

* address project with path separator failure mode

* Update ci-testing.yml

* detect.py default --name bug fix

* missing rstrip PR

* train/exp0 to train/exp
This commit is contained in:
Glenn Jocher authored and GitHub committed 2020-11-12 23:37:46 +01:00
1 parent 04081f8102
commit c4addd7761
7 files changed
+71 -78

No files matched your search

+13 -13
View File
@@ -597,7 +597,7 @@
},
"source": [
"!python detect.py --weights yolov5s.pt --img 640 --conf 0.25 --source data/images/\n",
"Image(filename='runs/detect/exp0/zidane.jpg', width=600)"
"Image(filename='runs/detect/exp/zidane.jpg', width=600)"
],
"execution_count": null,
"outputs": [
@@ -611,7 +611,7 @@
"Model Summary: 140 layers, 7.45958e+06 parameters, 0 gradients\n",
"image 1/2 /content/yolov5/data/images/bus.jpg: 640x480 4 persons, 1 buss, 1 skateboards, Done. (0.012s)\n",
"image 2/2 /content/yolov5/data/images/zidane.jpg: 384x640 2 persons, 2 ties, Done. (0.012s)\n",
"Results saved to runs/detect/exp0\n",
"Results saved to runs/detect/exp\n",
"Done. (0.113s)\n"
],
"name": "stdout"
@@ -887,7 +887,7 @@
"source": [
"Train a YOLOv5s model on [COCO128](https://www.kaggle.com/ultralytics/coco128) with `--data coco128.yaml`, starting from pretrained `--weights yolov5s.pt`, or from randomly initialized `--weights '' --cfg yolov5s.yaml`. Models are downloaded automatically from the [latest YOLOv5 release](https://github.com/ultralytics/yolov5/releases), and **COCO, COCO128, and VOC datasets are downloaded automatically** on first use.\n",
"\n",
"All training results are saved to `runs/train/` with incrementing run directories, i.e. `runs/train/exp0`, `runs/train/exp1` etc.\n"
"All training results are saved to `runs/train/` with incrementing run directories, i.e. `runs/train/exp2`, `runs/train/exp3` etc.\n"
]
},
{
@@ -969,7 +969,7 @@
"Analyzing anchors... anchors/target = 4.26, Best Possible Recall (BPR) = 0.9946\n",
"Image sizes 640 train, 640 test\n",
"Using 2 dataloader workers\n",
"Logging results to runs/train/exp0\n",
"Logging results to runs/train/exp\n",
"Starting training for 3 epochs...\n",
"\n",
" Epoch gpu_mem box obj cls total targets img_size\n",
@@ -986,8 +986,8 @@
" 2/2 3.17G 0.04445 0.06545 0.01666 0.1266 149 640: 100% 8/8 [00:01<00:00, 4.33it/s]\n",
" Class Images Targets P R mAP@.5 mAP@.5:.95: 100% 8/8 [00:02<00:00, 2.78it/s]\n",
" all 128 929 0.395 0.766 0.701 0.455\n",
"Optimizer stripped from runs/train/exp0/weights/last.pt, 15.2MB\n",
"Optimizer stripped from runs/train/exp0/weights/best.pt, 15.2MB\n",
"Optimizer stripped from runs/train/exp/weights/last.pt, 15.2MB\n",
"Optimizer stripped from runs/train/exp/weights/best.pt, 15.2MB\n",
"3 epochs completed in 0.005 hours.\n",
"\n"
],
@@ -1030,7 +1030,7 @@
"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/exp0`, `runs/train/exp1`, etc. View train and test 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)."
"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 test 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)."
]
},
{
@@ -1039,9 +1039,9 @@
"id": "riPdhraOTCO0"
},
"source": [
"Image(filename='runs/train/exp0/train_batch0.jpg', width=800) # train batch 0 mosaics and labels\n",
"Image(filename='runs/train/exp0/test_batch0_labels.jpg', width=800) # test batch 0 labels\n",
"Image(filename='runs/train/exp0/test_batch0_pred.jpg', width=800) # test batch 0 predictions"
"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) # test batch 0 labels\n",
"Image(filename='runs/train/exp/test_batch0_pred.jpg', width=800) # test batch 0 predictions"
],
"execution_count": null,
"outputs": []
@@ -1078,7 +1078,7 @@
},
"source": [
"from utils.utils import plot_results \n",
"plot_results(save_dir='runs/train/exp0') # plot results.txt as results.png\n",
"plot_results(save_dir='runs/train/exp') # plot results.txt as results.png\n",
"Image(filename='results.png', width=800) "
],
"execution_count": null,
@@ -1170,9 +1170,9 @@
" for di in 0 cpu # inference devices\n",
" do\n",
" python detect.py --weights $x.pt --device $di # detect official\n",
" python detect.py --weights runs/train/exp0/weights/last.pt --device $di # detect custom\n",
" python detect.py --weights runs/train/exp/weights/last.pt --device $di # detect custom\n",
" python test.py --weights $x.pt --device $di # test official\n",
" python test.py --weights runs/train/exp0/weights/last.pt --device $di # test custom\n",
" python test.py --weights runs/train/exp/weights/last.pt --device $di # test custom\n",
" done\n",
" python models/yolo.py --cfg $x.yaml # inspect\n",
" python models/export.py --weights $x.pt --img 640 --batch 1 # export\n",