Skip to content

Latest commit

 

History

History
185 lines (148 loc) · 8.5 KB

README.md

File metadata and controls

185 lines (148 loc) · 8.5 KB

YOLO V4 for darknet_ros

Thanks for taking a look at this repository!!
This repository is the environment of YOLO V4 ported to darknet_ros.
If you need the Japanese README file, please go here.

Installation

This repository assumes that the Robot Operating System (ROS) has already been installed on your environment. See ros.org to know how to install ROS. My environment is here.

Create workspace

First, create the ROS workspace. The <workspace> can be named arbitrarily.

## Create workspace for ROS, Change directory
$ mkdir -p workspace/src && cd workspace/src

## init workspace
$ catkin_init_workspace

## Make
$ cd ../
$ catkin_make

Installation your environment

Easy Installation

To clone darknet and darknet_ros as a submodule, you must clone them with --recursive. This allows you to clone the two submodules together.

$ cd src
$ git clone --recursive https://github.com/Tossy0423/yolov4-for-darknet_ros.git

Download weights file

The weights file is very large and needs to be downloaded separately.

Download the weights file to darknet_ros/darknet_ros/yolo_network_config/weights to install it.

$ wget https://github.com/AlexeyAB/darknet/releases/download/darknet_yolo_v3_optimal/yolov4.weights

make pkg

# Change workspace directory
$ cd workspace

## Make
$ catkin_make

# Write source command in ~/.bashrc
$ echo "source ~/workspace/devel/setup.bash" >> ~/.bashrc

Environment

Topics Spec
Model Dell ALIENWARE m15
CPU Intel® Core™ i7-8750H CPU @ 2.20GHz × 12
GPU GeForce RTX 2070 with Max-Q Design/PCIe/SSE2
RAM 15.4 GB
OS Ubuntu 18.04.3 LTS bionic
Midlleware ROS Melodic
NVIDIA-SMI 440.100
Driver Version 440.100
CUDA Version 10.2
Cuda compilation tools release 10.1, V10.1.243

Demo

I will describe how to demonstrate it in an implemented environment. Before you can do the demo, you need to prepare for it.

Preparation

  • Web Camera
    You don't need to have it if it's already installed.

    At the Terminal

    $ ls /dev/video*

    If you enter and display, you are ready to go. If you do not see anything, prepare your environment.

  • ROS package of uvc_camera
    If it has already been installed, there is no need to do it again. To install, execute the following command

    $ sudo apt install ros-melodic-uvc-camera
  • Fixing the launch file
    If you use the uvc_camera package, you need to change the Topic of the camera image to input to darknet_ros. Open the file darknet_ros/darknet_ros/config/ros.yaml and change the file as follows

    ## Before
    topic: /camera/rgb/image_raw
    
    ## After
    topic: /image_raw
    

Running

Execute the three commands in another Terminal.

$ roscore
$ rosrun uvc_camera uvc_camera_node
$ roslaunch darknet_ros yolo_v4.launch

How to build this environment??

Here is the documentation to set up this environment.

Acknowledgment

This repository consists of two large repositories, AlexeyAB's darknet and legged robotics's darknet_ros. For building this environment, I have a reference to the information published by many developers. I would like to thank the developers who made these repositories available to me, and many of them have contributed their information to make this environment possible.

LISENCE

This software is released under the MIT License, see LICENSE.

Future Plans

I will improve it at my whim.

  • Rewrite the readme file in English. 🌎
  • Getting your environment ready to run in the Docker Container. 🐳

History

  • I've roughly summarized everything from environment building to manual creation(11. Aug. 2020)
  • Create an English version of the README(20. Aug. 2020)
  • Moved /root/darknet to /root/darknet/darknet/darknet_ros due to redundant file structure.(31. Aug. 2020)

Autor

Tossy Japan, Osaka Please Follow me!!