Unverified 提交 0de4a9c3 authored 作者: Glenn Jocher's avatar Glenn Jocher 提交者: GitHub

Add `--conf-thres` >> 0.001 warning (#5567)

Partially addresses invalid mAPs at higher confidence threshold issue https://github.com/ultralytics/yolov5/issues/1466.
上级 b8f979ba
...@@ -330,6 +330,8 @@ def main(opt): ...@@ -330,6 +330,8 @@ def main(opt):
check_requirements(requirements=ROOT / 'requirements.txt', exclude=('tensorboard', 'thop')) check_requirements(requirements=ROOT / 'requirements.txt', exclude=('tensorboard', 'thop'))
if opt.task in ('train', 'val', 'test'): # run normally 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 will produce invalid mAP values.')
run(**vars(opt)) run(**vars(opt))
elif opt.task == 'speed': # speed benchmarks elif opt.task == 'speed': # speed benchmarks
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论