Skip to content

neverleave0916/docker-yolo_v4

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Docker-Yolo_v4

GitHub release GitHub license Docker Image CI workflow

A Docker image containing all the dependencies you need to run yolov4 with GPUs.

https://github.com/neverleave0916/docker-yolo_v4



中文教學(full Tutorial):https://hackmd.io/@neverleave0916/YOLOv4 (可跳過安裝環境,由 3.測試YOLOv4 開始實作)

Last updated: 2022/2/1 17:52

Test platform

Software Version Version
Ubuntu 18.04 20.04
Docker 19.03.8 20.10.5
Nvidia Driver 440.82 450.102
CUDA 10.2 11.0

Tutorial

1. Start docker

You may use the latest or auto tag to specify the image you need.
latest is the original image that I generated manually. (2020.07 build notes)
auto is the image that automatic build from this DockerFile. (2022.02)

  • auto image does not contain VNC server
  • Except for the package version, there is no difference between the two images. If you can't run Yolo on one, you may try another one.
docker run --gpus all --ipc=host -it -p 8888:8888 -p 5901:5901 neverleave0916/yolo_v4:auto
  • port 8888: jupyter
  • port 5901: VNC(if installed)

2. Clone YOLO

git clone https://github.com/AlexeyAB/darknet
chmod -R 777 darknet/  #This step is important

3. Use make to compile

you can follow the AlexeyAB/darknet tutorial if you want, below are the steps that I use, because I kept getting errors in the AlexeyAB/darknet tutorial

  1. Open Makefile
cd darknet
vim Makefile
  1. Modify these param to train with GPU and display image
    You may need to follow the newest instruction in the original yolov4 GitHub.
GPU=1
CUDNN=1
CUDNN_HALF=1
OPENCV=1
AVX=0
OPENMP=0
LIBSO=1
ZED_CAMERA=0 # ZED SDK 3.0 and above
ZED_CAMERA_v2_8=0 # ZED SDK 2.X
  1. Compile
make

4. Test YOLOv4

  1. get the pre-train weights
wget https://github.com/AlexeyAB/darknet/releases/download/darknet_yolo_v3_optimal/yolov4.weights
  1. testing YOLOv4(on single Image) caution :If there are GUI env on your computer,you could remove -dont_show to display the image.
./darknet detector test cfg/coco.data cfg/yolov4.cfg yolov4.weights data/person.jpg -i 0 -thresh 0.25 -dont_show
  1. View the result

If succeed, you will get predictions.jpg in your folder.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published