Docker2TestVALOD / yolov10_predict.py
datnguyentien204's picture
Upload 8 files
253e609 verified
raw
history blame contribute delete
316 Bytes
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()