0%

Face Time Lapse

1. Goal

Show how my face and hair style changes from time to time

Input: a bunch of selfie

Output: a short clip show the change

2. Plan

  1. Collect data (image) from camera and phone
  2. Put into Lightroom in a album for organization and further development
  3. Output the image with time-tagged prefix
  4. Remove the background (maybe not)
  5. Use computer vision to detect the face and crop

3. Code

Eye alignment is the key process

https://github.com/hujunhan/eyelign

  1. main.py use machine learning to do the most job
  2. gui_manual_align.py use GUI to manual align the corner case

Generate the timelapse

1
2
3
4
5
6
7
8
9
ffmpeg \
-framerate 15 \
-pattern_type glob \
-i "/Users/Hu/Downloads/output/*.jpg" \
-s:v 500x500 \
-c:v libx264 \
-crf 17 \
-pix_fmt yuv420p \
timelapse.mp4

New setting

1
2
3
4
5
6
7
8
ffmpeg \
-framerate 30 \
-pattern_type glob \
-i "/Users/Hu/Downloads/fog/*.jpg" \
-s:v 4096x2750 \
-c:v h264_videotoolbox \
-q:v 40 \
timelapse_fog_264.mp4

h264_videotoolbox is used since Apple M series support hardware encode

DS