Downloads · 30 days
8
0% of all-time downloads
Jonathancasjar/Retail_Shelves
Retail_Shelves is a machine learning model from Jonathancasjar. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for transformers. The card lists the license as apache-2.0.
<div style="text-align:center;" <img style="margin: 0 auto;" width="700" src="https://huggingface.co/Jonathancasjar/RetailShelves/resolve/main/testimages/image.png"/ </div
Downloads · 30 days
8
0% of all-time downloads
All-time downloads
10.2K
Public
Repo size
398 MB
Likes
5
Public
Click a slice to open those files.
.pt168 MB · 91%
From the Hugging Face model README
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'
import yolov5
# load model
model = yolov5.load('Jonathancasjar/Retail_Shelves')
# set model parameters
model.conf = 0.25 # NMS confidence threshold
# set an image
img = '/content/image.jpg'
# perform inference
results = model(img, size=640)
# inference with test time augmentation
results = model(img, augment=True)
# parse results
predictions = results.pred[0]
boxes = predictions[:, :4] # x1, y1, x2, y2
scores = predictions[:, 4]
categories = predictions[:, 5]
# show detection bounding boxes on image
results.show()
# save results into "results/" folder
results.save(save_dir='results/')