from ultralytics import YOLOWorld
# Initialize a YOLO-World model
model = YOLOWorld('yolov8s-world.pt')
# Define custom classes
model.set_classes(["person"])
# Execute inference with the YOLOv8s-world on the specified image
results = model.predict('bus.jpg')
# Show results
results[0].show()
06-30
817
03-28
1280
“相关推荐”对你有帮助么?
-
非常没帮助
-
没帮助
-
一般
-
有帮助
-
非常有帮助
提交