Yolo v3 Darknet for box detection in gazebo. This package provides dataset and training notebooks. As well as trained weights
Reference : Here
Note : For unknown reasons , yolo v3 tiny weights don't show any predictions when used with darknet ( AlexeyAB ) but Yolo v3 weights work fine.
cd ~/catkin_ws/src
git clone --recursive https://github.com/leggedrobotics/darknet_ros.git
cd ~/catkin_ws
catkin_make -DCMAKE_BUILD_TYPE=Release
cd ~ git clone https://github.com/AlexeyAB/darknet.git cd darknet
( Make sure you have downloaded necessary libraries , please refer to these guides 1 and 2 )
Make changes in Makefile and save them using gedit or code (vs code)
code Makefile
For CPU build , set following parameters in Makefile :
CUDNN=0 CUDNN_HALF=0 OPENCV=1 AVX=1 OPENMP=1 LIBSO=1 ZED_CAMERA=0 ZED_CAMERA_v2_8=0
Save the edited Makefile
make
Now copy obj.data , obj.names and yolov3_training.cfg files from ~/Object_follower_UR5/src/yolov3/cfg folder to cfg folder of darknet directory. Also place weights file in darknet directory Now place any test image ( for example here it is two_boxes.png ) in darknet directory and run following command :
cd ~/darknet ./darknet detector test cfg/obj.data cfg/yolov3_training.cfg yolov3_training.weights two_boxes.png
Watch the predictions of model! (Task 3 - Object Detection)