Apply fun filters to images
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
docs/img
src
test
.gitignore
Dockerfile
README.md
app.js
fabfile.py
index.js
package.json

README.md

FunnyFace

Quick Start

Requires

Option 1: Build the docker image

git clone https://github.com/neufeldtech/funnyface.git funnyface
docker build funnyface -t myapp
docker run -d -p 5000:8080 --restart always myapp

Option 2: Use the prebuilt container image

docker pull jordanneufeld/funnyface:latest
docker run -d -p 5000:8080 --restart always jordanneufeld/funnyface:latest

The app should be running now at http://localhost:5000

Show me something awesome

From your local repository directory, we'll use curl to test out the app:

curl -F file=@docs/img/barack.jpg -o /tmp/barack-stache.jpg "http://localhost:5000/api/v1/image"

Upon success, you'll open up /tmp/barack-stache.jpg and get back something like this:

API

Endpoint Description Query String Parameters Form Parameters Example
GET /api/v1/image Attempts face detection and applies template image to each face url: url to source image
template: (optional) template image to apply to face (see GET /api/v1/templates)
N/A curl -o /tmp/output.jpg https://funnyface.neufeldtech.com/api/v1/image?template=helmet&url=https://raw.githubusercontent.com/neufeldtech/funnyface/master/docs/img/barack.jpg
POST /api/v1/image Attempts face detection and applies template image to each face template: (optional) template image to apply to face (see GET /api/v1/templates) file: Image to upload (jpg, png, or gif) curl -F file=@docs/img/barack.jpg -o /tmp/barack-stache.jpg "https://funnyface.neufeldtech.com/api/v1/image?template=moustache"
GET /api/v1/templates Returns list of known templates N/A N/A curl https://funnyface.neufeldtech.com/api/v1/templates
GET /api/v1/help Returns link to this help doc N/A N/A curl https://funnyface.neufeldtech.com/api/v1/help

Run it locally

Requires
npm install
npm start

Tests

Note: tests are currently not fully mocked (You will need all dependencies installed)

  • To run the tests: npm test

Fact

The codebase for this app was originally forked from https://github.com/sitepoint-editors/face-detection-nodejs

License

MIT