From bb7e8a135fe754c022d1e36aaff457ac383545e9 Mon Sep 17 00:00:00 2001 From: zhima <15836938703@163.com> Date: Wed, 27 Aug 2025 16:19:20 +0800 Subject: [PATCH] fix: create results_dir if missing before saving results --- inference.py | 1 + 1 file changed, 1 insertion(+) diff --git a/inference.py b/inference.py index 4645799c89..7ccaa334ce 100755 --- a/inference.py +++ b/inference.py @@ -345,6 +345,7 @@ def main(): results_filename = f'{args.model}-{img_size}' if args.results_dir: + os.makedirs(args.results_dir, exist_ok=True) results_filename = os.path.join(args.results_dir, results_filename) for fmt in args.results_format: