lenLRX / Atlas_ACL_E2E_Demo

188 stars 38 forks source link

如果想用yolov4 608x608 + deepsort,应该要怎么修改 #9

Closed Leon16226 closed 3 years ago

Leon16226 commented 3 years ago

目前的需求是使用Tianxiaomo /pytorch-YOLOv4,把yolov4官方的weights转成608x608 yolov4.om 然后把config文件改成,如下: { "streams": [ { "name": "deep_sort_demo_stream1", "stream_type": "deep_sort_demo", "src": "test.mp4", "dst": "output1.mp4", "hw_encoder": false, "yolov3_model_path": "./model/company.om", "deepsort_model_path": "./model/deepsort_mars.om" } ], "config": { "app_perf": true, "perflog_path": "." } } 运行./run.sh config/deep_sort_demo.json 无法正常推理。 /home/HwHiAiUser/deepsort/src/yolov3_stream.cpp:40 aclError:100000 /home/HwHiAiUser/deepsort/src/acl_model.h:58 aclError:107000 /home/HwHiAiUser/deepsort/src/yolov3_stream.cpp:40 aclError:100000 terminate called after throwing an instance of 'std::length_error' what(): vector::reserve ./run.sh: line 5: 4679 Segmentation fault ./build/acl_demo_app -c $1 是需要该哪里的代码吗?

Leon16226 commented 3 years ago

完整的运行信息如下: total dev count: 1 [FFMPEGInput::Init] test.mp4 codec name:h264 avcc profile: 100 frame h: 720 frame w: 1280 ticks_per_frame: 2 framerate.num: 30 framerate.den: 1 ref frame num: 1 has B frame: 0 pix format: 0 codec_tag 828601953 extra_data size: 46 [DvppDecoder::Init] h: 720 w:1280output_size: 1382400 Model Info: ACLModel:./model/company-sim.om Input Num:1 Input shapes:393216, Output Num:2 Output shapes:5160960, 258048, Model Info: ACLModel:./model/deepsort_mars.om Input Num:1 Input shapes:196608, Output Num:1 Output shapes:8192, FFMPEGOutput::Init frame send interval: 0.0333333 [libx264 @ 0xfffee8626ca0] using cpu capabilities: ARMv8 NEON [libx264 @ 0xfffee8626ca0] profile High, level 3.1 [libx264 @ 0xfffee8626ca0] 264 - core 152 r2854 e9a5903 - H.264/MPEG-4 AVC codec - Copyleft 2003-2017 - http://www.videolan.org/x264.html - options: cabac=1 ref=1 deblock=1:0:0 analyse=0x3:0x3 me=dia subme=1 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=4 lookahead_threads=4 sliced_threads=1 slices=4 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=1 keyint=12 keyint_min=1 scenecut=40 intra_refresh=0 rc=crf mbtree=0 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00 Output #0, mp4, to 'output1.mp4': Stream #0:0: Video: h264 (libx264), nv12, 1280x720, q=-1--1 [FFMPEGOutput::Init] expected frame size 1382400 /home/HwHiAiUser/deepsort/src/yolov3_stream.cpp:40 aclError:100000 /home/HwHiAiUser/deepsort/src/acl_model.h:58 aclError:107000 /home/HwHiAiUser/deepsort/src/yolov3_stream.cpp:40 aclError:100000 terminate called after throwing an instance of 'std::length_error' what(): vector::reserve ./run.sh: line 5: 4679 Segmentation fault ./build/acl_demo_app -c $1

lenLRX commented 3 years ago

这个需要改一些代码,首先yolov4现在也是写死的416x416。需要在json里面价格配置。

然后是需要让deepsort前面的模型支持yolov4。 这些修改不难

Leon16226 commented 3 years ago

想在python上跑,所以不进行修改了