From b343c18c8b5f4073917c64e8823297c49aa3b59e Mon Sep 17 00:00:00 2001 From: Desmond Zhu Date: Thu, 29 Aug 2024 15:31:29 -0400 Subject: [PATCH] fix validator --- yolo/tools/solver.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/yolo/tools/solver.py b/yolo/tools/solver.py index 51ceffc0..68bbf181 100644 --- a/yolo/tools/solver.py +++ b/yolo/tools/solver.py @@ -228,8 +228,8 @@ def __init__( with contextlib.redirect_stdout(io.StringIO()): # TODO: load with config file - json_path, _ = locate_label_paths(Path(dataset_cfg.path), dataset_cfg.get("validation", "val")) - if json_path: + json_path, file_type = locate_label_paths(Path(dataset_cfg.path), dataset_cfg.get("validation", "val")) + if json_path and file_type == "json": self.coco_gt = COCO(json_path) def solve(self, dataloader, epoch_idx=1):