Skip to content

Instantly share code, notes, and snippets.

@facepainter
facepainter / FaceGrab.py
Last active March 11, 2025 21:22
Batch extract known face from video/image sequence (CNN GPU with CUDA / HoG)
'''
Extract a known face from a video.
Uses a combination of a deep learning CNN model to batch detect faces
in video frames, or a sequence of images, in GPU with CUDA and HoG to compare
the detected faces with a computed reference set of face encodings.
'''
from os import path, listdir
from typing import NamedTuple