YOLO-darknet-on-Jetson-TX2

YOLO-darknet-on-Jetson-TX2

            https://github.com/Alro10/YOLO-darknet-on-Jetson-TX2

software:

            https://blog.csdn.net/cherry_dr/article/details/80134373

NVIDIA TensorRT使用记录:

https://www.jianshu.com/p/59fe26073a41

Classifying Images with ImageNet

TensorRT下载地址:https://developer.nvidia.com/nvidia-tensorrt-download 
TesnsoRT介绍文档:https://devblogs.nvidia.com/tensorrt-3-faster-tensorflow-inference/ 
TensorRT开发者指南:http://docs.nvidia.com/deeplearning/sdk/tensorrt-developer-guide/index.html 
TensorRT样例代码:http://docs.nvidia.com/deeplearning/sdk/tensorrt-developer-guide/index.html#samples

Yolo darknet is an amazing algorithm that uses deep learning for real-time object detection but needs a good GPU, many CUDA cores. For Jetson TX2 I would like to recommend to you use this repository if you want to achieve better performance, more fps, and detect more objects real-time object detection on Jetson TX2

YOLO-darknet-on-Jetson-TX2_第1张图片

How to run YOLO on Jetson TX2

After boot (Jetpack 3.1) and install OPENCV...

Copy original Yolo repository:

$ git clone https://github.com/pjreddie/darknet.git

$ cd darknet

$ sudo sed -i 's/GPU=0/GPU=1/g' Makefile

$ sudo sed -i 's/CUDNN=0/CUDNN=1/g' Makefile

$ sudo sed -i 's/OPENCV=0/OPENCV=1/g' Makefile

$ make -j4

You will have to download the pre-trained weight file yolo.weights or tiny-yolo but this is much faster but less accurate than the normal YOLO model.

$ wget https://pjreddie.com/media/files/yolo.weights

$ wget https://pjreddie.com/media/files/tiny-yolo-voc.weights

How to run YOLO using onboard camara Jetson TX2? It's a really hard question, I needed to find many sites but I found the right solution:

$ ./darknet detector demo cfg/coco.data cfg/yolo.cfg yolo.weights "nvcamerasrc ! video/x-raw(memory:NVMM), width=(int)1280, height=(int)720,format=(string)I420, framerate=(fraction)30/1 ! nvvidconv flip-method=0 ! video/x-raw, format=(string)BGRx ! videoconvert ! video/x-raw, format=(string)BGR ! appsink"

Or if you wan to run using tiny-yolo only need to change

$ ./darknet detector test cfg/voc.data cfg/tiny-yolo-voc.cfg tiny-yolo-voc.weights

Run in videos

$ ./darknet detector demo cfg/coco.data cfg/yolov2.cfg yolo.weights data/

Run in photos or image

$ ./darknet detect cfg/yolov2.cfg yolo.weights data/

I recommend to take a look...https://pjreddie.com/darknet/yolo/ for more details of YOLO!

I think it is important to install a SSD and setup to work as the root directory. Also build a kernel and extra modules, you can do the last recommendation after o before build and run YOLO. Jetson only has 32gb. See this videos:

https://www.youtube.com/watch?v=ZpQgRdg8RmA&t=4s

你可能感兴趣的:(环境搭建)