Spaces:
Runtime error
Runtime error
File size: 316 Bytes
253e609 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
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() |