From b5b4dc8f60a19b8fea6ee3bbe8ceca60dca60a20 Mon Sep 17 00:00:00 2001 From: SunAhong1993 <48579383+SunAhong1993@users.noreply.github.com> Date: Tue, 10 Dec 2019 19:24:46 +0800 Subject: [PATCH] fix the x2coco.py for eval and test (#94) * gix the doc * Update x2coco.py --- ppdet/data/tools/x2coco.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ppdet/data/tools/x2coco.py b/ppdet/data/tools/x2coco.py index bf67b359f..7a3fd0317 100644 --- a/ppdet/data/tools/x2coco.py +++ b/ppdet/data/tools/x2coco.py @@ -282,13 +282,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