Face-Replacement - CIS-581 - Computer Vision

Instructions:

  • Install python 2.7
  • Install boost(ver 1.62)
  • Install dlib for python and its dependencies
  • Install numpy, OpenCV (version 3.0 and above)

For Multiple Face Replacement:

  • Place the video and the picture to be used for face replacement in the
  • same folder as the 'Code'
  • Open the faceSwap_Wrapper.py
  • Change the cv2.VideoCapture input with the video you want to do
  • Face replacement on.
  • Change cv2.VideoWriter input to the file name you want to save as.
  • Change filename of the picture with which you want to replace the face in video

For Single Face Replacement with Motion Compensation:

  • Place the video and the picture to be used for face replacement in the
  • same folder as the 'Code'
  • Open the faceSwap_MotionCompensation.py
  • Change the cv2.VideoCapture input with the video you want to do
  • Face replacement on.
  • Change cv2.VideoWriter input to the file name you want to save as.
  • Change filename of the picture with which you want to replace the face in video