Getting started with Deep Learning Caffe Framework - Fastest way(Installation +Web Demo)

Here is the fastest way to get started with caffe deep learning framework with installation and basic we application demo for image classification :

Installation :

Here i am using caffe official ubuntu image and running it on docker . Follow the steps mentioned below :
1.) Install docker setup on your machine . Follow this link :
2.) I have build caffe ubuntu image and push to docker hub . You can pull it in to your local.
  docker pull anishratnawat/caffe_deep_learning
3.)Run this command on terminal :
    docker run -ti -p 5000 anishratnawat/caffe_deep_learning bash  
 // it will download the image if its not downloaded before.
// When downloading finishes , terminal will enter in to image bash and your terminal will change to :

If you install any necessary packages inside that image then you need to commit it to make changes persist .
docker commit <ContainerId> <NewImageName>

3.) Your caffe installation path is : /opt/caffe
4.) By this time , You are ready to get started with Caffe framework .


Web Demo :

Here is python based application that have web interface which will take image as a input and classify the image .

1.) Go inside caffe installation path : /opt/caffe
2.) Download caffe Net model and ImageNet data Auxillary data using below commands:
 ./scripts/ models/bvlc_reference_caffenet
3.) After this finishes , try to run the python server using :
python examples/web_demo/ & (& is used to run it in background)
4.) This will start your python server .
5.) you can access the python page from your browser .
  Just hit :<PORT>
  PORT you will get from this command :
ratnawat-macOS:~ ratnawat$ docker ps
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS                     NAMES

eccc952b32aa        caffev1             "bash"              14 hours ago        Up 38 seconds>5000/tcp   epic_brown

Here our port is 32771 . This may get change after each run .

So just hit : . It will open page where you will upload image and Deep learning model will classify it .

Web App will look like this :

In case if you have any question or doubt , please free to comment below .


Popular posts from this blog

Build Knowledge Graph from unstructured corpus using Machine Learning

Sudoku using dancing link - Java implementation