| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154 |
- # Runtime
- epoch: 270
- use_gpu: true
- use_xpu: false
- use_mlu: false
- use_npu: false
- log_iter: 20
- save_dir: output
- snapshot_epoch: 1
- print_flops: false
- print_params: false
- # Dataset
- metric: COCO
- num_classes: 80
- TrainDataset:
- 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:
- name: COCODataSet
- image_dir: val2017
- anno_path: annotations/instances_val2017.json
- dataset_dir: dataset/coco
- allow_empty: true
- TestDataset:
- 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'
- worker_num: 2
- TrainReader:
- inputs_def:
- num_max_boxes: 50
- sample_transforms:
- - Decode: {}
- - Mixup: {alpha: 1.5, beta: 1.5}
- - RandomDistort: {}
- - RandomExpand: {fill_value: [123.675, 116.28, 103.53]}
- - RandomCrop: {}
- - RandomFlip: {}
- batch_transforms:
- - BatchRandomResize: {target_size: [320, 352, 384, 416, 448, 480, 512, 544, 576, 608], random_size: True, random_interp: True, keep_ratio: False}
- - NormalizeBox: {}
- - PadBox: {num_max_boxes: 50}
- - BboxXYXY2XYWH: {}
- - NormalizeImage: {mean: [0.485, 0.456, 0.406], std: [0.229, 0.224, 0.225], is_scale: True}
- - Permute: {}
- - Gt2YoloTarget: {anchor_masks: [[6, 7, 8], [3, 4, 5], [0, 1, 2]], anchors: [[10, 13], [16, 30], [33, 23], [30, 61], [62, 45], [59, 119], [116, 90], [156, 198], [373, 326]], downsample_ratios: [32, 16, 8]}
- batch_size: 8
- shuffle: true
- drop_last: true
- mixup_epoch: 250
- use_shared_memory: true
- EvalReader:
- inputs_def:
- num_max_boxes: 50
- sample_transforms:
- - Decode: {}
- - Resize: {target_size: [608, 608], keep_ratio: False, interp: 2}
- - NormalizeImage: {mean: [0.485, 0.456, 0.406], std: [0.229, 0.224, 0.225], is_scale: True}
- - Permute: {}
- batch_size: 1
- TestReader:
- inputs_def:
- image_shape: [3, 608, 608]
- sample_transforms:
- - Decode: {}
- - Resize: {target_size: [608, 608], keep_ratio: False, interp: 2}
- - NormalizeImage: {mean: [0.485, 0.456, 0.406], std: [0.229, 0.224, 0.225], is_scale: True}
- - Permute: {}
- batch_size: 1
- # Model
- architecture: YOLOv3
- pretrain_weights: https://paddledet.bj.bcebos.com/models/pretrained/ResNet50_vd_ssld_pretrained.pdparams
- norm_type: sync_bn
- YOLOv3:
- backbone: ResNet
- neck: YOLOv3FPN
- yolo_head: YOLOv3Head
- post_process: BBoxPostProcess
- ResNet:
- depth: 50
- variant: d
- return_idx: [1, 2, 3]
- dcn_v2_stages: [3]
- freeze_at: -1
- freeze_norm: false
- norm_decay: 0.
- # YOLOv3FPN:
- YOLOv3Head:
- anchors: [[10, 13], [16, 30], [33, 23],
- [30, 61], [62, 45], [59, 119],
- [116, 90], [156, 198], [373, 326]]
- anchor_masks: [[6, 7, 8], [3, 4, 5], [0, 1, 2]]
- loss: YOLOv3Loss
- YOLOv3Loss:
- ignore_thresh: 0.7
- downsample: [32, 16, 8]
- label_smooth: false
- BBoxPostProcess:
- decode:
- name: YOLOBox
- conf_thresh: 0.005
- downsample_ratio: 32
- clip_bbox: true
- nms:
- name: MultiClassNMS
- keep_top_k: 100
- score_threshold: 0.01
- nms_threshold: 0.45
- nms_top_k: 1000
- # Optimizer
- LearningRate:
- base_lr: 0.001
- schedulers:
- - !PiecewiseDecay
- gamma: 0.1
- milestones:
- - 216
- - 243
- - !LinearWarmup
- start_factor: 0.
- steps: 4000
- OptimizerBuilder:
- optimizer:
- momentum: 0.9
- type: Momentum
- regularizer:
- factor: 0.0005
- type: L2
- # Export
- export:
- post_process: True # Whether post-processing is included in the network when export model.
- nms: True # Whether NMS is included in the network when export model.
- benchmark: False # It is used to testing model performance, if set `True`, post-process and NMS will not be exported.
- fuse_conv_bn: False
|