Saving masks as files from yolov8l-seg.rknn on npu

Which system do you use? Android, Ubuntu, OOWOW or others?


Which version of system do you use? Khadas official images, self built images, or others?

rknn-lite v1.5.0

Please describe your issue below:

Hello everyone. I’m trying to get masks as .jpg files from inference of yolov8l-seg.rknn model. It exported to .onnx and .rknn well, 0 errors, but the inference i get are 3 torch tensors with shapes [1, 1, 80, 80, 144] [1, 1, 40, 40, 144] [1, 1, 20, 20, 144] - which is OK as far as I can see, however I can’t figure out a way to make anything out of this inference. Please give an advice on how to get masks files of an object.

I used a default yolov8l-seg, pre-trained on COCO, it suits my task pretty well. There is only 1 object on the photo as well, no need to multy-detect.

Hello @Vdol22

@Louis-Cheng-Liu will help you then.

Hello @Vdol22 ,

Sorry, we do not do about image segmentation for YOLO. Our demo only has target detection. It is not the same.

Your three outputs only are the result of detection boxes. So i guess you modify by referring our doc, but our doc only is target detection. I suggest you try to add masks output in function forward_export.