Example POST
request:
curl -H "Content-Type: application/json" -X POST -d '{"urls":["https://upload.wikimedia.org/wikipedia/en/2/24/Lenna.png"]}' -L https://heroku-caffe-test-ck.herokuapp.com/classify
Result:
{"predictions": [1]}
Installation (prerequisite: Have heroku-cli and Docker installed):
$ heroku plugins:install heroku-container-registry
$ git clone https://github.com/thamcheongkit/heroku-docker-caffe-demo.git
$ cd heroku-docker-caffe-demo
$ ./api-server/download-pretrained-model.sh
$ heroku create
$ heroku container:push web
$ heroku ps:scale web=1
*tips: patient
Reference:
https://devcenter.heroku.com/articles/container-registry-and-runtime https://github.com/BVLC/caffe/tree/master/docker https://github.com/BVLC/caffe/tree/master/examples/finetune_flickr_styleStyles list (from 0 to 19):
- Detailed
- Pastel
- Melancholy
- Noir
- HDR
- Vintage
- Long Exposure
- Horror
- Sunny
- Bright
- Hazy
- Bokeh
- Serene
- Texture
- Ethereal
- Macro
- Depth of Field
- Geometric Composition
- Minimal
- Romantic