+
Skip to content

fwdekker/facemation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Facemation

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.

Requirements

  • FFmpeg (e.g. apt install ffmpeg)

How to use

  1. Check that you satisfy all the above requirements.
  2. Download the latest version of Facemation. Unzip the downloaded archive.
  3. Put your images in the input/ folder. Files are processed in natural sort order.
  4. (Optional) Configure Facemation by editing config.py. Check config_default.py for a list of all options.
  5. Run the downloaded Facemation executable.
  6. Check the output and adjust the configuration as desired. All intermediate results are heavily cached, so subsequent runs are much faster.

Development

Requirements

Setup

  1. Check that you satisfy all the above requirements.
  2. (Required once) Create a venv:
    python3 -m venv venv/
  3. Activate the venv:
    # Linux
    source venv/bin/activate
    # Windows
    .\venv\Scripts\activate
  4. (Required once) Install dependencies:
    python3 -m pip install -r requirements.txt
  5. (Optional) Copy src/main/python/config_empty.py to config_dev.py in your working directory. config_dev.py overrides both config_default.py and config.py.

Execute

Run the script:

cd src/main/python/
python3 -m facemation

Build

  1. 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/*
  2. Run executable:
    # Linux
    dist/facemation
    # Windows
    dist/facemation.exe
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载