ncnn Model inference crash

pobjuy32  于 2022-10-24  发布在  其他
关注(0)|答案(2)|浏览(231)

Hello
How are you?
Thanks for contributing this project.
I made a Keras model for liveness detection, which inputs a cropped face image resized to size 224x224 and outputs a liveness score.
I converted this model to tflite, onnx models and they work well.
I converted the onnx model to NCNN model.
When testing the NCNN model, the inference is crashed.
I used the latest NCNN master version.
I did several experiments but could not the reason.
The obvious is that it is crashed when pass the first convolution layer.
Could u help me?
If u want, I can send the models and inference code together.
Thanks

vmjh9lq9

vmjh9lq91#

ncnn do not support onnx model converted from frameworks other than pytorch

For keras model conversion, see
https://github.com/Tencent/ncnn/tree/master/tools/keras

wj8zmpe1

wj8zmpe12#

Thanks for your reply.
There are several opened tools for keras2ncnn but they do not support any keras model.
I tried to convert with the tools but failed
Is it impossible to contain itself converter for keras model in this github project?
Or is it impossible to support ANY ONNX model -> NCNN model conversion?
I think that this Tencent/NCNN project should contain all the tools for conversion to NCNN model.
The same is true for PyNCNN. I think that this github project should support PyNCNN too.
Of course, there are other github projects for PyNCNN but they often do NOT support the latest NCNN.
I think that peoples will feel many troubles in using NCNN if the above problems are NOT solved.
I hope my humble thought will help.

相关问题