GithubHelp home page GithubHelp logo

hyper-devil / yolov4-for-darknet_ros Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tossy0423/yolov4-for-darknet_ros

0.0 0.0 0.0 1.67 MB

This is the environment in which YOLO V4 is ported to darknet_ros.

License: MIT License

yolov4-for-darknet_ros's Introduction

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.

@Hyper-Devil:
1.如果出现:error "OpenCV 4.x+ requires enabled C++11 support",请降级至opencv3.x。
2.如果/darknet_ros/detection_image不正常 设置enable_opencv: false。

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!!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.