I am currently facing an issue while attempting to use the Android camera frame directly as input for the SNPE engine. I have followed the steps outlined below:
Converted ONNX into a DLC model using snpe-onnx-to-dlc:
snpe-onnx-to-dlc --no_simplification -i deploy.onnx -o deploy_yuv.dlc --input_encoding "data" nv21 bgr
Quantized the DLC model using snpe-dlc-quantize:
snpe-dlc-quantize --input_dlc deploy_yuv.dlc --input_list image.list --output_dlc deploy_yuv_quantized.dlc
The calibration images in image.list are converted into nv21 format
Run the model on device
the code is following SampleCode, we set SNPEBuilder with setRuntimeProcessorOrder with Runtime_t::DSP and Runtime_t::CPU, and we set "unsignedPD:ON"
However, when using the quantized DLC in YUV format, the following error is encountered:
build engine error: error_code=401; error_message=Network creation has failed. QnnGraph_finalize failed: 1002; error_component=Dl Network; line_no=2196; thread_id=544263146752; error_component=Dl Network; line_no=283; thread_id=544290178296 loadmodel_withdecrypt fail! ret=-1
The device is QCM5430, and the SNPE version is 2.12.0.230626.
However,the quantized DLC in BGR format runs successfully, and the result is correct. Any guidance on how to use YUV as input directly would be greatly appreciated.