Skip to content

Latest commit

 

History

History
44 lines (30 loc) · 1.15 KB

DatasetHelper.md

File metadata and controls

44 lines (30 loc) · 1.15 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 DeepFaceRecon.

  2. Copy the provided scrips to the folder Deep3DFaceRecon_pytorch.

    cp scripts/face_recon_videos.py ./Deep3DFaceRecon_pytorch
    cp scripts/extract_kp_videos.py ./Deep3DFaceRecon_pytorch
    cp scripts/coeff_detector.py ./Deep3DFaceRecon_pytorch
    cp scripts/inference_options.py ./Deep3DFaceRecon_pytorch/options
    
    cd Deep3DFaceRecon_pytorch
  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