Turn your daily selfies into a good-looking timelapse.
This script automatically scales, rotates, crops, and captions all frames so your eyes are aligned in each photo, and compiles these frames into a timelapse.
- FFmpeg (e.g.
apt install ffmpeg
)
- Check that you satisfy all the above requirements.
- Download the latest version of Facemation. Unzip the downloaded archive.
- Put your images in the
input/
folder. Files are processed in natural sort order. - (Optional) Configure Facemation by editing
config.py
. Checkconfig_default.py
for a list of all options. - Run the downloaded Facemation executable.
- Check the output and adjust the configuration as desired. All intermediate results are heavily cached, so subsequent runs are much faster.
- Python 3.9 or newer
venv
(e.g.apt install python3-venv
)cmake
(e.g.apt install cmake
) (required to installdlib
dependency)- FFmpeg (e.g.
apt install ffmpeg
) (to demux frames into a video) - shape_predictor_68_face_landmarks.dat (in your working directory)
- Check that you satisfy all the above requirements.
- (Required once) Create a venv:
python3 -m venv venv/
- Activate the venv:
# Linux source venv/bin/activate # Windows .\venv\Scripts\activate
- (Required once) Install dependencies:
python3 -m pip install -r requirements.txt
- (Optional) Copy
src/main/python/config_empty.py
toconfig_dev.py
in your working directory.config_dev.py
overrides bothconfig_default.py
andconfig.py
.
Run the script:
cd src/main/python/
python3 -m facemation
- Build executable into
dist/
:pyinstaller -y --clean -F --add-data="shape_predictor_68_face_landmarks.dat:." src/main/python/facemation.py cp src/main/python/config_empty.py dist/config.py pip-licenses --with-license-file --no-license-path --output-file=dist/THIRD_PARTY_LICENSES python3 -m zipfile -c "facemation-<system>-<version>.zip" dist/*
- Run executable:
# Linux dist/facemation # Windows dist/facemation.exe