Powered by models from Arbitrary Image Stylization TFJS by reiinakano (Reiichiro Nakano).
PORT
- the port to listen onSTYLE_NAME
- name of the style model to use; options aremobilenet-style
(default) orinception-style
TRANSFORMER_NAME
- name of the transformer model to use; options areseperable-transformer
(default) ororiginal-transformer
OUTPUT_SIZE
- maximum dimension of the image to generate (defaults to 512)STYLE_SCALE
- style scale to use if not overridden by request (defaults to 0.5)STYLE_RATIO
- strength of style to use if not overridden by request (defaults to 0.8)
POST the following data to /stylize
:
{
content: "<base64 encoded content image>",
styles: ["<base64 encoded style image>" ...],
scale: 0.5, //optional; any real number 0.25..2 suggested
ratio: 0.8 //optional; 0..1 range
}
- Create routes for generating/combining style vectors and stylizing with previously created style vectors