From 0c62f8575077c6640c3fc4ad76d2e4fc820987ae Mon Sep 17 00:00:00 2001 From: setwgx <67215359+setwgx@users.noreply.github.com> Date: Sun, 28 May 2023 22:23:10 +0800 Subject: [PATCH] Fix KeyError:line_thickness (#2852) Co-authored-by: Glenn Jocher --- ultralytics/yolo/engine/results.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ultralytics/yolo/engine/results.py b/ultralytics/yolo/engine/results.py index 94b82f4..7809353 100644 --- a/ultralytics/yolo/engine/results.py +++ b/ultralytics/yolo/engine/results.py @@ -197,7 +197,7 @@ class Results(SimpleClass): conf = kwargs['show_conf'] assert type(conf) == bool, '`show_conf` should be of boolean type, i.e, show_conf=True/False' - if 'show_conf' in kwargs: + if 'line_thickness' in kwargs: deprecation_warn('line_thickness', 'line_width') line_width = kwargs['line_thickness'] assert type(line_width) == int, '`line_width` should be of int type, i.e, line_width=3'