Test R-CNN model using caffe and python

Following instructions from

https://github.com/BVLC/caffe/blob/master/examples/detection.ipynb

First, need to download caffe R-CNN ImageNet model:

in caffe folder, run

 ./scripts/download_model_binary.py models/bvlc_reference_rcnn_ilsvrc13

Second, download selective_search_icv_with_python module and compile in MATLAB

Third, run with example image:

mkdir -p _temp
echo `pwd`/images/fish-bike.jpg > _temp/det_input.txt
python/detect.py --crop_mode=selective_search --pretrained_model=models/bvlc_reference_rcnn_ilsvrc13/bvlc_reference_rcnn_ilsvrc13.caffemodel --model_def=models/bvlc_reference_rcnn_ilsvrc13/deploy.prototxt --raw_scale=255 _temp/det_input.txt _temp/det_output.h5

 

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Blog at WordPress.com.

Up ↑

%d bloggers like this: