Seeking Demo YOLOv8 Segmentation Example for vim3_npu_applications_lite SDK

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

Ubuntu

Which version of system do you use? Please provide the version of the system here:

vim3-ubuntu-20.04-gnome-linux-4.9-fenix-1.4-221229-emmc.img

Please describe your issue below:

I am trying to run YOLOv8n-seg (segmentation) on the Khadas VIM3 using the vim3_npu_applications_lite SDK.

Post a console log of your issue below:

I converted my YOLOv8n-seg model to ONNX and my model outputs the following tensors:


After converting this ONNX file to yolov8n-seg.nb using AML NPU SDK, I replaced:

vnn_yolov8nseg.h

vnn_yolov8nseg.c

yolov8n-seg.nb 
 inside vim3_npu_applications_lite/yolov8n_seg_demo_x11_usb

I also created and updated:

  • yolov8n_seg_process.c

  • main.cpp

to add segmentation post-processing.

The Problem

Even after fixing multiple compilation issues, the demo only shows the camera stream.
There is no segmentation, no masks, and no detections displayed.

I am requesting , To Guide me @numbqq @Louis-Cheng-Liu for building Demo Example of YOLOv8-Segmentation for VIM3 using khadas/vim3_npu_applications_lite

Hello @Kaustubh45

Maybe you need to dig into the code to check whether the image has been processed by the NPU and you can get the result.

Thanks for your reply. @numbqq

The NPU is processing the image correctly and the detections (bounding boxes + NMS output) are valid. The issue is only with segmentation mask post-processing. The mask prototype tensor is not being read or combined with mask coefficients not correctly, which results in corrupted green mask output. So inference on the NPU works fine; only the mask decoding logic needs to be fixed.

Kindly let me know what inputs you need from me to fix the mask decode logic. I can share model outputs , logs as required.