Skip to content

Flask Server for Face-Morp webapp. This server exposes api-endpoints to generate morphed GIFs of the incoming images.

License

Notifications You must be signed in to change notification settings

ftx/morph-server

 
 

Repository files navigation

Face Morphing (Server Side Script) - See Client Side Here.

Project Demo 🤓

IMAGE ALT TEXT HERE

What is Morphing? 🤔

The face morphing algorithm morphs between faces using a common set of feature points, placed by hand on each face. To morph between two faces, you need to warp both faces to a common shape so they can be blended together.

About this Server. 🧐

This is Flask based API Server, manages the two API Endpoints namely: POST /api/upload and GET /api/morph/<images>. The former accepts and a POST request to save an Image to the servers local storge (No Database Connected Yet!). The latter responds to the GET request appended with a unique image name under , which basically creates a MORPH of the two images and returns the morphed GIF. On the client repo, ReactJS has been used, however any Frontend framework can be used as per your choice (Angular, Vue etc.).

Steps for Local Deployment of server: 🚀

  1. Download the 68 facial landmarks predictor by dlib from here and extract it to the root directory. It should have the following name : shape_predictor_68_face_landmarks.dat.
  2. Clone the repo.
  3. Open terminal/CMD in repo directory.
  4. Create a new virtual environment by py -m venv env.
  5. Activate the environment by env\Scripts\activate.
  6. Intall the packages by pip install -r requirements.txt
  7. Start the server by python server.py.

Note: The Server will run on http:https://localhost:5000, don't forget to add a proxy of this URL in your client side script.

Contribute

Check and put up Issues and let me know the features which you wish to add before making a PR.

Leave a ⭐ if you found this helpful.

About

Flask Server for Face-Morp webapp. This server exposes api-endpoints to generate morphed GIFs of the incoming images.

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 92.3%
  • HTML 7.7%