导出yolact模型时报错
-
现象:
按照官方提供的yolact模型转换的文档操作,在导出模型时报如下错误:I Save vx network source file to /home/ubuntu/yolact/ovxlib/yolact/yolact.2012.vcxproj I Save vx network source file to /home/ubuntu/yolact/ovxlib/yolact/makefile.linux I Save vx network source file to /home/ubuntu/yolact/ovxlib/yolact/.cproject I Save vx network source file to /home/ubuntu/yolact/ovxlib/yolact/.project D Generate fake input /home/ubuntu/yolact/ovxlib/yolact/input.1_219_0.tensor gcc -Wall -std=c++0x -I. -I/home/ubuntu/VeriSilicon/VivanteIDE5.7.0/cmdtools/vsimulator/include/ -I/home/ubuntu/VeriSilicon/VivanteIDE5.7.0/cmdtools/vsimulator/include/CL -I/home/ubuntu/VeriSilicon/VivanteIDE5.7.0/cmdtools/vsimulator/include/VX -I/home/ubuntu/VeriSilicon/VivanteIDE5.7.0/cmdtools/vsimulator/include/ovxlib -I/home/ubuntu/VeriSilicon/VivanteIDE5.7.0/cmdtools/vsimulator/include/jpeg -D__linux__ -DLINUX -O3 -c vnn_pre_process.c cc1: warning: command line option ‘-std=c++11’ is valid for C++/ObjC++ but not for C vnn_pre_process.c: In function ‘_handle_multiple_inputs’: vnn_pre_process.c:749:11: warning: variable ‘p1’ set but not used [-Wunused-but-set-variable] 749 | char *p1 = NULL; | ^~ gcc -Wall -std=c++0x -I. -I/home/ubuntu/VeriSilicon/VivanteIDE5.7.0/cmdtools/vsimulator/include/ -I/home/ubuntu/VeriSilicon/VivanteIDE5.7.0/cmdtools/vsimulator/include/CL -I/home/ubuntu/VeriSilicon/VivanteIDE5.7.0/cmdtools/vsimulator/include/VX -I/home/ubuntu/VeriSilicon/VivanteIDE5.7.0/cmdtools/vsimulator/include/ovxlib -I/home/ubuntu/VeriSilicon/VivanteIDE5.7.0/cmdtools/vsimulator/include/jpeg -D__linux__ -DLINUX -O3 -c vnn_yolact.c cc1: warning: command line option ‘-std=c++11’ is valid for C++/ObjC++ but not for C gcc -Wall -std=c++0x -I. -I/home/ubuntu/VeriSilicon/VivanteIDE5.7.0/cmdtools/vsimulator/include/ -I/home/ubuntu/VeriSilicon/VivanteIDE5.7.0/cmdtools/vsimulator/include/CL -I/home/ubuntu/VeriSilicon/VivanteIDE5.7.0/cmdtools/vsimulator/include/VX -I/home/ubuntu/VeriSilicon/VivanteIDE5.7.0/cmdtools/vsimulator/include/ovxlib -I/home/ubuntu/VeriSilicon/VivanteIDE5.7.0/cmdtools/vsimulator/include/jpeg -D__linux__ -DLINUX -O3 -c main.c cc1: warning: command line option ‘-std=c++11’ is valid for C++/ObjC++ but not for C gcc -Wall -std=c++0x -I. -I/home/ubuntu/VeriSilicon/VivanteIDE5.7.0/cmdtools/vsimulator/include/ -I/home/ubuntu/VeriSilicon/VivanteIDE5.7.0/cmdtools/vsimulator/include/CL -I/home/ubuntu/VeriSilicon/VivanteIDE5.7.0/cmdtools/vsimulator/include/VX -I/home/ubuntu/VeriSilicon/VivanteIDE5.7.0/cmdtools/vsimulator/include/ovxlib -I/home/ubuntu/VeriSilicon/VivanteIDE5.7.0/cmdtools/vsimulator/include/jpeg -D__linux__ -DLINUX -O3 -c vnn_post_process.c cc1: warning: command line option ‘-std=c++11’ is valid for C++/ObjC++ but not for C gcc -Wall -std=c++0x -I. -I/home/ubuntu/VeriSilicon/VivanteIDE5.7.0/cmdtools/vsimulator/include/ -I/home/ubuntu/VeriSilicon/VivanteIDE5.7.0/cmdtools/vsimulator/include/CL -I/home/ubuntu/VeriSilicon/VivanteIDE5.7.0/cmdtools/vsimulator/include/VX -I/home/ubuntu/VeriSilicon/VivanteIDE5.7.0/cmdtools/vsimulator/include/ovxlib -I/home/ubuntu/VeriSilicon/VivanteIDE5.7.0/cmdtools/vsimulator/include/jpeg -D__linux__ -DLINUX -O3 -O3 vnn_pre_process.o vnn_yolact.o main.o vnn_post_process.o -L/home/ubuntu/VeriSilicon/VivanteIDE5.7.0/cmdtools/vsimulator/lib -lOpenVX -lOpenVXU -lCLC -lVSC -lGAL -lovxlib -lEmulator -lvdtproxy -L/home/ubuntu/VeriSilicon/VivanteIDE5.7.0/cmdtools/vsimulator/lib/vsim -lOpenVX -lOpenVXU -lCLC -lVSC -lGAL -lovxlib -lEmulator -lvdtproxy -L/home/ubuntu/VeriSilicon/VivanteIDE5.7.0/cmdtools/vsimulator/lib/x64_linux -lOpenVX -lOpenVXU -lCLC -lVSC -lGAL -lovxlib -lEmulator -lvdtproxy -L/home/ubuntu/VeriSilicon/VivanteIDE5.7.0/cmdtools/vsimulator/lib/x64_linux/vsim -lOpenVX -lOpenVXU -lCLC -lVSC -lGAL -lovxlib -lEmulator -lvdtproxy -L/home/ubuntu/VeriSilicon/VivanteIDE5.7.0/cmdtools/vsimulator/lib/x64_linux/vsim -lOpenVX -lOpenVXU -lCLC -lVSC -lGAL -lovxlib -lEmulator -lvdtproxy -L/home/ubuntu/VeriSilicon/VivanteIDE5.7.0/cmdtools/vsimulator/../common/lib/ -lvdtproxy /home/ubuntu/VeriSilicon/VivanteIDE5.7.0/cmdtools/vsimulator/../common/lib/libjpeg.a -o gen_nbg Create Neural Network: 213ms or 213529us Verify... E [kernel/evis/resize_bilinear_evis.c:_resize_bilinear_initializer_impl:1051]CHECK STATUS(-1:A generic error code, used when no other describes the error.) E [main.c:vnn_VerifyGraph:91]CHECK STATUS(-1:A generic error code, used when no other describes the error.) E [main.c:main:243]CHECK STATUS(-1:A generic error code, used when no other describes the error.) E Fatal model generation error: 65280 W ----------------Error(1),Warning(0)---------------- Traceback (most recent call last): File "pegasus.py", line 131, in <module> File "pegasus.py", line 116, in main File "acuitylib/app/exporter/commands.py", line 178, in execute File "acuitylib/vsi_nn.py", line 650, in export_ovxlib File "acuitylib/app/exporter/ovxlib_case/export_ovxlib.py", line 73, in run File "acuitylib/app/exporter/ovxlib_case/casegenerator.py", line 701, in generate File "acuitylib/app/exporter/ovxlib_case/casegenerator.py", line 660, in _gen_special_case File "acuitylib/app/exporter/ovxlib_case/casegenerator.py", line 637, in _gen_nb_file File "acuitylib/acuitylog.py", line 263, in e acuitylib.acuityerror.AcuityError: ('Fatal model generation error: 65280', 'nbg_generate') [5240] Failed to execute script 'pegasus' due to unhandled exception!
目前可知的提示信息:
E [kernel/evis/resize_bilinear_evis.c:_resize_bilinear_initializer_impl:1051]CHECK STATUS(-1:A generic error code, used when no other describes the error.) E [main.c:vnn_VerifyGraph:91]CHECK STATUS(-1:A generic error code, used when no other describes the error.) E [main.c:main:243]CHECK STATUS(-1:A generic error code, used when no other describes the error.) E Fatal model generation error: 65280 W ----------------Error(1),Warning(0)----------------
前面的操作都是按照文档的操作,请问各位大佬这啥问题导致的?
-
@null037 反复对比检查了一下不知道是否是下面的警告导致的报错
-
@null037 找了一段时间没什么头绪,这放一下根据文档转换后的ONNX格式的yolact模型文件,可以尝试按照文档进行模型转换,看一下各位大佬在转换时是否也会遇到此问题:
yolact模型文件:yolact.onnx
yolact模型转换工程文件:yolact.tar.gz
我是在导出模型时遇到的问题,前面没有出现报错信息。导出模型命令为:
pegasus export ovxlib --model yolact-sim.json --model-data yolact-sim.data --dtype quantized --model-quantize yolact-sim.quantilize --batch-size 1 --save-fused-graph -- target-ide-project 'linux64' --with-input-meta yolact-sim-inputemeta.yml --postprocess-file yolact-sim-postprocess-file.yml --output-path ovxlib/yolact/yolact --pack-nbg-unify - -optimize "VIP9000PICO_PID0XEE" --vivsdk${VIV_SDK}
报错信息为:
D Quantize @Conv_Conv_97_183:bias to asymmetric_affine. D Quantize @Conv_Conv_97_183:weight to asymmetric_affine. D Packing Conv_Conv_99_162 ... D Quantize @Conv_Conv_99_162:bias to asymmetric_affine. D Quantize @Conv_Conv_99_162:weight to asymmetric_affine. D Packing Initializer_769_6 ... D Packing Initializer_onnx//Add_528_104 ... I Saving data to ovxlib/yolact/yolact.export.data D Get binary package acuity_path [/home/ubuntu/VeriSilicon/acuity-toolkit-binary-6.6.1/bin] D Get binary package acuity_path [/home/ubuntu/VeriSilicon/acuity-toolkit-binary-6.6.1/bin] D Get binary package acuity_path [/home/ubuntu/VeriSilicon/acuity-toolkit-binary-6.6.1/bin] I Export ovxlib case with version 1.1.36 I Save vx network source file to /home/ubuntu/yolact/ovxlib/yolact/vnn_yolact.c I Save vx network source file to /home/ubuntu/yolact/ovxlib/yolact/vnn_yolact.h I Save vx network source file to /home/ubuntu/yolact/ovxlib/yolact/vnn_post_process.c I Save vx network source file to /home/ubuntu/yolact/ovxlib/yolact/vnn_post_process.h I Save vx network source file to /home/ubuntu/yolact/ovxlib/yolact/vnn_pre_process.c I Save vx network source file to /home/ubuntu/yolact/ovxlib/yolact/vnn_pre_process.h I Save vx network source file to /home/ubuntu/yolact/ovxlib/yolact/vnn_global.h I Save vx network source file to /home/ubuntu/yolact/ovxlib/yolact/main.c I Save vx network source file to /home/ubuntu/yolact/ovxlib/yolact/BUILD I Save vx network source file to /home/ubuntu/yolact/ovxlib/yolact/yolact.vcxproj I Save vx network source file to /home/ubuntu/yolact/ovxlib/yolact/yolact.2012.vcxproj I Save vx network source file to /home/ubuntu/yolact/ovxlib/yolact/makefile.linux I Save vx network source file to /home/ubuntu/yolact/ovxlib/yolact/.cproject I Save vx network source file to /home/ubuntu/yolact/ovxlib/yolact/.project D Generate fake input /home/ubuntu/yolact/ovxlib/yolact/input.1_219_0.tensor gcc -Wall -std=c++0x -I. -I/home/ubuntu/VeriSilicon/VivanteIDE5.7.0/cmdtools/vsimulator/include/ -I/home/ubuntu/VeriSilicon/VivanteIDE5.7.0/cmdtools/vsimulator/include/CL -I/home/ubuntu/VeriSilicon/VivanteIDE5.7.0/cmdtools/vsimulator/include/VX -I/home/ubuntu/VeriSilicon/VivanteIDE5.7.0/cmdtools/vsimulator/include/ovxlib -I/home/ubuntu/VeriSilicon/VivanteIDE5.7.0/cmdtools/vsimulator/include/jpeg -D__linux__ -DLINUX -O3 -c vnn_pre_process.c cc1: warning: command line option ‘-std=c++11’ is valid for C++/ObjC++ but not for C vnn_pre_process.c: In function ‘_handle_multiple_inputs’: vnn_pre_process.c:749:11: warning: variable ‘p1’ set but not used [-Wunused-but-set-variable] 749 | char *p1 = NULL; | ^~ gcc -Wall -std=c++0x -I. -I/home/ubuntu/VeriSilicon/VivanteIDE5.7.0/cmdtools/vsimulator/include/ -I/home/ubuntu/VeriSilicon/VivanteIDE5.7.0/cmdtools/vsimulator/include/CL -I/home/ubuntu/VeriSilicon/VivanteIDE5.7.0/cmdtools/vsimulator/include/VX -I/home/ubuntu/VeriSilicon/VivanteIDE5.7.0/cmdtools/vsimulator/include/ovxlib -I/home/ubuntu/VeriSilicon/VivanteIDE5.7.0/cmdtools/vsimulator/include/jpeg -D__linux__ -DLINUX -O3 -c vnn_yolact.c cc1: warning: command line option ‘-std=c++11’ is valid for C++/ObjC++ but not for C gcc -Wall -std=c++0x -I. -I/home/ubuntu/VeriSilicon/VivanteIDE5.7.0/cmdtools/vsimulator/include/ -I/home/ubuntu/VeriSilicon/VivanteIDE5.7.0/cmdtools/vsimulator/include/CL -I/home/ubuntu/VeriSilicon/VivanteIDE5.7.0/cmdtools/vsimulator/include/VX -I/home/ubuntu/VeriSilicon/VivanteIDE5.7.0/cmdtools/vsimulator/include/ovxlib -I/home/ubuntu/VeriSilicon/VivanteIDE5.7.0/cmdtools/vsimulator/include/jpeg -D__linux__ -DLINUX -O3 -c main.c cc1: warning: command line option ‘-std=c++11’ is valid for C++/ObjC++ but not for C gcc -Wall -std=c++0x -I. -I/home/ubuntu/VeriSilicon/VivanteIDE5.7.0/cmdtools/vsimulator/include/ -I/home/ubuntu/VeriSilicon/VivanteIDE5.7.0/cmdtools/vsimulator/include/CL -I/home/ubuntu/VeriSilicon/VivanteIDE5.7.0/cmdtools/vsimulator/include/VX -I/home/ubuntu/VeriSilicon/VivanteIDE5.7.0/cmdtools/vsimulator/include/ovxlib -I/home/ubuntu/VeriSilicon/VivanteIDE5.7.0/cmdtools/vsimulator/include/jpeg -D__linux__ -DLINUX -O3 -c vnn_post_process.c cc1: warning: command line option ‘-std=c++11’ is valid for C++/ObjC++ but not for C gcc -Wall -std=c++0x -I. -I/home/ubuntu/VeriSilicon/VivanteIDE5.7.0/cmdtools/vsimulator/include/ -I/home/ubuntu/VeriSilicon/VivanteIDE5.7.0/cmdtools/vsimulator/include/CL -I/home/ubuntu/VeriSilicon/VivanteIDE5.7.0/cmdtools/vsimulator/include/VX -I/home/ubuntu/VeriSilicon/VivanteIDE5.7.0/cmdtools/vsimulator/include/ovxlib -I/home/ubuntu/VeriSilicon/VivanteIDE5.7.0/cmdtools/vsimulator/include/jpeg -D__linux__ -DLINUX -O3 -O3 vnn_pre_process.o vnn_yolact.o main.o vnn_post_process.o -L/home/ubuntu/VeriSilicon/VivanteIDE5.7.0/cmdtools/vsimulator/lib -lOpenVX -lOpenVXU -lCLC -lVSC -lGAL -lovxlib -lEmulator -lvdtproxy -L/home/ubuntu/VeriSilicon/VivanteIDE5.7.0/cmdtools/vsimulator/lib/vsim -lOpenVX -lOpenVXU -lCLC -lVSC -lGAL -lovxlib -lEmulator -lvdtproxy -L/home/ubuntu/VeriSilicon/VivanteIDE5.7.0/cmdtools/vsimulator/lib/x64_linux -lOpenVX -lOpenVXU -lCLC -lVSC -lGAL -lovxlib -lEmulator -lvdtproxy -L/home/ubuntu/VeriSilicon/VivanteIDE5.7.0/cmdtools/vsimulator/lib/x64_linux/vsim -lOpenVX -lOpenVXU -lCLC -lVSC -lGAL -lovxlib -lEmulator -lvdtproxy -L/home/ubuntu/VeriSilicon/VivanteIDE5.7.0/cmdtools/vsimulator/lib/x64_linux/vsim -lOpenVX -lOpenVXU -lCLC -lVSC -lGAL -lovxlib -lEmulator -lvdtproxy -L/home/ubuntu/VeriSilicon/VivanteIDE5.7.0/cmdtools/vsimulator/../common/lib/ -lvdtproxy /home/ubuntu/VeriSilicon/VivanteIDE5.7.0/cmdtools/vsimulator/../common/lib/libjpeg.a -o gen_nbg Create Neural Network: 1494ms or 1494420us Verify... E [kernel/evis/resize_bilinear_evis.c:_resize_bilinear_initializer_impl:1051]CHECK STATUS(-1:A generic error code, used when no other describes the error.) E [main.c:vnn_VerifyGraph:91]CHECK STATUS(-1:A generic error code, used when no other describes the error.) E [main.c:main:243]CHECK STATUS(-1:A generic error code, used when no other describes the error.) E Fatal model generation error: 65280 W ----------------Error(1),Warning(0)---------------- Traceback (most recent call last): File "pegasus.py", line 131, in <module> File "pegasus.py", line 116, in main File "acuitylib/app/exporter/commands.py", line 178, in execute File "acuitylib/vsi_nn.py", line 650, in export_ovxlib File "acuitylib/app/exporter/ovxlib_case/export_ovxlib.py", line 73, in run File "acuitylib/app/exporter/ovxlib_case/casegenerator.py", line 701, in generate File "acuitylib/app/exporter/ovxlib_case/casegenerator.py", line 660, in _gen_special_case File "acuitylib/app/exporter/ovxlib_case/casegenerator.py", line 637, in _gen_nb_file File "acuitylib/acuitylog.py", line 263, in e acuitylib.acuityerror.AcuityError: ('Fatal model generation error: 65280', 'nbg_generate') [3550] Failed to execute script 'pegasus' due to unhandled exception!
-
@null037 通过测试转换yolov5的模型发现
问题并不是出现在GCC和G++的问题,而是在校验是没有通过,不太清楚校验主要验证模型的什么内容 -
@null037 hello,看了里头的yolact-sim.onnx模型,是模型的输出shape还没有固定导致的错误;请重新获取onnx模型并将模型设置为静态shape再尝试~
-
@dabugege 您好,很感谢您的回复让我找到了思路。我现在根据您的建议又进行尝试了,将输出和输入都固定,使用onnxsim,如下所示:
模型简化前后结构对比如下图所示:
我发现简化后固定输入输出只有四个输出节点,提供的文档中有5个输出节点。但我觉得这个不会影响。
继续进行模型转换发现还是会出现同样的问题
源模型文件:yolact.onnx
简化后模型文件:yolact-sim.onnx
这是我固定模型输出有问题吗?期待您的回复
-
@null037 hi~,应是这个版本的IDE某个op支持有bug,试下这个IDE版本;或是联系全志获取最新的NPU配套软件。
IDE v5.7.1: https://netstorage.allwinnertech.com:5001/sharing/9gbytImwj
pwd:allwinnertech -
@dabugege 怎么联系全志获取最新的NPU配套软件?
-
@yzr1992 联系对接的FAE
-
@whycanservice 直接从百问网的淘宝店购买的,没有FAE,全志的官方QQ群也只是个吹水群,都让我到论坛发帖子。。
-
@yzr1992 那就用这个链接
IDE v5.7.1: https://netstorage.allwinnertech.com:5001/sharing/9gbytImwj
pwd:allwinnertech
Copyright © 2024 深圳全志在线有限公司 粤ICP备2021084185号 粤公网安备44030502007680号