使用自训练的yolov3 替换AI Express内的默认版本。遇到推理不出正确结果的问题。步骤如下,请论坛内的研发人员帮忙看看
1. 自行训练了一个yolov3。使用工具链转换成x3可以使用的版本。转换时已经修改了 input_type_rt: ‘nv12’
2. 将工具链的例子包括转换后的bin文件、脚本和测试图片 scp到x3板子上,运行dev_board_01_infer.sh 测试一个图片可以看到正确的结果
3. 对原始的aiExpress2.9 进行build和deploy到同一个X3板子上,运行各个例子都正常。包括yolov3的例子
3. 用同样的bin文件,替换aiExpress(2.9)里的对应文件 yolov3_nv12_hybrid_horizonrt.bin。修改了yolov3_post_process_method.cc文件中的default_yolo3_config变量用来对应自己训练的分类数和名称。重新编译aiExpress后上版运行yolov3的例子。使用callback调用方式指向到同一个测试图片,显示推理成功但结果却不对。但log没有报错,看不出来哪里可能有问题
映像文件是 disk_X3SDB-Linux-20210104_p1_wb_2G.img,aiExpress是2.9.0
运行sh run.sh d ,依次输入17,3,2,1,2
log如下:
(convert.cpp:45): vio message, frame_id = 1
(convert.cpp:47): vio message, pym_level_0, width=1920, height=1080, stride=1920
(convert.cpp:47): vio message, pym_level_1, width=0, height=0, stride=0
(convert.cpp:47): vio message, pym_level_2, width=0, height=0, stride=0
(convert.cpp:47): vio message, pym_level_3, width=0, height=0, stride=0
(convert.cpp:47): vio message, pym_level_4, width=960, height=540, stride=960
(convert.cpp:47): vio message, pym_level_5, width=800, height=480, stride=800
(convert.cpp:47): vio message, pym_level_6, width=640, height=360, stride=640
(convert.cpp:47): vio message, pym_level_7, width=0, height=0, stride=0
(convert.cpp:47): vio message, pym_level_8, width=480, height=270, stride=480
(convert.cpp:47): vio message, pym_level_9, width=0, height=0, stride=0
(convert.cpp:47): vio message, pym_level_10, width=0, height=0, stride=0
(convert.cpp:47): vio message, pym_level_11, width=0, height=0, stride=0
(convert.cpp:47): vio message, pym_level_12, width=240, height=134, stride=240
(convert.cpp:47): vio message, pym_level_13, width=0, height=0, stride=0
(convert.cpp:47): vio message, pym_level_14, width=0, height=0, stride=0
(convert.cpp:47): vio message, pym_level_15, width=0, height=0, stride=0
(convert.cpp:47): vio message, pym_level_16, width=120, height=66, stride=128
(convert.cpp:47): vio message, pym_level_17, width=0, height=0, stride=0
(convert.cpp:47): vio message, pym_level_18, width=0, height=0, stride=0
(convert.cpp:47): vio message, pym_level_19, width=0, height=0, stride=0
(convert.cpp:47): vio message, pym_level_20, width=60, height=32, stride=64
(convert.cpp:47): vio message, pym_level_21, width=0, height=0, stride=0
(convert.cpp:47): vio message, pym_level_22, width=0, height=0, stride=0
(convert.cpp:47): vio message, pym_level_23, width=0, height=0, stride=0
(convert.cpp:57): Input Frame ID = 1, Timestamp = 1
(convert.cpp:77): input name:image
(runtime_monitor.cpp:40): PushFrame frame_id = 1
(smartplugin.cpp:2760): feed one task to xtream workflow
(DnnPredictMethod.cpp:317): DnnPredictMethod DoProcess
(yolov3_predict_method.cc:60): src image height: 1080, src image width: 1920
(yolov3_predict_method.cc:70): Yolov3PredictMethod PrepareInputData
(DnnPredictMethod.cpp:137): input_tensor.data_shape.d[0]: 1, input_tensor.data_shape.d[1]: 3, input_tensor.data_shape.d[2]: 416, input_tensor.data_shape.d[3]: 416, input_tensor.data_shape.layout: 2
(DnnPredictMethod.cpp:146): input_height: 416, input_width: 416, input_channel: 3
(websocketplugin.cpp:355): WebsocketPLugin Feedvideo
(convert.cpp:80): websocketplugin x3 mediacodec: GetYUV
(DnnPredictMethod.cpp:230): node.aligned_shape.d[j]:1
(DnnPredictMethod.cpp:230): node.aligned_shape.d[j]:13
(DnnPredictMethod.cpp:230): node.aligned_shape.d[j]:13
(DnnPredictMethod.cpp:230): node.aligned_shape.d[j]:87
(DnnPredictMethod.cpp:238): output_size: 58816
(DnnPredictMethod.cpp:230): node.aligned_shape.d[j]:1
(DnnPredictMethod.cpp:230): node.aligned_shape.d[j]:26
(DnnPredictMethod.cpp:230): node.aligned_shape.d[j]:26
(DnnPredictMethod.cpp:230): node.aligned_shape.d[j]:87
(DnnPredictMethod.cpp:238): output_size: 235248
(DnnPredictMethod.cpp:230): node.aligned_shape.d[j]:1
(DnnPredictMethod.cpp:230): node.aligned_shape.d[j]:52
(DnnPredictMethod.cpp:230): node.aligned_shape.d[j]:52
(DnnPredictMethod.cpp:230): node.aligned_shape.d[j]:87
(DnnPredictMethod.cpp:238): output_size: 940992
(DnnPredictMethod.cpp:450): DnnPredictMethod DoProcess Success
(scheduler.cpp:457): ScheduleImp2: Yolov3PredictMethod
(yolov3_post_process_method.cc:63): Yolov3PostProcessMethod ParseDnnResult
(yolov3_post_process_method.cc:82): yolov3 model output layer: 3
(yolov3_post_process_method.cc:194): ( x1: 0 y1: 838.817 x2: 1919 y2: 1078 score: 0.696941 ), id: 16, category_name: Panthera pardus
(scheduler.cpp:457): ScheduleImp2: Yolov3PostProcessMethod
(DnnPostProcessMethod.cpp:70): DnnPostProcessMethod DoProcess
(DnnPredictMethod.cpp:317): DnnPredictMethod DoProcess
(mobilenetv2_predict_method.cc:39): Mobilenetv2PredictMethod PrepareInputData
(DnnPredictMethod.cpp:137): input_tensor.data_shape.d[0]: 1, input_tensor.data_shape.d[1]: 3, input_tensor.data_shape.d[2]: 224, input_tensor.data_shape.d[3]: 224, input_tensor.data_shape.layout: 2
(DnnPredictMethod.cpp:146): input_height: 224, input_width: 224, input_channel: 3
(DnnPredictMethod.cpp:230): node.aligned_shape.d[j]:1
(DnnPredictMethod.cpp:230): node.aligned_shape.d[j]:1000
(DnnPredictMethod.cpp:230): node.aligned_shape.d[j]:1
(DnnPredictMethod.cpp:230): node.aligned_shape.d[j]:1
(DnnPredictMethod.cpp:238): output_size: 4000
(DnnPredictMethod.cpp:450): DnnPredictMethod DoProcess Success
(scheduler.cpp:457): ScheduleImp2: Mobilenetv2PredictMethod
(DnnPostProcessMethod.cpp:70): DnnPostProcessMethod DoProcess
(mobilenetv2_post_process_method.cc:51): Mobilenetv2PostProcessMethod ParseDnnResult
(mobilenetv2_post_process_method.cc:71): id: 399, category_name: abaya
(scheduler.cpp:457): ScheduleImp2: Mobilenetv2PostProcessMethod
(smartplugin.cpp:2907): smart plugin got one smart result
(smartplugin.cpp:2913): image, type is ImageFrame
(smartplugin.cpp:2913): detect_box, type is BaseDataVector
(smartplugin.cpp:2913): classify, type is BaseDataVector
(mergehandbody.cpp:48): image, type is ImageFrame
(mergehandbody.cpp:48): detect_box, type is BaseDataVector
(mergehandbody.cpp:48): classify, type is BaseDataVector
(mergehandbody.cpp:325): UpdateHandTrackID recv null pointer
(mergehandbody.cpp:376): FilterGesture recv null pointer
explicit ExampleCustomSmartMessage
(smartplugin.cpp:2958): smart result image name = configs/vio_hg/Heixiong0.jpg
(smartplugin.cpp:2959): smart result frame_id = 0
(runtime_monitor.cpp:55): Pop frame 0
(viomessage.cpp:51): begin remove one vio slot
(viomessage.cpp:89): free feedback context success
(viomessage.cpp:45): call ~ImageVioMessage
(scheduler.cpp:423): FrameworkDataState_Ready
(ExampleSmartPlugin.cpp:40): output name: image
(ExampleSmartPlugin.cpp:40): output name: detect_box
(ExampleSmartPlugin.cpp:45): box type: detect_box, box size: 1
(ExampleSmartPlugin.cpp:40): output name: classify
^Crecv signal 2, stop
(vioproduce.cpp:206): consumed_vio_buffers_=2
(vioproduce.cpp:379): wait task to finish
(viopipeline.cpp:177): Enter vio pipeline module stop
(viopipeline.cpp:183): viopipeline stop, cam_en: 0 pipe_id: 0
(vpsmodule.cpp:525): Enter vps module stop, pipe_id: 0
(vpsmodule.cpp:470): Enter VpsDestoryPymThread, pipe_id: 0 start_flag: 1
(vpsmodule.cpp:1113): No Pym info in RingQueue! pipe_id: 0
(vpsmodule.cpp:1418): Quit get pym data thread, pipe_id: 0
(viopipeline.cpp:221): vps module get info failed, pipe_id: 0
(vioproduce.cpp:634): iot_vio_pyramid_info failed
(vioproduce.cpp:1561): fill vio image failed, ret: 0
(vpsmodule.cpp:487): Quit VpsDestoryPymThread, pipe_id: 0 start_flag: 0
(vpsmodule.cpp:538): HB_VPS_StopGrp, pipe_id: 0
(executor.cpp:123): Finish a job
(executor.cpp:107): task_queue_ is empty
(yolov3_post_process_method.cc:63): Yolov3PostProcessMethod ParseDnnResult
(yolov3_post_process_method.cc:82): yolov3 model output layer: 3
(yolov3_post_process_method.cc:194): ( x1: 0 y1: 838.817 x2: 1919 y2: 1078 score: 0.696941 ), id: 16, category_name: Panthera pardus
(scheduler.cpp:457): ScheduleImp2: Yolov3PostProcessMethod
(DnnPredictMethod.cpp:317): DnnPredictMethod DoProcess
(mobilenetv2_predict_method.cc:39): Mobilenetv2PredictMethod PrepareInputData
(DnnPredictMethod.cpp:137): input_tensor.data_shape.d[0]: 1, input_tensor.data_shape.d[1]: 3, input_tensor.data_shape.d[2]: 224, input_tensor.data_shape.d[3]: 224, input_tensor.data_shape.layout: 2
(DnnPredictMethod.cpp:146): input_height: 224, input_width: 224, input_channel: 3
(DnnPredictMethod.cpp:230): node.aligned_shape.d[j]:1
(DnnPredictMethod.cpp:230): node.aligned_shape.d[j]:1000
(DnnPredictMethod.cpp:230): node.aligned_shape.d[j]:1
(DnnPredictMethod.cpp:230): node.aligned_shape.d[j]:1
(DnnPredictMethod.cpp:238): output_size: 4000
(DnnPredictMethod.cpp:450): DnnPredictMethod DoProcess Success
(scheduler.cpp:457): ScheduleImp2: Mobilenetv2PredictMethod
(DnnPostProcessMethod.cpp:70): DnnPostProcessMethod DoProcess
(mobilenetv2_post_process_method.cc:51): Mobilenetv2PostProcessMethod ParseDnnResult
(mobilenetv2_post_process_method.cc:71): id: 399, category_name: abaya
(scheduler.cpp:457): ScheduleImp2: Mobilenetv2PostProcessMethod
(smartplugin.cpp:2907): smart plugin got one smart result
(smartplugin.cpp:2913): image, type is ImageFrame
(smartplugin.cpp:2913): detect_box, type is BaseDataVector
(smartplugin.cpp:2913): classify, type is BaseDataVector
(mergehandbody.cpp:48): image, type is ImageFrame
(mergehandbody.cpp:48): detect_box, type is BaseDataVector
(mergehandbody.cpp:48): classify, type is BaseDataVector
(mergehandbody.cpp:325): UpdateHandTrackID recv null pointer
(mergehandbody.cpp:376): FilterGesture recv null pointer
explicit ExampleCustomSmartMessage
(smartplugin.cpp:2958): smart result image name = configs/vio_hg/Heixiong0.jpg
(smartplugin.cpp:2959): smart result frame_id = 1
