Yolo9000 wrapped in a ros-package for running it with ROS. A lot of credit goes to Joseph Chet Redmon - you might enjoy his resume - and co. for implementing a deep learning framework Darknet and the super fast object detector YOLO and YOLOv2 / YOLO9000.
The make-file have been converted to a CMakeLists. (Code test on ubuntu 16.04, cuda 8, opencv 3.2.0-dev, ROS kinetic)
Follow the ROS installation guide for download and installation and ROS tutorials for creating a workspace.
Go to ros-workspace source folder in a terminal
cd [workspace]/src/
Clone folder in terminal.
The repository needs to be updated.
$ git clone https://github.com/PeteHeine/yolo_v2_ros
Download yolo model to directory the weight directory.
cd [workspace]/src/yolo_v2_ros
mkdir weights
cd weigths
wget http://pjreddie.com/media/files/yolo.weights
Test yolo without ROS, without opencv and without GPU (In Makefile, set GPU=0 and OPENCV=0 and make.)
cd [workspace]/src/yolo_v2_ros
make
./darknet detect cfg/yolo.cfg weights/yolo.weights data/dog.jpg
To run with GPU and opencv. Open Makefile, set GPU=1 and OPENCV=1 and make agian.
First clone bounding box message type in workspace.
cd [workspace]/src/
git clone https://github.com/PeteHeine/msg_boundingbox.git
Open [workspace]/src/yolo_v2_ros/CMakeList.txt and ensure that
set(OPENCV 1)
set(ROS_INTERFACE 1)
Open [workspace]/src/yolo_v2_ros/CMakeList.txt and ensure that
set(GPU 0)
Software requires CUDA to be installed. Go to download page select your platform, download and follow instructions.
Open [workspace]/src/yolo_v2_ros/CMakeList.txt and ensure that
set(GPU 1)
Go to workspace and run catkin make.
cd [workspace]
catkin_make
Clone usb_cam ros package to workspace. Go again to ros-workspace source folder.
cd [workspace]/src/
Clone folder
git clone https://github.com/bosch-ros-pkg/usb_cam.git
Move file to weight-folder
cd [workspace]/src/yolo_v2_ros
mkdir weights
# Normal model
cp ~/Downloads/yolo.weights ./weights
Build packages
cd [workspace]
catkin_make
Source ros-workspace
source devel/setup.bash
Run launch file
roslaunch yolo_v2_ros usb_web_cam.launch