Installing Overfeat: CNN based feature extractor and classifier on Ubuntu 16.04

Step 1: Download the archive from the link below
http://cilvr.cs.nyu.edu/lib/exe/fetch.php?media=overfeat:overfeat-v04-2.tgz

Step 2: Extract and prepare

tar -xvzf overfeat-v04-2.tgz
cd overfeat
python download_weights.py
git pull

Step 3: A simple test of the pre-compiled binaries can be done with following command

#for 64bit OS
./bin/linux_64/overfeat -n 3 samples/bee.jpg

overfeatbeeupload

Step 3: Overfeat can run without BLAS, however it would be very slow. On linux, however we strongly advice you to install openblas. On Ubuntu/Debian you should compile it (it might take a while, but it is worth it) :

sudo apt-get install build-essential gfortran git libgfortran3
git clone https://github.com/xianyi/OpenBLAS.git
cd OpenBLAS
make NO_AFFINITY=1 USE_OPENMP=1
sudo make install

Step 4: Configure OpenBLAS maximum thread count as env variable

“gedit ~/.bashrc”  and restart terminal after saving changes

export OMP_NUM_THREADS=4

Step 5: Build overfeat libraries and tools with the webcam demo (requires opencv).

sudo apt-get install python imagemagick
sudo apt-get install pkg-config libopencv-dev libopencv-highgui-dev

#Go to overfeat root directory "cd overfeat"
#here are the instructions to build the OverFeat library and tools:
cd src
make all
make cam

Step 6: Run the webcam demo with the large network : (go to overfeat root folder)

./bin/linux_64/webcam -l

overfeatupload

 

 

 

 

 

 

 

 

 

 

Advertisements

Join the Discussion

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s

Create a free website or blog at WordPress.com.

Up ↑

%d bloggers like this: