Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kadirnar/yolov7-pip
This repo is a packaged version of the Yolov7 model.
https://github.com/kadirnar/yolov7-pip
computer-vision object-detection yolov7
Last synced: about 1 month ago
JSON representation
This repo is a packaged version of the Yolov7 model.
- Host: GitHub
- URL: https://github.com/kadirnar/yolov7-pip
- Owner: kadirnar
- License: mit
- Created: 2022-11-22T10:12:50.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-03-15T17:00:54.000Z (11 months ago)
- Last Synced: 2024-05-01T16:28:38.766Z (10 months ago)
- Topics: computer-vision, object-detection, yolov7
- Language: Python
- Homepage:
- Size: 66.2 MB
- Stars: 24
- Watchers: 2
- Forks: 8
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-yolo-object-detection - kadirnar/yolov7-pip - pip?style=social"/> : Packaged version of yolov7 model. (Other Versions of YOLO)
- awesome-yolo-object-detection - kadirnar/yolov7-pip - pip?style=social"/> : Packaged version of yolov7 model. (Other Versions of YOLO)
README
##
OverviewThis repo is a packaged version of the [Yolov7](https://github.com/WongKinYiu/yolov7) model.
### Installation
```
pip install yolov7detect
```### Yolov7 Inference
```python
import yolov7# load pretrained or custom model
model = yolov7.load('yolov7.pt')
#model = yolov7.load('kadirnar/yolov7-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()
```
### Citation
```bibtex
@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}
}
```
### Acknowledgement
A part of the code is borrowed from [Yolov5-pip](https://github.com/fcakyon/yolov5-pip). Many thanks for their wonderful works.