Skip to main content

yolov9-trunk

Project description

🤗 Citation

This code was forked from yolov9pip.

Description

This code is lightly updated to allow use of Pytorch >2.6 as an imported library.

This repo is a packaged version of the Yolov9 model.

⭐ Installation

pip install yolov9pip

🌠 Yolov9 Inference

import yolov9

# load pretrained or custom model
model = yolov9.load(
    "yolov9-c.pt",
    device="cpu",
)

# 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 = "data/zidane.jpg"

# perform inference
results = model(imgs)

# inference with larger input size and test time augmentation
results = model(img, size=640)

# 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()

😍 Contributing

pip install -r dev-requirements.txt
pre-commit install
pre-commit run --all-files

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

yolov9_trunk-0.0.2.1.tar.gz (228.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

yolov9_trunk-0.0.2.1-py3-none-any.whl (282.4 kB view details)

Uploaded Python 3

File details

Details for the file yolov9_trunk-0.0.2.1.tar.gz.

File metadata

  • Download URL: yolov9_trunk-0.0.2.1.tar.gz
  • Upload date:
  • Size: 228.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for yolov9_trunk-0.0.2.1.tar.gz
Algorithm Hash digest
SHA256 f3d6975e3494c371d9fb61b92bb1d1c719b27986dda50852e8b68d6bcd5b27e3
MD5 ccb2449b7965a921ca9eaf39dfa969da
BLAKE2b-256 3224763638954b479e1cb8aef85313cdfb1dce60685e6be1b8530a7006843fb4

See more details on using hashes here.

File details

Details for the file yolov9_trunk-0.0.2.1-py3-none-any.whl.

File metadata

  • Download URL: yolov9_trunk-0.0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 282.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for yolov9_trunk-0.0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 844ae609b24d673f710daa69cfda9de87951377886dc0dffe31702ad4700b757
MD5 c619e81be4a7916e2e46764885bc06d2
BLAKE2b-256 7d94c9ad0398b8576996737101ad935ca5f01cc05d67157780679ead311adff4

See more details on using hashes here.

Supported by

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