Swift for TensorFlow model wrapped in a HTTP/REST service, with basic front-end included.
Tested with Ubuntu and Swift for TensorFlow v0.5-rc0.
Live demo: https://s4tf-style-transfer.herokuapp.com
API tries to be compatible with TF Serving Predict API.
Expected input image format is JPEG, output format is PNG (base64-encoded).
Request:
POST /v1/models/style-transfer:predict
{
"instances": [{"b64": "ABC=="}]
}
Response:
200 OK
{
"predictions": [{"b64": "ABC=="}]
}
Checkout repo, build image and run:
$ docker build --tag=s4tf-style-transfer .
$ docker run --rm -p 8080:80 s4tf-style-transfer