![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
MNN
ystsaan
这个作者很懒,什么都没留下…
展开
-
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0(Cause: null pointer dereference)
问题描述:基于mnn编译的面向安卓平台的模型推理so动态在android studio调用其推理函数时报空指针错误(完整错误输出在最后),且错误行在于mnn推理输出的指针数组元素的判断语句(如下代码),但之前使用其他模型时加入类似语句并未报错,所以猜测问题出在了模型上面int* output_tensor_array = output_tensor->host<int>();output_tensor_array[col + 1024 * row] == 2 //此处为addr2li原创 2021-07-12 14:56:17 · 3377 阅读 · 0 评论 -
yolov4 使用mnn在c++部署
概要1.使用的是AlexeyAB版的darknet(https://github.com/AlexeyAB/darknet/)在windows下进行训练得到.weights2.将训练时的.cfg文件和训练后得到的.weights文件根据https://github.com/Tianxiaomo/pytorch-YOLOv4转onnx3.将onnx文件转mnn格式4.在c++中调用mnn文件进行目标检测详细在步骤2转换得到的onnx文件使用onnxruntime推理输出两个数组,第一个数组的sha原创 2021-06-07 15:44:52 · 1313 阅读 · 1 评论 -
转化yolov2的weights和cfg文件到onnx
修改https://github.com/purelyvivid/yolo2_onnx/blob/master/darknet.py 151行为pad = int((kernel_size-1)/2) if is_pad else 0在https://github.com/purelyvivid/yolo2_onnx/blob/master/Onnx.py中的最下方添加如下代码转化yolov2的weights和cfg文件到onnxdef onnx_file_export(model, onnxfil原创 2021-05-19 11:07:07 · 938 阅读 · 0 评论 -
mnn在c++中的推理demo(mnn不支持5维输入,即暂时不支持3dcnn的推理)
准备工作1.使用cmake-gui在windows下编译mnn得到MNN.dll和MNN.lib(Release x64)2.opencv的dll,lib,头文件可以在https://github.com/opencv/opencv/releases/tag/4.3.0的opencv-4.3.0-vc14_vc15.exe直接安装后得到,不用编译(opencv_world430.dll,opencv_world430.lib)3.在vs2017中include mnn和opencv的所需要头文件(mn原创 2021-05-12 15:25:07 · 1050 阅读 · 1 评论 -
MNN Resize error for ConvertTensor,The input is not ready,Can’t run session because not resized
背景:使用vs2017编写加载mnn模型并推理输入图片的程序,发生如下错误The 321's input is not readyResize error for 321, code=3Resize error for ConvertTensor3, code=3Can't run session because not resized由于一开始在linux下生成的项目可执行文件也报了这个错误输出,其他推理的输出也是正常的;根据https://github.com/alibaba/MNN/is原创 2020-06-05 17:41:17 · 2594 阅读 · 7 评论 -
MNN windows环境编译 c++.exe: error: /wd4267: No such file or directory
按照https://www.yuque.com/mnn/cn/build_windows编译windows下的MNNcd /path/to/MNNpowershell ./schema/generate.ps1mkdir buildcd buildcmake -G "Ninja" -DCMAKE_BUILD_TYPE=Release ..ninja在windows10上出现C:\MinGW\bin\c++.exe -DBUILDING_MNN_DLL -DMNN_SUPPORT_TFLI原创 2020-06-03 10:46:57 · 1573 阅读 · 1 评论 -
recipe for target 'tools/converter/CMakeFiles/OnnxClip.dir/all' failed(recipe for target 'OnnxClip')
问题:按照https://www.yuque.com/mnn/en/cvrt_linux编译MNNConverter到OnnxClip出错配置环境:cmake .. -DMNN_BUILD_CONVERTER=true-- The C compiler identification is GNU 4.9.3-- The CXX compiler identification is GNU 5.4.0-- The ASM compiler identification is GNU-- Fou原创 2020-05-12 16:15:33 · 927 阅读 · 0 评论 -
MNNConverter编译错误: recipe for target ‘tools/converter/CMakeFiles/MNNConverterONNX.dir/all‘ failed
终端错误输出如下tools/converter/CMakeFiles/MNNConverterONNX.dir/build.make:78: recipe for target 'tools/converter/CMakeFiles/MNNConverterONNX.dir/source/onnx/ArgMaxOnnx.cpp.o' failedmake[2]: *** [tools/converter/CMakeFiles/MNNConverterONNX.dir/source/onnx/ArgMax原创 2020-05-11 16:25:29 · 910 阅读 · 3 评论