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.3.tar.gz
(231.4 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file yolov9_trunk-0.0.2.3.tar.gz.
File metadata
- Download URL: yolov9_trunk-0.0.2.3.tar.gz
- Upload date:
- Size: 231.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1fba1111e12292f3682f1d5182a98f25da72ba5ab7d37ed0fa69f7bf9362c581
|
|
| MD5 |
49ef668603b3ae58a56c7a40b0088c92
|
|
| BLAKE2b-256 |
1484750bb79f323a10c08cec7dd6a2d41a2c394252a5947e176aa4ad864a6efc
|
File details
Details for the file yolov9_trunk-0.0.2.3-py3-none-any.whl.
File metadata
- Download URL: yolov9_trunk-0.0.2.3-py3-none-any.whl
- Upload date:
- Size: 285.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c8827b3b02aa02b6f37c2789464170b684e5585ea4a08a9898ed68d4dce56ab5
|
|
| MD5 |
1c6e4b9a2d654ebadefe13f1591817a5
|
|
| BLAKE2b-256 |
b7e8c9ecc8b2f7dbfcdb145ca8bb784d9705a13129985f3aa229601a98133ec9
|