mirror of
https://github.com/THU-MIG/yolov10.git
synced 2025-05-23 13:34:23 +08:00
Fix names
bug when exporting YOLOv8-World to ONNX (#8941)
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
This commit is contained in:
parent
5c1277113b
commit
58a05f8e70
@ -71,7 +71,8 @@ class YOLOWorld(Model):
|
||||
"""
|
||||
super().__init__(model=model, task="detect")
|
||||
|
||||
# Assign default COCO class names
|
||||
# Assign default COCO class names when there are no custom names
|
||||
if not hasattr(self.model, "names"):
|
||||
self.model.names = yaml_load(ROOT / "cfg/datasets/coco8.yaml").get("names")
|
||||
|
||||
@property
|
||||
|
Loading…
x
Reference in New Issue
Block a user