Skip to content

Instantly share code, notes, and snippets.

View AKASH2907's full-sized avatar
🎯
(1.01)^365

Akash Kumar AKASH2907

🎯
(1.01)^365
View GitHub Profile
@AKASH2907
AKASH2907 / faces_extraction.py
Created March 24, 2020 11:43
extracting faces from frames
from facenet_pytorch import MTCNN
import cv2
from PIL import Image
from os import listdir, makedirs
import glob
from os.path import join, exists
from skimage.io import imsave
import imageio.core.util
import cv2
from os import makedirs
from os.path import join, exists
import glob
training_videos_folder = ["train/0", "train/1"]
for folder in training_videos_folder:
videos_path = glob.glob(join(folder, "*.mp4"))
folder = folder.split("/")[1]