From 2385ca7545e738fbd254fc253e019b0265d9fe7b Mon Sep 17 00:00:00 2001 From: Kaipeng Deng Date: Mon, 19 Oct 2020 20:04:18 +0800 Subject: [PATCH] add TestReader for ppyolo export (#1579) --- configs/ppyolo/ppyolo_r18vd.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/configs/ppyolo/ppyolo_r18vd.yml b/configs/ppyolo/ppyolo_r18vd.yml index a686a2099..ca42947cc 100755 --- a/configs/ppyolo/ppyolo_r18vd.yml +++ b/configs/ppyolo/ppyolo_r18vd.yml @@ -132,3 +132,27 @@ TrainReader: worker_num: 16 bufsize: 8 use_process: true + +TestReader: + inputs_def: + image_shape: [3, 320, 320] + fields: ['image', 'im_size', 'im_id'] + dataset: + !ImageFolder + anno_path: annotations/instances_val2017.json + with_background: false + sample_transforms: + - !DecodeImage + to_rgb: True + - !ResizeImage + target_size: 320 + interp: 2 + - !NormalizeImage + mean: [0.485, 0.456, 0.406] + std: [0.229, 0.224, 0.225] + is_scale: True + is_channel_first: false + - !Permute + to_bgr: false + channel_first: True + batch_size: 1 -- GitLab