Skip to content

Latest commit

 

History

History
41 lines (28 loc) · 1.06 KB

DatasetHelper.md

File metadata and controls

41 lines (28 loc) · 1.06 KB

Extract 3DMM Coefficients for Videos

We provide scripts for extracting 3dmm coefficients for videos by using DeepFaceRecon_pytorch.

  1. Follow the instructions of their repo to build the environment of DeepFace.

  2. Copy the provided scrips to the folder Deep3DFaceRecon_pytorch.

    cp scripts/face_recon_images.py ./Deep3DFaceRecon_pytorch
    cp scripts/face_recon_videos.py ./Deep3DFaceRecon_pytorch
    cp scripts/inference_options.py ./Deep3DFaceRecon_pytorch/options
  3. Extract facial landmarks from videos.

    python extract_kp_videos.py \
    --input_dir path_to_viodes \
    --output_dir path_to_keypoint \
    --device_ids 0,1,2,3 \
    --workers 12
  4. Extract coefficients for videos

    python face_recon_videos.py \
    --input_dir path_to_videos \
    --keypoint_dir path_to_keypoint \
    --output_dir output_dir \
    --inference_batch_size 100 \
    --name=model_name \
    --epoch=20 \
    --model facerecon