Skip to main content

Packaged version of the Yolov7 repository

Project description

Yolov7-Pip: Packaged version of the Yolov7 repository

teaser

Overview

This repo is a packaged version of the Yolov7 model.

Installation

pip install yolov7detect

Yolov7 Inference

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

@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. Many thanks for their wonderful works.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

yolov7detect-0.3.1.tar.gz (122.2 kB view details)

Uploaded Source

File details

Details for the file yolov7detect-0.3.1.tar.gz.

File metadata

  • Download URL: yolov7detect-0.3.1.tar.gz
  • Upload date:
  • Size: 122.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.10

File hashes

Hashes for yolov7detect-0.3.1.tar.gz
Algorithm Hash digest
SHA256 92c14218aa80dafabf06875892d0cb3e20657d7a019029e255558a7d124425f7
MD5 5476c484bb128cf15df8ec77f415a82b
BLAKE2b-256 aa1be6f6625b4fb8c37ecb3b5b0f1caac6c6e8e8dd4faf25ddfd878232d143bf

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page