此步骤很简单,基本和YOLOv2一样,在作者项目主页上有完整步骤。
项目主页:
https://pjreddie.com/darknet/yolo/
论文:
https://pjreddie.com/media/files/papers/YOLOv3.pdf
1、获取darknet
$ git clone https://github.com/pjreddie/darknet.git
$ cd darknet
$ vim Makefile
修改
GPU=1
CUDNN=1
OPENCV=1
NVCC=/usr/local/cuda-8.0/bin/nvcc
保存退出
$ make -j16
2、YOLOv3的测试
$ cd darknet
在目录下新建weights文件夹,用于存放权重
$ cd weights
$
wget https://pjreddie.com/media/files/yolov3.weights
单张图像测试(coco数据集)
./darknet detect cfg/yolov3.cfg weights/yolov3.weights data/dog.jpg
detect是detector test的简写模式,完整命令是
./darknet detector test cfg/coco.data cfg/yolov3.cfg weights/yolov3.weights data/dog.jpg
多张图像测试
./darknet detect cfg/yolov3.cfg weights/yolov3.weights
出现
EnterImage Path:
可以读入多张图像
设置阈值输出(阈值为0)
./darknet detect cfg/yolov3.cfg weights/yolov3.weights data/dog.jpg -thresh 0
摄像头情况下
./darknet detector demo cfg/coco.data cfg/yolov3.cfg weights/yolov3.weights
视频demo
./darknet
detector demo cfg/coco.data cfg/yolov3.cfg weights/yolov3.weights
<video file>
ps:论文的Introduction和What This All Means很幽默,有启发性。