diff --git a/test.py b/test.py index 028e9e13ac93..177ac2494cab 100644 --- a/test.py +++ b/test.py @@ -236,7 +236,7 @@ def test(data, parser.add_argument('--merge', action='store_true', help='use Merge NMS') parser.add_argument('--verbose', action='store_true', help='report mAP by class') opt = parser.parse_args() - opt.save_json = opt.save_json or opt.data.endswith('coco.yaml') + opt.save_json |= opt.data.endswith('coco.yaml') opt.data = check_file(opt.data) # check file print(opt)