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.tar.gz (228.3 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-py3-none-any.whl (282.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: yolov9_trunk-0.0.2.tar.gz
  • Upload date:
  • Size: 228.3 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.tar.gz
Algorithm Hash digest
SHA256 633a47703cdacc071d58f3e0fb06d51e560927411789795d5633bdeb8d87b4c3
MD5 c4bd0c27ee231720389fb1bbb8819951
BLAKE2b-256 56e0c4c6e7348cf60548e3266b27ba6364cc6ba9674e8488b0d69c1b4d4f3b29

See more details on using hashes here.

File details

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

File metadata

  • Download URL: yolov9_trunk-0.0.2-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-py3-none-any.whl
Algorithm Hash digest
SHA256 ad5e3478129ec72ac968fd081948170a5b092e94f2166819273ee2c6fdcaf229
MD5 b6ce54e0ba27003c0a292c4af273a9fd
BLAKE2b-256 b2d6b25c57ae7e29a7e30e9d47d8b0acef51b0c3f9d4b8961dbb78502739ad60

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