#Usage of the web demo
The demo server requires Python with some dependencies.
To make sure you have the dependencies, please run pip install -r requirements.txt
, and also make sure that you have compiled the Python Caffe interface and that it is on your PYTHONPATH
Please refer to Caffe for how to train a model based on your own dataset. After the train, you should get the net file .prototxt, the weight file .caffemodel.
Plese make sure your caffe framewok was installed, and the path of caffe/.build_release/tools has been added to the system PATH.
Download the images, annotations and lists from stanford dogs dataset and extract them to data/standord_dogs
cd data/standord-dogs && python dog_parse.py
cd data/standord-dogs && ./create_image.sh
Download GoogleNet Model to models/bvlc_googlenet/
Run the following command to start the train.
cd models/bvlc_googlenet/ && train.sh
-
You could store your caffe mdoel in the models dir.
-
Modify the web_demo/app.py file.
a). In line 10, define the path that you store this project. b). define your caffe model path from line 101 t0 108.
http://vision.stanford.edu/aditya86/ImageNetDogs/images.tar http://vision.stanford.edu/aditya86/ImageNetDogs/annotation.tar http://vision.stanford.edu/aditya86/ImageNetDogs/lists.tar
Running python web_demo/app.py
will bring up the demo server, accessible at http://0.0.0.0:5000
.
You can enable debug mode of the web server, or switch to a different port:
% python examples/web_demo/app.py -h
Usage: app.py [options]
Options:
-h, --help show this help message and exit
-d, --debug enable debug mode
-p PORT, --port=PORT which port to serve content on