Spaces:
Runtime error
Runtime error
| from ultralytics import YOLO | |
| import numpy as np | |
| from PIL import Image | |
| import matplotlib.pyplot as plt | |
| model=YOLO('yolov10n.pt') | |
| file="su57.jpg" | |
| image=Image.open(file) | |
| results=model.predict(source=np.array(image)) | |
| result_images=results[0].plot() | |
| plt.imshow(result_images) | |
| plt.axis('off') | |
| plt.show() |