diff --git a/ppdet/data/tools/x2coco.py b/ppdet/data/tools/x2coco.py index bf67b359f92e3bc2221c02585cde8cc59dc57a7b..7a3fd03177913aa467bbafaca2f3d666c9596919 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')