<div align="center">
<h2>
Yolov7-Pip: Packaged version of the Yolov7 repository
</h2>
<h4>
<img width="500" alt="teaser" src="docs/paper.png">
</h4>
<div>
<a href="https://pepy.tech/project/yolov7detect"><img src="https://pepy.tech/badge/yolov7detect" alt="downloads"></a>
<a href="https://badge.fury.io/py/yolov7detect"><img src="https://badge.fury.io/py/yolov7detect.svg" alt="pypi version"></a>
<a href="https://huggingface.co/spaces/kadirnar/yolov7"><img src="https://img.shields.io/badge/%20HuggingFace%20-Demo-blue.svg" alt="HuggingFace Spaces"></a>
</div>
</div>
## <div align="center">Overview</div>
This 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.
Raw data
{
"_id": null,
"home_page": "https://github.com/kadirnar/yolov7-pip",
"name": "yolov7detect",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": "",
"keywords": "machine-learning,deep-learning,pytorch,vision,image-classification,object-detection,yolov7,detector,yolov5",
"author": "kadirnar",
"author_email": "",
"download_url": "https://files.pythonhosted.org/packages/81/c5/bdebbae697003981a25c7560bf27c5338845952fa23265ab47d585d63621/yolov7detect-1.0.1.tar.gz",
"platform": null,
"description": "<div align=\"center\">\n<h2>\n Yolov7-Pip: Packaged version of the Yolov7 repository \n</h2>\n<h4>\n <img width=\"500\" alt=\"teaser\" src=\"docs/paper.png\">\n</h4>\n<div>\n <a href=\"https://pepy.tech/project/yolov7detect\"><img src=\"https://pepy.tech/badge/yolov7detect\" alt=\"downloads\"></a>\n <a href=\"https://badge.fury.io/py/yolov7detect\"><img src=\"https://badge.fury.io/py/yolov7detect.svg\" alt=\"pypi version\"></a>\n <a href=\"https://huggingface.co/spaces/kadirnar/yolov7\"><img src=\"https://img.shields.io/badge/%20HuggingFace%20-Demo-blue.svg\" alt=\"HuggingFace Spaces\"></a>\n</div>\n</div>\n\n## <div align=\"center\">Overview</div>\n\nThis repo is a packaged version of the [Yolov7](https://github.com/WongKinYiu/yolov7) model.\n### Installation\n```\npip install yolov7detect\n```\n\n### Yolov7 Inference\n```python\nimport yolov7\n\n# load pretrained or custom model\nmodel = yolov7.load('yolov7.pt')\n#model = yolov7.load('kadirnar/yolov7-v0.1', hf_model=True)\n\n# set model parameters\nmodel.conf = 0.25 # NMS confidence threshold\nmodel.iou = 0.45 # NMS IoU threshold\nmodel.classes = None # (optional list) filter by class\n\n# set image\nimgs = 'inference/images'\n\n# perform inference\nresults = model(imgs)\n\n# inference with larger input size and test time augmentation\nresults = model(img, size=1280, augment=True)\n\n# parse results\npredictions = results.pred[0]\nboxes = predictions[:, :4] # x1, y1, x2, y2\nscores = predictions[:, 4]\ncategories = predictions[:, 5]\n\n# show detection bounding boxes on image\nresults.show()\n```\n### Citation\n```bibtex\n@article{wang2022yolov7,\n title={{YOLOv7}: Trainable bag-of-freebies sets new state-of-the-art for real-time object detectors},\n author={Wang, Chien-Yao and Bochkovskiy, Alexey and Liao, Hong-Yuan Mark},\n journal={arXiv preprint arXiv:2207.02696},\n year={2022}\n}\n```\n### Acknowledgement\nA part of the code is borrowed from [Yolov5-pip](https://github.com/fcakyon/yolov5-pip). Many thanks for their wonderful works.\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Packaged version of the Yolov7 repository",
"version": "1.0.1",
"split_keywords": [
"machine-learning",
"deep-learning",
"pytorch",
"vision",
"image-classification",
"object-detection",
"yolov7",
"detector",
"yolov5"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "81c5bdebbae697003981a25c7560bf27c5338845952fa23265ab47d585d63621",
"md5": "4aba5ba70b69f406f5b5dc9ca89e1169",
"sha256": "08e3c93cb2963adc7da03dd2c48c80f9c07436b0abb00c8e101d416e5cceb738"
},
"downloads": -1,
"filename": "yolov7detect-1.0.1.tar.gz",
"has_sig": false,
"md5_digest": "4aba5ba70b69f406f5b5dc9ca89e1169",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 122455,
"upload_time": "2023-02-10T06:06:28",
"upload_time_iso_8601": "2023-02-10T06:06:28.482758Z",
"url": "https://files.pythonhosted.org/packages/81/c5/bdebbae697003981a25c7560bf27c5338845952fa23265ab47d585d63621/yolov7detect-1.0.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-02-10 06:06:28",
"github": true,
"gitlab": false,
"bitbucket": false,
"github_user": "kadirnar",
"github_project": "yolov7-pip",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [],
"lcname": "yolov7detect"
}