Skip to main content

Deploy YOLO-Seg ONNX model with ONNX Runtime

Project description

yolo-seg-ort

Contributors Forks Stargazers Issues MIT License LinkedIn


Logo

yolo-seg-ort

采用纯ONNX Runtime实现YOLOv11-seg的onnx模型。
探索本项目的文档 »

查看发布 · 报告Bug · 提出新特性

1. 模型转换

from ultralytics import YOLO

# Load the YOLO11 model
model = YOLO("best.pt")

# Export the model to ONNX format
model.export(format="onnx")  # creates 'yolo11n.onnx'

2. 安装依赖

pip install -r requirements.txt

3. 用法

from yolo_seg_ort import YOLOSeg
import cv2

onnx_path = "best.onnx"
image_path = "test.jpg"

image = cv2.imread(image_path)

model = YOLOSeg(
    onnx_model=onnx_path,
    classes=["Grass", "Ground", "Ramp", "Road", "Stairs"],
    conf=0.25,
    iou=0.7,
    imgsz=640,
)

result = model(image)

if result:
    result[0].save("./results.jpg")
    # result[0].show()
else:
    print("未检测到任何对象或结果为空。")

4. 结果

5. 贡献者

7emotions

6. 许可证

本项目采用 MIT 许可证。有关详细信息,请查看 LICENSE 文件。

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

yolo_seg_ort-1.0.1.tar.gz (9.3 kB view details)

Uploaded Source

Built Distribution

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

yolo_seg_ort-1.0.1-py3-none-any.whl (8.8 kB view details)

Uploaded Python 3

File details

Details for the file yolo_seg_ort-1.0.1.tar.gz.

File metadata

  • Download URL: yolo_seg_ort-1.0.1.tar.gz
  • Upload date:
  • Size: 9.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for yolo_seg_ort-1.0.1.tar.gz
Algorithm Hash digest
SHA256 8550cc137f35fe237a5b1e9c396ce21ed8276cc62ac0526682f137b44a74dc2c
MD5 3310fb8813a24e97cf53d8a6e60ab762
BLAKE2b-256 435960cc431fb82819cce5861d168a0e276903458f0cea59c9c4cde5159354af

See more details on using hashes here.

Provenance

The following attestation bundles were made for yolo_seg_ort-1.0.1.tar.gz:

Publisher: python-publish.yml on 7emotions/yolo-seg-ort

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file yolo_seg_ort-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: yolo_seg_ort-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 8.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for yolo_seg_ort-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7bb682a242584748716048f2c16141a510347eda71f266660de7d0cbde7d1a52
MD5 4050d1f5f97a62295514d9516fb669a4
BLAKE2b-256 951f8fb7f6e0c678f91c93b171dd7b52ed6e3b2b7939b8c29b3d9942bba8805c

See more details on using hashes here.

Provenance

The following attestation bundles were made for yolo_seg_ort-1.0.1-py3-none-any.whl:

Publisher: python-publish.yml on 7emotions/yolo-seg-ort

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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