31 lines
1.1 KiB
Python
31 lines
1.1 KiB
Python
import os
|
|
import sys
|
|
import pandas as pd
|
|
import numpy as np
|
|
from skimage.io import imread, imshow, imsave
|
|
from skimage.transform import resize
|
|
from sklearn.preprocessing import StandardScaler
|
|
from sklearn.decomposition import PCA
|
|
from sklearn.model_selection import train_test_split
|
|
from sklearn import svm
|
|
from sklearn import metrics
|
|
import pickle
|
|
from skimage import img_as_ubyte
|
|
|
|
|
|
from adiencealign.pipeline.CascadeFaceAligner import CascadeFaceAligner
|
|
from adiencealign.cascade_detection.cascade_face_finder import CascadeFaceFinder
|
|
|
|
# imgdat = imread(sys.argv[1], as_gray=True)
|
|
|
|
|
|
cascade_face_aligner = CascadeFaceAligner()
|
|
cascade_face_aligner.detect_faces("videos", "output")
|
|
|
|
cascade_face_aligner.align_faces(input_images = "output",
|
|
output_path = "bkp",
|
|
fidu_max_size = 200*200,
|
|
fidu_min_size = 50*50,
|
|
is_align = True,
|
|
is_draw_fidu = True,
|
|
delete_no_fidu = True) |