mirror of
https://github.com/Bing-su/adetailer.git
synced 2026-05-01 03:31:21 +00:00
fix: sync with ultralytics implement
f8e681c2be/ultralytics/models/yolo/model.py (L17)
This commit is contained in:
@@ -40,7 +40,7 @@ def ultralytics_predict(
|
|||||||
|
|
||||||
|
|
||||||
def apply_classes(model, model_path: str | Path, classes: str):
|
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
|
return
|
||||||
parsed = [c.strip() for c in classes.split(",")]
|
parsed = [c.strip() for c in classes.split(",")]
|
||||||
model.set_classes(parsed)
|
model.set_classes(parsed)
|
||||||
|
|||||||
Reference in New Issue
Block a user