From c07bf620d976d26d7ab22b7e7cfc43394179db29 Mon Sep 17 00:00:00 2001 From: FlyingQianMM <245467267@qq.com> Date: Thu, 12 Mar 2020 18:06:42 +0800 Subject: [PATCH] refine pedestrian_yolov3_darknet.yml and vehicle_yolov3_darknet.yml in contrib (#324) --- .../pedestrian_yolov3_darknet.yml | 44 ++++++++++--------- .../vehicle_yolov3_darknet.yml | 43 +++++++++--------- 2 files changed, 47 insertions(+), 40 deletions(-) diff --git a/contrib/PedestrianDetection/pedestrian_yolov3_darknet.yml b/contrib/PedestrianDetection/pedestrian_yolov3_darknet.yml index adc9109aa..b86c37289 100644 --- a/contrib/PedestrianDetection/pedestrian_yolov3_darknet.yml +++ b/contrib/PedestrianDetection/pedestrian_yolov3_darknet.yml @@ -1,7 +1,4 @@ architecture: YOLOv3 -train_feed: YoloTrainFeed -eval_feed: YoloEvalFeed -test_feed: YoloTestFeed use_gpu: true max_iters: 200000 log_smooth_window: 20 @@ -11,6 +8,7 @@ metric: COCO pretrain_weights: https://paddle-imagenet-models-name.bj.bcebos.com/DarkNet53_pretrained.tar weights: https://paddlemodels.bj.bcebos.com/object_detection/pedestrian_yolov3_darknet.tar num_classes: 1 +use_fine_grained_loss: false YOLOv3: backbone: DarkNet @@ -27,8 +25,7 @@ YOLOv3Head: [30, 61], [62, 45], [59, 119], [116, 90], [156, 198], [373, 326]] norm_decay: 0. - ignore_thresh: 0.7 - label_smooth: true + yolo_loss: YOLOv3Loss nms: background_label: -1 keep_top_k: 100 @@ -37,6 +34,11 @@ YOLOv3Head: normalized: false score_threshold: 0.01 +YOLOv3Loss: + batch_size: 8 + ignore_thresh: 0.7 + label_smooth: false + LearningRate: base_lr: 0.001 schedulers: @@ -57,26 +59,28 @@ OptimizerBuilder: factor: 0.0005 type: L2 -YoloTrainFeed: +_READER_: '../../configs/yolov3_reader.yml' +TrainReader: batch_size: 8 dataset: - dataset_dir: dataset/pedestrian - annotation: annotations/instances_train2017.json - image_dir: train2017 - num_workers: 8 - bufsize: 128 - use_process: true + !COCODataSet + dataset_dir: dataset/pedestrian + anno_path: annotations/instances_train2017.json + image_dir: train2017 + with_background: false -YoloEvalFeed: +EvalReader: batch_size: 8 - image_shape: [3, 608, 608] dataset: - dataset_dir: dataset/pedestrian - annotation: annotations/instances_val2017.json - image_dir: val2017 + !COCODataSet + dataset_dir: dataset/pedestrian + anno_path: annotations/instances_val2017.json + image_dir: val2017 + with_background: false -YoloTestFeed: +TestReader: batch_size: 1 - image_shape: [3, 608, 608] dataset: - annotation: contrib/PedestrianDetection/pedestrian.json + !ImageFolder + anno_path: contrib/PedestrianDetection/pedestrian.json + with_background: false diff --git a/contrib/VehicleDetection/vehicle_yolov3_darknet.yml b/contrib/VehicleDetection/vehicle_yolov3_darknet.yml index 6a923a0c1..7ee5897a7 100644 --- a/contrib/VehicleDetection/vehicle_yolov3_darknet.yml +++ b/contrib/VehicleDetection/vehicle_yolov3_darknet.yml @@ -1,7 +1,4 @@ architecture: YOLOv3 -train_feed: YoloTrainFeed -eval_feed: YoloEvalFeed -test_feed: YoloTestFeed use_gpu: true max_iters: 120000 log_smooth_window: 20 @@ -27,8 +24,7 @@ YOLOv3Head: [23, 33], [40, 25], [54, 50], [101, 80], [139, 145], [253, 224]] norm_decay: 0. - ignore_thresh: 0.7 - label_smooth: false + yolo_loss: YOLOv3Loss nms: background_label: -1 keep_top_k: 100 @@ -37,6 +33,11 @@ YOLOv3Head: normalized: false score_threshold: 0.005 +YOLOv3Loss: + batch_size: 8 + ignore_thresh: 0.7 + label_smooth: false + LearningRate: base_lr: 0.001 schedulers: @@ -57,26 +58,28 @@ OptimizerBuilder: factor: 0.0005 type: L2 -YoloTrainFeed: +_READER_: '../../configs/yolov3_reader.yml' +TrainReader: batch_size: 8 dataset: - dataset_dir: dataset/vehicle - annotation: annotations/instances_train2017.json - image_dir: train2017 - num_workers: 8 - bufsize: 128 - use_process: true + !COCODataSet + dataset_dir: dataset/vehicle + anno_path: annotations/instances_train2017.json + image_dir: train2017 + with_background: false -YoloEvalFeed: +EvalReader: batch_size: 8 - image_shape: [3, 608, 608] dataset: - dataset_dir: dataset/vehicle - annotation: annotations/instances_val2017.json - image_dir: val2017 + !COCODataSet + dataset_dir: dataset/vehicle + anno_path: annotations/instances_val2017.json + image_dir: val2017 + with_background: false -YoloTestFeed: +TestReader: batch_size: 1 - image_shape: [3, 608, 608] dataset: - annotation: contrib/VehicleDetection/vehicle.json + !ImageFolder + anno_path: contrib/VehicleDetection/vehicle.json + with_background: false -- GitLab