Skip to content

Instantly share code, notes, and snippets.

@takurx
Last active December 3, 2022 09:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save takurx/eaa10571836a9d282c4cbbd3409d82f5 to your computer and use it in GitHub Desktop.
Save takurx/eaa10571836a9d282c4cbbd3409d82f5 to your computer and use it in GitHub Desktop.
Log of install YOLO v3/v4 on Ubuntu 20.04

log_install_YOLO_v3_v4_on_Ubuntu_20p04

  1. Install dependency
  2. Git clone Build darknet
  3. Download pre-trained model v3
  4. Execute v3

1. Install dependency

sudo apt install -y cmake build-essential git

2. Git clone and Build darknet

git clone https://github.com/AlexeyAB/darknet.git
cd darknet
./build.sh

3. Download pre-trained model v3

wget https://pjreddie.com/media/files/yolov3.weights

4. Execute v3

./darknet detect cfg/yolov3.cfg yolov3.weights data/dog.jpg

One more things, case of v4

wget https://github.com/AlexeyAB/darknet/releases/download/darknet_yolo_v3_optimal/yolov4.conv.137
./darknet detect cfg/yolov4.cfg yolov4.conv.137 data/dog.jpg

Without training I had failed......lol

@pjcrux
Copy link

pjcrux commented Dec 2, 2022

Hello. I'm getting the following error:

user@SON-desktop:~/darknet$ ./build.sh
sudo: ./build.sh: command not found

contents of /darknet are as follows using "ls -a":

user@SON-desktop:~/darknet$ ls -a
3rdparty        DarknetConfig.cmake.in  include                results
build           darknet_images.py       json_mjpeg_streams.sh  scripts
build.ps1       darknet.py              LICENSE                src
cfg             darknet_video.py        Makefile               vcpkg.json
cmake           data                    net_cam_v3.sh          video_yolov3.sh
CMakeLists.txt  image_yolov3.sh         net_cam_v4.sh          video_yolov4.sh
darknet         image_yolov4.sh         README.md

The file for build.sh is not present or I'm missing something obvious. 

@takurx
Copy link
Author

takurx commented Dec 3, 2022

Thanks. I written this gist 2 years ago.

It may can build currently version.
https://github.com/AlexeyAB/darknet#how-to-compile-on-linuxmacos-using-cmake

git clone https://github.com/AlexeyAB/darknet
cd darknet
mkdir build_release
cd build_release
cmake ..
cmake --build . --target install --parallel 8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment