From f7c9f535ac52d128b980a96989b301e3501d3b18 Mon Sep 17 00:00:00 2001 From: MichaelAnderson-AI Date: Wed, 23 Jun 2021 12:49:38 +0200 Subject: [PATCH] Create `data/hyps` directory (#3747) --- .gitignore | 10 +--------- data/{ => hyps}/hyp.finetune.yaml | 0 data/{ => hyps}/hyp.finetune_objects365.yaml | 0 data/{ => hyps}/hyp.scratch.yaml | 0 train.py | 2 +- tutorial.ipynb | 2 +- 6 files changed, 3 insertions(+), 11 deletions(-) rename data/{ => hyps}/hyp.finetune.yaml (100%) rename data/{ => hyps}/hyp.finetune_objects365.yaml (100%) rename data/{ => hyps}/hyp.scratch.yaml (100%) diff --git a/.gitignore b/.gitignore index 91ce33f..91299e2 100755 --- a/.gitignore +++ b/.gitignore @@ -19,26 +19,18 @@ *.avi *.data *.json - *.cfg !cfg/yolov3*.cfg storage.googleapis.com runs/* data/* +!data/hyps/* !data/images/zidane.jpg !data/images/bus.jpg -!data/coco.names -!data/coco_paper.names -!data/coco.data -!data/coco_*.data -!data/coco_*.txt -!data/trainvalno5k.shapes !data/*.sh -pycocotools/* results*.txt -gcp_test*.sh # Datasets ------------------------------------------------------------------------------------------------------------- coco/ diff --git a/data/hyp.finetune.yaml b/data/hyps/hyp.finetune.yaml similarity index 100% rename from data/hyp.finetune.yaml rename to data/hyps/hyp.finetune.yaml diff --git a/data/hyp.finetune_objects365.yaml b/data/hyps/hyp.finetune_objects365.yaml similarity index 100% rename from data/hyp.finetune_objects365.yaml rename to data/hyps/hyp.finetune_objects365.yaml diff --git a/data/hyp.scratch.yaml b/data/hyps/hyp.scratch.yaml similarity index 100% rename from data/hyp.scratch.yaml rename to data/hyps/hyp.scratch.yaml diff --git a/train.py b/train.py index 05542b4..e934441 100644 --- a/train.py +++ b/train.py @@ -484,7 +484,7 @@ def parse_opt(known=False): parser.add_argument('--weights', type=str, default='yolov5s.pt', help='initial weights path') parser.add_argument('--cfg', type=str, default='', help='model.yaml path') parser.add_argument('--data', type=str, default='data/coco128.yaml', help='dataset.yaml path') - parser.add_argument('--hyp', type=str, default='data/hyp.scratch.yaml', help='hyperparameters path') + parser.add_argument('--hyp', type=str, default='data/hyps/hyp.scratch.yaml', help='hyperparameters path') parser.add_argument('--epochs', type=int, default=300) parser.add_argument('--batch-size', type=int, default=16, help='total batch size for all GPUs') parser.add_argument('--img-size', nargs='+', type=int, default=[640, 640], help='[train, test] image sizes') diff --git a/tutorial.ipynb b/tutorial.ipynb index b45b321..bcdbc01 100644 --- a/tutorial.ipynb +++ b/tutorial.ipynb @@ -932,7 +932,7 @@ "\u001b[34m\u001b[1mgithub: \u001b[0mup to date with https://github.com/ultralytics/yolov5 ✅\n", "YOLOv5 🚀 v5.0-158-g78cf488 torch 1.8.1+cu101 CUDA:0 (Tesla V100-SXM2-16GB, 16160.5MB)\n", "\n", - "Namespace(adam=False, artifact_alias='latest', batch_size=16, bbox_interval=-1, bucket='', cache_images=True, cfg='', data='./data/coco128.yaml', device='', entity=None, epochs=3, evolve=False, exist_ok=False, global_rank=-1, hyp='data/hyp.scratch.yaml', image_weights=False, img_size=[640, 640], label_smoothing=0.0, linear_lr=False, local_rank=-1, multi_scale=False, name='exp', noautoanchor=False, nosave=False, notest=False, project='runs/train', quad=False, rect=False, resume=False, save_dir='runs/train/exp', save_period=-1, single_cls=False, sync_bn=False, total_batch_size=16, upload_dataset=False, weights='yolov5s.pt', workers=8, world_size=1)\n", + "Namespace(adam=False, artifact_alias='latest', batch_size=16, bbox_interval=-1, bucket='', cache_images=True, cfg='', data='./data/coco128.yaml', device='', entity=None, epochs=3, evolve=False, exist_ok=False, global_rank=-1, hyp='hyp.scratch.yaml', image_weights=False, img_size=[640, 640], label_smoothing=0.0, linear_lr=False, local_rank=-1, multi_scale=False, name='exp', noautoanchor=False, nosave=False, notest=False, project='runs/train', quad=False, rect=False, resume=False, save_dir='runs/train/exp', save_period=-1, single_cls=False, sync_bn=False, total_batch_size=16, upload_dataset=False, weights='yolov5s.pt', workers=8, world_size=1)\n", "\u001b[34m\u001b[1mtensorboard: \u001b[0mStart with 'tensorboard --logdir runs/train', view at http://localhost:6006/\n", "2021-06-08 17:00:55.016221: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Successfully opened dynamic library libcudart.so.11.0\n", "\u001b[34m\u001b[1mhyperparameters: \u001b[0mlr0=0.01, lrf=0.2, 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\n",