Sign inSign up

esimov/colidr-openfaas

By esimov

Updated about 7 years ago

Automatically generates a sketch like image art based on the provided image

Image
1

10K+

esimov/colidr-openfaas repository overview

Coherent Line Drawing - OpenFaaS function

license

For more info about the implementation details check the project source code at https://github.com/esimov/openfaas-coherent-line-drawing.

Local usage

To run the function locally you have to make sure OpenFaaS is up and running. Read the official documentation for more help. https://docs.openfaas.com/

Clone the repository:

$ git clone https://github.com/esimov/openfaas-coherent-line-drawing
Build
$ faas-cli template pull https://github.com/alexellis/opencv-openfaas-template
$ faas-cli build -f stack.yml --gateway=http://<GATEWAY-IP>
Deploy
$ faas-cli deploy -f stack.yml --gateway=http://<GATEWAY-IP>

You can access the UI on the url provided to --gateway.

Note: in case of large images you need to increase write_timeout in stack.yml.

Results

After deployment the coherent-line-drawing function will show up in the function list. You have to provide an image URL then hit invoke. This will generate a contoured, sketch-liked image.

You can also provide different values as query parameters. The follwing parameters are supported:

FlagDefault valueDescription
aafalseAnti aliasing
bl3New height
di1Number of FDoG iteration
ei2Number of Etf iteration
k2Etf kernel
rho0.98Rho
sc1Sigma C
sm3Sigma M
sr2.6Sigma R
tau0.98Tau

Below is an example with query parameters you can try out:

https://user-images.githubusercontent.com/883386/61370913-30e21c00-a89c-11e9-8edf-f4b59b59793c.jpg?k=2&sr=2.9&sm=3.5&tau=0.999&aa=1&ei=2&di=1

License

Copyright © 2019 Endre Simo

This project is under the MIT License. See the LICENSE file for the full license text.

Tag summary

Content type

Image

Digest

Size

24.2 MB

Last updated

about 7 years ago

docker pull esimov/colidr-openfaas:0.1