This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def extract_features(iDirName, cnn_model): | |
# get face detector from dlib and initialize the face aligner | |
detector = dlib.get_frontal_face_detector() | |
# open the video file | |
iFramePaths = [os.path.join(iDirName, iFramePath) for iFramePath in os.listdir(iDirName)] | |
# an empty list to hold the results | |
features = [] | |
# process each frame |