Skip to content

Commit

Permalink
Move check_yaml(data) to better position
Browse files Browse the repository at this point in the history
  • Loading branch information
KSGulin committed Jan 20, 2023
1 parent 3162c3c commit d5234f6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion val.py
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,6 @@ def parse_opt(skip_parse=False):
parser.add_argument('--dnn', action='store_true', help='use OpenCV DNN for ONNX inference')
parser.add_argument('--deepsparse', action='store_true', help='use the DeepSparse engine for ONNX inference')
opt = parser.parse_args()
opt.data = check_yaml(opt.data) # check YAML
opt.save_json |= opt.data.endswith('coco.yaml')
opt.save_txt |= opt.save_hybrid
print_args(vars(opt))
Expand All @@ -381,6 +380,7 @@ def parse_opt(skip_parse=False):
def main(opt):
check_requirements(exclude=('tensorboard', 'thop'))

opt.data = check_yaml(opt.data) # check YAML
if opt.task in ('train', 'val', 'test'): # run normally
if opt.conf_thres > 0.001: # https://github.com/ultralytics/yolov5/issues/1466
LOGGER.info(f'WARNING ⚠️ confidence threshold {opt.conf_thres} > 0.001 produces invalid results')
Expand Down

0 comments on commit d5234f6

Please sign in to comment.