一、下载安装jetson-nano镜像
jetson-nano-4gb-jp441-sd-card-image.zip.
具体的安装步骤参考jetson-nano开箱刷系统.
二、deepstream5.0下载安装
镜像下载deepstream_sdk_v5.0.1_jetson.tbz2.
-
$ sudo apt install \
libssl1.0.0 \
libgstreamer1.0-0 \
gstreamer1.0-tools \
gstreamer1.0-plugins-good \
gstreamer1.0-plugins-bad \
gstreamer1.0-plugins-ugly \
gstreamer1.0-libav \
libgstrtspserver-1.0-0 \
libjansson4=2.11-1 -
$ git clone https://github.com/edenhill/librdkafka.git
$ cd librdkafka
$ git reset --hard 7101c2310341ab3f4675fc565f64f0967e135a6a
$ ./configure
$ make
$ sudo make install
$ sudo mkdir -p /opt/nvidia/deepstream/deepstream-5.0/lib
$ sudo cp /usr/local/lib/librdkafka* /opt/nvidia/deepstream/deepstream-5.0/lib -
$ sudo apt update
$ sudo apt install --reinstall nvidia-l4t-gstreamer
三、deepstream5.0运行实例
- $ sudo tar -xvf deepstream_sdk_v5.0.1_jetson.tbz2 -C /
$ cd /opt/nvidia/deepstream/deepstream-5.0
$ sudo ./install.sh
$ sudo ldconfig
$ sudo nvpmodel -m 0
$ sudo jetson_clocks
$ deepstream-app -c source8_1080p_dec_infer-resnet_tracker_tiled_display_fp16_nano.txt
(注意在opt/nvidia/deepstream/deepstream-5.0/samples/configs/文件夹内执行)
四、YOLOV4下载和运行
$ git clone https://github.com/AlexeyAB/darknet.git
$ cd darknet
$ sudo vim Makefile
修改如下
GPU=1
CUDNN=1
OPENCV=1
NVCC=/usr/local/cuda-10.2/bin/nvcc
$ make -j4
权重文件下载地址,下载后放到darknet文件夹内即可https://github.com/AlexeyAB/darknet/releases/download/darknet_yolo_v4_pre/yolov4-tiny.weights
视频检测,把deepstream的视频/opt/nvidia/deepstream/deepstream-5.0/samples/streams/sample_1080p_h265.mp4拷贝到darknet/data文件夹内
$ ./darknet detector demo cfg/coco.data cfg/yolov4-tiny.cfg yolov4-tiny.weights data/sample_1080p_h265.mp4