pip install yolov5==7.0.5
wget -O 'image.jpg' 'https://images.unsplash.com/photo-1556767576-cf0a4a80e5b8?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxzZWFyY2h8NXx8c3VwZXJtYXJrZXQlMjBzaGVsdmVzfGVufDB8fDB8fHww&w=1000&q=80'
- Load model and perform prediction:
import yolov5
model = yolov5.load('Jonathancasjar/Retail_Shelves')
model.conf = 0.25
img = '/content/image.jpg'
results = model(img, size=640)
results = model(img, augment=True)
predictions = results.pred[0]
boxes = predictions[:, :4]
scores = predictions[:, 4]
categories = predictions[:, 5]
results.show()
results.save(save_dir='results/')