Skip to main content

Meta Onnx Toolkit

Project description

metaonnx

metaonnx部署通用框架

1、安装最新版 meta-cv

pip install meta-cv

2、安装最新版 meta-onnx

pip install meta-onnx

3、目标检测示例(参考detection_demo.py代码)

import platform, cv2
import metaonnx as mo

Detection = mo.DetectionOnnx

y = Detection(model_path='models/yolov8m.onnx',
              input_width=640,
              input_height=480,
              confidence_thresh=0.5,
              nms_thresh=0.3,
              class_names=classnames)

img = cv2.imread('models/bus.jpg')
_dets, _scores, _labels = y.predict(cv2.cvtColor(img, cv2.COLOR_BGR2RGB), use_preprocess=True)

# 显示
y.show(img, _dets, _scores, _labels)
cv2.imwrite("models/bus.png", img)

4、实例分割示例(参考segment_demo.py代码)

import platform, cv2
import metaonnx as mo

Segment = mo.SegmentOnnx

y = Segment(model_path='models/yolov8m-seg.rknn',
            input_width=640,
            input_height=480,
            confidence_thresh=0.5,
            nms_thresh=0.3,
            class_names=classnames)

img = cv2.imread('models/bus.jpg')
_dets, _scores, _labels = y.predict(cv2.cvtColor(img, cv2.COLOR_BGR2RGB), use_preprocess=True)

# 显示
y.show(img, _dets, _scores, _labels)
cv2.imwrite("models/bus.png", img)

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

meta-onnx-0.0.2.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

meta_onnx-0.0.2-py3-none-any.whl (8.8 kB view details)

Uploaded Python 3

File details

Details for the file meta-onnx-0.0.2.tar.gz.

File metadata

  • Download URL: meta-onnx-0.0.2.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.9.6 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/1.0.0 urllib3/1.26.15 tqdm/4.64.0 importlib-metadata/4.2.0 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.5 CPython/3.6.13

File hashes

Hashes for meta-onnx-0.0.2.tar.gz
Algorithm Hash digest
SHA256 069e39905315f671d61574ebb36d4eb0e54f7e7c2f72497ec0834f3ff811945a
MD5 9b9ba0c4f1289c0b409642a57e802e12
BLAKE2b-256 497cbbe027581d344c9a1e3e9854d4a174adb7d039667832b527b51b0d083fae

See more details on using hashes here.

File details

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

File metadata

  • Download URL: meta_onnx-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 8.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.9.6 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/1.0.0 urllib3/1.26.15 tqdm/4.64.0 importlib-metadata/4.2.0 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.5 CPython/3.6.13

File hashes

Hashes for meta_onnx-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ed96e860150ff22435d9a756b15b4557a2340d7b4c97eb13ebd55413e6250704
MD5 ad7f21d563582b22e5672708e480f521
BLAKE2b-256 af54f224d2804bfb0a8249ef04edf23bed9ef0cd52a7db4d369b5dc41cf96ff8

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