fix: sync with ultralytics implement

f8e681c2be/ultralytics/models/yolo/model.py (L17)
This commit is contained in:
Dowon
2024-02-29 20:34:35 +09:00
parent 6dcad30b64
commit 6018184ce4

View File

@@ -40,7 +40,7 @@ def ultralytics_predict(
def apply_classes(model, model_path: str | Path, classes: str):
if not classes or not Path(model_path).stem.endswith("world"):
if not classes or "-world" not in Path(model_path).stem:
return
parsed = [c.strip() for c in classes.split(",")]
model.set_classes(parsed)