Context
A digital piece by MaVILab for the 50th anniversary exhibition of the UFV Art Gallery, shown from November 7 to 18, 2023. “Francisca” is a pencil portrait by Tarsila do Amaral; in the installation, she narrates a text about the work in Portuguese.
Starting point
MakeItTalk animates an image from audio in two steps, each with its own neural network: it detects the image’s facial landmarks and generates, from the audio, how those landmarks move over time. It then warps the image to follow them.
Two limitations ruled out using it as is:
- the landmark detector was trained on photos and realistic paintings, and the portrait is a loose line drawing;
- the network that turns audio into motion was trained on English, and the text is in Portuguese.
What I did
- Landmarks on the portrait: ran MakeItTalk’s detector on the drawing and corrected each point by hand in an annotation tool, until they outlined the eyes, nose, mouth and jaw.
- Speech motion: instead of generating motion from audio, we recorded a person reading Francisca’s text and extracted facial landmarks from every frame with MediaPipe Face Landmarker. It returns 478 points per face; I kept the 68 that match the points marked on the portrait.
- Warping: the 68 points, plus 12 on the image border, form a 146-triangle Delaunay mesh. For each frame, the portrait’s mesh is warped to the position of the points in the recorded video, and the original audio is joined to the frames with ffmpeg.
MakeItTalk detector
Hand-adjusted landmarks
Delaunay meshTeam
With Ana Osias, supervised by professors Thiago Luange Gomes and Michel M. Silva, at MaVILab, Department of Informatics, UFV.
Stack
Python · MediaPipe · MakeItTalk · OpenCV · Delaunay triangulation · Mesh warping