mirror of
https://github.com/THU-MIG/yolov10.git
synced 2025-07-27 11:25:39 +08:00
Merge 84b18f968cbb316787a5fd644efe7454ec50f411 into 6fbaf42b23f6709f4e34a51430587673e70e151d
This commit is contained in:
commit
2aafd3e9d9
@ -65,7 +65,7 @@ class DetectionValidator(BaseValidator):
|
||||
def init_metrics(self, model):
|
||||
"""Initialize evaluation metrics for YOLO."""
|
||||
val = self.data.get(self.args.split, "") # validation path
|
||||
self.is_coco = isinstance(val, str) and "coco" in val and val.endswith(f"{os.sep}val2017.txt") # is COCO
|
||||
self.is_coco = isinstance(val, str) and "coco" in val and (val.endswith(f"{os.sep}val2017.txt") or val.endswith(f"{os.sep}test-dev2017.txt")) # is COCO
|
||||
self.class_map = converter.coco80_to_coco91_class() if self.is_coco else list(range(1000))
|
||||
self.args.save_json |= self.is_coco # run on final val if training COCO
|
||||
self.names = model.names
|
||||
|
Loading…
x
Reference in New Issue
Block a user