Sign inSign up

neverleave0916/yolo_v4

By neverleave0916

•Updated over 4 years ago

Install all the Dependencies that you need to run alexeyab/darknet/yolov4 on your own machine.

Image
9

10K+

neverleave0916/yolo_v4 repository overview

⁠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
SoftwareVersionVersion
Ubuntu18.0420.04
Docker19.03.820.10.5
Nvidia Driver440.82450.102
CUDA10.211.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.

Tag summary

Content type

Image

Digest

Size

3.8 GB

Last updated

about 6 years ago

docker pull neverleave0916/yolo_v4