Tag Archives: Caffe

Deep Dreams with Caffe on Ubuntu 16.04

First, install caffe as being explained in my other post here.

Googlenet Model

Download the bvlc_googlenet.caffemodel from https://github.com/BVLC/caffe/tree/master/models/bvlc_googlenet

and put it in
caffe/models/bvlc_googlenet/

PIP

IPython, scipy, Jupyter, protobuf, scikit-image

Always install in the user space with –user

Running  jupyter notebook

open  a new notebook and paste the following into it and correct the “model_path” and

img = np.float32(PIL.Image.open(‘/home/behnam/Downloads/fractal.jpg’)) according to your setup.


 

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:

add the following lines to your Makefile.config

and build it:

used video_stream_opencv to stream your video:

download the trained model from here and put them in the model directory.

In my ssd.launch, I have changed my trained network into:

Now run the following to open rviz:

in the rviz, go to add a panel, and add integrated viewer>ImageViewrPlugin.

Now correct the topic in the added panel and you should see detected cars:

Car Detection Using Fast Region-based Convolutional Networks (R-CNN) in ROS with Caffe

To run this, you need to install Fast-RCNN and Autoware. Just in case you got error regarding hd5f when making Fast-RCNN, add the following lines to your Makefile.config

Now run the following command to start:

if you got an error like :

That means your graphics card is not ready or accessible, in my everytime I suspend my notebook I get that error and I need a restart :/

now you should publish your video stream on the topic “image_raw”, for that purpose I used video_stream_opencv. Here is my launch file:

Now run the following to open rviz:

in the rviz, go to add a panel, and add integrated viewer>ImageViewrPlugin.

Now correct the topic in the added panel and you should see detected cars: