Car Detection Using Single Shot MultiBox Detector (SSD Convolutional Neural Network) in ROS Using Caffe
This work is similar to the previous work here, but this time I used Single Shot MultiBox Detector (SSD) for car detection. Installation is similar, clone the SSD Caffe:
1 2 3 |
git clone https://github.com/weiliu89/caffe.git ssdcaffe cd ssdcaffe git checkout 5365d0dccacd18e65f10e840eab28eb65ce0cda |
add the following lines to your Makefile.config
1 2 |
INCLUDE_DIRS += /usr/include/hdf5/serial LIBRARY_DIRS += /usr/lib/x86_64-linux-gnu/hdf5/serial |
and build it:
1 |
make && make distribute |
used video_stream_opencv to stream your video:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
<!-- Example of run: roslaunch video_file.launch video_file:=/home/behnam/Desktop/dash_cam.mp4 --> <launch> <!-- launch video stream --> <!--remaping the topic --> <remap from="/videofile/image_raw" to="/image_raw"/> <include file="$(find video_stream_opencv)/launch/camera.launch" > <!-- node name and ros graph name --> <arg name="camera_name" value="videofile" /> <!-- full path to the video file --> <arg name="video_stream_provider" value="$(arg video_file)" /> <!-- throttling the querying of frames to --> <arg name="fps" value="30" /> <!-- setting frame_id --> <arg name="frame_id" value="videofile_frame" /> </include> </launch> |
download the trained model from here and put them in the model …