Quick and Dirty project to generate custom Images including a person from an selfie for a local thank you evening for the staff of a youth camp.
By default it is creating images like but it can be adjusted in the ./ai/infer_creator.py:
![]() |
![]() |
|---|---|
![]() |
![]() |
As mentioned i was using a p3.2xlarge Instance which is equipped with a Nvidia Tesla V100 GPU.
I takes ~20 seconds to generate one image.
cd ./backend
pip install -r requirements.txt
source venv/bin/activate
gunicorn -w 1 -b 0.0.0.0:5000 app:app
cd ./ai
pip install -r requirements.txt
source venv/bin/activate
python download_models.py
python infer_creator.py
The infer_creator.py will check for new images in ./ai/s3/input.
If a new image is available it will run the pipeline and generate two images. Those will be stored in ./ai/s3/output.
As soon as the Output is stored, the input image will be moved to ./ai/s3/archive.
In the ./frontend/index.htmlis a LOC containing const host = "http://34.220.135.157:5000" which needs to be adjusted to the ip and port of the backend.
Inspired by https://github.com/instantX-research/InstantID




