Hello, I’m trying to infer yolov8m-seg trained on my data. Steps I already do:
-
Export from “.pt” to “.onnx”, using Ultralytics API. When I export, I forgot to set imgz, so default imgz is 640x640 (if I understand correct)
-
Export from “.onnx” to “.hef”, using hailomz compile. Path to yaml file I set as suggested in Hailo Model Zoo documentation (hailo_model_zoo/cfg/networks/yolov8s-seg.yaml). I changed nothing in this config(i’m not sure if i need to). Full command: hailomz compile --ckpt my-yolov8m-seg.onnx --calib-path /path/to/calibration/imgs/dir/ --yaml path/to/yolov8m-seg.yaml.
-
Trying to infer. I pass some batch of shape [1, 640, 640, 3] and receive some output from model.
Config:
base:
- base/yolov8_seg.yaml
network:
network_name: yolov8m_seg
paths:
alls_script: yolov8m_seg.alls
network_path:
- models_files/InstanceSegmentation/coco/yolov8/yolov8m/pretrained/2023-03-06/yolov8m-seg.onnx
url: https://hailo-model-zoo.s3.eu-west-2.amazonaws.com/InstanceSegmentation/coco/yolov8/yolov8m/pretrained/2023-03-06/yolov8m-seg.zip
parser:
nodes:
- null
- - /model.22/cv2.2/cv2.2.2/Conv
- /model.22/cv3.2/cv3.2.2/Conv
- /model.22/cv4.2/cv4.2.2/Conv
- /model.22/cv2.1/cv2.1.2/Conv
- /model.22/cv3.1/cv3.1.2/Conv
- /model.22/cv4.1/cv4.1.2/Conv
- /model.22/cv2.0/cv2.0.2/Conv
- /model.22/cv3.0/cv3.0.2/Conv
- /model.22/cv4.0/cv4.0.2/Conv
- /model.22/proto/cv3/act/Mul
info:
task: instance segmentation
input_shape: 640x640x3
output_shape: 20x20x64, 20x20x80, 20x20x32, 40x40x64, 40x40x80, 40x40x32, 80x80x64,
80x80x80, 80x80x32, 160x160x32
operations: 110.2G
parameters: 27.3M
framework: pytorch
training_data: coco instances train2017
validation_data: coco instances val2017
eval_metric: mAP
full_precision_result: 40.6
source: https://github.com/ultralytics/ultralytics
license_url: https://github.com/ultralytics/ultralytics/blob/main/LICENSE
license_name: GPL-3.0
I receive 6 outputs with shape mentioned in yaml config.
Question: what should I do with this 6 outputs ? Should I pass them somewhere else ? Or I need change these outputs to another layers names (check my onnx in netron and change outputs ?) ?
Feel free to ask questions
Thanks for help!