Install
Morphace is a Python package that provides the morphace command-line tool
for preparing images and creating face-morphing videos.
The morphace command provides three subcommands:
| Command | Purpose |
|---|---|
morphace download | Downloads Morphace’s required model file. |
morphace prep | Prepares aligned square PNG face crops from raw images. |
morphace morph | Generates an MP4 face-morphing video from two source images. |
Requirements
Section titled “Requirements”To install and run Morphace, your system needs:
- Python 3.12 or newer.
- FFmpeg installed and available on
PATH.
The required Python dependencies are declared by the package and are installed automatically.
Morphace also requires the dlib shape_predictor_68_face_landmarks_GTX.dat
landmark model when running the morph and prep commands. You do not
need to download this model before installing Morphace. The recommended
setup is to install Morphace first, then run
morphace download.
Install Morphace
Section titled “Install Morphace”Install the Morphace package with pip:
pip install morphaceDownload the Landmark Model
Section titled “Download the Landmark Model”After installing Morphace, download the required landmark model
using the morphace download command:
morphace downloadThis saves the model to Morphace’s Default Model Directory.
For most users, this is all the model setup you need.
Create Your First Morph
Section titled “Create Your First Morph”After installing Morphace and downloading the landmark model,
use the morphace morph command to create a face
morph:
morphace morph \ first_image.png \ second_image.pngMorphace creates a new video file in the current directory called
morph.mp4.