From acabd8847af2ae24a5d656b39c92775094b84267 Mon Sep 17 00:00:00 2001 From: SunAhong1993 <48579383+SunAhong1993@users.noreply.github.com> Date: Tue, 10 Dec 2019 16:48:06 +0800 Subject: [PATCH] fix the x2coco.py for val and test (#4052) * Update GETTING_STARTED_cn.md * Update x2coco.py --- PaddleCV/PaddleDetection/ppdet/data/tools/x2coco.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/PaddleCV/PaddleDetection/ppdet/data/tools/x2coco.py b/PaddleCV/PaddleDetection/ppdet/data/tools/x2coco.py index da8e4aef..0379fab6 100644 --- a/PaddleCV/PaddleDetection/ppdet/data/tools/x2coco.py +++ b/PaddleCV/PaddleDetection/ppdet/data/tools/x2coco.py @@ -277,13 +277,16 @@ def main(): indent=4, cls=MyEncoder) if args.val_proportion != 0: - val_data_coco = deal_json(args.output_dir + '/val', args.json_input_dir) + val_data_coco = deal_json(args.dataset_type, + args.output_dir + '/val', + args.json_input_dir) val_json_path = osp.join(args.output_dir + '/annotations', 'instance_val.json') json.dump( val_data_coco, open(val_json_path, 'w'), indent=4, cls=MyEncoder) if args.test_proportion != 0: - test_data_coco = deal_json(args.output_dir + '/test', + test_data_coco = deal_json(args.dataset_type, + args.output_dir + '/test', args.json_input_dir) test_json_path = osp.join(args.output_dir + '/annotations', 'instance_test.json') -- GitLab