矩池云上安装yolov4 darknet教程
这里我是用PyTorch 1.8.1来安装的
拉取仓库
官方仓库
git clone https://github.com/AlexeyAB/darknet
镜像仓库
git clone https://github.com.cnpmjs.org/AlexeyAB/darknet.git
安装opencv
apt-get update
apt-get install libopencv-dev -y
修改Makefile
在 /darknet/ 目录下找到 Makefile 进行修改
GPU=1
CUDNN=1
CUDNN_HALF=1
OPENCV=1
LIBSO=1
cd darknet
make
测试一下
这里用到了隐藏的vnc功能,查看教程 用端口映射的办法使用矩池云隐藏的vnc功能。
VNC_PASSWD="matpool" /root/vnc/vnc_startup.sh
ssh -p 26499 -NL 5901:localhost:5901 root@hz.matpool.com
localhost:5901
下载yolov4.weights
官方下载
https://github.com/AlexeyAB/darknet/releases/download/darknet_yolo_v3_optimal/yolov4.weights
https://raw.githubusercontent.com/AlexeyAB/darknet/master/cfg/yolov4.cfg
镜像加速
https://download.fastgit.org/AlexeyAB/darknet/releases/download/darknet_yolo_v4_pre/yolov4.weights
https://raw.fastgit.org/AlexeyAB/darknet/master/cfg/yolov4.cfg
cp /mnt/yolov4.weights /darknet/
cp /mnt/yolov4.cfg /darknet/cfg/
cd /darknet/
./darknet detect cfg/yolov4.cfg yolov4.weights data/dog.jpg
参考文章
Ubuntu20.04 DarkNet框架yolo v4安装图文
基于darknet 的yolov4的Ubuntu 18.04环境搭建