Commit
•
09ba6f6
1
Parent(s):
2373c50
Add warning emoji ⚠️ on `--conf > 0.001` (#8005)
Browse files* Add warning emoji on `--conf > 0.001`
* Update val.py
val.py
CHANGED
@@ -38,7 +38,7 @@ from models.common import DetectMultiBackend
|
|
38 |
from utils.callbacks import Callbacks
|
39 |
from utils.dataloaders import create_dataloader
|
40 |
from utils.general import (LOGGER, check_dataset, check_img_size, check_requirements, check_yaml,
|
41 |
-
coco80_to_coco91_class, colorstr, increment_path, non_max_suppression, print_args,
|
42 |
scale_coords, xywh2xyxy, xyxy2xywh)
|
43 |
from utils.metrics import ConfusionMatrix, ap_per_class, box_iou
|
44 |
from utils.plots import output_to_target, plot_images, plot_val_study
|
@@ -363,7 +363,7 @@ def main(opt):
|
|
363 |
|
364 |
if opt.task in ('train', 'val', 'test'): # run normally
|
365 |
if opt.conf_thres > 0.001: # https://github.com/ultralytics/yolov5/issues/1466
|
366 |
-
LOGGER.info(f'WARNING: confidence threshold {opt.conf_thres}
|
367 |
run(**vars(opt))
|
368 |
|
369 |
else:
|
|
|
38 |
from utils.callbacks import Callbacks
|
39 |
from utils.dataloaders import create_dataloader
|
40 |
from utils.general import (LOGGER, check_dataset, check_img_size, check_requirements, check_yaml,
|
41 |
+
coco80_to_coco91_class, colorstr, emojis, increment_path, non_max_suppression, print_args,
|
42 |
scale_coords, xywh2xyxy, xyxy2xywh)
|
43 |
from utils.metrics import ConfusionMatrix, ap_per_class, box_iou
|
44 |
from utils.plots import output_to_target, plot_images, plot_val_study
|
|
|
363 |
|
364 |
if opt.task in ('train', 'val', 'test'): # run normally
|
365 |
if opt.conf_thres > 0.001: # https://github.com/ultralytics/yolov5/issues/1466
|
366 |
+
LOGGER.info(emojis(f'WARNING: confidence threshold {opt.conf_thres} > 0.001 produces invalid results ⚠️'))
|
367 |
run(**vars(opt))
|
368 |
|
369 |
else:
|