From 52d3a9aee1016604652898fed679e55783e264ed Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Fri, 29 Jul 2022 17:07:24 +0200 Subject: [PATCH] Fix `detect.py --update` list bug (#8783) Fix detect.py --update Resolves https://github.com/ultralytics/yolov5/issues/8776 --- detect.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/detect.py b/detect.py index 01ad797ae6f1..8741e7f7fd62 100644 --- a/detect.py +++ b/detect.py @@ -210,7 +210,7 @@ def run( s = f"\n{len(list(save_dir.glob('labels/*.txt')))} labels saved to {save_dir / 'labels'}" if save_txt else '' LOGGER.info(f"Results saved to {colorstr('bold', save_dir)}{s}") if update: - strip_optimizer(weights) # update model (to fix SourceChangeWarning) + strip_optimizer(weights[0]) # update model (to fix SourceChangeWarning) def parse_opt():