I
ICpachong 发布的最佳帖子
ICpachong 发布的最新帖子
-
回复: 运行eye-mpp 中的sample_odet_demo报错
@null037 可以确定这个例程有问题,经过修改程序可以运行了,但是还有问题待修复。
还是希望AW能发布经过测试的例程,避免大家无谓的踩坑。
-
回复: 全志V853 NPU yolov3转化模型时量化未使用全部data图片
@rain_tk 在 全志V853 NPU yolov3转化模型时量化未使用全部data图片 中说:
sample_odet_demo
你好,sample_odet_demo的原代码运行需要做什么修改吗?如果需要修改,可以将你修改该过的代码发一下吗?
-
回复: 运行eye-mpp 中的sample_odet_demo报错
@whycanservice
如果这里不改的话会报如下错误
npu_config_and_run line 808, fatal error! AW_MPI_VI CreateVipp:8 failed
-
运行eye-mpp 中的sample_odet_demo报错
运行eye-mpp 中的sample_odet_demo报错,帮忙看看需要修改哪里。log如下:
root@TinaLinux:~# ./sample_odet_demo WARNING: Logging before InitGoogleLogging() is written to STDERR I0101 01:07:26.883501 1217 dup2SeldomUsedFd.c:20] <dup2SeldomUsedFdInit> gFdLock init main line 1879, run start! [0xb6f56560]vip_init[104], The version of Viplite is: 1.8.0-0-AW-2022-04-21 [0xb6f56560]gcvip_os_call_kernel[344], fail to ioctl vipcore, command[0]:CMD_INIT, status=-2 [0xb6f56560]gcvip_os_init[99], fail to call kernel for cmd init, status=-2. [0xb6f56560]gcvip_user_init[339], fail to initialize OS, status=-2. [0xb6f56560]gcvip_init[3479], failed to user init Error: sample_odet_demo/yolov3-tiny_nbg_viplite/main.c: odet_init at 227 load_vipp_parameters line 137, run start! load_vipp_parameters line 211, run finish! mpp_init line 219, run start! I0101 01:07:26.956034 1217 mpi_sys.c:840] <AW_MPI_SYS_SetConf> kfctmpdir is [/tmp] >>>>>>>>>>>>>>>>>>>>>>>>>>>>> Media Process Platform<<<<<<<<<<<<<<<<<<<<<<<<<<<< modName : MPP-Platform tag : V1.0 Release branch: v5-dev commit: 4eed413532ad87725895a8cb1ba75e22fc328233 date : 20170725 author: jenkins iniparser: cannot open /etc/cedarx.conf iniparser: cannot open /vendor/etc/cedarx.conf I0101 01:07:26.960326 1217 mpi_sys.c:1280] <AW_MPI_SYS_Init> ISP init [ISP]>>>>>>>>>>>>>>>>>>>> ISP VERSION INFO <<<<<<<<<<<<<<<<<<< IPCORE: ISP600 branch: libisp-dev commit: 14df8348718d093707641fea73eba7db962885f5 date : Thu Jul 14 15:40:38 2022 +0800 author: <mayifei@allwinnertech.com> -------------------------------------------------------- I0101 01:07:26.961239 1217 mpi_sys.c:1282] <AW_MPI_SYS_Init> ISP init done INFO : cedarc <VeInitialize:1185>: *** ic_version = 0x1302000023010, I0101 01:07:26.971323 1217 hwdisplay.c:84] <hw_display_init> I0101 01:07:26.971831 1217 hwdisplay.c:993] <hwd_init> (hwd_init 993) I0101 01:07:26.972479 1217 hwdisplay.c:1048] <hwd_init> ret[0][2,0]ch[2]lyl[0] init: enable[0], screenwin[0,0, 0x0], zorder[0], alpha[mode:0, value:0] I0101 01:07:26.973121 1217 alsa_interface.c:701] <alsaOpenMixer> open mixer:hw:0 I0101 01:07:26.979233 1217 alsa_interface.c:736] <alsaOpenMixer> alsa_elem:ADC1 ADC2 swap I0101 01:07:26.979757 1217 alsa_interface.c:736] <alsaOpenMixer> alsa_elem:ADC1 volume I0101 01:07:26.980278 1217 alsa_interface.c:736] <alsaOpenMixer> alsa_elem:ADC2 volume I0101 01:07:26.980780 1217 alsa_interface.c:736] <alsaOpenMixer> alsa_elem:ADCDRC I0101 01:07:26.981432 1217 alsa_interface.c:736] <alsaOpenMixer> alsa_elem:ADCHPF I0101 01:07:26.981941 1217 alsa_interface.c:736] <alsaOpenMixer> alsa_elem:DAC volume I0101 01:07:26.982416 1217 alsa_interface.c:736] <alsaOpenMixer> alsa_elem:DACDRC I0101 01:07:26.983530 1217 alsa_interface.c:736] <alsaOpenMixer> alsa_elem:DACHPF I0101 01:07:26.983962 1217 alsa_interface.c:736] <alsaOpenMixer> alsa_elem:LINEIN I0101 01:07:26.984780 1217 alsa_interface.c:736] <alsaOpenMixer> alsa_elem:LINEINL gain volume I0101 01:07:26.985854 1217 alsa_interface.c:736] <alsaOpenMixer> alsa_elem:LINEINR gain volume I0101 01:07:26.986367 1217 alsa_interface.c:736] <alsaOpenMixer> alsa_elem:LINEOUT I0101 01:07:26.987161 1217 alsa_interface.c:736] <alsaOpenMixer> alsa_elem:LINEOUT Output Select I0101 01:07:26.987677 1217 alsa_interface.c:736] <alsaOpenMixer> alsa_elem:LINEOUT volume I0101 01:07:26.988190 1217 alsa_interface.c:756] <alsaOpenMixer> set playback vol_val to value: 27 I0101 01:07:26.988677 1217 alsa_interface.c:736] <alsaOpenMixer> alsa_elem:MIC1 I0101 01:07:26.989505 1217 alsa_interface.c:736] <alsaOpenMixer> alsa_elem:MIC1 Input Select I0101 01:07:26.990000 1217 alsa_interface.c:736] <alsaOpenMixer> alsa_elem:MIC1 gain volume I0101 01:07:26.990471 1217 alsa_interface.c:736] <alsaOpenMixer> alsa_elem:MIC2 I0101 01:07:26.990960 1217 alsa_interface.c:736] <alsaOpenMixer> alsa_elem:MIC2 Input Select I0101 01:07:26.991932 1217 alsa_interface.c:736] <alsaOpenMixer> alsa_elem:MIC2 gain volume I0101 01:07:26.992735 1217 alsa_interface.c:736] <alsaOpenMixer> alsa_elem:SPK I0101 01:07:26.993681 1217 alsa_interface.c:736] <alsaOpenMixer> alsa_elem:digital volume I0101 01:07:26.994238 1217 alsa_interface.c:736] <alsaOpenMixer> alsa_elem:rx sync mode I0101 01:07:26.995046 1217 alsa_interface.c:736] <alsaOpenMixer> alsa_elem:tx hub mode E0101 01:07:26.995832 1217 alsa_interface.c:970] <alsaMixerSetAudioCodecHubMode> aec_elem_audio_codec_hub_mode:tx hub mode-1 E0101 01:07:26.996355 1217 alsa_interface.c:853] <alsaMixerSetCapPlaySyncMode> aec_elem_sync_mode_switch:rx sync mode-1 I0101 01:07:26.996936 1217 alsa_interface.c:701] <alsaOpenMixer> open mixer:hw:1 I0101 01:07:26.998519 1217 alsa_interface.c:736] <alsaOpenMixer> alsa_elem:loopback debug I0101 01:07:26.999007 1217 alsa_interface.c:736] <alsaOpenMixer> alsa_elem:rx sync mode I0101 01:07:26.999499 1217 alsa_interface.c:736] <alsaOpenMixer> alsa_elem:tx hub mode E0101 01:07:27.000310 1217 alsa_interface.c:993] <alsaMixerSetDAudio0HubMode> aec_elem_daudio0_hub_mode:tx hub mode-1 E0101 01:07:27.000856 1217 alsa_interface.c:1016] <alsaMixerSetDAudio0LoopBackEn> aec_elem_daudio0_loopback_en:loopback debug-1 E0101 01:07:27.001342 1217 alsa_interface.c:853] <alsaMixerSetCapPlaySyncMode> aec_elem_sync_mode_switch:rx sync mode-1 mpp_init line 232, run finish! run_project line 1690, run start! I0101 01:07:27.002786 1217 hwdisplay.c:1248] <hwd_get_disp_type> Current the disp_type:0x0 tv_mode:0x0 I0101 01:07:27.004058 1217 mpi_vo.c:837] <AW_MPI_VO_SetPubAttr> vo interface changed, [0x0, 0x1]->[0x40, 0x1] I0101 01:07:27.004617 1217 hwdisplay.c:1486] <hwd_switch_vo_device> Current the disp_type:0x0 tv_mode:0x0 config_vipp_display2_vo line 1430, run start! config_vipp_display2_vo line 1453, vipp[4] vir_chn[0] creating. [ISP]video device name is vin_video4 [ISP_ERR]video_init, line: 110,can not get entity by name vin_video4 [ISP_ERR]isp_video_open, line: 468,error: unable to initialize video device. [ISP_ERR]isp_video_open, line: 487,unable to open video device[4]! E0101 01:07:27.536814 1217 videoInputHw.c:637] <videoInputHw_ChnInit> error: isp video can not open, chn[4]! E0101 01:07:27.536981 1217 mpi_vi.c:170] <AW_MPI_VI_CreateVipp> initialize video input hardware failed!! config_vipp_display2_vo line 1459, fatal error! AW_MPI_VI CreateVipp:4 failed config_vipp_display2_vo line 1652, run finish! npu_worker_thread line 1676, run start! npu_config_and_run line 779, run start! npu_config_and_run line 802, vipp[0] vir_chn[1] creating. [ISP]video device name is vin_video0 [ISP]open video device[0], detect isp0 success! I0101 01:07:27.538473 1220 media_debug.c:45] <getDictByConfPath> MPP_DEDIA_DEBUG_FILE_PATH=(null) I0101 01:07:27.538810 1220 videoInputHw.c:1015] <videoInputHw_SetChnAttr> ViCh[0], user set disable Encpp [ISP_ERR]isp_ir_reset, line: 639,isp0 device is NULL! run_project line 1748, fatal error! isp switch wdr[0] fail[-1]. [ISP]video0 fd[10] ve_online_en=0, dma_buf_num=0 [ISP]open isp device[0] success! [ISP_WARN]open /mnt/extsd/isp0_1920_1088_30_ctx_saved.bin failed, err:No such file or directory. [ISP]prefer isp config: [gc2053_mipi], 1920x1088, 30, 0, 0 [ISP_WARN]cannot find gc2053_mipi_1920_1088_30_0_0 isp config, use gc2053_mipi_1920_1088_20_0_0 -> [gc2053_mipi_isp600_20220511_164617_vlc4_day] [ISP]create isp0 server thread! I0101 01:07:27.849592 1220 VideoVirVi_Component.c:1160] <VideoViComponentInit> VideoVirvi component Init! thread_id[0xb6986d50] I0101 01:07:27.849816 1222 videoInputHw.c:4787] <VideoInputHw_CapThread> loop VideoInputHw_CapThread vipp_id = 0, buf_num=5. [ISP_ERR]isp_stat_process_buffer, line: 268,AEWB: stats error, skipping buffer. I0101 01:07:28.043595 1220 hwdisplay.c:1121] <hwd_layer_request_hlay> hlay:5, zorder=5, cnt:2 I0101 01:07:28.043795 1220 mpi_vo.c:1038] <AW_MPI_VO_SetVideoLayerAttr> ch[1]lyl[1]:dispRect changed, [0, 0, 320x240]->[0, 0, 0x0] I0101 01:07:28.043898 1220 hwdisplay.c:409] <hwd_layer_set_rect> ch[1]lyl[1]: screen_win[0,0, 0x0] npu_config_and_run line 912, create vo channel[0] success! [ISP_WARN]gc2053_mipi get sensor_temp failed: Invalid argument (22). [ISP_ERR]isp_sync_debug_info, line: 747,VIDIOC_VIN_ISP_GET_INFO error! [ISP_ERR]isp_sync_debug_info, line: 747,VIDIOC_VIN_ISP_GET_INFO error! [ISP_ERR]isp_sync_debug_info, line: 747,VIDIOC_VIN_ISP_GET_INFO error! [ISP]video device name is vin_video12 [ISP]open video device[12], detect isp0 success! save_raw_picture line 758, virAddr[0]=[0xb69aa000], length=[173056]. save_raw_picture line 758, virAddr[1]=[0xb69d4400], length=[86528]. save_raw_picture line 765, store raw frame in file[/mnt/sdcard/pic[0-416x416].nv12]. Usage: nbg_name input_data1 input_data2... Segmentation fault (core dumped)
-
回复: yolo v5 使用--batch-size 大于1时量化报错
@yuzukitsuru 感谢回答!
如果在量化和预推理时循环多次的话,需要加入--iterations 6
参数 -
yolo v5 使用--batch-size 大于1时量化报错
在量化yolo v5模型时使用命令:
pegasus quantize --model yolov5s-sim.json --model-data yolov5s-sim.data --batch-size 5 --device CPU --with-input-meta yolov5s-sim_inputmeta.yml --rebuild --model-quantize yolov5s-sim.quantize --quantizer asymmetric_affine --qtype uint8
dataset.txt的配置和图片的位置都是正确的,当--batch-size 为1是成功的,但是当--batch-size 为5或其他大于1的值时会报如下错误,请各位大佬帮忙看看:I Build torch-jit-export complete. D *********** Setup database (1) *********** D Setup dataset "TEXT": D Lids: ['images_208'] D Layouts: ['nchw'] D Shapes: [[5, 3, 640, 640]] D Data types: ['float32'] D Sparse tensors: [] D Tensor names(H5FS only): [] W:tensorflow:AutoGraph could not transform <acuitylib.core.execution.BackendFunction object at 0x7f5bcde20ee0> and will run it as-is. Please report this to the TensorFlow team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: Unable to locate the source code of <function BackendFunction.__call__ at 0x7f5bced43670>. Note that functions defined in certain environments, like the interactive Python shell do not expose their source code. If that is the case, you should to define them in a .py source file. If you are certain the code is graph-compatible, wrap the call using @tf.autograph.do_not_convert. Original error: could not get source code To silence this warning, decorate the function with @tf.autograph.experimental.do_not_convert Traceback (most recent call last): File "tensorflow/python/autograph/pyct/parser.py", line 204, in parse_entity File "tensorflow/python/autograph/pyct/inspect_utils.py", line 147, in getimmediatesource File "inspect.py", line 798, in findsource OSError: could not get source code During handling of the above exception, another exception occurred: Traceback (most recent call last): File "tensorflow/python/autograph/impl/api.py", line 584, in converted_call File "tensorflow/python/autograph/impl/conversion.py", line 118, in convert File "tensorflow/python/autograph/pyct/transpiler.py", line 411, in transform_function File "tensorflow/python/autograph/pyct/transpiler.py", line 373, in _transformed_factory File "tensorflow/python/autograph/pyct/transpiler.py", line 303, in _transform_function File "tensorflow/python/autograph/pyct/parser.py", line 206, in parse_entity ValueError: Unable to locate the source code of <function BackendFunction.__call__ at 0x7f5bced43670>. Note that functions defined in certain environments, like the interactive Python shell do not expose their source code. If that is the case, you should to define them in a .py source file. If you are certain the code is graph-compatible, wrap the call using @tf.autograph.do_not_convert. Original error: could not get source code During handling of the above exception, another exception occurred: Traceback (most recent call last): File "tensorflow/python/framework/ops.py", line 1812, in _create_c_op tensorflow.python.framework.errors_impl.InvalidArgumentError: Cannot reshape a tensor with 8160000 elements to shape [1,3,85,80,80] (1632000 elements) for '{{node Reshape_Reshape_213_8}} = Reshape[T=DT_FLOAT, Tshape=DT_INT32](Reshape_Reshape_213_8_acuity_mark_perm_211, Reshape_Reshape_213_8/shape)' with input shapes: [5,255,80,80], [5] and with input tensors computed as partial shapes: input[1] = [1,3,85,80,80]. During handling of the above exception, another exception occurred: Traceback (most recent call last): File "pegasus.py", line 131, in <module> File "pegasus.py", line 108, in main File "acuitylib/app/medusa/commands.py", line 212, in execute File "acuitylib/vsi_nn.py", line 589, in quantize File "acuitylib/app/medusa/quantization.py", line 151, in run File "acuitylib/app/medusa/quantization.py", line 54, in _run_quantization File "acuitylib/app/medusa/workspace.py", line 120, in run File "acuitylib/app/medusa/workspace.py", line 92, in _setup_graph File "acuitylib/acuitynetbuilder.py", line 83, in build_normal_graph File "acuitylib/acuitynetbuilder.py", line 69, in _build_backend_execution File "acuitylib/core/execution.py", line 557, in __init__ File "tensorflow/python/eager/def_function.py", line 1167, in get_concrete_function File "tensorflow/python/eager/def_function.py", line 1073, in _get_concrete_function_garbage_collected File "tensorflow/python/eager/def_function.py", line 696, in _initialize File "tensorflow/python/eager/function.py", line 2855, in _get_concrete_function_internal_garbage_collected File "tensorflow/python/eager/function.py", line 3213, in _maybe_define_function File "tensorflow/python/eager/function.py", line 3065, in _create_graph_function File "tensorflow/python/framework/func_graph.py", line 986, in func_graph_from_py_func File "tensorflow/python/eager/def_function.py", line 600, in wrapped_fn File "tensorflow/python/framework/func_graph.py", line 962, in wrapper File "tensorflow/python/autograph/impl/api.py", line 591, in converted_call File "tensorflow/python/autograph/impl/api.py", line 398, in _fall_back_unconverted File "tensorflow/python/autograph/impl/api.py", line 339, in _call_unconverted File "acuitylib/core/execution.py", line 413, in __call__ File "acuitylib/core/execution.py", line 409, in _build_backend_operations File "acuitylib/core/execution.py", line 401, in _build_layer_backend File "acuitylib/core/execution.py", line 19, in __call__ File "acuitylib/layer/reshapelayer.py", line 89, in compute_out_tensor File "tensorflow/python/util/dispatch.py", line 201, in wrapper File "tensorflow/python/ops/array_ops.py", line 195, in reshape File "tensorflow/python/ops/gen_array_ops.py", line 8233, in reshape File "tensorflow/python/framework/op_def_library.py", line 742, in _apply_op_helper File "tensorflow/python/framework/func_graph.py", line 591, in _create_op_internal File "tensorflow/python/framework/ops.py", line 3477, in _create_op_internal File "tensorflow/python/framework/ops.py", line 1974, in __init__ File "tensorflow/python/framework/ops.py", line 1815, in _create_c_op ValueError: Cannot reshape a tensor with 8160000 elements to shape [1,3,85,80,80] (1632000 elements) for '{{node Reshape_Reshape_213_8}} = Reshape[T=DT_FLOAT, Tshape=DT_INT32](Reshape_Reshape_213_8_acuity_mark_perm_211, Reshape_Reshape_213_8/shape)' with input shapes: [5,255,80,80], [5] and with input tensors computed as partial shapes: input[1] = [1,3,85,80,80]. [107616] Failed to execute script 'pegasus' due to unhandled exception!