-
Notifications
You must be signed in to change notification settings - Fork 11
/
main.py
executable file
·26 lines (15 loc) · 1.19 KB
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
from processDatabase_v2 import *
# get phone list from file, extract phonemes and times, get the frames corresponding to those phonemes
# then remove frames without phonemes, extract faces, extract mouths, convert them to grayscale images
# also store compressed (eg 120x120) versions of grayscale faces and mouths
###################################################################################################
# !!!! Before running this, make sure all the paths to yuythe videos in the MLF file are correct !!!!#0
###################################################################################################
startTime = time.clock()
nbThreads = 20
processDatabase('./MLFfiles/lipspeaker_labelfiles.mlf',os.path.expanduser("~/TCDTIMIT/lipreading/processed"), nbThreads) #storeDir requires TCDTIMIT in the name
processDatabase('./MLFfiles/volunteer_labelfiles.mlf', os.path.expanduser("~/TCDTIMIT/lipreading/processed"), nbThreads)
# processDatabase('./MLFfiles/lipspeaker2_test.mlf', os.path.expanduser("~/TCDTIMIT/lipreading/processedTEST3"),
# nbThreads) # storeDir requires TCDTIMIT in the name
duration = time.clock() - startTime
print("This took ", duration, " seconds")