diff --git a/ultralytics/engine/results.py b/ultralytics/engine/results.py index 029e4471e0..8de0a2e6a1 100644 --- a/ultralytics/engine/results.py +++ b/ultralytics/engine/results.py @@ -750,7 +750,7 @@ class Results(SimpleClass): save_one_box( d.xyxy, self.orig_img.copy(), - file=Path(save_dir) / self.names[int(d.cls)] / f"{Path(file_name)}.jpg", + file=Path(save_dir) / self.names[int(d.cls)] / Path(file_name).with_suffix(".jpg"), BGR=True, )