mirror of
https://github.com/THU-MIG/yolov10.git
synced 2025-05-23 21:44:22 +08:00
Compare commits
2 Commits
8900452ca2
...
2aafd3e9d9
Author | SHA1 | Date | |
---|---|---|---|
![]() |
2aafd3e9d9 | ||
![]() |
84b18f968c |
@ -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