網頁

2020年8月25日 星期二

Jetson Nano darknet

參考 Nvidia Jetson Nano 使用心得

$ git clone https://github.com/pjreddie/darknet.git
出現下列錯誤
error: 'CUDNN_CONVOLUTION_FWD_SPECIFY_WORKSPACE_LIMIT' undeclared

改為使用
$ git clone https://github.com/AlexeyAB/darknet
$ cd darknet
$ vi Makefile
GPU=1
CUDNN=1
CUDNN_HALF=1
OPENCV=1
LIBSO=1

$ make -j4

參考 AlexeyAB/darknet
cfg 和 weights 由 YOLOv4 model zoo 下載
yolov4-tiny.weights (建議使用)
yolov4-leaky-416.weight
yolov4-mish-416.weight


nano@nano-desktop:~/Data/darknet/darknet.AlexeyAB$ ./darknet detector demo ../cfg/coco.data ../cfg/yolov4-leaky-416.cfg ../weights/yolov4-leaky-416.weights 'nvarguscamerasrc ! video/x-raw(memory:NVMM), width=(int)1280, height=(int)720,format=(string)NV12, framerate=(fraction)30/1 ! nvvidconv flip-method=2 ! video/x-raw, format=(string)BGRx ! videoconvert ! video/x-raw, format=(string)BGR ! appsink'

nano@nano-desktop:~/Data/darknet/darknet.AlexeyAB$ python3 darknet_video.py --weights ../weights/yolov4-leaky-416.weights --data_file ../cfg/coco.data --config_file ../cfg/yolov4-leaky-416.cfg --input 'nvarguscamerasrc ! video/x-raw(memory:NVMM), width=(int)416, height=(int)416,format=(string)NV12, framerate=(fraction)30/1 ! nvvidconv flip-method=2 ! video/x-raw, format=(string)BGRx ! videoconvert ! video/x-raw, format=(string)BGR ! appsink' --ext_output

需要按 Enter 才會進下一個畫面



沒有留言:

張貼留言