From 8a2367c928802fad6bded9b1eb324f23c9ecba26 Mon Sep 17 00:00:00 2001 From: wangguanzhong Date: Fri, 10 Feb 2023 11:27:59 +0800 Subject: [PATCH] enhance arg overwrite for picodet and ppyoloe (#7720) --- configs/datasets/coco_detection.yml | 26 +++++++++---------- configs/datasets/coco_instance.yml | 24 ++++++++--------- configs/picodet/_base_/optimizer_300e.yml | 4 +-- .../legacy_model/_base_/optimizer_100e.yml | 4 +-- .../legacy_model/_base_/optimizer_300e.yml | 4 +-- configs/picodet/picodet_l_416_coco_lcnet.yml | 4 +-- configs/picodet/picodet_m_320_coco_lcnet.yml | 4 +-- configs/picodet/picodet_m_416_coco_lcnet.yml | 4 +-- configs/picodet/picodet_xs_416_coco_lcnet.yml | 4 +-- configs/ppyoloe/_base_/optimizer_300e.yml | 4 +-- configs/ppyoloe/_base_/optimizer_36e_xpu.yml | 4 +-- configs/ppyoloe/_base_/optimizer_400e.yml | 4 +-- configs/ppyoloe/_base_/optimizer_60e.yml | 4 +-- configs/ppyoloe/_base_/optimizer_80e.yml | 4 +-- 14 files changed, 49 insertions(+), 49 deletions(-) diff --git a/configs/datasets/coco_detection.yml b/configs/datasets/coco_detection.yml index ea0924514..176ba271c 100644 --- a/configs/datasets/coco_detection.yml +++ b/configs/datasets/coco_detection.yml @@ -2,20 +2,20 @@ metric: COCO num_classes: 80 TrainDataset: - !COCODataSet - image_dir: train2017 - anno_path: annotations/instances_train2017.json - dataset_dir: dataset/coco - data_fields: ['image', 'gt_bbox', 'gt_class', 'is_crowd'] + name: COCODataSet + image_dir: train2017 + anno_path: annotations/instances_train2017.json + dataset_dir: dataset/coco + data_fields: ['image', 'gt_bbox', 'gt_class', 'is_crowd'] EvalDataset: - !COCODataSet - image_dir: val2017 - anno_path: annotations/instances_val2017.json - dataset_dir: dataset/coco - allow_empty: true + name: COCODataSet + image_dir: val2017 + anno_path: annotations/instances_val2017.json + dataset_dir: dataset/coco + allow_empty: true TestDataset: - !ImageFolder - anno_path: annotations/instances_val2017.json # also support txt (like VOC's label_list.txt) - dataset_dir: dataset/coco # if set, anno_path will be 'dataset_dir/anno_path' + name: ImageFolder + anno_path: annotations/instances_val2017.json # also support txt (like VOC's label_list.txt) + dataset_dir: dataset/coco # if set, anno_path will be 'dataset_dir/anno_path' diff --git a/configs/datasets/coco_instance.yml b/configs/datasets/coco_instance.yml index b04dbdca9..91c4ab889 100644 --- a/configs/datasets/coco_instance.yml +++ b/configs/datasets/coco_instance.yml @@ -2,19 +2,19 @@ metric: COCO num_classes: 80 TrainDataset: - !COCODataSet - image_dir: train2017 - anno_path: annotations/instances_train2017.json - dataset_dir: dataset/coco - data_fields: ['image', 'gt_bbox', 'gt_class', 'gt_poly', 'is_crowd'] + name: COCODataSet + image_dir: train2017 + anno_path: annotations/instances_train2017.json + dataset_dir: dataset/coco + data_fields: ['image', 'gt_bbox', 'gt_class', 'gt_poly', 'is_crowd'] EvalDataset: - !COCODataSet - image_dir: val2017 - anno_path: annotations/instances_val2017.json - dataset_dir: dataset/coco + name: COCODataSet + image_dir: val2017 + anno_path: annotations/instances_val2017.json + dataset_dir: dataset/coco TestDataset: - !ImageFolder - anno_path: annotations/instances_val2017.json # also support txt (like VOC's label_list.txt) - dataset_dir: dataset/coco # if set, anno_path will be 'dataset_dir/anno_path' + name: ImageFolder + anno_path: annotations/instances_val2017.json # also support txt (like VOC's label_list.txt) + dataset_dir: dataset/coco # if set, anno_path will be 'dataset_dir/anno_path' diff --git a/configs/picodet/_base_/optimizer_300e.yml b/configs/picodet/_base_/optimizer_300e.yml index 0b3f5a12e..113707a03 100644 --- a/configs/picodet/_base_/optimizer_300e.yml +++ b/configs/picodet/_base_/optimizer_300e.yml @@ -3,9 +3,9 @@ epoch: 300 LearningRate: base_lr: 0.32 schedulers: - - !CosineDecay + - name: CosineDecay max_epochs: 300 - - !LinearWarmup + - name: LinearWarmup start_factor: 0.1 steps: 300 diff --git a/configs/picodet/legacy_model/_base_/optimizer_100e.yml b/configs/picodet/legacy_model/_base_/optimizer_100e.yml index 8adda6a64..c866b3998 100644 --- a/configs/picodet/legacy_model/_base_/optimizer_100e.yml +++ b/configs/picodet/legacy_model/_base_/optimizer_100e.yml @@ -3,9 +3,9 @@ epoch: 100 LearningRate: base_lr: 0.4 schedulers: - - !CosineDecay + - name: CosineDecay max_epochs: 100 - - !LinearWarmup + - name: LinearWarmup start_factor: 0.1 steps: 300 diff --git a/configs/picodet/legacy_model/_base_/optimizer_300e.yml b/configs/picodet/legacy_model/_base_/optimizer_300e.yml index 5a89bbbce..fa4c9094a 100644 --- a/configs/picodet/legacy_model/_base_/optimizer_300e.yml +++ b/configs/picodet/legacy_model/_base_/optimizer_300e.yml @@ -3,9 +3,9 @@ epoch: 300 LearningRate: base_lr: 0.4 schedulers: - - !CosineDecay + - name: CosineDecay max_epochs: 300 - - !LinearWarmup + - name: LinearWarmup start_factor: 0.1 steps: 300 diff --git a/configs/picodet/picodet_l_416_coco_lcnet.yml b/configs/picodet/picodet_l_416_coco_lcnet.yml index 8b97bd03e..f508e21d7 100644 --- a/configs/picodet/picodet_l_416_coco_lcnet.yml +++ b/configs/picodet/picodet_l_416_coco_lcnet.yml @@ -35,9 +35,9 @@ PicoHeadV2: LearningRate: base_lr: 0.12 schedulers: - - !CosineDecay + - name: CosineDecay max_epochs: 300 - - !LinearWarmup + - name: LinearWarmup start_factor: 0.1 steps: 300 diff --git a/configs/picodet/picodet_m_320_coco_lcnet.yml b/configs/picodet/picodet_m_320_coco_lcnet.yml index cd9cca9ca..bd188c218 100644 --- a/configs/picodet/picodet_m_320_coco_lcnet.yml +++ b/configs/picodet/picodet_m_320_coco_lcnet.yml @@ -18,8 +18,8 @@ TrainReader: LearningRate: base_lr: 0.24 schedulers: - - !CosineDecay + - name: CosineDecay max_epochs: 300 - - !LinearWarmup + - name: LinearWarmup start_factor: 0.1 steps: 300 diff --git a/configs/picodet/picodet_m_416_coco_lcnet.yml b/configs/picodet/picodet_m_416_coco_lcnet.yml index 130303d39..c224f4e09 100644 --- a/configs/picodet/picodet_m_416_coco_lcnet.yml +++ b/configs/picodet/picodet_m_416_coco_lcnet.yml @@ -18,8 +18,8 @@ TrainReader: LearningRate: base_lr: 0.24 schedulers: - - !CosineDecay + - name: CosineDecay max_epochs: 300 - - !LinearWarmup + - name: LinearWarmup start_factor: 0.1 steps: 300 diff --git a/configs/picodet/picodet_xs_416_coco_lcnet.yml b/configs/picodet/picodet_xs_416_coco_lcnet.yml index 352fa9511..8ca47d23a 100644 --- a/configs/picodet/picodet_xs_416_coco_lcnet.yml +++ b/configs/picodet/picodet_xs_416_coco_lcnet.yml @@ -38,8 +38,8 @@ TrainReader: LearningRate: base_lr: 0.28 schedulers: - - !CosineDecay + - name: CosineDecay max_epochs: 300 - - !LinearWarmup + - name: LinearWarmup start_factor: 0.1 steps: 300 diff --git a/configs/ppyoloe/_base_/optimizer_300e.yml b/configs/ppyoloe/_base_/optimizer_300e.yml index ab94c9c3e..d07bf4e53 100644 --- a/configs/ppyoloe/_base_/optimizer_300e.yml +++ b/configs/ppyoloe/_base_/optimizer_300e.yml @@ -3,9 +3,9 @@ epoch: 300 LearningRate: base_lr: 0.01 schedulers: - - !CosineDecay + - name: CosineDecay max_epochs: 360 - - !LinearWarmup + - name: LinearWarmup start_factor: 0. epochs: 5 diff --git a/configs/ppyoloe/_base_/optimizer_36e_xpu.yml b/configs/ppyoloe/_base_/optimizer_36e_xpu.yml index 59d76f4ba..951938468 100644 --- a/configs/ppyoloe/_base_/optimizer_36e_xpu.yml +++ b/configs/ppyoloe/_base_/optimizer_36e_xpu.yml @@ -3,9 +3,9 @@ epoch: 36 LearningRate: base_lr: 0.00125 schedulers: - - !CosineDecay + - name: CosineDecay max_epochs: 43 - - !LinearWarmup + - name: LinearWarmup start_factor: 0.001 steps: 2000 diff --git a/configs/ppyoloe/_base_/optimizer_400e.yml b/configs/ppyoloe/_base_/optimizer_400e.yml index de33fb749..0a8a5a6c3 100644 --- a/configs/ppyoloe/_base_/optimizer_400e.yml +++ b/configs/ppyoloe/_base_/optimizer_400e.yml @@ -3,9 +3,9 @@ epoch: 400 LearningRate: base_lr: 0.01 schedulers: - - !CosineDecay + - name: CosineDecay max_epochs: 480 - - !LinearWarmup + - name: LinearWarmup start_factor: 0. epochs: 5 diff --git a/configs/ppyoloe/_base_/optimizer_60e.yml b/configs/ppyoloe/_base_/optimizer_60e.yml index 6df9a5659..b261003db 100644 --- a/configs/ppyoloe/_base_/optimizer_60e.yml +++ b/configs/ppyoloe/_base_/optimizer_60e.yml @@ -3,9 +3,9 @@ epoch: 60 LearningRate: base_lr: 0.001 schedulers: - - !CosineDecay + - name: CosineDecay max_epochs: 72 - - !LinearWarmup + - name: LinearWarmup start_factor: 0. epochs: 1 diff --git a/configs/ppyoloe/_base_/optimizer_80e.yml b/configs/ppyoloe/_base_/optimizer_80e.yml index 7a8773df1..b6ba4ec31 100644 --- a/configs/ppyoloe/_base_/optimizer_80e.yml +++ b/configs/ppyoloe/_base_/optimizer_80e.yml @@ -3,9 +3,9 @@ epoch: 80 LearningRate: base_lr: 0.001 schedulers: - - !CosineDecay + - name: CosineDecay max_epochs: 96 - - !LinearWarmup + - name: LinearWarmup start_factor: 0. epochs: 5 -- GitLab