Skip to main content

metart

metart部署通用框架

1、安装最新版 meta-cv

pip install meta-cv

2、安装最新版 meta-rt

pip install meta-rt

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

import platform, cv2
import metart as m

Detection = m.Detection

y = Detection(model_path='models/yolov8m.rt',
              input_width=640,
              input_height=480,
              use_preprocess=True,
              pad=True,
              normal=True,
              swap=(2, 0, 1),
              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 platform, cv2
import metart as m

Segment = m.Segment

y = Segment(model_path='models/yolov8m-seg.rt',
            input_width=640,
            input_height=480,
            use_preprocess=True,
            pad=True,
            normal=True,
            swap=(2, 0, 1),
            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-rt 0.1.4

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-rt 0.1.4
File Size Uploaded Provenance Actions
meta-rt-0.1.4.tar.gz 5.2 kB Without provenance Details for meta-rt-0.1.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for meta-rt 0.1.4
File Interpreter ABI Platform Actions
meta_rt-0.1.4-py3-none-any.whl Python 3 none any Details for meta_rt-0.1.4-py3-none-any.whl

Total release size: 16.1 kB

Release files / meta-rt-0.1.4.tar.gz

Download URL meta-rt-0.1.4.tar.gz
Size 5.2 kB
Tags Source
SHA-256 checksum
How to use checksums
b28b4866fab21b3311ec507c41c9e3e3bb64373001314390df1b088956e73c0e
BLAKE2b-256 checksum
How to use checksums
7ed05a6fee588fb17b252c8c7dcedb1ba9644154fa3008db554ec47fb17ae1bf
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / meta_rt-0.1.4-py3-none-any.whl

Download URL meta_rt-0.1.4-py3-none-any.whl
Size 10.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
529add24c2b96b94e71233ce8ee0cc4739abb0662607268b3d4d65e8115d5421
BLAKE2b-256 checksum
How to use checksums
367be46252453174c326c8d60adbc92467bf6514500f66e51ed52fcb725485ed
Upload date
Uploaded using Trusted Publishing?
What is 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

Security for meta-rt 0.1.4

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