$ tar –zxf bmnnsdk2d-bm1684_v2.0.1.tar.gz
$ cd bmnnsdk2-bm1684_v2.0.1/scripts
$ sudo ./install_driver_pcie.sh && cd ..
$ ./docker_run_bmnnsdk.sh
# cd scritps
# ./install_lib.sh nntc
# source envsetup_pcie.sh && cd ..
# cd lib/ffmpeg/x86 && export LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH && cd ../../../
# cd lib/decode/x86 && export LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH && cd ../../../
# cd examples/sail/python3/x86 && pip3 install sophon-2.0.*-py3-none-any.whl
实例代码编译及运行
# cd ../examples/SSD_object/cpp_ffmpeg_bmcv_bmrt/
# make -f Makefile.pcie clean && make -f Makefile.pcie
# make -f Makefile.pcie install
# cd ../../../install
**float32模型测试**
# ./bin/ssd300_cv_cv_bmrt.pcie image res/ssd300/vehicle_1.jpg model/ssd300/fp32_ssd300.bmodel 1
**int8模型测试**
# ./bin/ssd300_cv_cv_bmrt.pcie image res/ssd300/vehicle_1.jpg model/ssd300/int8_ssd300.bmodel 1
pcie状态监控
$ bm-smi 此命令用于检测pcie工作状态,tpu,mem使用率, 板卡温度等
CMODEL模式用例演示
解压sdk开发包并运行docker开发环境,本示例都基于此docker环境 $ tar –zxf bmnnsdk2d-bm1684_v2.0.1.tar.gz
$ tar –zxf bmnnsdk2d-bm1684_v2.0.1.tar.gz
$ cd bmnnsdk2-bm1684_v2.0.1
$ ./docker_run_bmnnsdk.sh
# cd scritps
# ./install_lib.sh nntc && cd ..
实例代码编译及运行
# cd examples/SSD_object/cpp_cv_cv_bmrt/
# make -f Makefile.x86 clean && make -f Makefile.x86
# make -f Makefile.arm f32
此用例测试了float 32模型示例,运行成功会保存如下图片检测结果:
out-0_vehicle_1.jpg