From 1b610d2d99359406cedbedf976fee8bad1f5942c Mon Sep 17 00:00:00 2001 From: Chikage0o0 <89348590+Chikage0o0@users.noreply.github.com> Date: Mon, 10 Jul 2023 20:45:31 +0800 Subject: [PATCH] fix image_file path --- nanodet/data/dataset/yolo.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nanodet/data/dataset/yolo.py b/nanodet/data/dataset/yolo.py index 6c5efff40..ba7f3fc21 100644 --- a/nanodet/data/dataset/yolo.py +++ b/nanodet/data/dataset/yolo.py @@ -83,7 +83,8 @@ def yolo_to_coco(self, ann_path): for idx, txt_name in enumerate(ann_file_names): ann_file = os.path.join(ann_path, txt_name) - image_file = self._find_image(os.path.splitext(ann_file)[0]) + image_file = self._find_image(os.path.join( + self.img_path, os.path.splitext(txt_name)[0])) if image_file is None: logging.warning(f"Could not find image for {ann_file}")