Meta OM Toolkit
Project description
metaom
metaom部署通用框架
1、安装最新版 meta-cv
pip install meta-cv
2、安装最新版 meta-hb
pip install meta-om
3、目标检测示例(参考detection_demo.py代码)
import cv2, platform
import metaom as m
Detection = m.Detection
y = DetectionDetection(
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)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
meta_om-0.1.0.tar.gz
(5.2 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file meta_om-0.1.0.tar.gz.
File metadata
- Download URL: meta_om-0.1.0.tar.gz
- Upload date:
- Size: 5.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
01e20fac48925d4d9a7879dd18445408abf0e18b57c0e3882173cc0e86c5dfa6
|
|
| MD5 |
63bbc3404f0aefc6352aed0ac509735e
|
|
| BLAKE2b-256 |
3fbf9c0c4f4c7d2a288143ca05bb0770ecea705a2856b038d9ff089bfa7c7173
|
File details
Details for the file meta_om-0.1.0-py3-none-any.whl.
File metadata
- Download URL: meta_om-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0f8378f4a9a548a347da209ed7ef8f5b74cb299edf841c3e94ef4ee4618853a5
|
|
| MD5 |
d996d1e42975ce9aa37ae42643a3bdca
|
|
| BLAKE2b-256 |
bf8276f17599b25af9621102b5f7fcf41670c5185fdb7405ad2f94c3e4a8fe7e
|