Downloads · 30 days
0
kadirnar/yolov7-tiny-v0.1
yolov7-tiny-v0.1 is a object detection model from kadirnar. Use it when you need objects located in an image. The card lists the license as gpl-3.0.
YOLOv7: Trainable bag-of-freebies sets new state-of-the-art for real-time object detectors
Downloads · 30 days
0
Access
Public
Updated Dec 22, 2022
Repo size
12.6 MB
Likes
1
Public
Click a slice to open those files.
.pt12.6 MB · 100%
From the Hugging Face model README
YOLOv7: Trainable bag-of-freebies sets new state-of-the-art for real-time object detectors
YOLOv7-Pip: Packaged version of the Yolov7 repository
Paper Repo: Implementation of paper - YOLOv7
pip install yolov7detect
import yolov7
# load pretrained or custom model
model = yolov7.load('kadirnar/yolov7-tiny-v0.1', hf_model=True)
# set model parameters
model.conf = 0.25 # NMS confidence threshold
model.iou = 0.45 # NMS IoU threshold
model.classes = None # (optional list) filter by class
# set image
imgs = 'inference/images'
# perform inference
results = model(imgs)
# inference with larger input size and test time augmentation
results = model(img, size=1280, 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()
@article{wang2022yolov7,
title={{YOLOv7}: Trainable bag-of-freebies sets new state-of-the-art for real-time object detectors},
author={Wang, Chien-Yao and Bochkovskiy, Alexey and Liao, Hong-Yuan Mark},
journal={arXiv preprint arXiv:2207.02696},
year={2022}
}