| from ultralytics import YOLO | |
| model = YOLO("./yolo26m_best.pt") | |
| results = model.predict( | |
| source="./test.jpg", | |
| imgsz=640, | |
| conf=0.25, | |
| device=0, | |
| # classes=[1, 7, 8], | |
| save=True, | |
| save_txt=True, | |
| project="./output", | |
| show_labels=False, | |
| line_width=2, | |
| exist_ok=True | |
| ) |