Skip to main content

Meta HB Toolkit

Project description

metahb

metahb部署通用框架

1、安装最新版 meta-cv

pip install meta-cv

2、安装最新版 meta-hb

pip install meta-hb

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

import platform, cv2
import metahb as mh

Detection = mh.DetectionHB

y = Detection(model_path='models/yolov8m.onnx' if platform.machine() == 'x86_64' else 'models/yolov8m.bin',
              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.onnx' if platform.machine() == 'x86_64' else 'models/yolov8m-seg.bin',
            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-hb-0.0.1.tar.gz (2.7 kB view details)

Uploaded Source

Built Distribution

meta_hb-0.0.1-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

Details for the file meta-hb-0.0.1.tar.gz.

File metadata

  • Download URL: meta-hb-0.0.1.tar.gz
  • Upload date:
  • Size: 2.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.7.10

File hashes

Hashes for meta-hb-0.0.1.tar.gz
Algorithm Hash digest
SHA256 c947d99b3b9642f0a1f3d7fb235ec8145dda43a17823a312b6f974240310bd8f
MD5 5d01dfd52d1f2df6c31a22fab5de889d
BLAKE2b-256 93c95bf3d291da9104ed4c116198c6dcbf3052dbd0ce73934ad0b9aeb01f41ae

See more details on using hashes here.

File details

Details for the file meta_hb-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: meta_hb-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 4.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.7.10

File hashes

Hashes for meta_hb-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d5189813100e97f12a07e328a78be8af30b59e9683c8b09675d565763c078788
MD5 7fbf1ed83395a5014ba4f1831f377558
BLAKE2b-256 55ffbf707d5071c4886f0fc8bfc3705a30700ca5da4d225ad5b49418e5243ab4

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