Skip to main content

Meta TR Toolkit

Project description

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)

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-rt-0.1.2.tar.gz (5.3 kB view details)

Uploaded Source

Built Distribution

meta_rt-0.1.2-py3-none-any.whl (10.7 kB view details)

Uploaded Python 3

File details

Details for the file meta-rt-0.1.2.tar.gz.

File metadata

  • Download URL: meta-rt-0.1.2.tar.gz
  • Upload date:
  • Size: 5.3 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-rt-0.1.2.tar.gz
Algorithm Hash digest
SHA256 91dea7c7078fd4b4d101db0412dfc865bea3a173349ac6e1417f6af2d2a82e58
MD5 c2392ff20542266086f2ad182acf9d48
BLAKE2b-256 cb35ccf96f3de405680a6d97408a5703f8f08e43417e08ea7cbe210569ee7675

See more details on using hashes here.

File details

Details for the file meta_rt-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: meta_rt-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 10.7 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_rt-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 7953d28a56c2f5c925a0a89ee7e844c33ef4f6846f85f97963f41b497ed67be0
MD5 de798118a1a0940ef985eb7bccbde169
BLAKE2b-256 08d8bd7d4be0f93fc471bd6f6bcc67751c2f091cc2de161962fec36dc7954e93

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