nndl course proj
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

20 lines
754 B

'''
Created on May 7, 2014
@author: eran
'''
import subprocess
import os
def detect_landmarks(fname, max_size = 400*400, min_size = 50*50, fidu_exec_dir = os.path.abspath('../resources/')):
'''
optional flags:
max_size - If exceeds this pixel size, image is resized to that before landmark detection
min_size - If below this pixel size, image is resized to that before landmark detection
'''
max_size = str(max_size) if max_size is not None else ''
min_size = str(min_size) if min_size is not None else ''
fidu_cmd = './FiducialFaceDetector.sh Face_small_146filters_-0.65thr.xml %s %s %s' %(fname, min_size, max_size)
print(fidu_cmd)
x = subprocess.call(fidu_cmd, shell=True, cwd = fidu_exec_dir)
return