View Code? Open in Web Editor
NEW
Backend application for Image Morpher
License: MIT License
Python 97.90%
Dockerfile 1.88%
Shell 0.23%
imagemorpher's Introduction
This application exposes a public API for morphing two faces together
Create a .env file in the imagemorpher directory where settings.py is located. Populate the secret key variable by running python manage.py shell -c 'from django.core.management import utils; print(utils.get_random_secret_key())'
The docker build can take 10-15 min, so you may start a screen session while building screen -S build-morpher
Build the docker image: docker build --memory=2g --memory-swap=4g --cpuset-cpus=1 -t face-morpher-api:<RELEASE-VERSION> -f Dockerfile .
Bash into the container: docker-compose -f docker-compose.yml run --rm face-morpher-api /bin/bash
Start the development server: python manage.py runserver 0:8000
imagemorpher's People
Contributors
Watchers
imagemorpher's Issues
docker build --memory=2g --memory-swap=4g --cpuset-cpus=1 -t face-morpher-api:v1.0.0 -f Dockerfile .
morph.py can be moved into a package outside of the django app
Update readme to onboard people on how to actually morph images and call the endpoints
Consider making a video on how to build, and run the imagemorpher locally
Overview
currently, users access their morph endpoint through nginx
we want to be able to log (maybe to some file) whenever an image is returned (200) or invalid (404)
URL requests may be invalid, or have been made invalidated after the morph file is deleted
Add hour, minute, second date timestamp to saved images so we can navigate in order
For now, leave the morphed image on server so that the shared link stays valid
Current Behavior:
User uploads two images, the output is the morphed image
Currently, we store the two images even after the morph output
We should delete the input images by the user and store only the output (so link remains valid)
Apply these changes to single image morph + morph sequence (store only GIF)