Skip to main content

Meta TR Toolkit

Project description

metart

metahb部署通用框架

1、安装最新版 meta-cv

pip install meta-cv

2、安装最新版 meta-rt

pip install meta-rt

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

import platform, cv2
import metart as mr

Detection = mr.DetectionRT

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

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 metahb as hb

Segment = mr.SegmentHB

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

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

Uploaded Source

Built Distribution

meta_rt-0.1.0-py3-none-any.whl (9.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: meta-rt-0.1.0.tar.gz
  • Upload date:
  • Size: 4.8 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.0.tar.gz
Algorithm Hash digest
SHA256 2cac6e9b1ed12bfc016d92fa18b693211ce8d77c251d94e313f008041694bbae
MD5 19b66f97369cd2a1d7c3f79101bf1894
BLAKE2b-256 25758a59d0316a345a25316e6615503bed51fc9d4c682a808f88ad8333ad7111

See more details on using hashes here.

File details

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

File metadata

  • Download URL: meta_rt-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 9.1 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6bb34b5acdadd5b0f1695458a0fbee4c835a661b8158f4349cc822d06d5540ec
MD5 03dd6fef12740753157a2bf76e67cc22
BLAKE2b-256 44ef1968e5177edf099bd6abd8fe6f7b644025a6a9250de324e011e5d4e3d23c

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