Skip to main content

metaom

metaom部署通用框架

1、安装最新版 meta-cv

pip install meta-cv

2、安装最新版 meta-om

pip install meta-om

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

import cv2, platform
import metaom as m

Detection = m.Detection

y = Detection(
    model_path='models/yolov8m-seg_quantized_model.om',
    input_width=640,
    input_height=480,
    use_preprocess=True,
    pad=True,
    confidence_thresh=0.5,
    nms_thresh=0.3,
    class_names=classnames,
    device_id=0)

batch_size = 1
img = cv2.imread('models/bus.jpg')
img_list = [img[:, :, ::-1]] * batch_size if batch_size > 1 else img[:, :, ::-1]
_dets, _scores, _labels = y.predict(img_list)

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

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

import cv2, platform
import metaom as m

Segment = m.Segment

y = Segment(
    model_path='models/yolov8m-seg_quantized_model.om',
    input_width=640,
    input_height=480,
    use_preprocess=True,
    pad=True,
    confidence_thresh=0.5,
    nms_thresh=0.3,
    class_names=classnames,
    device_id=0)

batch_size = 1
img = cv2.imread('models/bus.jpg')
img_list = [img[:, :, ::-1]] * batch_size if batch_size > 1 else img[:, :, ::-1]
_dets, _scores, _labels = y.predict(img_list)

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

Metadata

Release files for meta-om 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for meta-om 0.2.1
File Size Uploaded Provenance Actions
meta_om-0.2.1.tar.gz 5.4 kB Without provenance Details for meta_om-0.2.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for meta-om 0.2.1
File Interpreter ABI Platform Actions
meta_om-0.2.1-py3-none-any.whl Python 3 none any Details for meta_om-0.2.1-py3-none-any.whl

Total release size: 13.0 kB

Release files / meta_om-0.2.1.tar.gz

Download URL meta_om-0.2.1.tar.gz
Size 5.4 kB
Tags Source
SHA-256 checksum
How to use checksums
97668b0cbf90aa025f759036ca5dd92010f076005320d052a1cb6e48e662ba37
BLAKE2b-256 checksum
How to use checksums
62b43859051e9667a8fd8cb44626a6b87b29c279d56251f2d0dabee1eb61ed77
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.15

Release files / meta_om-0.2.1-py3-none-any.whl

Download URL meta_om-0.2.1-py3-none-any.whl
Size 7.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
67175be5ed4138ce22c6d6cf26aa771146a8dd9a4d10218be61accf79383c4ff
BLAKE2b-256 checksum
How to use checksums
32d5512f3c55d1c96e1da3d5565d6325e576a9a94e346a4329ef1b1a99fc998e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.15

Security for meta-om 0.2.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page