diff --git a/1.pdf b/1.pdf deleted file mode 100644 index 58e9f74..0000000 Binary files a/1.pdf and /dev/null differ diff --git a/annotation_training.pkl b/Annotations/annotation_training.pkl similarity index 100% rename from annotation_training.pkl rename to Annotations/annotation_training.pkl diff --git a/annotation_validation.pkl b/Annotations/annotation_validation.pkl similarity index 100% rename from annotation_validation.pkl rename to Annotations/annotation_validation.pkl diff --git a/Images/Dan_model.PNG b/Images/Dan_model.PNG new file mode 100644 index 0000000..147ae71 Binary files /dev/null and b/Images/Dan_model.PNG differ diff --git a/LICENSE b/LICENSE index 57d9d95..e4a2264 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2019 THEFASHIONGEEK +Copyright (c) 2019 AKULA HEMANTH KUMAR Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index 3baae55..2cbdc78 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ As is known, the first impression made is highly important in many contexts, suc The model used is called `Descriptor Aggregation Network` called DAN in short. -![Model Archi](modelImg.png) +![Model Archi](Images/Dan_model.PNG) What distinguishes DAN from the traditional CNN is: the fully connected layers are discarded, and replaced by both average- and max-pooling following the last convolutional layers (Pool5). Meanwhile, each pooling operation is followed by the standard L2-normalization. After that, the obtained two 512-d feature vectors are concatenated as the final image representation. Thus, in DAN, the deep descriptors of the last convolutional layers are aggregated as a single visual feature. Finally, a regression (fc+sigmoid) layer is added for end-to-end training. @@ -28,7 +28,7 @@ These instructions will get you a copy of the project up and running on your loc ### Prerequisites * [Python3](https://www.python.org/downloads/release/python-373/) - Python version 3.7.3 -* [Numpy](http://www.numpy.org/) - Multidimensioanl Mathematical Computing +* [Numpy](http://www.numpy.org/) - Multidimensional Mathematical Computing * [Tensorflow 1.14.0](https://www.tensorflow.org/) - Deep Learning python module * [Pandas](https://pandas.pydata.org/) - Loading csv files * [Cha-Learn Dataset](http://chalearnlap.cvc.uab.es/dataset/24/description/) - Dataset for this problem @@ -37,6 +37,7 @@ These instructions will get you a copy of the project up and running on your loc * [OpenCV 3.4.1](https://breakthrough.github.io/Installing-OpenCV/) library used for Image Processing * [ffmpeg](https://ffmpeg.zeranoe.com/builds/ ) software suite of libraries and programs for handling video, audio, and other multimedia files and streams +* [python_speech_features](https://pypi.org/project/python_speech_features/) This library provides common speech features for ASR including MFCCs and filterbank energies ### Installing @@ -46,10 +47,15 @@ Clone the repository git clone https://github.com/THEFASHIONGEEK/First-Impression.git ``` -Downlad the training dataset and extract it into a new /data directory with all 75 training zip files and 25 validation zip files as it is, we will extract them through the script. +Download the training dataset and extract it into a new /data directory with all 75 training zip files and 25 validation zip files as it is, we will extract them through the script. [Download](http://www.vlfeat.org/matconvnet/models/vgg-face.mat) Pretrained Vgg-face model and move it to the root directory +Run the requirements.txt + +``` +pip install -r requirements.txt +``` Run the Video_to_Image.py file to scrape the images from the videos and save it to a new ImageData directory ``` @@ -66,6 +72,11 @@ If succesfully completed then run the Write_Into_TFRecords.py file to form a dat ``` python Write_Into_TFRecords.py ``` +Run the feat_extraction_from_wav.py file to form a data pipeline by saving the all the train audio into train_audio_full.tfrecords file , all the validation images into val_audio_full.tfrecords to load it later during training + +``` +python feat_extraction_from_wav.py +``` Start the training by running the following command @@ -78,3 +89,5 @@ python train.py * [paper](https://cs.nju.edu.cn/wujx/paper/eccvw16_APA.pdf) - Implemented paper * [TfRecord Data Pipeline](http://machinelearninguru.com/deep_learning/data_preparation/tfrecord/tfrecord.html#read) - Used to make data pipeline +* [VGG16 in TensorFlow](https://www.cs.toronto.edu/~frossard/post/vgg16/) - Used in DAN +* [Author's code](https://github.com/tzzcl/ChaLearn-APA-Code#2-extract-audio-feature-from-video) diff --git a/Video_to_Image.py b/Video_to_Image.py index 49b502f..6d79326 100644 --- a/Video_to_Image.py +++ b/Video_to_Image.py @@ -1,107 +1,127 @@ -''' +""" Extract all the 6 training zipped files and 2 validation zipped files into data folder and then run this script -''' -import cv2 -import numpy as np +""" import os import zipfile -## Runnin a loop throught all the zipped training file to extract all video and then extract 100 frames from each. -for i in range(1,76): - if i<10: - zipfilename = 'training80_0'+str(i)+'.zip' +import numpy as np + +import cv2 + +# Runnin a loop throught all the zipped training file to extract all video and then extract 100 frames from each. + +### Training data ### +for i in range(1, 76): + if i < 10: + zipfilename = "training80_0" + str(i) + ".zip" else: - zipfilename = 'training80_'+str(i)+'.zip' + zipfilename = "training80_" + str(i) + ".zip" ## Accessing the zipfile i - archive = zipfile.ZipFile('data/'+zipfilename, 'r') - zipfilename = zipfilename.split('.zip')[0] + archive = zipfile.ZipFile("data/" + zipfilename, "r") + zipfilename = zipfilename.split(".zip")[0] ##Extracting all videos in it and saving it all to the new folder with same name as zipped one - archive.extractall('unzippedData/'+zipfilename) - + archive.extractall("unzippedData/" + zipfilename) + ## Running a loop over all the videos in the zipped file and extracting 100 frames from each for file_name in archive.namelist(): - cap = cv2.VideoCapture('unzippedData/'+zipfilename+'/'+file_name) + cap = cv2.VideoCapture("unzippedData/" + zipfilename + "/" + file_name) - file_name=(file_name.split('.mp4'))[0] + file_name = (file_name.split(".mp4"))[0] ## Creating folder to save all the 100 frames from the video try: - if not os.path.exists('ImageData/trainingData/'+file_name): - os.makedirs('ImageData/trainingData/'+file_name) + if not os.path.exists("ImageData/trainingData/" + file_name): + os.makedirs("ImageData/trainingData/" + file_name) except OSError: - print ('Error: Creating directory of data') + print("Error: Creating directory of data") ## Setting the frame limit to 100 cap.set(cv2.CAP_PROP_FRAME_COUNT, 101) - length=101 - count=0 + length = 101 + count = 0 ## Running a loop to each frame and saving it in the created folder - while(cap.isOpened()): - count+=1 - if length==count: + while cap.isOpened(): + count += 1 + if length == count: break ret, frame = cap.read() if frame is None: continue ## Resizing it to 256*256 to save the disk space and fit into the model - frame = cv2.resize(frame,(256, 256), interpolation = cv2.INTER_CUBIC) + frame = cv2.resize(frame, (256, 256), interpolation=cv2.INTER_CUBIC) # Saves image of the current frame in jpg file - name = 'ImageData/trainingData/'+str(file_name)+'/frame' + str(count) + '.jpg' + name = ( + "ImageData/trainingData/" + + str(file_name) + + "/frame" + + str(count) + + ".jpg" + ) cv2.imwrite(name, frame) - - if cv2.waitKey(1) & 0xFF == ord('q'): + + if cv2.waitKey(1) & 0xFF == ord("q"): break ## Print the file which is done - print (zipfilename, ':', file_name) -# -for i in range(1,26): - if i<10: - zipfilename = 'validation80_0'+str(i)+'.zip' + print(zipfilename, ":", file_name) +### Training data ### + +### Validation data ### +for i in range(1, 26): + if i < 10: + zipfilename = "validation80_0" + str(i) + ".zip" else: - zipfilename = 'validation80_'+str(i)+'.zip' + zipfilename = "validation80_" + str(i) + ".zip" ## Accessing the zipfile i - archive = zipfile.ZipFile('data/'+zipfilename, 'r') - zipfilename = zipfilename.split('.zip')[0] + archive = zipfile.ZipFile("data/" + zipfilename, "r") + zipfilename = zipfilename.split(".zip")[0] ##Extracting all videos in it and saving it all to the new folder with same name as zipped one - archive.extractall('unzippedData/'+zipfilename) - + archive.extractall("unzippedData/" + zipfilename) + ## Running a loop over all the videos in the zipped file and extracting 100 frames from each for file_name in archive.namelist(): - cap = cv2.VideoCapture('unzippedData/'+zipfilename+'/'+file_name) + cap = cv2.VideoCapture("unzippedData/" + zipfilename + "/" + file_name) - file_name=(file_name.split('.mp4'))[0] + file_name = (file_name.split(".mp4"))[0] ## Creating folder to save all the 100 frames from the video try: - if not os.path.exists('ImageData/validationData/'+file_name): - os.makedirs('ImageData/validationData/'+file_name) + if not os.path.exists("ImageData/validationData/" + file_name): + os.makedirs("ImageData/validationData/" + file_name) except OSError: - print ('Error: Creating directory of data') + print("Error: Creating directory of data") ## Setting the frame limit to 100 cap.set(cv2.CAP_PROP_FRAME_COUNT, 101) - length=101 - count=0 + length = 101 + count = 0 ## Running a loop to each frame and saving it in the created folder - while(cap.isOpened()): - count+=1 - if length==count: + while cap.isOpened(): + count += 1 + if length == count: break ret, frame = cap.read() if frame is None: continue ## Resizing it to 256*256 to save the disk space and fit into the model - frame = cv2.resize(frame,(256, 256), interpolation = cv2.INTER_CUBIC) + frame = cv2.resize(frame, (256, 256), interpolation=cv2.INTER_CUBIC) # Saves image of the current frame in jpg file - name = 'ImageData/validationData/'+str(file_name)+'/frame' + str(count) + '.jpg' + name = ( + "ImageData/validationData/" + + str(file_name) + + "/frame" + + str(count) + + ".jpg" + ) cv2.imwrite(name, frame) - - if cv2.waitKey(1) & 0xFF == ord('q'): + + if cv2.waitKey(1) & 0xFF == ord("q"): break ## Print the file which is done - print (zipfilename, ':', file_name) + print(zipfilename, ":", file_name) + +### Validation data ### diff --git a/Write_Into_TFRecords.py b/Write_Into_TFRecords.py index 61dc5a6..38d023a 100644 --- a/Write_Into_TFRecords.py +++ b/Write_Into_TFRecords.py @@ -1,109 +1,142 @@ -from random import shuffle import glob -import pandas as pd -import tensorflow as tf +import pickle import sys +from random import shuffle + import numpy as np -from PIL import Image +import pandas as pd +import tensorflow as tf +from PIL import Image + import cv2 -import pickle def load_image(addr): - img = np.array(Image.open(addr).resize((224,224), Image.ANTIALIAS)) + img = np.array(Image.open(addr).resize((224, 224), Image.ANTIALIAS)) img = img.astype(np.uint8) return img + def _float_feature(value): - return tf.train.Feature(float_list=tf.train.FloatList(value=[value])) + return tf.train.Feature(float_list=tf.train.FloatList(value=[value])) + + def _bytes_feature(value): - return tf.train.Feature(bytes_list=tf.train.BytesList(value=[value])) + return tf.train.Feature(bytes_list=tf.train.BytesList(value=[value])) + def load_pickle(pickle_file): - with open(pickle_file, 'rb') as f: - pickle_data = pickle.load(f, encoding='latin1') + with open(pickle_file, "rb") as f: + pickle_data = pickle.load(f, encoding="latin1") df = pd.DataFrame(pickle_data) df.reset_index(inplace=True) - del df['interview'] - df.columns = ["VideoName","ValueExtraversion","ValueNeuroticism","ValueAgreeableness","ValueConscientiousness","ValueOpenness"] + del df["interview"] + df.columns = [ + "VideoName", + "ValueExtraversion", + "ValueNeuroticism", + "ValueAgreeableness", + "ValueConscientiousness", + "ValueOpenness", + ] return df -df = load_pickle('annotation_training.pkl') + +##### TRAINING DATA #### +df = load_pickle("Annotations/annotation_training.pkl") NUM_VID = len(df) addrs = [] labels = [] for i in range(NUM_VID): - filelist=glob.glob('ImageData/trainingData/'+(df['VideoName'].iloc[i]).split('.mp4')[0]+'/*.jpg') - addrs+=filelist - labels+=[np.array(df.drop(['VideoName'], 1, inplace=False).iloc[i]).astype(np.float32)]*100 + filelist = glob.glob( + "ImageData/trainingData/" + + (df["VideoName"].iloc[i]).split(".mp4")[0] + + "/*.jpg" + ) + addrs += filelist + labels += [ + np.array(df.drop(["VideoName"], 1, inplace=False).iloc[i]).astype(np.float32) + ] * 100 c = list(zip(addrs, labels)) shuffle(c) train_addrs, train_labels = zip(*c) -train_filename = 'train_full.tfrecords' # address to save the TFRecords file +train_filename = "train_full.tfrecords" # address to save the TFRecords file # open the TFRecords file writer = tf.python_io.TFRecordWriter(train_filename) for i in range(len(train_addrs)): # print how many images are saved every 1000 images if not i % 1000: - print ('Train data: {}/{}'.format(i, len(train_addrs))) + print("Train data: {}/{}".format(i, len(train_addrs))) sys.stdout.flush() # Load the image img = load_image(train_addrs[i]) label = train_labels[i] # Create a feature - feature = {'train/label': _bytes_feature(tf.compat.as_bytes(label.tostring())), - 'train/image': _bytes_feature(tf.compat.as_bytes(img.tostring()))} + feature = { + "train/label": _bytes_feature(tf.compat.as_bytes(label.tostring())), + "train/image": _bytes_feature(tf.compat.as_bytes(img.tostring())), + } # Create an example protocol buffer example = tf.train.Example(features=tf.train.Features(feature=feature)) - + # Serialize to string and write on the file writer.write(example.SerializeToString()) writer.close() sys.stdout.flush() +##### TRAINING DATA #### -print (len(train_addrs), "training images saved.. ") +print(len(train_addrs), "training images saved.. ") -df = load_pickle('annotation_validation.pkl') +##### VALIDATION DATA #### +df = load_pickle("Annotations/annotation_validation.pkl") NUM_VID = len(df) addrs = [] labels = [] for i in range(NUM_VID): - filelist=glob.glob('ImageData/validationData/'+(df['VideoName'].iloc[i]).split('.mp4')[0]+'/*.jpg') - addrs+=filelist - labels+=[np.array(df.drop(['VideoName'], 1, inplace=False).iloc[i]).astype(np.float32)]*100 + filelist = glob.glob( + "ImageData/validationData/" + + (df["VideoName"].iloc[i]).split(".mp4")[0] + + "/*.jpg" + ) + addrs += filelist + labels += [ + np.array(df.drop(["VideoName"], 1, inplace=False).iloc[i]).astype(np.float32) + ] * 100 c = list(zip(addrs, labels)) shuffle(c) val_addrs, val_labels = zip(*c) -val_filename = 'val_full.tfrecords' # address to save the TFRecords file +val_filename = "val_full.tfrecords" # address to save the TFRecords file # open the TFRecords file writer = tf.python_io.TFRecordWriter(val_filename) for i in range(len(val_addrs)): # print how many images are saved every 1000 images if not i % 1000: - print ('Val data: {}/{}'.format(i, len(val_addrs))) + print("Val data: {}/{}".format(i, len(val_addrs))) sys.stdout.flush() # Load the image img = load_image(val_addrs[i]) label = val_labels[i].astype(np.float32) - feature = {'val/label': _bytes_feature(tf.compat.as_bytes(label.tostring())), - 'val/image': _bytes_feature(tf.compat.as_bytes(img.tostring()))} + feature = { + "val/label": _bytes_feature(tf.compat.as_bytes(label.tostring())), + "val/image": _bytes_feature(tf.compat.as_bytes(img.tostring())), + } # Create an example protocol buffer example = tf.train.Example(features=tf.train.Features(feature=feature)) - + # Serialize to string and write on the file writer.write(example.SerializeToString()) writer.close() sys.stdout.flush() +##### VALIDATION DATA #### -print (len(train_addrs), "training images saved.. ") -print (len(val_addrs), "validation images saved.. ") +print(len(val_addrs), "validation images saved.. ") diff --git a/dan.py b/dan.py index 68e00ee..0e90633 100644 --- a/dan.py +++ b/dan.py @@ -8,268 +8,349 @@ # Weights from Caffe converted using https://github.com/ethereon/caffe-tensorflow # ######################################################################################## -import tensorflow as tf -import numpy as np -import warnings -from scipy.io import loadmat import pickle +import warnings +import numpy as np +import tensorflow as tf +from scipy.io import loadmat warnings.filterwarnings("ignore") - - class DAN: def __init__(self, imgs, REG_PENALTY=0, preprocess=None): self.imgs = imgs - if preprocess=='vggface': + if preprocess == "vggface": self.mean = [129.1862793, 104.76238251, 93.59396362] - else: - self.mean = [123.68, 116.779, 103.939] self.convlayers() self.dan_part() self.output = tf.nn.sigmoid(self.reg_head, name="output") - self.cost_reg = REG_PENALTY*tf.reduce_mean(tf.square(self.parameters[-2]))/2 - + self.cost_reg = REG_PENALTY * tf.reduce_mean(tf.square(self.parameters[-2])) / 2 def convlayers(self): self.parameters = [] # zero-mean input - with tf.name_scope('preprocess') as scope: - mean = tf.constant(self.mean, dtype=tf.float32, shape=[1, 1, 1, 3], name='img_mean') - images = self.imgs-mean + with tf.name_scope("preprocess") as scope: + mean = tf.constant( + self.mean, dtype=tf.float32, shape=[1, 1, 1, 3], name="img_mean" + ) + images = self.imgs - mean # conv1_1 - with tf.name_scope('conv1_1') as scope: - kernel = tf.Variable(tf.truncated_normal([3, 3, 3, 64], dtype=tf.float32, - stddev=1e-1), name='weights') - conv = tf.nn.conv2d(images, kernel, [1, 1, 1, 1], padding='SAME') - biases = tf.Variable(tf.constant(0.0, shape=[64], dtype=tf.float32), - trainable=True, name='biases') + with tf.name_scope("conv1_1") as scope: + kernel = tf.Variable( + tf.truncated_normal([3, 3, 3, 64], dtype=tf.float32, stddev=1e-1), + name="weights", + ) + conv = tf.nn.conv2d(images, kernel, [1, 1, 1, 1], padding="SAME") + biases = tf.Variable( + tf.constant(0.0, shape=[64], dtype=tf.float32), + trainable=True, + name="biases", + ) out = tf.nn.bias_add(conv, biases) self.conv1_1 = tf.nn.relu(out, name=scope) self.parameters += [kernel, biases] # conv1_2 - with tf.name_scope('conv1_2') as scope: - kernel = tf.Variable(tf.truncated_normal([3, 3, 64, 64], dtype=tf.float32, - stddev=1e-1), name='weights') - conv = tf.nn.conv2d(self.conv1_1, kernel, [1, 1, 1, 1], padding='SAME') - biases = tf.Variable(tf.constant(0.0, shape=[64], dtype=tf.float32), - trainable=True, name='biases') + with tf.name_scope("conv1_2") as scope: + kernel = tf.Variable( + tf.truncated_normal([3, 3, 64, 64], dtype=tf.float32, stddev=1e-1), + name="weights", + ) + conv = tf.nn.conv2d(self.conv1_1, kernel, [1, 1, 1, 1], padding="SAME") + biases = tf.Variable( + tf.constant(0.0, shape=[64], dtype=tf.float32), + trainable=True, + name="biases", + ) out = tf.nn.bias_add(conv, biases) self.conv1_2 = tf.nn.relu(out, name=scope) self.parameters += [kernel, biases] # pool1 - self.pool1 = tf.nn.max_pool(self.conv1_2, - ksize=[1, 2, 2, 1], - strides=[1, 2, 2, 1], - padding='SAME', - name='pool1') + self.pool1 = tf.nn.max_pool( + self.conv1_2, + ksize=[1, 2, 2, 1], + strides=[1, 2, 2, 1], + padding="SAME", + name="pool1", + ) # conv2_1 - with tf.name_scope('conv2_1') as scope: - kernel = tf.Variable(tf.truncated_normal([3, 3, 64, 128], dtype=tf.float32, - stddev=1e-1), name='weights') - conv = tf.nn.conv2d(self.pool1, kernel, [1, 1, 1, 1], padding='SAME') - biases = tf.Variable(tf.constant(0.0, shape=[128], dtype=tf.float32), - trainable=True, name='biases') + with tf.name_scope("conv2_1") as scope: + kernel = tf.Variable( + tf.truncated_normal([3, 3, 64, 128], dtype=tf.float32, stddev=1e-1), + name="weights", + ) + conv = tf.nn.conv2d(self.pool1, kernel, [1, 1, 1, 1], padding="SAME") + biases = tf.Variable( + tf.constant(0.0, shape=[128], dtype=tf.float32), + trainable=True, + name="biases", + ) out = tf.nn.bias_add(conv, biases) self.conv2_1 = tf.nn.relu(out, name=scope) self.parameters += [kernel, biases] # conv2_2 - with tf.name_scope('conv2_2') as scope: - kernel = tf.Variable(tf.truncated_normal([3, 3, 128, 128], dtype=tf.float32, - stddev=1e-1), name='weights') - conv = tf.nn.conv2d(self.conv2_1, kernel, [1, 1, 1, 1], padding='SAME') - biases = tf.Variable(tf.constant(0.0, shape=[128], dtype=tf.float32), - trainable=True, name='biases') + with tf.name_scope("conv2_2") as scope: + kernel = tf.Variable( + tf.truncated_normal([3, 3, 128, 128], dtype=tf.float32, stddev=1e-1), + name="weights", + ) + conv = tf.nn.conv2d(self.conv2_1, kernel, [1, 1, 1, 1], padding="SAME") + biases = tf.Variable( + tf.constant(0.0, shape=[128], dtype=tf.float32), + trainable=True, + name="biases", + ) out = tf.nn.bias_add(conv, biases) self.conv2_2 = tf.nn.relu(out, name=scope) self.parameters += [kernel, biases] # pool2 - self.pool2 = tf.nn.max_pool(self.conv2_2, - ksize=[1, 2, 2, 1], - strides=[1, 2, 2, 1], - padding='SAME', - name='pool2') + self.pool2 = tf.nn.max_pool( + self.conv2_2, + ksize=[1, 2, 2, 1], + strides=[1, 2, 2, 1], + padding="SAME", + name="pool2", + ) # conv3_1 - with tf.name_scope('conv3_1') as scope: - kernel = tf.Variable(tf.truncated_normal([3, 3, 128, 256], dtype=tf.float32, - stddev=1e-1), name='weights') - conv = tf.nn.conv2d(self.pool2, kernel, [1, 1, 1, 1], padding='SAME') - biases = tf.Variable(tf.constant(0.0, shape=[256], dtype=tf.float32), - trainable=True, name='biases') + with tf.name_scope("conv3_1") as scope: + kernel = tf.Variable( + tf.truncated_normal([3, 3, 128, 256], dtype=tf.float32, stddev=1e-1), + name="weights", + ) + conv = tf.nn.conv2d(self.pool2, kernel, [1, 1, 1, 1], padding="SAME") + biases = tf.Variable( + tf.constant(0.0, shape=[256], dtype=tf.float32), + trainable=True, + name="biases", + ) out = tf.nn.bias_add(conv, biases) self.conv3_1 = tf.nn.relu(out, name=scope) self.parameters += [kernel, biases] # conv3_2 - with tf.name_scope('conv3_2') as scope: - kernel = tf.Variable(tf.truncated_normal([3, 3, 256, 256], dtype=tf.float32, - stddev=1e-1), name='weights') - conv = tf.nn.conv2d(self.conv3_1, kernel, [1, 1, 1, 1], padding='SAME') - biases = tf.Variable(tf.constant(0.0, shape=[256], dtype=tf.float32), - trainable=True, name='biases') + with tf.name_scope("conv3_2") as scope: + kernel = tf.Variable( + tf.truncated_normal([3, 3, 256, 256], dtype=tf.float32, stddev=1e-1), + name="weights", + ) + conv = tf.nn.conv2d(self.conv3_1, kernel, [1, 1, 1, 1], padding="SAME") + biases = tf.Variable( + tf.constant(0.0, shape=[256], dtype=tf.float32), + trainable=True, + name="biases", + ) out = tf.nn.bias_add(conv, biases) self.conv3_2 = tf.nn.relu(out, name=scope) self.parameters += [kernel, biases] # conv3_3 - with tf.name_scope('conv3_3') as scope: - kernel = tf.Variable(tf.truncated_normal([3, 3, 256, 256], dtype=tf.float32, - stddev=1e-1), name='weights') - conv = tf.nn.conv2d(self.conv3_2, kernel, [1, 1, 1, 1], padding='SAME') - biases = tf.Variable(tf.constant(0.0, shape=[256], dtype=tf.float32), - trainable=True, name='biases') + with tf.name_scope("conv3_3") as scope: + kernel = tf.Variable( + tf.truncated_normal([3, 3, 256, 256], dtype=tf.float32, stddev=1e-1), + name="weights", + ) + conv = tf.nn.conv2d(self.conv3_2, kernel, [1, 1, 1, 1], padding="SAME") + biases = tf.Variable( + tf.constant(0.0, shape=[256], dtype=tf.float32), + trainable=True, + name="biases", + ) out = tf.nn.bias_add(conv, biases) self.conv3_3 = tf.nn.relu(out, name=scope) self.parameters += [kernel, biases] # pool3 - self.pool3 = tf.nn.max_pool(self.conv3_3, - ksize=[1, 2, 2, 1], - strides=[1, 2, 2, 1], - padding='SAME', - name='pool3') + self.pool3 = tf.nn.max_pool( + self.conv3_3, + ksize=[1, 2, 2, 1], + strides=[1, 2, 2, 1], + padding="SAME", + name="pool3", + ) # conv4_1 - with tf.name_scope('conv4_1') as scope: - kernel = tf.Variable(tf.truncated_normal([3, 3, 256, 512], dtype=tf.float32, - stddev=1e-1), name='weights') - conv = tf.nn.conv2d(self.pool3, kernel, [1, 1, 1, 1], padding='SAME') - biases = tf.Variable(tf.constant(0.0, shape=[512], dtype=tf.float32), - trainable=True, name='biases') + with tf.name_scope("conv4_1") as scope: + kernel = tf.Variable( + tf.truncated_normal([3, 3, 256, 512], dtype=tf.float32, stddev=1e-1), + name="weights", + ) + conv = tf.nn.conv2d(self.pool3, kernel, [1, 1, 1, 1], padding="SAME") + biases = tf.Variable( + tf.constant(0.0, shape=[512], dtype=tf.float32), + trainable=True, + name="biases", + ) out = tf.nn.bias_add(conv, biases) self.conv4_1 = tf.nn.relu(out, name=scope) self.parameters += [kernel, biases] # conv4_2 - with tf.name_scope('conv4_2') as scope: - kernel = tf.Variable(tf.truncated_normal([3, 3, 512, 512], dtype=tf.float32, - stddev=1e-1), name='weights') - conv = tf.nn.conv2d(self.conv4_1, kernel, [1, 1, 1, 1], padding='SAME') - biases = tf.Variable(tf.constant(0.0, shape=[512], dtype=tf.float32), - trainable=True, name='biases') + with tf.name_scope("conv4_2") as scope: + kernel = tf.Variable( + tf.truncated_normal([3, 3, 512, 512], dtype=tf.float32, stddev=1e-1), + name="weights", + ) + conv = tf.nn.conv2d(self.conv4_1, kernel, [1, 1, 1, 1], padding="SAME") + biases = tf.Variable( + tf.constant(0.0, shape=[512], dtype=tf.float32), + trainable=True, + name="biases", + ) out = tf.nn.bias_add(conv, biases) self.conv4_2 = tf.nn.relu(out, name=scope) self.parameters += [kernel, biases] # conv4_3 - with tf.name_scope('conv4_3') as scope: - kernel = tf.Variable(tf.truncated_normal([3, 3, 512, 512], dtype=tf.float32, - stddev=1e-1), name='weights') - conv = tf.nn.conv2d(self.conv4_2, kernel, [1, 1, 1, 1], padding='SAME') - biases = tf.Variable(tf.constant(0.0, shape=[512], dtype=tf.float32), - trainable=True, name='biases') + with tf.name_scope("conv4_3") as scope: + kernel = tf.Variable( + tf.truncated_normal([3, 3, 512, 512], dtype=tf.float32, stddev=1e-1), + name="weights", + ) + conv = tf.nn.conv2d(self.conv4_2, kernel, [1, 1, 1, 1], padding="SAME") + biases = tf.Variable( + tf.constant(0.0, shape=[512], dtype=tf.float32), + trainable=True, + name="biases", + ) out = tf.nn.bias_add(conv, biases) self.conv4_3 = tf.nn.relu(out, name=scope) self.parameters += [kernel, biases] # pool4 - self.pool4 = tf.nn.max_pool(self.conv4_3, - ksize=[1, 2, 2, 1], - strides=[1, 2, 2, 1], - padding='SAME', - name='pool4') + self.pool4 = tf.nn.max_pool( + self.conv4_3, + ksize=[1, 2, 2, 1], + strides=[1, 2, 2, 1], + padding="SAME", + name="pool4", + ) # conv5_1 - with tf.name_scope('conv5_1') as scope: - kernel = tf.Variable(tf.truncated_normal([3, 3, 512, 512], dtype=tf.float32, - stddev=1e-1), name='weights') - conv = tf.nn.conv2d(self.pool4, kernel, [1, 1, 1, 1], padding='SAME') - biases = tf.Variable(tf.constant(0.0, shape=[512], dtype=tf.float32), - trainable=True, name='biases') + with tf.name_scope("conv5_1") as scope: + kernel = tf.Variable( + tf.truncated_normal([3, 3, 512, 512], dtype=tf.float32, stddev=1e-1), + name="weights", + ) + conv = tf.nn.conv2d(self.pool4, kernel, [1, 1, 1, 1], padding="SAME") + biases = tf.Variable( + tf.constant(0.0, shape=[512], dtype=tf.float32), + trainable=True, + name="biases", + ) out = tf.nn.bias_add(conv, biases) self.conv5_1 = tf.nn.relu(out, name=scope) self.parameters += [kernel, biases] # conv5_2 - with tf.name_scope('conv5_2') as scope: - kernel = tf.Variable(tf.truncated_normal([3, 3, 512, 512], dtype=tf.float32, - stddev=1e-1), name='weights') - conv = tf.nn.conv2d(self.conv5_1, kernel, [1, 1, 1, 1], padding='SAME') - biases = tf.Variable(tf.constant(0.0, shape=[512], dtype=tf.float32), - trainable=True, name='biases') + with tf.name_scope("conv5_2") as scope: + kernel = tf.Variable( + tf.truncated_normal([3, 3, 512, 512], dtype=tf.float32, stddev=1e-1), + name="weights", + ) + conv = tf.nn.conv2d(self.conv5_1, kernel, [1, 1, 1, 1], padding="SAME") + biases = tf.Variable( + tf.constant(0.0, shape=[512], dtype=tf.float32), + trainable=True, + name="biases", + ) out = tf.nn.bias_add(conv, biases) self.conv5_2 = tf.nn.relu(out, name=scope) self.parameters += [kernel, biases] # conv5_3 - with tf.name_scope('conv5_3') as scope: - kernel = tf.Variable(tf.truncated_normal([3, 3, 512, 512], dtype=tf.float32, - stddev=1e-1), name='weights') - conv = tf.nn.conv2d(self.conv5_2, kernel, [1, 1, 1, 1], padding='SAME') - biases = tf.Variable(tf.constant(0.0, shape=[512], dtype=tf.float32), - trainable=True, name='biases') + with tf.name_scope("conv5_3") as scope: + kernel = tf.Variable( + tf.truncated_normal([3, 3, 512, 512], dtype=tf.float32, stddev=1e-1), + name="weights", + ) + conv = tf.nn.conv2d(self.conv5_2, kernel, [1, 1, 1, 1], padding="SAME") + biases = tf.Variable( + tf.constant(0.0, shape=[512], dtype=tf.float32), + trainable=True, + name="biases", + ) out = tf.nn.bias_add(conv, biases) self.conv5_3 = tf.nn.relu(out, name=scope) self.parameters += [kernel, biases] - # MaxPool5 - self.maxpool5 = tf.nn.max_pool(self.conv5_3, - ksize=[1, 2, 2, 1], - strides=[1, 2, 2, 1], - padding='SAME', - name='maxpool5') - - # AvgPool5 - self.avgpool5 = tf.nn.avg_pool(self.conv5_3, - ksize=[1, 2, 2, 1], - strides=[1, 2, 2, 1], - padding='SAME', - name='avgpool5') + # pool5 + self.pool5 = tf.nn.max_pool( + self.conv5_3, + ksize=[1, 2, 2, 1], + strides=[1, 2, 2, 1], + padding="SAME", + name="pool5", + ) + # MaxPool6 + self.maxpool5 = tf.nn.max_pool( + self.pool5, + ksize=[1, 7, 7, 1], + strides=[1, 1, 1, 1], + padding="SAME", + name="maxpool5", + ) + + # AvgPool6 + self.avgpool5 = tf.nn.avg_pool( + self.pool5, + ksize=[1, 7, 7, 1], + strides=[1, 1, 1, 1], + padding="SAME", + name="avgpool5", + ) def dan_part(self): - + # fc1 - with tf.name_scope('reg_head') as scope: - shape = 2*int(np.prod(self.maxpool5.get_shape()[1:])) - # shape = int(np.prod(self.pool5.get_shape()[1:])) - fc1w = tf.Variable(tf.truncated_normal([shape, 5], - dtype=tf.float32, - stddev=1e-1), name='weights') - fc1b = tf.Variable(tf.constant(1.0, shape=[5], dtype=tf.float32), - trainable=True, name='biases') - - maxpool5_flat = tf.nn.l2_normalize(tf.reshape(self.maxpool5, [-1, int(shape/2)]), 1) - avgpool5_flat = tf.nn.l2_normalize(tf.reshape(self.avgpool5, [-1, int(shape/2)]), 1) - + with tf.name_scope("reg_head") as scope: + shape = 2 * int(np.prod(self.maxpool5.get_shape()[1:])) + fc1w = tf.Variable( + tf.truncated_normal([shape, 5], dtype=tf.float32, stddev=1e-1), + name="weights", + ) + fc1b = tf.Variable( + tf.constant(1.0, shape=[5], dtype=tf.float32), + trainable=True, + name="biases", + ) + + maxpool5_flat = tf.nn.l2_normalize( + tf.reshape(self.maxpool5, [-1, int(shape / 2)]), 1 + ) + avgpool5_flat = tf.nn.l2_normalize( + tf.reshape(self.avgpool5, [-1, int(shape / 2)]), 1 + ) + self.concat = tf.concat([maxpool5_flat, avgpool5_flat], 1) - self.reg_head = tf.nn.bias_add(tf.matmul(self.concat, fc1w), fc1b, name="reg_val") + self.reg_head = tf.nn.bias_add( + tf.matmul(self.concat, fc1w), fc1b, name=scope + ) self.parameters += [fc1w, fc1b] - - def initialize_with_imagenet(self, weight_file, sess): - weights = np.load(weight_file) - keys = sorted(weights.keys()) - for i, k in enumerate(keys): - if i==len(self.parameters)-2: - break - sess.run(self.parameters[i].assign(weights[k])) - def initialize_with_vggface(self, weight_file, sess): data = loadmat(weight_file) - layers = data['layers'][0] - i=0 + layers = data["layers"][0] + i = 0 for layer in layers: - name = layer[0]['name'][0][0] - layer_type = layer[0]['type'][0][0] - if layer_type=='conv' and name[0:2]!='fc': - kernel, bias = layer[0]['weights'][0][0] + name = layer[0]["name"][0][0] + layer_type = layer[0]["type"][0][0] + if layer_type == "conv" and name[0:2] != "fc": + kernel, bias = layer[0]["weights"][0][0] sess.run(self.parameters[i].assign(kernel)) - sess.run(self.parameters[i+1].assign(bias.reshape(bias.shape[0]))) - print (name, kernel.shape, bias.shape) - i+=2 + sess.run(self.parameters[i + 1].assign(bias.reshape(bias.shape[0]))) + i += 2 def load_trained_model(self, pickle_file, sess): - with open(pickle_file, 'rb') as pfile: - param=pickle.load(pfile) + with open(pickle_file, "rb") as pfile: + param = pickle.load(pfile) for i in range(len(param)): sess.run(self.parameters[i].assign(param[i])) diff --git a/dan.pyc b/dan.pyc deleted file mode 100644 index 6587ad4..0000000 Binary files a/dan.pyc and /dev/null differ diff --git a/dan_plus.py b/dan_plus.py new file mode 100644 index 0000000..14e2ea9 --- /dev/null +++ b/dan_plus.py @@ -0,0 +1,372 @@ +import pickle +import warnings + +import numpy as np +import tensorflow as tf +from scipy.io import loadmat + +warnings.filterwarnings("ignore") + + +class DAN_PLUS: + def __init__(self, imgs, REG_PENALTY=0, preprocess=None): + self.imgs = imgs + if preprocess == "vggface": + self.mean = [129.1862793, 104.76238251, 93.59396362] + self.convlayers() + self.dan_part() + self.output = tf.nn.sigmoid(self.reg_head, name="output") + self.cost_reg = REG_PENALTY * tf.reduce_mean(tf.square(self.parameters[-2])) / 2 + + def convlayers(self): + self.parameters = [] + + # zero-mean input + with tf.name_scope("preprocess") as scope: + mean = tf.constant( + self.mean, dtype=tf.float32, shape=[1, 1, 1, 3], name="img_mean" + ) + images = self.imgs - mean + + # conv1_1 + with tf.name_scope("conv1_1") as scope: + kernel = tf.Variable( + tf.truncated_normal([3, 3, 3, 64], dtype=tf.float32, stddev=1e-1), + name="weights", + ) + conv = tf.nn.conv2d(images, kernel, [1, 1, 1, 1], padding="SAME") + biases = tf.Variable( + tf.constant(0.0, shape=[64], dtype=tf.float32), + trainable=True, + name="biases", + ) + out = tf.nn.bias_add(conv, biases) + self.conv1_1 = tf.nn.relu(out, name=scope) + self.parameters += [kernel, biases] + + # conv1_2 + with tf.name_scope("conv1_2") as scope: + kernel = tf.Variable( + tf.truncated_normal([3, 3, 64, 64], dtype=tf.float32, stddev=1e-1), + name="weights", + ) + conv = tf.nn.conv2d(self.conv1_1, kernel, [1, 1, 1, 1], padding="SAME") + biases = tf.Variable( + tf.constant(0.0, shape=[64], dtype=tf.float32), + trainable=True, + name="biases", + ) + out = tf.nn.bias_add(conv, biases) + self.conv1_2 = tf.nn.relu(out, name=scope) + self.parameters += [kernel, biases] + + # pool1 + self.pool1 = tf.nn.max_pool( + self.conv1_2, + ksize=[1, 2, 2, 1], + strides=[1, 2, 2, 1], + padding="SAME", + name="pool1", + ) + + # conv2_1 + with tf.name_scope("conv2_1") as scope: + kernel = tf.Variable( + tf.truncated_normal([3, 3, 64, 128], dtype=tf.float32, stddev=1e-1), + name="weights", + ) + conv = tf.nn.conv2d(self.pool1, kernel, [1, 1, 1, 1], padding="SAME") + biases = tf.Variable( + tf.constant(0.0, shape=[128], dtype=tf.float32), + trainable=True, + name="biases", + ) + out = tf.nn.bias_add(conv, biases) + self.conv2_1 = tf.nn.relu(out, name=scope) + self.parameters += [kernel, biases] + + # conv2_2 + with tf.name_scope("conv2_2") as scope: + kernel = tf.Variable( + tf.truncated_normal([3, 3, 128, 128], dtype=tf.float32, stddev=1e-1), + name="weights", + ) + conv = tf.nn.conv2d(self.conv2_1, kernel, [1, 1, 1, 1], padding="SAME") + biases = tf.Variable( + tf.constant(0.0, shape=[128], dtype=tf.float32), + trainable=True, + name="biases", + ) + out = tf.nn.bias_add(conv, biases) + self.conv2_2 = tf.nn.relu(out, name=scope) + self.parameters += [kernel, biases] + + # pool2 + self.pool2 = tf.nn.max_pool( + self.conv2_2, + ksize=[1, 2, 2, 1], + strides=[1, 2, 2, 1], + padding="SAME", + name="pool2", + ) + + # conv3_1 + with tf.name_scope("conv3_1") as scope: + kernel = tf.Variable( + tf.truncated_normal([3, 3, 128, 256], dtype=tf.float32, stddev=1e-1), + name="weights", + ) + conv = tf.nn.conv2d(self.pool2, kernel, [1, 1, 1, 1], padding="SAME") + biases = tf.Variable( + tf.constant(0.0, shape=[256], dtype=tf.float32), + trainable=True, + name="biases", + ) + out = tf.nn.bias_add(conv, biases) + self.conv3_1 = tf.nn.relu(out, name=scope) + self.parameters += [kernel, biases] + + # conv3_2 + with tf.name_scope("conv3_2") as scope: + kernel = tf.Variable( + tf.truncated_normal([3, 3, 256, 256], dtype=tf.float32, stddev=1e-1), + name="weights", + ) + conv = tf.nn.conv2d(self.conv3_1, kernel, [1, 1, 1, 1], padding="SAME") + biases = tf.Variable( + tf.constant(0.0, shape=[256], dtype=tf.float32), + trainable=True, + name="biases", + ) + out = tf.nn.bias_add(conv, biases) + self.conv3_2 = tf.nn.relu(out, name=scope) + self.parameters += [kernel, biases] + + # conv3_3 + with tf.name_scope("conv3_3") as scope: + kernel = tf.Variable( + tf.truncated_normal([3, 3, 256, 256], dtype=tf.float32, stddev=1e-1), + name="weights", + ) + conv = tf.nn.conv2d(self.conv3_2, kernel, [1, 1, 1, 1], padding="SAME") + biases = tf.Variable( + tf.constant(0.0, shape=[256], dtype=tf.float32), + trainable=True, + name="biases", + ) + out = tf.nn.bias_add(conv, biases) + self.conv3_3 = tf.nn.relu(out, name=scope) + self.parameters += [kernel, biases] + + # pool3 + self.pool3 = tf.nn.max_pool( + self.conv3_3, + ksize=[1, 2, 2, 1], + strides=[1, 2, 2, 1], + padding="SAME", + name="pool3", + ) + + # conv4_1 + with tf.name_scope("conv4_1") as scope: + kernel = tf.Variable( + tf.truncated_normal([3, 3, 256, 512], dtype=tf.float32, stddev=1e-1), + name="weights", + ) + conv = tf.nn.conv2d(self.pool3, kernel, [1, 1, 1, 1], padding="SAME") + biases = tf.Variable( + tf.constant(0.0, shape=[512], dtype=tf.float32), + trainable=True, + name="biases", + ) + out = tf.nn.bias_add(conv, biases) + self.conv4_1 = tf.nn.relu(out, name=scope) + self.parameters += [kernel, biases] + + # conv4_2 + with tf.name_scope("conv4_2") as scope: + kernel = tf.Variable( + tf.truncated_normal([3, 3, 512, 512], dtype=tf.float32, stddev=1e-1), + name="weights", + ) + conv = tf.nn.conv2d(self.conv4_1, kernel, [1, 1, 1, 1], padding="SAME") + biases = tf.Variable( + tf.constant(0.0, shape=[512], dtype=tf.float32), + trainable=True, + name="biases", + ) + out = tf.nn.bias_add(conv, biases) + self.conv4_2 = tf.nn.relu(out, name=scope) + self.parameters += [kernel, biases] + + # conv4_3 + with tf.name_scope("conv4_3") as scope: + kernel = tf.Variable( + tf.truncated_normal([3, 3, 512, 512], dtype=tf.float32, stddev=1e-1), + name="weights", + ) + conv = tf.nn.conv2d(self.conv4_2, kernel, [1, 1, 1, 1], padding="SAME") + biases = tf.Variable( + tf.constant(0.0, shape=[512], dtype=tf.float32), + trainable=True, + name="biases", + ) + out = tf.nn.bias_add(conv, biases) + self.conv4_3 = tf.nn.relu(out, name=scope) + self.parameters += [kernel, biases] + + # pool4 + self.pool4 = tf.nn.max_pool( + self.conv4_3, + ksize=[1, 2, 2, 1], + strides=[1, 2, 2, 1], + padding="SAME", + name="pool4", + ) + + # conv5_1 + with tf.name_scope("conv5_1") as scope: + kernel = tf.Variable( + tf.truncated_normal([3, 3, 512, 512], dtype=tf.float32, stddev=1e-1), + name="weights", + ) + conv = tf.nn.conv2d(self.pool4, kernel, [1, 1, 1, 1], padding="SAME") + biases = tf.Variable( + tf.constant(0.0, shape=[512], dtype=tf.float32), + trainable=True, + name="biases", + ) + out = tf.nn.bias_add(conv, biases) + self.conv5_1 = tf.nn.relu(out, name=scope) + self.parameters += [kernel, biases] + + # conv5_2 + with tf.name_scope("conv5_2") as scope: + kernel = tf.Variable( + tf.truncated_normal([3, 3, 512, 512], dtype=tf.float32, stddev=1e-1), + name="weights", + ) + conv = tf.nn.conv2d(self.conv5_1, kernel, [1, 1, 1, 1], padding="SAME") + biases = tf.Variable( + tf.constant(0.0, shape=[512], dtype=tf.float32), + trainable=True, + name="biases", + ) + out = tf.nn.bias_add(conv, biases) + self.conv5_2 = tf.nn.relu(out, name=scope) + self.parameters += [kernel, biases] + + # MaxPool5_2 + self.maxpool5_2 = tf.nn.max_pool( + self.conv5_2, + ksize=[1, 14, 14, 1], + strides=[1, 1, 1, 1], + padding="SAME", + name="maxpool5_2", + ) + + # AvgPool5_2 + self.avgpool5_2 = tf.nn.avg_pool( + self.conv5_2, + ksize=[1, 14, 14, 1], + strides=[1, 1, 1, 1], + padding="SAME", + name="avgpool5_2", + ) + # conv5_3 + with tf.name_scope("conv5_3") as scope: + kernel = tf.Variable( + tf.truncated_normal([3, 3, 512, 512], dtype=tf.float32, stddev=1e-1), + name="weights", + ) + conv = tf.nn.conv2d(self.conv5_2, kernel, [1, 1, 1, 1], padding="SAME") + biases = tf.Variable( + tf.constant(0.0, shape=[512], dtype=tf.float32), + trainable=True, + name="biases", + ) + out = tf.nn.bias_add(conv, biases) + self.conv5_3 = tf.nn.relu(out, name=scope) + self.parameters += [kernel, biases] + + # pool5 + self.pool5 = tf.nn.max_pool( + self.conv5_3, + ksize=[1, 2, 2, 1], + strides=[1, 2, 2, 1], + padding="SAME", + name="pool5", + ) + # MaxPool5_3 + self.maxpool5_3 = tf.nn.max_pool( + self.pool5, + ksize=[1, 7, 7, 1], + strides=[1, 1, 1, 1], + padding="SAME", + name="maxpool5_3", + ) + + # AvgPool5_3 + self.avgpool5_3 = tf.nn.avg_pool( + self.pool5, + ksize=[1, 7, 7, 1], + strides=[1, 1, 1, 1], + padding="SAME", + name="avgpool5_3", + ) + + + + def dan_part(self): + + # fc1 + with tf.name_scope("reg_head") as scope: + shape = 2 * int(np.prod(self.maxpool5_3.get_shape()[1:])) + + fc1w = tf.Variable( + tf.truncated_normal([shape, 5], dtype=tf.float32, stddev=1e-1), + name="weights", + ) + fc1b = tf.Variable( + tf.constant(1.0, shape=[5], dtype=tf.float32), + trainable=True, + name="biases", + ) + maxpool5_2_flat = tf.nn.l2_normalize( + tf.reshape(self.maxpool5_2, [-1, int(shape / 2)]), 1 + ) + avgpool5_2_flat = tf.nn.l2_normalize( + tf.reshape(self.avgpool5_2, [-1, int(shape / 2)]), 1 + ) + + maxpool5_3_flat = tf.nn.l2_normalize( + tf.reshape(self.maxpool5_3, [-1, int(shape / 2)]), 1 + ) + avgpool5_3_flat = tf.nn.l2_normalize( + tf.reshape(self.avgpool5_3, [-1, int(shape / 2)]), 1 + ) + + self.concat = tf.concat([maxpool5_3_flat, avgpool5_3_flat,maxpool5_2_flat,avgpool5_2_flat], 1) + self.reg_head = tf.nn.bias_add( + tf.matmul(self.concat, fc1w), fc1b, name=scope + ) + self.parameters += [fc1w, fc1b] + + def initialize_with_vggface(self, weight_file, sess): + data = loadmat(weight_file) + layers = data["layers"][0] + i = 0 + for layer in layers: + name = layer[0]["name"][0][0] + layer_type = layer[0]["type"][0][0] + if layer_type == "conv" and name[0:2] != "fc": + kernel, bias = layer[0]["weights"][0][0] + sess.run(self.parameters[i].assign(kernel)) + sess.run(self.parameters[i + 1].assign(bias.reshape(bias.shape[0]))) + i += 2 + + def load_trained_model(self, pickle_file, sess): + with open(pickle_file, "rb") as pfile: + param = pickle.load(pfile) + for i in range(len(param)): + sess.run(self.parameters[i].assign(param[i])) diff --git a/demo.py b/demo.py new file mode 100644 index 0000000..0fb335d --- /dev/null +++ b/demo.py @@ -0,0 +1,163 @@ +import glob +import os +import pickle +import sys +import time +import warnings + +import numpy as np +import pandas as pd +import tensorflow as tf +from PIL import Image + +import cv2 +from dan import DAN + +warnings.filterwarnings("ignore") + + +def predict(file_name): + + num = [] + + cap = cv2.VideoCapture(file_name) + + file_name = (file_name.split(".mp4"))[0] + ## Creating folder to save all the 100 frames from the video + try: + os.makedirs("ImageData/testingData/" + file_name) + except OSError: + print("Error: Creating directory of data") + + ## Setting the frame limit to 100 + cap.set(cv2.CAP_PROP_FRAME_COUNT, 101) + length = 101 + count = 0 + ## Running a loop to each frame and saving it in the created folder + while cap.isOpened(): + count += 1 + if length == count: + break + _, frame = cap.read() + if frame is None: + continue + + ## Resizing it to 256*256 to save the disk space and fit into the model + frame = cv2.resize(frame, (256, 256), interpolation=cv2.INTER_CUBIC) + # Saves image of the current frame in jpg file + name = ( + "ImageData/testingData/" + str(file_name) + "/frame" + str(count) + ".jpg" + ) + cv2.imwrite(name, frame) + + if cv2.waitKey(1) & 0xFF == ord("q"): + break + + addrs = [] + + def load_image(addr): + img = np.array(Image.open(addr).resize((224, 224), Image.ANTIALIAS)) + img = img.astype(np.uint8) + return img + + def _float_feature(value): + return tf.train.Feature(float_list=tf.train.FloatList(value=[value])) + + def _bytes_feature(value): + return tf.train.Feature(bytes_list=tf.train.BytesList(value=[value])) + + addrs = [] + + filelist = glob.glob("ImageData/testingData/" + str(file_name) + "/*.jpg") + addrs += filelist + + train_addrs = addrs + train_filename = "test.tfrecords" # address to save the TFRecords file + writer = tf.python_io.TFRecordWriter(train_filename) + for i in range(len(train_addrs)): + # Load the image + img = load_image(train_addrs[i]) + feature = {"test/image": _bytes_feature(tf.compat.as_bytes(img.tostring()))} + # Create an example protocol buffer + example = tf.train.Example(features=tf.train.Features(feature=feature)) + + # Serialize to string and write on the file + writer.write(example.SerializeToString()) + + writer.close() + sys.stdout.flush() + + BATCH_SIZE = 20 + REG_PENALTY = 0 + NUM_IMAGES = 100 + N_EPOCHS = 1 + + imgs = tf.placeholder("float", [None, 224, 224, 3], name="image_placeholder") + gpu_options = tf.GPUOptions(per_process_gpu_memory_fraction=0.8, allow_growth=True) + config = tf.ConfigProto(allow_soft_placement=True, gpu_options=gpu_options) + + with tf.Session(config=config) as sess: + + model = DAN(imgs, REG_PENALTY=REG_PENALTY, preprocess="vggface") + tr_reader = tf.TFRecordReader() + tr_filename_queue = tf.train.string_input_producer( + ["test.tfrecords"], num_epochs=N_EPOCHS + ) + _, tr_serialized_example = tr_reader.read(tr_filename_queue) + tr_feature = {"test/image": tf.FixedLenFeature([], tf.string)} + tr_features = tf.parse_single_example( + tr_serialized_example, features=tr_feature + ) + + tr_image = tf.decode_raw(tr_features["test/image"], tf.uint8) + tr_image = tf.reshape(tr_image, [224, 224, 3]) + tr_images = tf.train.shuffle_batch( + [tr_image], + batch_size=BATCH_SIZE, + capacity=100, + min_after_dequeue=BATCH_SIZE, + allow_smaller_final_batch=True, + ) + init_op = tf.group( + tf.global_variables_initializer(), tf.local_variables_initializer() + ) + sess.run(init_op) + + coord = tf.train.Coordinator() + threads = tf.train.start_queue_runners(coord=coord) + file_list = ["param1.pkl", "param2.pkl"] + epoch = 0 + for pickle_file in file_list: + error = 0 + model.load_trained_model(pickle_file, sess) + i = 0 + while i < NUM_IMAGES: + i += BATCH_SIZE + try: + epoch_x = sess.run(tr_images) + except: + if error >= 5: + break + error += 1 + continue + output = sess.run( + [model.output], feed_dict={imgs: epoch_x.astype(np.float32)} + ) + num.append(output[0]) + epoch += 1 + coord.request_stop() + # Wait for threads to stop + coord.join(threads) + a = np.round(np.mean(np.concatenate(num), axis=0), 3) + a_json = { + "Extraversion": a[0], + "Neuroticism": a[1], + "Agreeableness": a[2], + "Conscientiousness": a[3], + "Openness": a[4], + } + return a_json + + +output = predict("_uNup91ZYw0.002.mp4") +print(output) diff --git a/feat_extraction_from_wav.py b/feat_extraction_from_wav.py index 753b1f6..c075a81 100644 --- a/feat_extraction_from_wav.py +++ b/feat_extraction_from_wav.py @@ -1,64 +1,84 @@ -from python_speech_features import logfbank -import scipy.io.wavfile as wav -import tensorflow as tf +import glob import pickle -import numpy as np +import sys from random import shuffle -import glob + +import numpy as np import pandas as pd -import sys +import scipy.io.wavfile as wav +import tensorflow as tf +from python_speech_features import logfbank + def load_pickle(pickle_file): - with open(pickle_file, 'rb') as f: - pickle_data = pickle.load(f, encoding='latin1') + with open(pickle_file, "rb") as f: + pickle_data = pickle.load(f, encoding="latin1") df = pd.DataFrame(pickle_data) df.reset_index(inplace=True) - del df['interview'] - df.columns = ["VideoName","ValueExtraversion","ValueNeuroticism","ValueAgreeableness","ValueConscientiousness","ValueOpenness"] + del df["interview"] + df.columns = [ + "VideoName", + "ValueExtraversion", + "ValueNeuroticism", + "ValueAgreeableness", + "ValueConscientiousness", + "ValueOpenness", + ] return df + def process_wav(wav_file): (rate, sig) = wav.read(wav_file) - fbank_feat = logfbank(sig, rate) #fbank_feat.shape = (3059,26) - a = fbank_feat.flatten() - single_vec_feat = a.reshape(1,-1) #single_vec_feat.shape = (1,79534) + fbank_feat = logfbank(sig, rate) # fbank_feat.shape = (3059,26) + a = fbank_feat.flatten() + single_vec_feat = a.reshape(1, -1) # single_vec_feat.shape = (1,79534) return single_vec_feat + def _float_feature(value): - return tf.train.Feature(float_list=tf.train.FloatList(value=[value])) + return tf.train.Feature(float_list=tf.train.FloatList(value=[value])) + + def _bytes_feature(value): - return tf.train.Feature(bytes_list=tf.train.BytesList(value=[value])) + return tf.train.Feature(bytes_list=tf.train.BytesList(value=[value])) + -df = load_pickle('annotation_training.pkl') +df = load_pickle("Annotations/annotation_training.pkl") NUM_VID = len(df) addrs = [] labels = [] for i in range(NUM_VID): - filelist=glob.glob('VoiceData/trainingData/'+(df['VideoName'].iloc[i]).split('.mp4')[0]+'.wav') - addrs+=filelist - labels+=[np.array(df.drop(['VideoName'], 1, inplace=False).iloc[i]).astype(np.float32)]*100 + filelist = glob.glob( + "VoiceData/trainingData/" + (df["VideoName"].iloc[i]).split(".mp4")[0] + ".wav" + ) + addrs += filelist + labels += [ + np.array(df.drop(["VideoName"], 1, inplace=False).iloc[i]).astype(np.float32) + ] * 100 c = list(zip(addrs, labels)) shuffle(c) train_addrs, train_labels = zip(*c) # train_addrs, train_labels = addrs , labels -train_filename = 'train_audio_full.tfrecords' # address to save the TFRecords file +train_filename = "train_audio_full.tfrecords" # address to save the TFRecords file # open the TFRecords file writer = tf.python_io.TFRecordWriter(train_filename) for i in range(len(train_addrs)): # print how many audio are saved every 1000 images if not i % 1000: - print ('Train data: {}/{}'.format(i, len(train_addrs))) + print("Train data: {}/{}".format(i, len(train_addrs))) sys.stdout.flush() # Load the audio audio = process_wav(train_addrs[i]) label = train_labels[i] -# Create a feature - feature = {'train/label': _bytes_feature(tf.compat.as_bytes(label.tostring())), - 'train/audio': _bytes_feature(tf.compat.as_bytes(audio.tostring()))} -# Create an example protocol buffer + # Create a feature + feature = { + "train/label": _bytes_feature(tf.compat.as_bytes(label.tostring())), + "train/audio": _bytes_feature(tf.compat.as_bytes(audio.tostring())), + } + # Create an example protocol buffer example = tf.train.Example(features=tf.train.Features(feature=feature)) - + # Serialize to string and write on the file writer.write(example.SerializeToString()) @@ -66,40 +86,47 @@ def _bytes_feature(value): writer.close() sys.stdout.flush() -print (len(train_addrs), "training audio files saved.. ") - +print(len(train_addrs), "training audio files saved.. ") -df = load_pickle('annotation_validation.pkl') +df = load_pickle("Annotations/annotation_validation.pkl") NUM_VID = len(df) addrs = [] labels = [] for i in range(NUM_VID): - filelist=glob.glob('VoiceData/validationData/'+(df['VideoName'].iloc[i]).split('.mp4')[0]+'.wav') - addrs+=filelist - labels+=[np.array(df.drop(['VideoName'], 1, inplace=False).iloc[i]).astype(np.float32)]*100 + filelist = glob.glob( + "VoiceData/validationData/" + + (df["VideoName"].iloc[i]).split(".mp4")[0] + + ".wav" + ) + addrs += filelist + labels += [ + np.array(df.drop(["VideoName"], 1, inplace=False).iloc[i]).astype(np.float32) + ] * 100 c = list(zip(addrs, labels)) shuffle(c) val_addrs, val_labels = zip(*c) -#val_addrs, val_labels = addrs , labels -val_filename = 'val_audio_full.tfrecords' # address to save the TFRecords file +# val_addrs, val_labels = addrs , labels +val_filename = "val_audio_full.tfrecords" # address to save the TFRecords file # open the TFRecords file writer = tf.python_io.TFRecordWriter(val_filename) for i in range(len(val_addrs)): # print how many audio are saved every 1000 images if not i % 1000: - print ('val data: {}/{}'.format(i, len(val_addrs))) + print("val data: {}/{}".format(i, len(val_addrs))) sys.stdout.flush() # Load the audio audio = process_wav(val_addrs[i]) label = val_labels[i] -# Create a feature - feature = {'val/label': _bytes_feature(tf.compat.as_bytes(label.tostring())), - 'val/audio': _bytes_feature(tf.compat.as_bytes(audio.tostring()))} -# Create an example protocol buffer + # Create a feature + feature = { + "val/label": _bytes_feature(tf.compat.as_bytes(label.tostring())), + "val/audio": _bytes_feature(tf.compat.as_bytes(audio.tostring())), + } + # Create an example protocol buffer example = tf.train.Example(features=tf.train.Features(feature=feature)) - + # Serialize to string and write on the file writer.write(example.SerializeToString()) @@ -107,6 +134,4 @@ def _bytes_feature(value): writer.close() sys.stdout.flush() -print (len(val_addrs), "val audio files saved.. ") - - +print(len(val_addrs), "val audio files saved.. ") diff --git a/modelImg.png b/modelImg.png deleted file mode 100644 index 0f29176..0000000 Binary files a/modelImg.png and /dev/null differ diff --git a/remtime.pyc b/remtime.pyc deleted file mode 100644 index d1fc7e4..0000000 Binary files a/remtime.pyc and /dev/null differ diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..080557e --- /dev/null +++ b/requirements.txt @@ -0,0 +1,26 @@ +absl-py==0.8.1 +astor==0.8.0 +ffmpeg==1.4 +gast==0.3.2 +google-pasta==0.1.8 +grpcio==1.25.0 +h5py==2.10.0 +Keras-Applications==1.0.8 +Keras-Preprocessing==1.1.0 +Markdown==3.1.1 +numpy==1.16.4 +opencv-python==4.1.2.30 +pandas==0.25.3 +Pillow==6.2.1 +protobuf==3.11.1 +python-dateutil==2.8.1 +python-speech-features==0.6 +pytz==2019.3 +scipy==1.3.3 +six==1.13.0 +tensorboard==1.14.0 +tensorflow==1.14.0 +tensorflow-estimator==1.14.0 +termcolor==1.1.0 +Werkzeug==0.16.0 +wrapt==1.11.2 diff --git a/small_train_sample.csv b/small_train_sample.csv deleted file mode 100644 index 1b35306..0000000 --- a/small_train_sample.csv +++ /dev/null @@ -1,501 +0,0 @@ -VideoName,ValueExtraversion,ValueAgreeableness,ValueConscientiousness,ValueNeurotisicm,ValueOpenness -voSLxKtKr0Q.000.mp4,0.5794392523,0.5934065934,0.5145631068,0.5833333333,0.6111111111 -dvU5jYExl0o.003.mp4,0.3644859813,0.5824175824,0.6699029126,0.5,0.4777777778 -WMp0lsXbOqM.003.mp4,0.7196261682,0.7252747253,0.7669902913,0.75,0.8111111111 -Lj1WuMXFa-4.002.mp4,0.4859813084,0.5054945055,0.4951456311,0.5104166667,0.7555555556 -YliKljQIX2o.003.mp4,0.6448598131,0.6593406593,0.8155339806,0.5729166667,0.6888888889 -RlUuWWWFrhM.005.mp4,0.4299065421,0.5934065934,0.4854368932,0.46875,0.4555555556 -blAjqQ0ja8Q.005.mp4,0.6168224299,0.6703296703,0.5048543689,0.5208333333,0.5777777778 -r9TaaVTo8Y8.000.mp4,0.6074766355,0.5714285714,0.5922330097,0.5833333333,0.5777777778 -Psahy1Vju4A.005.mp4,0.5887850467,0.6813186813,0.6213592233,0.6458333333,0.6888888889 -T8ibN-b3h7Y.001.mp4,0.6822429907,0.5054945055,0.5922330097,0.6770833333,0.6444444444 -2IwWILRuuNU.003.mp4,0.5607476636,0.5274725275,0.6796116505,0.4791666667,0.6222222222 -syAUKJMQWeo.001.mp4,0.4018691589,0.4505494505,0.2718446602,0.34375,0.4444444444 -ztyBhnjtrz0.004.mp4,0.523364486,0.6923076923,0.6019417476,0.5729166667,0.6333333333 -Ry5JJvTfP-8.002.mp4,0.4672897196,0.5934065934,0.5242718447,0.4791666667,0.5777777778 -ixPqs7L8oAE.003.mp4,0.5607476636,0.6153846154,0.7572815534,0.625,0.6666666667 -UtVo107m5lg.005.mp4,0.6355140187,0.7142857143,0.6699029126,0.6354166667,0.6444444444 -izq1ogkfedI.002.mp4,0.4485981308,0.5494505495,0.7475728155,0.4895833333,0.5666666667 -EgolOPjkkg8.005.mp4,0.4299065421,0.4505494505,0.3495145631,0.4270833333,0.5666666667 -AobPtpyKat8.001.mp4,0.5981308411,0.5934065934,0.640776699,0.5729166667,0.5555555556 -qtB-CogljAo.003.mp4,0.4205607477,0.6153846154,0.6116504854,0.40625,0.5555555556 -EaBCJB8LXdI.005.mp4,0.5607476636,0.6483516484,0.5436893204,0.5833333333,0.5333333333 -TCzYD74Xqe8.002.mp4,0.523364486,0.7802197802,0.4660194175,0.5729166667,0.5555555556 -s3m8DgUi6GM.004.mp4,0.4859813084,0.3956043956,0.4563106796,0.3020833333,0.5888888889 -GTmHSF6vNWc.002.mp4,0.5607476636,0.5274725275,0.5533980583,0.6145833333,0.7222222222 -YbxdeEd7wq4.001.mp4,0.5887850467,0.5824175824,0.7378640777,0.5833333333,0.6222222222 -HNKnvSmTkC4.001.mp4,0.4579439252,0.5494505495,0.6019417476,0.59375,0.5444444444 -nGe8dIc-ecc.003.mp4,0.5794392523,0.5714285714,0.6116504854,0.6666666667,0.6222222222 -nkmYbzMmrYw.003.mp4,0.4859813084,0.5274725275,0.6213592233,0.5520833333,0.6777777778 -5U0xeSXEZOU.004.mp4,0.5327102804,0.4835164835,0.640776699,0.4479166667,0.7 -S-e9-bW4seo.001.mp4,0.3738317757,0.3516483516,0.6116504854,0.5416666667,0.4888888889 -lErjGxBb1Bk.004.mp4,0.6355140187,0.5494505495,0.6796116505,0.5520833333,0.6444444444 -4RoZPrjRQZE.000.mp4,0.261682243,0.3626373626,0.2621359223,0.3229166667,0.3666666667 -n8IiQJyqjiE.004.mp4,0.6355140187,0.6483516484,0.427184466,0.6770833333,0.7777777778 -nOCSTnpB_F4.002.mp4,0.4485981308,0.6813186813,0.4757281553,0.6041666667,0.6888888889 -wTo1uZns2X8.005.mp4,0.2242990654,0.4835164835,0.3203883495,0.375,0.2 -6tBnFWDqvJE.003.mp4,0.5607476636,0.7472527473,0.6019417476,0.5729166667,0.6 -AJIphVRpYrg.003.mp4,0.5514018692,0.6703296703,0.4174757282,0.6354166667,0.6111111111 -7nhJXn9PI0I.005.mp4,0.5514018692,0.4615384615,0.4757281553,0.5,0.4666666667 -RrvG7JlKoXM.002.mp4,0.3271028037,0.6153846154,0.5339805825,0.4166666667,0.5222222222 -nBjBfN9SbpM.001.mp4,0.4672897196,0.5384615385,0.4174757282,0.5104166667,0.6111111111 -mhF4kYTlVUE.002.mp4,0.6355140187,0.5494505495,0.4563106796,0.5208333333,0.5 ---Ymqszjv54.001.mp4,0.5514018692,0.5274725275,0.6504854369,0.5,0.7444444444 -R42dmIPCXwo.003.mp4,0.3271028037,0.3406593407,0.2718446602,0.3125,0.4222222222 -YPMffqhP0C8.004.mp4,0.2429906542,0.3516483516,0.2621359223,0.2916666667,0.2333333333 -5Mc-mjLvvGU.000.mp4,0.2523364486,0.1978021978,0.2330097087,0.3229166667,0.5333333333 -t899haDGi38.004.mp4,0.5794392523,0.6483516484,0.7378640777,0.7083333333,0.6666666667 -VxtZDXM0cuQ.005.mp4,0.6822429907,0.5604395604,0.5048543689,0.4895833333,0.6444444444 -41NNb7cucVo.001.mp4,0.523364486,0.6923076923,0.3689320388,0.4895833333,0.5444444444 -U2RemWUyjts.003.mp4,0.2710280374,0.4835164835,0.5631067961,0.4375,0.5222222222 -CdUYBux3Vn8.002.mp4,0.4392523364,0.3736263736,0.3786407767,0.59375,0.6111111111 -OZlpENU9h28.005.mp4,0.3177570093,0.4285714286,0.3495145631,0.4166666667,0.4 -k3iu-fhIkeI.000.mp4,0.5794392523,0.5384615385,0.572815534,0.5729166667,0.5111111111 -Bt5zyk-Xf9Q.000.mp4,0.6261682243,0.6703296703,0.6213592233,0.5625,0.6111111111 -k2buv6xZ4_o.001.mp4,0.3738317757,0.4505494505,0.6796116505,0.4479166667,0.3666666667 -8Bt-vEroq6M.004.mp4,0.4299065421,0.6153846154,0.7475728155,0.7395833333,0.5555555556 -A6ZWTfKPLPE.002.mp4,0.5607476636,0.6483516484,0.6990291262,0.65625,0.6777777778 -M39PNQ8Omhc.005.mp4,0.476635514,0.6043956044,0.6990291262,0.5729166667,0.6444444444 -hquzfo9MVDo.003.mp4,0.1962616822,0.2197802198,0.2330097087,0.1979166667,0.2666666667 -0fMw9o1v2tY.002.mp4,0.2803738318,0.3516483516,0.3300970874,0.3333333333,0.3555555556 -merppcmY6y0.003.mp4,0.3177570093,0.4395604396,0.3300970874,0.40625,0.4777777778 -BS0wgLXqFgc.003.mp4,0.6542056075,0.6923076923,0.6019417476,0.6041666667,0.6888888889 -zF46tAI2PQc.005.mp4,0.7102803738,0.5824175824,0.5242718447,0.71875,0.6444444444 -0MB91ku0eEw.003.mp4,0.5981308411,0.8021978022,0.572815534,0.5520833333,0.5222222222 -wTo1uZns2X8.003.mp4,0.6448598131,0.6483516484,0.3786407767,0.65625,0.5777777778 -ivcVlDXJCDo.002.mp4,0.7289719626,0.7362637363,0.7475728155,0.8333333333,0.9111111111 -rwinPicu_aw.002.mp4,0.5046728972,0.6593406593,0.6796116505,0.625,0.5333333333 -oVSMxtPpQ0M.002.mp4,0.4672897196,0.6483516484,0.427184466,0.40625,0.8111111111 -UEYKBC_SuzU.001.mp4,0.3738317757,0.4835164835,0.3009708738,0.3541666667,0.5 -vJnjjy5DZN4.002.mp4,0.5327102804,0.7362637363,0.7184466019,0.53125,0.6 -J9MfhPoJOaw.004.mp4,0.691588785,0.4835164835,0.6699029126,0.6145833333,0.6777777778 -r9TaaVTo8Y8.004.mp4,0.6542056075,0.6263736264,0.6213592233,0.6979166667,0.7111111111 -zrdxHERn628.003.mp4,0.4299065421,0.5164835165,0.5339805825,0.4583333333,0.5888888889 -kDJigDGDJTo.001.mp4,0.5046728972,0.5164835165,0.3300970874,0.5729166667,0.6 -sntohi33U5s.000.mp4,0.6728971963,0.6263736264,0.6893203883,0.75,0.6444444444 -m536hegSuKI.002.mp4,0.5794392523,0.5164835165,0.5922330097,0.65625,0.7888888889 -bEXDNfLBy1I.002.mp4,0.3925233645,0.5164835165,0.572815534,0.4479166667,0.5444444444 -3AyjQQYmqU4.000.mp4,0.4205607477,0.6153846154,0.640776699,0.625,0.5555555556 -j3jdT1V-DeI.004.mp4,0.1121495327,0.1648351648,0.2038834951,0.15625,0.2444444444 -NWlCdMyKlE0.001.mp4,0.6728971963,0.6923076923,0.786407767,0.59375,0.6444444444 -LaxnVuOM6kE.002.mp4,0.3644859813,0.5604395604,0.4368932039,0.4479166667,0.4222222222 -LHV4HNK35pM.005.mp4,0.7289719626,0.6043956044,0.4757281553,0.5729166667,0.6 -IQdz0Pd-L2Y.003.mp4,0.6261682243,0.5384615385,0.5242718447,0.5833333333,0.6666666667 -Kbcvurfuvhk.000.mp4,0.3738317757,0.5934065934,0.5922330097,0.3645833333,0.4777777778 -dy9EqbKLDP0.003.mp4,0.4953271028,0.7252747253,0.7669902913,0.6458333333,0.7555555556 -ng42eoHytOA.003.mp4,0.3364485981,0.4065934066,0.3009708738,0.3541666667,0.3888888889 -oe6q_ZByIxQ.000.mp4,0.3271028037,0.4505494505,0.3786407767,0.4375,0.6222222222 -Z3E1jkaNRKs.000.mp4,0.4392523364,0.6703296703,0.6699029126,0.46875,0.4222222222 -gZblxCs4EV4.001.mp4,0.4859813084,0.5934065934,0.3980582524,0.46875,0.6777777778 -zRevZ94Rxjc.004.mp4,0.6448598131,0.6263736264,0.5339805825,0.6041666667,0.7888888889 -UGn9Q8Fe9jw.001.mp4,0.5981308411,0.6593406593,0.5631067961,0.6458333333,0.5888888889 -s6N1pv5lzrU.003.mp4,0.4392523364,0.5604395604,0.4951456311,0.5208333333,0.4333333333 -1RMdiCbNNh4.005.mp4,0.1588785047,0.1758241758,0.2621359223,0.21875,0.4444444444 -QBZieJiOl1w.001.mp4,0.4485981308,0.5714285714,0.359223301,0.4583333333,0.5444444444 -8gvBbE6iZNo.003.mp4,0.4485981308,0.8681318681,0.6796116505,0.6770833333,0.6333333333 -DVh_7dO2cWY.000.mp4,0.691588785,0.6263736264,0.7572815534,0.625,0.6222222222 -Y6iogSmj6FQ.002.mp4,0.5327102804,0.5164835165,0.5339805825,0.4791666667,0.4777777778 -gUyH1qvbOZA.000.mp4,0.5887850467,0.5164835165,0.786407767,0.8541666667,0.7777777778 -OeGMd58Wgsk.000.mp4,0.308411215,0.5164835165,0.5533980583,0.3854166667,0.5 -zT_s9X21gAE.005.mp4,0.7289719626,0.6373626374,0.6601941748,0.6666666667,0.7333333333 -OhHg1lyxe4I.001.mp4,0.1401869159,0.3076923077,0.1650485437,0.1979166667,0.1888888889 -IWAT58l2Chg.001.mp4,0.5607476636,0.7142857143,0.5242718447,0.6458333333,0.5666666667 -C8xZ0vhrrFE.005.mp4,0.2897196262,0.3076923077,0.4174757282,0.2395833333,0.3666666667 -bej-DbxTkWA.000.mp4,0.476635514,0.7692307692,0.6990291262,0.4270833333,0.5111111111 -bYXRyimxh7A.003.mp4,0.4205607477,0.4945054945,0.4174757282,0.4895833333,0.5111111111 -Uu-NbXUPr-A.000.mp4,0.7476635514,0.7142857143,0.8252427184,0.7916666667,0.8111111111 -cgp1OzTOq1o.005.mp4,0.5700934579,0.6593406593,0.5339805825,0.6354166667,0.7333333333 -XLKNGnpTO9k.001.mp4,0.4953271028,0.5384615385,0.4466019417,0.53125,0.5333333333 -6wHQsN5g2RM.003.mp4,0.3364485981,0.3406593407,0.4563106796,0.4166666667,0.5888888889 -XvV4YdhpC2w.002.mp4,0.4859813084,0.7032967033,0.5145631068,0.5104166667,0.5444444444 -og8vtyRh_bc.000.mp4,0.5607476636,0.5494505495,0.3980582524,0.53125,0.6 -V2nvyZB-JNM.004.mp4,0.5327102804,0.7362637363,0.572815534,0.4270833333,0.6444444444 -xerGtxpxW6Q.003.mp4,0.6448598131,0.4725274725,0.427184466,0.6145833333,0.7111111111 -BOOMkDl8JwA.005.mp4,0.5794392523,0.6373626374,0.3786407767,0.375,0.4777777778 -HH03EXo0TB0.004.mp4,0.4672897196,0.6923076923,0.4174757282,0.6145833333,0.5666666667 -2kqPuht5jTg.002.mp4,0.7663551402,0.8131868132,0.7281553398,0.7604166667,0.6666666667 -7tlMys6MZ34.004.mp4,0.3551401869,0.3846153846,0.4368932039,0.4375,0.4888888889 -jgyDXrhO3n4.000.mp4,0.2429906542,0.3406593407,0.2330097087,0.3854166667,0.3222222222 -7tlMys6MZ34.005.mp4,0.3271028037,0.5274725275,0.5242718447,0.4270833333,0.6222222222 -jSw-grsJCnE.003.mp4,0.8504672897,0.8131868132,0.6893203883,0.8020833333,1 -2TXrDZgbDHE.005.mp4,0.1028037383,0.1978021978,0.1747572816,0.2395833333,0.2555555556 -txU8yE9d-4k.005.mp4,0.1401869159,0.1758241758,0.1844660194,0.2916666667,0.2222222222 -EjhDyc8Oc6k.001.mp4,0.6168224299,0.5494505495,0.640776699,0.625,0.6444444444 -7LHmNEH65Pk.005.mp4,0.4299065421,0.4175824176,0.6796116505,0.5,0.5333333333 -dRYEzqUa_Rc.000.mp4,0.2990654206,0.3296703297,0.2233009709,0.2708333333,0.3666666667 -w7wPDiQkiA4.004.mp4,0.5514018692,0.5384615385,0.6504854369,0.5729166667,0.6 -LtBYojIGYEc.000.mp4,0.5140186916,0.6593406593,0.6601941748,0.6979166667,0.6 -k2buv6xZ4_o.004.mp4,0.5420560748,0.6263736264,0.6990291262,0.5625,0.5333333333 -YyHOKFYDZ5Y.002.mp4,0.3364485981,0.2527472527,0.2815533981,0.3541666667,0.3888888889 -fsaslN7xV-w.004.mp4,0.4112149533,0.6813186813,0.3689320388,0.53125,0.5888888889 -w989xx44UQI.000.mp4,0.5981308411,0.5274725275,0.5145631068,0.6354166667,0.6555555556 -RgZTZIf8K8g.000.mp4,0.4672897196,0.7802197802,0.5631067961,0.5416666667,0.4555555556 -mkJjaOADfj4.003.mp4,0.6542056075,0.6483516484,0.7475728155,0.8125,0.7666666667 -f39E4ct09Cc.005.mp4,0.6168224299,0.6153846154,0.6796116505,0.7083333333,0.8222222222 -iGlLSkRAsJc.003.mp4,0.6728971963,0.4285714286,0.6601941748,0.6041666667,0.6777777778 -k99PI3FGEj0.000.mp4,0.5514018692,0.3736263736,0.3689320388,0.375,0.5333333333 -sBHv1jYmZQE.004.mp4,0.523364486,0.5824175824,0.4368932039,0.2916666667,0.4777777778 -w989xx44UQI.001.mp4,0.7289719626,0.6593406593,0.5825242718,0.78125,0.7666666667 -b39BQbVhOAg.004.mp4,0.476635514,0.6153846154,0.3689320388,0.46875,0.7444444444 -4zkY1SG-7xc.003.mp4,0.2429906542,0.5054945055,0.3689320388,0.3229166667,0.4111111111 -TwWDFpN3occ.002.mp4,0.4579439252,0.6153846154,0.3398058252,0.4583333333,0.5555555556 -f0LnGz5Z6kA.002.mp4,0.5981308411,0.3846153846,0.5048543689,0.6145833333,0.6888888889 --zNyDPzId4E.001.mp4,0.2897196262,0.4615384615,0.2912621359,0.4270833333,0.5222222222 -fkDqn2muw-A.000.mp4,0.5046728972,0.5934065934,0.6116504854,0.7083333333,0.7111111111 -mpXOSY5dW7c.004.mp4,0.4859813084,0.6593406593,0.5533980583,0.5520833333,0.6222222222 -I01_ubtktEQ.004.mp4,0.4953271028,0.6593406593,0.4951456311,0.3854166667,0.5555555556 -shEsu57CYnA.002.mp4,0.6542056075,0.5824175824,0.4660194175,0.7083333333,0.6333333333 --Gl98Jn45Fs.001.mp4,0.6542056075,0.6153846154,0.640776699,0.5729166667,0.6666666667 -GWOtluILlk4.002.mp4,0.5887850467,0.7142857143,0.5436893204,0.6145833333,0.5888888889 -xZ9iwqHw7GY.002.mp4,0.4859813084,0.4175824176,0.4757281553,0.4583333333,0.4888888889 -VDcYF-YQuWw.000.mp4,0.5327102804,0.5274725275,0.3786407767,0.6145833333,0.6333333333 -KsToJAKi7xQ.000.mp4,0.3177570093,0.4725274725,0.5339805825,0.3229166667,0.4444444444 -nOFHZ_s7Et4.001.mp4,0.6542056075,0.5494505495,0.5339805825,0.7291666667,0.6888888889 -ABWFQuPG1LA.005.mp4,0.6261682243,0.6263736264,0.4951456311,0.4895833333,0.6888888889 -9RfE2-aTvaM.000.mp4,0.6074766355,0.6483516484,0.6601941748,0.6875,0.5777777778 -B4ducm9sydg.005.mp4,0.4579439252,0.5494505495,0.6019417476,0.5,0.5888888889 -USO-o9dHJ3U.004.mp4,0.4299065421,0.5054945055,0.427184466,0.4479166667,0.4888888889 -ABWFQuPG1LA.004.mp4,0.4485981308,0.4505494505,0.4951456311,0.4895833333,0.6777777778 -f1xAVtagIks.000.mp4,0.4392523364,0.5494505495,0.6116504854,0.5416666667,0.6666666667 -Lz3hYPF6aIM.004.mp4,0.2897196262,0.2857142857,0.4368932039,0.3645833333,0.5444444444 -4a6-tNo-NDM.000.mp4,0.3177570093,0.5494505495,0.4854368932,0.46875,0.4888888889 -SkNO4x-LSgE.004.mp4,0.3457943925,0.5714285714,0.427184466,0.5,0.5333333333 -RMA5HIyEsXc.000.mp4,0.3364485981,0.6703296703,0.5922330097,0.5104166667,0.4555555556 -Jh7Wk5fYeMk.002.mp4,0.4953271028,0.4615384615,0.5533980583,0.4791666667,0.5444444444 -jxt1W2WRNHQ.004.mp4,0.3551401869,0.5054945055,0.7184466019,0.5625,0.5222222222 -W4tz3plvvKI.003.mp4,0.3925233645,0.6043956044,0.640776699,0.4166666667,0.5333333333 -8OGiv7FetSQ.004.mp4,0.5420560748,0.6483516484,0.4660194175,0.5520833333,0.6666666667 -AR3UwbmgKuQ.003.mp4,0.3925233645,0.4615384615,0.3203883495,0.5208333333,0.4111111111 -AFtQfwBA_gI.000.mp4,0.6168224299,0.8461538462,0.3883495146,0.5625,0.5888888889 -JIYZTruMpiI.003.mp4,0.6355140187,0.6153846154,0.8834951456,0.6875,0.6777777778 -Bije9nsMl7M.003.mp4,0.4018691589,0.6593406593,0.572815534,0.5625,0.6111111111 -fbjDmltKVOM.000.mp4,0.5700934579,0.6263736264,0.7281553398,0.5729166667,0.6222222222 -CqQavmWSLrI.000.mp4,0.5140186916,0.6483516484,0.4854368932,0.5104166667,0.5666666667 -PReOtefm17s.002.mp4,0.523364486,0.6373626374,0.5533980583,0.6875,0.5777777778 -dkhnv1EBvKI.003.mp4,0.7009345794,0.6813186813,0.6796116505,0.65625,0.5555555556 -5IqtX-uq28E.002.mp4,0.3925233645,0.6043956044,0.6213592233,0.6145833333,0.5222222222 -GQczMGrVgbc.002.mp4,0.3457943925,0.5934065934,0.6310679612,0.3229166667,0.4111111111 -Q2AI4XpApFs.000.mp4,0.5607476636,0.6043956044,0.6213592233,0.6145833333,0.5444444444 -MajYvFTkKnk.002.mp4,0.4953271028,0.6263736264,0.7572815534,0.7395833333,0.7777777778 -glgfB3vFewc.003.mp4,0.523364486,0.6813186813,0.8446601942,0.65625,0.5444444444 -VbiUhNAdzus.002.mp4,0.4112149533,0.4065934066,0.4757281553,0.6979166667,0.6555555556 -vCY4uvfrWXA.003.mp4,0.6635514019,0.7692307692,0.5145631068,0.5625,0.7222222222 -VjYqagJ4xt8.001.mp4,0.7570093458,0.7472527473,0.9029126214,0.7916666667,0.7555555556 -CQMH9Qguuao.000.mp4,0.4205607477,0.6593406593,0.5436893204,0.625,0.6555555556 -kFak4VnRnRM.004.mp4,0.5700934579,0.4175824176,0.4951456311,0.4479166667,0.4555555556 -yuE25dFTn2o.001.mp4,0.261682243,0.4285714286,0.3980582524,0.3020833333,0.6555555556 -VJuVsi6G96s.000.mp4,0.4672897196,0.6153846154,0.4466019417,0.5,0.6222222222 -Agg7z10B_iY.000.mp4,0.5887850467,0.6593406593,0.6019417476,0.65625,0.6666666667 -bcx6xr9Ja-8.001.mp4,0.4579439252,0.7692307692,0.5145631068,0.59375,0.4111111111 -fv5lLeyRdd4.001.mp4,0.4953271028,0.6043956044,0.640776699,0.4791666667,0.6111111111 -fTpemcfElxI.005.mp4,0.3271028037,0.4175824176,0.4077669903,0.5208333333,0.4444444444 -pljK0DEusA0.003.mp4,0.4112149533,0.3956043956,0.4563106796,0.5729166667,0.5888888889 -8OGiv7FetSQ.000.mp4,0.5887850467,0.5824175824,0.5339805825,0.6875,0.7555555556 -kmV6Qtv0amA.005.mp4,0.6448598131,0.4505494505,0.4174757282,0.5729166667,0.7111111111 -rqfvIjzegpI.000.mp4,0.8411214953,0.6923076923,0.854368932,0.7916666667,0.7 -Jv2lyDcOmEM.004.mp4,0.1401869159,0.2527472527,0.2233009709,0.1458333333,0.2888888889 -MrYEK0nvnAo.003.mp4,0.5046728972,0.6263736264,0.6796116505,0.5625,0.6777777778 -s-jZlMKQGwc.002.mp4,0.3738317757,0.6043956044,0.4174757282,0.5208333333,0.5444444444 -EffEoI1l1zE.001.mp4,0.4299065421,0.7252747253,0.2718446602,0.4479166667,0.6111111111 -o2wtRccAgjE.003.mp4,0.3925233645,0.7032967033,0.6019417476,0.4895833333,0.5555555556 -S1AEj1kO5dc.004.mp4,0.3551401869,0.3516483516,0.4368932039,0.4166666667,0.5 -OhHg1lyxe4I.000.mp4,0.1495327103,0.3516483516,0.2330097087,0.2291666667,0.3 -TNtcyfM9jak.000.mp4,0.4205607477,0.3516483516,0.3300970874,0.3229166667,0.5888888889 -Gk94xrcmFts.000.mp4,0.1401869159,0.1428571429,0.1844660194,0.1458333333,0.2888888889 -mkJjaOADfj4.002.mp4,0.785046729,0.8131868132,0.6990291262,0.8125,0.8333333333 -cWZudzeJVXg.000.mp4,0.2523364486,0.3516483516,0.2912621359,0.1979166667,0.3 -ixPqs7L8oAE.005.mp4,0.6448598131,0.7032967033,0.5922330097,0.59375,0.7222222222 -t0AupkXkkZw.005.mp4,0.6074766355,0.6043956044,0.6504854369,0.6770833333,0.7444444444 -HUxtuDE-YNE.004.mp4,0.7196261682,0.5384615385,0.3009708738,0.6875,0.7 -vIW7gDmhYMk.004.mp4,0.4299065421,0.6813186813,0.5436893204,0.5625,0.6333333333 -rvB9DYAKHpk.000.mp4,0.5327102804,0.5274725275,0.5631067961,0.5,0.6777777778 -Wx_oe0SxD9w.003.mp4,0.4672897196,0.5934065934,0.6213592233,0.5416666667,0.4777777778 -hmy9XEvT2v4.000.mp4,0.476635514,0.5714285714,0.5825242718,0.53125,0.5666666667 -9CPKW0sqR3E.003.mp4,0.4018691589,0.5384615385,0.6893203883,0.5416666667,0.4888888889 -t30ERiF6b50.003.mp4,0.4672897196,0.5604395604,0.427184466,0.6666666667,0.5444444444 -O3_j0d7mq7k.001.mp4,0.3644859813,0.4285714286,0.3689320388,0.4270833333,0.3555555556 -N5nIQZMW_ig.003.mp4,0.5327102804,0.6923076923,0.4660194175,0.65625,0.6777777778 -JIYZTruMpiI.001.mp4,0.4859813084,0.5934065934,0.7184466019,0.5208333333,0.6222222222 -1yIGI42lzak.005.mp4,0.3551401869,0.4945054945,0.3786407767,0.2604166667,0.4888888889 -LKvxVEI8uVA.004.mp4,0.4859813084,0.3736263736,0.4951456311,0.3854166667,0.5888888889 -d4cPiUXpGbc.000.mp4,0.4392523364,0.5604395604,0.4660194175,0.4583333333,0.5888888889 -2ceHmUmguzk.001.mp4,0.4018691589,0.3736263736,0.5339805825,0.46875,0.6 -DvmzcQI5cnM.001.mp4,0.4672897196,0.5714285714,0.5242718447,0.5520833333,0.5777777778 -K3-YXXLR0Ho.000.mp4,0.3364485981,0.5714285714,0.640776699,0.3645833333,0.4333333333 -t6-ljEWQjW8.005.mp4,0.2990654206,0.4395604396,0.3689320388,0.46875,0.6 -YBsKLg3GMrE.005.mp4,0.3644859813,0.3296703297,0.4466019417,0.46875,0.4333333333 -fwYZP8qOtC0.005.mp4,0.6822429907,0.6153846154,0.5825242718,0.6875,0.8666666667 -eRRCer7epnA.002.mp4,0.6822429907,0.7032967033,0.8349514563,0.6145833333,0.8222222222 -wr4dP9MuHME.004.mp4,0.5140186916,0.7252747253,0.5339805825,0.5416666667,0.7333333333 -bMY2DaFFwzU.001.mp4,0.0560747664,0.2857142857,0.2718446602,0.1875,0.2222222222 -JFKZEGDhcRs.004.mp4,0.4859813084,0.6923076923,0.5145631068,0.5104166667,0.5666666667 -ask-ZFRztf8.002.mp4,0.4485981308,0.4395604396,0.5436893204,0.3854166667,0.3666666667 --OXMbG7ZwRk.000.mp4,0.523364486,0.6153846154,0.7281553398,0.5520833333,0.7444444444 -F0VbEO_0Ybc.000.mp4,0.3925233645,0.5604395604,0.5339805825,0.5625,0.4555555556 -nIwFocnmRFY.003.mp4,0.4299065421,0.5934065934,0.3980582524,0.4583333333,0.5444444444 -VugKq4gOi50.004.mp4,0.6728971963,0.8351648352,0.6601941748,0.71875,0.6222222222 -V1I40vVRk78.002.mp4,0.4299065421,0.5824175824,0.4660194175,0.5416666667,0.6444444444 -GHetseJP358.004.mp4,0.6728971963,0.7032967033,0.4951456311,0.6875,0.8111111111 -hOXvRgxjfik.000.mp4,0.2523364486,0.2747252747,0.3300970874,0.3854166667,0.6333333333 -pHCPbKprJGY.001.mp4,0.6074766355,0.6923076923,0.6990291262,0.5729166667,0.6777777778 -8RObWRnyuG0.001.mp4,0.4392523364,0.5054945055,0.572815534,0.6354166667,0.6444444444 -shEsu57CYnA.005.mp4,0.5327102804,0.4945054945,0.5922330097,0.5416666667,0.5666666667 -8gvBbE6iZNo.005.mp4,0.4018691589,0.6153846154,0.9514563107,0.6666666667,0.5333333333 -rBxWZzkEncE.002.mp4,0.5887850467,0.5714285714,0.4660194175,0.5520833333,0.7444444444 -cgGCyBMdGrA.001.mp4,0.2710280374,0.4835164835,0.427184466,0.4479166667,0.4333333333 -J0JrzUmZGcA.002.mp4,0.3831775701,0.4835164835,0.3495145631,0.4166666667,0.3777777778 -2oEUp9sGRGk.001.mp4,0.4672897196,0.6923076923,0.8252427184,0.6354166667,0.5444444444 -OmXuhT4yJpo.000.mp4,0.8130841121,0.8021978022,0.6601941748,0.59375,0.7333333333 -oC-qxnrmJws.002.mp4,0.7757009346,0.6263736264,0.6893203883,0.6354166667,0.7666666667 -ZqbJIM7rmO8.001.mp4,0.5794392523,0.6703296703,0.5631067961,0.7083333333,0.6222222222 -V1I40vVRk78.003.mp4,0.6168224299,0.5714285714,0.5339805825,0.6145833333,0.5444444444 -VtYPH6UsVnU.000.mp4,0.3457943925,0.5274725275,0.6601941748,0.5625,0.5222222222 -BlvmREgt2C0.005.mp4,0.6822429907,0.6703296703,0.5242718447,0.5625,0.5222222222 -isqmQc9AfBc.003.mp4,0.2523364486,0.5824175824,0.6699029126,0.5,0.5111111111 -usG6pVxbQkw.000.mp4,0.4112149533,0.5714285714,0.5436893204,0.5520833333,0.5666666667 -3Vr5-zedeWk.005.mp4,0.2897196262,0.3956043956,0.4660194175,0.3958333333,0.3777777778 -FwjoTGcsFNg.000.mp4,0.6542056075,0.6263736264,0.5048543689,0.6354166667,0.7 -0G9vplL8ae8.003.mp4,0.4018691589,0.5164835165,0.4077669903,0.46875,0.5777777778 -QlkTEWrSCBs.000.mp4,0.2710280374,0.3956043956,0.359223301,0.46875,0.4777777778 -KYvbRwTCtaU.005.mp4,0.5607476636,0.6153846154,0.3980582524,0.46875,0.6111111111 -RDOngWykAQU.000.mp4,0.6355140187,0.7362637363,0.7087378641,0.6458333333,0.7333333333 -mflgXFsGU9w.003.mp4,0.4579439252,0.6153846154,0.5825242718,0.4583333333,0.5888888889 -LsqAIHhFpLE.002.mp4,0.5700934579,0.5494505495,0.4854368932,0.4895833333,0.5444444444 -mKsGK9nCTxw.001.mp4,0.4579439252,0.4615384615,0.5339805825,0.4791666667,0.4888888889 -B3zFJhrmqwg.001.mp4,0.0373831776,0.2527472527,0.0776699029,0.125,0.1888888889 -mEQBB6XsJFk.001.mp4,0.6635514019,0.6593406593,0.5825242718,0.625,0.7888888889 -yBlPsPBRv5E.001.mp4,0.4299065421,0.4835164835,0.3689320388,0.5208333333,0.4111111111 -DzqJmiQjsZ4.004.mp4,0.6168224299,0.6153846154,0.4174757282,0.5625,0.5111111111 -OgPC4wnLJR0.001.mp4,0.1682242991,0.1098901099,0.213592233,0.1354166667,0.2666666667 -Pr7CHWFkWew.001.mp4,0.2897196262,0.4285714286,0.359223301,0.3854166667,0.4666666667 -cQRFb-xa4Vc.002.mp4,0.261682243,0.4285714286,0.5436893204,0.3229166667,0.3111111111 -aMPe0uSKqF4.005.mp4,0.3271028037,0.2967032967,0.3398058252,0.34375,0.6444444444 -NDBCrVvp0Vg.003.mp4,0.523364486,0.4285714286,0.5145631068,0.53125,0.5555555556 -qVcw5-mm31s.000.mp4,0.4579439252,0.5494505495,0.5048543689,0.46875,0.6333333333 -ZX3okNzASCs.000.mp4,0.6261682243,0.6593406593,0.7669902913,0.6354166667,0.8333333333 -mY1ZTvNVkSA.005.mp4,0.4579439252,0.5274725275,0.4563106796,0.5416666667,0.6333333333 -On2c_8sU8Vw.001.mp4,0.5514018692,0.7252747253,0.640776699,0.71875,0.6444444444 -QiR6yJbFCfM.005.mp4,0.3644859813,0.6593406593,0.4660194175,0.4791666667,0.5666666667 -nDcl8Jo2tYg.002.mp4,0.5327102804,0.7142857143,0.8058252427,0.7291666667,0.8555555556 -B2q0gbLVeck.000.mp4,0.4299065421,0.5054945055,0.5825242718,0.4583333333,0.2666666667 -m04e9ylCoK0.000.mp4,0.3551401869,0.2087912088,0.2718446602,0.3020833333,0.4222222222 -c7tczvW3_dQ.005.mp4,0.3644859813,0.6593406593,0.5048543689,0.6145833333,0.5111111111 -tS6bRcIIjDc.000.mp4,0.2523364486,0.4725274725,0.4466019417,0.3541666667,0.3888888889 -ABWFQuPG1LA.003.mp4,0.738317757,0.5934065934,0.5048543689,0.625,0.7 -IQdz0Pd-L2Y.004.mp4,0.2336448598,0.4175824176,0.2621359223,0.2395833333,0.4222222222 -0iXXdsO95O0.000.mp4,0.5607476636,0.7472527473,0.6116504854,0.5416666667,0.5333333333 -zxuPCshTSOs.005.mp4,0.476635514,0.6373626374,0.7378640777,0.5625,0.6777777778 -tutTFKP_fdg.000.mp4,0.3177570093,0.4285714286,0.3495145631,0.40625,0.5666666667 -KhMsmtSC5Lg.001.mp4,0.6168224299,0.5164835165,0.6893203883,0.53125,0.7222222222 -T1_6sVNHG70.000.mp4,0.3738317757,0.5934065934,0.3106796117,0.4791666667,0.5666666667 -mEQBB6XsJFk.005.mp4,0.6542056075,0.6483516484,0.6310679612,0.6875,0.7888888889 -KfurkMyjD-c.003.mp4,0.5327102804,0.6703296703,0.4951456311,0.71875,0.6222222222 -shEsu57CYnA.004.mp4,0.6822429907,0.6483516484,0.5825242718,0.7395833333,0.6777777778 -PpJ4S8ZM8mQ.000.mp4,0.6168224299,0.5714285714,0.5048543689,0.6145833333,0.8 -gsleSGEZHAs.001.mp4,0.476635514,0.7912087912,0.6504854369,0.6666666667,0.6444444444 -Pc-oQQwkIv8.001.mp4,0.0841121495,0.2637362637,0.1844660194,0.1354166667,0.2777777778 -495hLlCEW64.001.mp4,0.5607476636,0.4945054945,0.6213592233,0.5520833333,0.6777777778 -6WSr4IW6cNI.000.mp4,0.5420560748,0.6923076923,0.5825242718,0.6041666667,0.6333333333 -9cHxDnk6SUs.001.mp4,0.4859813084,0.4615384615,0.359223301,0.5833333333,0.5444444444 -4CiR99jTzso.000.mp4,0.4299065421,0.5274725275,0.1747572816,0.25,0.4888888889 -OugdInDyt9s.003.mp4,0.6261682243,0.6593406593,0.5825242718,0.53125,0.7 -Xfmu-7JuDGg.002.mp4,0.2710280374,0.5714285714,0.6019417476,0.5,0.4666666667 -siEnTktB4lQ.001.mp4,0.2990654206,0.5164835165,0.3883495146,0.4375,0.7 -1mHjMNZZvFo.005.mp4,0.7196261682,0.8241758242,0.8155339806,0.84375,0.7111111111 -1q-N_zbsAg0.000.mp4,0.4392523364,0.5274725275,0.3883495146,0.4166666667,0.4888888889 -D_FGBb-1B1o.003.mp4,0.5140186916,0.6263736264,0.6310679612,0.6666666667,0.7444444444 -Arsrkqma4i4.001.mp4,0.523364486,0.5604395604,0.3495145631,0.5208333333,0.5777777778 -9o10YrQykMk.003.mp4,0.6168224299,0.4725274725,0.6990291262,0.6041666667,0.7333333333 -WOyix7rTgwI.001.mp4,0.3831775701,0.3076923077,0.3203883495,0.2083333333,0.3888888889 -_G3kw9HwCqY.000.mp4,0.5514018692,0.4285714286,0.4466019417,0.4479166667,0.5333333333 -Kmrd1MsZKmQ.003.mp4,0.5514018692,0.5824175824,0.4951456311,0.2916666667,0.4333333333 -XQZ5M9oLkXw.005.mp4,0.4953271028,0.5714285714,0.7184466019,0.5625,0.4 -mxLRr3YqgMU.004.mp4,0.1775700935,0.4395604396,0.6893203883,0.4270833333,0.3 -ODDGS0hTcUc.004.mp4,0.4392523364,0.5494505495,0.3398058252,0.5416666667,0.5555555556 -UjqpaK1HlKI.004.mp4,0.5046728972,0.5824175824,0.5533980583,0.6458333333,0.5777777778 -_Q4wOgixh7E.000.mp4,0.046728972,0.2857142857,0.2233009709,0.1979166667,0.5222222222 -f9GeYKAXgAQ.000.mp4,0.3271028037,0.5494505495,0.6796116505,0.4791666667,0.4555555556 -y2UF49ddapI.001.mp4,0.3551401869,0.6483516484,0.4854368932,0.46875,0.5555555556 -btcCanysQsw.003.mp4,0.3644859813,0.5494505495,0.4174757282,0.4375,0.3222222222 -fipvPdFbKN4.004.mp4,0.3831775701,0.4505494505,0.3398058252,0.4375,0.5777777778 -B1efbNxLPe8.005.mp4,0.3364485981,0.4175824176,0.3398058252,0.5208333333,0.3888888889 -LP5N5uPfTdA.004.mp4,0.4859813084,0.6263736264,0.5145631068,0.5104166667,0.6555555556 -GMwEmLo-gfc.004.mp4,0.6448598131,0.8131868132,0.6116504854,0.7604166667,0.7888888889 -KJ643kfjqLY.003.mp4,0.5514018692,0.6593406593,0.4951456311,0.5729166667,0.6666666667 -hsXn0N8bAYs.005.mp4,0.3738317757,0.5054945055,0.3689320388,0.25,0.4666666667 -p5v75vAZ7F0.005.mp4,0.5327102804,0.5384615385,0.3980582524,0.4270833333,0.5333333333 -EknEAPhAjdA.002.mp4,0.1869158879,0.2857142857,0.2427184466,0.25,0.2888888889 -G2D3qU6R_YA.004.mp4,0.4859813084,0.6373626374,0.6893203883,0.5729166667,0.7111111111 -I01_ubtktEQ.005.mp4,0.476635514,0.5384615385,0.427184466,0.28125,0.3666666667 -AP0aklGHino.000.mp4,0.2990654206,0.4945054945,0.5048543689,0.5104166667,0.3666666667 -AJIphVRpYrg.005.mp4,0.5887850467,0.6483516484,0.5145631068,0.5520833333,0.7111111111 -jQRFHBVs0dA.004.mp4,0.4299065421,0.6483516484,0.4757281553,0.6666666667,0.6 -cRDYrvxRJ6U.001.mp4,0.7009345794,0.6373626374,0.8932038835,0.78125,0.7777777778 -y1e8xPAaL9k.002.mp4,0.4392523364,0.4835164835,0.5436893204,0.4270833333,0.4666666667 -LRczShwIVbM.004.mp4,0.4112149533,0.5164835165,0.5533980583,0.5208333333,0.5666666667 -kL-CeaXG9jM.004.mp4,0.3925233645,0.6373626374,0.5048543689,0.46875,0.5222222222 -oANKg9_grdA.004.mp4,0.4299065421,0.6263736264,0.5825242718,0.5833333333,0.5888888889 -6wHQsN5g2RM.000.mp4,0.4579439252,0.5054945055,0.3980582524,0.4895833333,0.3777777778 -Gs-AdRcYSPo.004.mp4,0.5514018692,0.6593406593,0.6601941748,0.6354166667,0.7111111111 -3gKpBq-1yG4.000.mp4,0.3831775701,0.5384615385,0.359223301,0.3854166667,0.3111111111 -RhFPotjd0hM.003.mp4,0.4579439252,0.6483516484,0.5048543689,0.375,0.5333333333 -MvWDky9ZaWU.000.mp4,0.5981308411,0.9230769231,0.8640776699,0.84375,0.8555555556 -vMtF0akNUK4.001.mp4,0.4672897196,0.5274725275,0.6116504854,0.5520833333,0.4666666667 -GUxm9AWVpOI.003.mp4,0.5140186916,0.4945054945,0.4660194175,0.3333333333,0.5555555556 -8XBprf4NyOg.005.mp4,0.214953271,0.2087912088,0.3495145631,0.25,0.3111111111 -EMqrrHHbP3s.002.mp4,0.5981308411,0.5824175824,0.5145631068,0.5,0.6555555556 -j3jdT1V-DeI.000.mp4,0.1401869159,0.2307692308,0.2621359223,0.2083333333,0.3222222222 -t9wFHk9TM-U.003.mp4,0.2429906542,0.4945054945,0.640776699,0.2395833333,0.3888888889 -h-jMFLm6U_Y.000.mp4,0.5981308411,0.6483516484,0.7184466019,0.8125,0.7111111111 -4bDOetaLvZs.001.mp4,0.1401869159,0.2417582418,0.2038834951,0.1666666667,0.1888888889 -DhqfB9chceo.003.mp4,0.4579439252,0.4725274725,0.3106796117,0.5104166667,0.5888888889 -7kO7jYYUVWg.004.mp4,0.7009345794,0.5054945055,0.4951456311,0.5729166667,0.8111111111 -HUJt0I1UKzo.000.mp4,0.6168224299,0.7472527473,0.6116504854,0.6041666667,0.6777777778 -Tad9Q9OFjJw.003.mp4,0.3738317757,0.6043956044,0.5436893204,0.59375,0.7222222222 -r9TaaVTo8Y8.002.mp4,0.5140186916,0.4725274725,0.5242718447,0.4270833333,0.4888888889 -QMRAbwZCTfI.005.mp4,0.3271028037,0.3846153846,0.3689320388,0.375,0.3222222222 -PJxgOFaaUZM.004.mp4,0.6355140187,0.6483516484,0.6601941748,0.6145833333,0.7111111111 -Cl7vQ9QR0es.004.mp4,0.4112149533,0.4175824176,0.5145631068,0.40625,0.5333333333 -Dq7Uep06KOQ.005.mp4,0.3177570093,0.1758241758,0.2815533981,0.1875,0.5333333333 -KHQJhOzdrYo.003.mp4,0.3457943925,0.5824175824,0.5339805825,0.4270833333,0.5111111111 -_mtiuHyOFXg.005.mp4,0.3177570093,0.4615384615,0.640776699,0.4895833333,0.5111111111 -Gvdh94z-SoM.002.mp4,0.3738317757,0.6153846154,0.4951456311,0.3854166667,0.5 -dNXqs5HNijI.001.mp4,0.6168224299,0.7252747253,0.6310679612,0.6458333333,0.7444444444 -1-GgVRmAEoo.002.mp4,0.6822429907,0.7582417582,0.6893203883,0.7291666667,0.7111111111 -JZNMxa3OKHY.005.mp4,0.5046728972,0.5714285714,0.4757281553,0.4583333333,0.6111111111 -lnawWqnGpMc.000.mp4,0.5794392523,0.4835164835,0.4757281553,0.4479166667,0.5555555556 -lNY0BdE4NqY.000.mp4,0.3925233645,0.3516483516,0.4854368932,0.375,0.6333333333 -NDC375coN1o.002.mp4,0.1495327103,0.2747252747,0.1165048544,0.09375,0.4111111111 -BZ3FEf_KKso.000.mp4,0.308411215,0.5274725275,0.3106796117,0.4583333333,0.5444444444 -SUI6WNryjqw.003.mp4,0.6074766355,0.4285714286,0.6019417476,0.5625,0.7777777778 -muLgzV1gGao.001.mp4,0.4859813084,0.5494505495,0.5533980583,0.46875,0.6111111111 -0_xOGmydDN0.004.mp4,0.4859813084,0.6153846154,0.5242718447,0.5729166667,0.6555555556 -J28DwJsK8Do.003.mp4,0.6822429907,0.6483516484,0.6310679612,0.7083333333,0.6555555556 -EyX8QI5nPTY.001.mp4,0.7476635514,0.6373626374,0.7184466019,0.8125,0.7555555556 -sntohi33U5s.004.mp4,0.6822429907,0.6373626374,0.7475728155,0.6145833333,0.7333333333 -FZYN9ZFngFM.001.mp4,0.4018691589,0.5604395604,0.5922330097,0.46875,0.5 -RWfY3Xk0XPQ.003.mp4,0.2803738318,0.5604395604,0.5339805825,0.5,0.5777777778 -S0QIXcQGG-g.001.mp4,0.7570093458,0.7032967033,0.6699029126,0.71875,0.6444444444 -sBw7VHQ74SY.005.mp4,0.523364486,0.3186813187,0.4951456311,0.6041666667,0.6888888889 -b8GPFr11adA.001.mp4,0.6074766355,0.6263736264,0.5242718447,0.5625,0.5777777778 -kFak4VnRnRM.001.mp4,0.691588785,0.6483516484,0.4563106796,0.59375,0.6555555556 -Cl7vQ9QR0es.000.mp4,0.4672897196,0.5824175824,0.359223301,0.5833333333,0.3888888889 -X7S71Som15M.001.mp4,0.523364486,0.4945054945,0.4563106796,0.6041666667,0.5777777778 -HUJt0I1UKzo.003.mp4,0.5887850467,0.5824175824,0.7378640777,0.5729166667,0.5666666667 -AotbiNsU85A.001.mp4,0.3644859813,0.3076923077,0.427184466,0.3333333333,0.4444444444 -1RMdiCbNNh4.003.mp4,0.1869158879,0,0.213592233,0.2708333333,0.5333333333 -Lq4uvcHNiy8.002.mp4,0.476635514,0.5164835165,0.4660194175,0.3854166667,0.4777777778 -ZNJFmNiWC4I.000.mp4,0.691588785,0.7032967033,0.7475728155,0.7395833333,0.7666666667 -VjYqagJ4xt8.004.mp4,0.6822429907,0.6373626374,0.7475728155,0.7604166667,0.7888888889 -huIQlWsIEvY.004.mp4,0.5140186916,0.6043956044,0.5825242718,0.6666666667,0.6666666667 -j-XUQ3Rmq6w.001.mp4,0.4953271028,0.5714285714,0.6116504854,0.6145833333,0.6444444444 -PKtzsEqLGx4.001.mp4,0.6261682243,0.4395604396,0.4660194175,0.4270833333,0.6 -E6rptSS3kP4.000.mp4,0.8691588785,0.8351648352,0.6990291262,0.84375,0.9444444444 -bJktioZ5Yxk.002.mp4,0.5046728972,0.5604395604,0.6893203883,0.5729166667,0.5777777778 -84Lz5a9yRZg.004.mp4,0.6168224299,0.6813186813,0.8932038835,0.6666666667,0.6777777778 -NFAlff6GUpA.000.mp4,0.4485981308,0.6043956044,0.5533980583,0.5208333333,0.4222222222 -lyZZSU1ziCQ.002.mp4,0.4485981308,0.5164835165,0.6116504854,0.3958333333,0.3444444444 -4lj66h4CXI8.003.mp4,0.7476635514,0.6923076923,0.7087378641,0.6979166667,0.7777777778 -OWZ-qVZG14A.004.mp4,0.3551401869,0.6483516484,0.4951456311,0.4479166667,0.4888888889 -be0DQawtVkE.003.mp4,0.476635514,0.6703296703,0.572815534,0.6458333333,0.7111111111 -XhgDsQlEnuU.002.mp4,0.5700934579,0.7032967033,0.7087378641,0.65625,0.8111111111 -F9mZ6De_6Ko.005.mp4,0.5887850467,0.5274725275,0.6213592233,0.625,0.6888888889 -elSd0IyX6ys.002.mp4,0.6448598131,0.4725274725,0.5339805825,0.4479166667,0.6333333333 -j3jdT1V-DeI.001.mp4,0.2990654206,0.3736263736,0.2427184466,0.2604166667,0.3777777778 -Nv0-x4K9YFI.004.mp4,0.1962616822,0.4505494505,0.3398058252,0.3958333333,0.3333333333 -si_gZCrLa4A.002.mp4,0.2990654206,0.4725274725,0.2912621359,0.34375,0.4888888889 -cFGjJg-2zOk.001.mp4,0.4672897196,0.5274725275,0.5631067961,0.5520833333,0.5666666667 -m2uxFfpb5xU.005.mp4,0.4392523364,0.4615384615,0.7378640777,0.5208333333,0.5666666667 -4lIbWq27O84.001.mp4,0.3644859813,0.5054945055,0.3689320388,0.4375,0.5444444444 -WuHLxhCSnGs.001.mp4,0.4205607477,0.5934065934,0.5339805825,0.4791666667,0.4444444444 -tcmYlyeqwuI.004.mp4,0.4579439252,0.6593406593,0.4854368932,0.4479166667,0.5 -pwvQaSwgso8.002.mp4,0.3831775701,0.4285714286,0.4368932039,0.4375,0.5333333333 -AvuGsnkWjt8.001.mp4,0.4485981308,0.5384615385,0.359223301,0.6770833333,0.5777777778 -U2lT_RogJMM.001.mp4,0.5046728972,0.5494505495,0.4563106796,0.40625,0.5111111111 -okdZnQbLnf8.004.mp4,0.4299065421,0.5494505495,0.6019417476,0.4270833333,0.5222222222 -bZAKBS9q0ZI.002.mp4,0.4579439252,0.6483516484,0.4077669903,0.6770833333,0.7 -ax1Fck6zMzk.003.mp4,0.4953271028,0.5824175824,0.5242718447,0.5208333333,0.6555555556 -2x8GZaBY6TM.003.mp4,0.3271028037,0.2087912088,0.2427184466,0.3229166667,0.4333333333 -86HyqfDcAJM.001.mp4,0.3644859813,0.5384615385,0.5339805825,0.5833333333,0.6444444444 -dRr2JtdzUpU.004.mp4,0.5420560748,0.6263736264,0.572815534,0.5416666667,0.7555555556 -UQeuBvZNusI.003.mp4,0.3925233645,0.4505494505,0.4077669903,0.46875,0.3444444444 -3b9fhd-EDaY.001.mp4,0.6074766355,0.7032967033,0.5145631068,0.6666666667,0.7111111111 -cgT-3CHBmKs.003.mp4,0.2242990654,0.4615384615,0.3106796117,0.3229166667,0.3555555556 -GTmHSF6vNWc.003.mp4,0.4859813084,0.5054945055,0.5631067961,0.6354166667,0.7444444444 -m4-vvEeWP8s.001.mp4,0.5514018692,0.5824175824,0.7669902913,0.6354166667,0.5222222222 -CcVuoHZqp6k.004.mp4,0.6448598131,0.5054945055,0.4757281553,0.6354166667,0.7666666667 -1mODTfLRGdI.001.mp4,0.6168224299,0.2417582418,0.1747572816,0.5416666667,0.4222222222 -ce7t2PgzMGw.000.mp4,0.3271028037,0.5494505495,0.6310679612,0.4375,0.3666666667 -W0Ay5uul8j0.001.mp4,0.3551401869,0.5274725275,0.5145631068,0.34375,0.5444444444 -8aPfoJiDeBY.004.mp4,0.6168224299,0.6703296703,0.8737864078,0.8333333333,0.6444444444 -osqQpQsJNPQ.001.mp4,0.4859813084,0.4725274725,0.6213592233,0.5520833333,0.6444444444 -OZaP2T74bLI.005.mp4,0.738317757,0.5164835165,0.6796116505,0.78125,0.7111111111 -aQVGVhcMBtE.004.mp4,0.5700934579,0.6703296703,0.5339805825,0.625,0.7444444444 -fLRRMLTFGMQ.000.mp4,0.4112149533,0.4285714286,0.5145631068,0.34375,0.4222222222 -dVwDf5N2NRA.002.mp4,0.6168224299,0.6593406593,0.640776699,0.78125,0.6777777778 -12lqQE6oPNE.001.mp4,0.5327102804,0.3626373626,0.427184466,0.5416666667,0.5888888889 -laPGbkC87us.004.mp4,0.5327102804,0.4835164835,0.6601941748,0.5520833333,0.6444444444 -kK4QL7pOrhs.002.mp4,0.6542056075,0.6593406593,0.6601941748,0.75,0.7555555556 -CFk4v2Kd5Ns.005.mp4,0.3738317757,0.6153846154,0.4368932039,0.4375,0.3666666667 -mpXOSY5dW7c.005.mp4,0.3738317757,0.4945054945,0.4563106796,0.46875,0.4444444444 -44rxmXiga90.004.mp4,0.3738317757,0.6593406593,0.5048543689,0.40625,0.6222222222 -U2RemWUyjts.000.mp4,0.2990654206,0.5384615385,0.5145631068,0.5833333333,0.5111111111 -Q0C0OU-j4DA.005.mp4,0.523364486,0.3736263736,0.2912621359,0.4479166667,0.8222222222 -19cplBTXyoY.002.mp4,0.6355140187,0.7472527473,0.4951456311,0.6875,0.9555555556 -h9jIdLBaMEo.002.mp4,0.7476635514,0.6923076923,0.6893203883,0.8020833333,0.9777777778 -cOirMOCpdo8.005.mp4,0.4579439252,0.5054945055,0.6116504854,0.5208333333,0.6222222222 ---Ymqszjv54.003.mp4,0.3925233645,0.5164835165,0.4757281553,0.4270833333,0.4666666667 -3taD1fEPfC8.002.mp4,0.3738317757,0.3406593407,0.4757281553,0.53125,0.4333333333 -lkeXyB-3Gs0.001.mp4,0.2336448598,0.4725274725,0.3300970874,0.3020833333,0.3888888889 -c3SQSM9OIsA.005.mp4,0.5420560748,0.5164835165,0.7475728155,0.5833333333,0.4888888889 -jOTlJwOBSd4.005.mp4,0.3831775701,0.5604395604,0.4951456311,0.4270833333,0.6 -i1cAYtXA2Xs.002.mp4,0.5046728972,0.5274725275,0.6019417476,0.6041666667,0.5 -U9cidDFDTQE.003.mp4,0.308411215,0.4725274725,0.6796116505,0.6041666667,0.4222222222 -hF3yR5rmga8.003.mp4,0.4112149533,0.4395604396,0.5145631068,0.5729166667,0.5777777778 --fqiCqZtgYs.003.mp4,0.2336448598,0.2967032967,0.2233009709,0.3229166667,0.4 -kV7MFI2_ddo.005.mp4,0.2429906542,0.5164835165,0.572815534,0.375,0.4333333333 -1Lv72Si4GnY.001.mp4,0.523364486,0.4395604396,0.1844660194,0.3958333333,0.4666666667 -T4eZ81aJwJI.005.mp4,0.4018691589,0.5494505495,0.4660194175,0.4583333333,0.5 -Jn76eAPxjNA.005.mp4,0.4953271028,0.4835164835,0.4854368932,0.6145833333,0.6555555556 -Jf8lqSpAjZ8.002.mp4,0.5700934579,0.5494505495,0.5145631068,0.6458333333,0.6666666667 -VbiUhNAdzus.000.mp4,0.5514018692,0.4395604396,0.572815534,0.4791666667,0.6333333333 -OckL7z_nBGg.002.mp4,0.738317757,0.6483516484,0.640776699,0.7916666667,0.5444444444 -P63CUj9KnSw.001.mp4,0.3271028037,0.4395604396,0.4466019417,0.3229166667,0.4 -IPjl2LdPMn0.000.mp4,0.4392523364,0.5714285714,0.5436893204,0.625,0.5333333333 -U_QQ8EuuWPg.000.mp4,0.4392523364,0.5824175824,0.3980582524,0.5625,0.4777777778 -wNH5FmWVr-M.001.mp4,0.785046729,0.7032967033,0.7669902913,0.78125,0.8666666667 -NTSMogqhvBg.002.mp4,0.3271028037,0.4615384615,0.3495145631,0.4270833333,0.6888888889 -HP8f3oqJwz0.001.mp4,0.5420560748,0.6923076923,0.5339805825,0.6145833333,0.5222222222 -iiW_nu6JITY.002.mp4,0.3925233645,0.5714285714,0.6213592233,0.5833333333,0.6333333333 -y0UCXXk9tlM.005.mp4,0.6168224299,0.5714285714,0.6019417476,0.8541666667,0.7333333333 -LBKbubsgpE8.003.mp4,0.5607476636,0.6373626374,0.7087378641,0.7395833333,0.8444444444 -EaBCJB8LXdI.002.mp4,0.6261682243,0.5494505495,0.6990291262,0.6666666667,0.5333333333 -7b9DirXrkHo.002.mp4,0.4485981308,0.5274725275,0.427184466,0.53125,0.6333333333 -a5-PJqy9QmU.001.mp4,0.3738317757,0.4945054945,0.2815533981,0.4270833333,0.4333333333 -hX2TVefa5bQ.002.mp4,0.6448598131,0.5824175824,0.572815534,0.6354166667,0.6666666667 -voSLxKtKr0Q.002.mp4,0.5046728972,0.4945054945,0.6116504854,0.5625,0.6 -OdwK_oMdfSU.005.mp4,0.5327102804,0.4505494505,0.4951456311,0.65625,0.6444444444 -be0DQawtVkE.001.mp4,0.6168224299,0.6923076923,0.4854368932,0.6145833333,0.6111111111 -knpgk7LAMb0.005.mp4,0.2242990654,0.5274725275,0.2621359223,0.2291666667,0.3333333333 -Pb7aNc6Kd40.003.mp4,0.4112149533,0.5604395604,0.640776699,0.625,0.6111111111 -hG0I7DLSSYg.002.mp4,0.5887850467,0.5604395604,0.5922330097,0.6666666667,0.6444444444 -4JjpfL4y3XM.001.mp4,0.5514018692,0.6373626374,0.6990291262,0.5729166667,0.5777777778 -VmyIItgMzpE.002.mp4,0.3457943925,0.5164835165,0.3689320388,0.3645833333,0.4888888889 -GCkOL2jLSQA.005.mp4,0.4392523364,0.5054945055,0.5339805825,0.625,0.5777777778 -0tse0Fsy_rg.001.mp4,0.3177570093,0.3296703297,0.2621359223,0.4375,0.3555555556 -YjXUMygVw7U.002.mp4,0.4205607477,0.4615384615,0.3495145631,0.3541666667,0.5111111111 -83cmR2fkyy8.002.mp4,0.4579439252,0.6043956044,0.3883495146,0.625,0.6222222222 -vAV6ovUKPDg.005.mp4,0.7663551402,0.7472527473,0.786407767,0.71875,0.7777777778 -g1TMjzZH8bw.002.mp4,0.4299065421,0.5274725275,0.427184466,0.4791666667,0.5 -9AsxY-x-TjM.000.mp4,0.4485981308,0.4395604396,0.4951456311,0.5104166667,0.4444444444 -encC96iqr9Y.003.mp4,0.3925233645,0.4615384615,0.5145631068,0.4583333333,0.4555555556 -bFwtVtZodIg.004.mp4,0.5700934579,0.6703296703,0.572815534,0.5833333333,0.6111111111 -izqyworQEEM.002.mp4,0.4299065421,0.5714285714,0.4368932039,0.5416666667,0.5222222222 -lnawWqnGpMc.005.mp4,0.1308411215,0.2307692308,0.2524271845,0.1145833333,0.3111111111 -qjU3GX3jgSY.004.mp4,0.4859813084,0.5824175824,0.5339805825,0.59375,0.6666666667 -N1ZOAktFbI0.002.mp4,0.7196261682,0.7912087912,0.7669902913,0.65625,0.8333333333 -N7oR6_oMBFk.004.mp4,0.5981308411,0.6703296703,0.5339805825,0.6666666667,0.6333333333 -mIcktEhNxRo.003.mp4,0.5794392523,0.6153846154,0.4563106796,0.53125,0.6555555556 -8QtlG5ujHyc.001.mp4,0.6448598131,0.4505494505,0.5436893204,0.6979166667,0.8 -Fz1BcPpjNXY.001.mp4,0.2990654206,0.4615384615,0.359223301,0.2395833333,0.3888888889 -RlaaCqle7tY.005.mp4,0.4485981308,0.3406593407,0.4077669903,0.5104166667,0.5777777778 diff --git a/test.py b/test.py index 2116590..2cc13b8 100644 --- a/test.py +++ b/test.py @@ -1,148 +1,173 @@ -import tensorflow as tf +import pickle +import time +import warnings + import numpy as np +import tensorflow as tf + from dan import DAN -import time from remtime import * -import warnings -import pickle warnings.filterwarnings("ignore") BATCH_SIZE = 50 - REG_PENALTY = 0 - -# NUM_VID = 500 -NUM_IMAGES = 599900 +NUM_IMAGES = 599900 NUM_TEST_IMAGES = 199900 -# NUM_IMAGES = 10000 -# NUM_TEST_IMAGES = 4000 N_EPOCHS = 1 -imgs = tf.placeholder('float', [None, 224, 224, 3], name="image_placeholder") -values = tf.placeholder('float', [None, 5], name="value_placeholder") +imgs = tf.placeholder("float", [None, 224, 224, 3], name="image_placeholder") +values = tf.placeholder("float", [None, 5], name="value_placeholder") config = tf.ConfigProto() config.gpu_options.allow_growth = True config.gpu_options.per_process_gpu_memory_fraction = 0.8 with tf.Session(config=config) as sess: - - model = DAN(imgs, REG_PENALTY=REG_PENALTY, preprocess='vggface') - # output = model.output - - tr_reader = tf.TFRecordReader() - tr_filename_queue = tf.train.string_input_producer(['train_full.tfrecords'], num_epochs=N_EPOCHS) - _, tr_serialized_example = tr_reader.read(tr_filename_queue) - # Decode the record read by the reader - tr_feature = {'train/image': tf.FixedLenFeature([], tf.string), 'train/label': tf.FixedLenFeature([], tf.string)} - tr_features = tf.parse_single_example(tr_serialized_example, features=tr_feature) - # Convert the image data from string back to the numbers - tr_image = tf.decode_raw(tr_features['train/image'], tf.uint8) - tr_label = tf.decode_raw(tr_features['train/label'], tf.float32) - # Reshape image data into the original shape - tr_image = tf.reshape(tr_image, [224, 224, 3]) - tr_label = tf.reshape(tr_label, [5]) - tr_images, tr_labels = tf.train.shuffle_batch([tr_image, tr_label], batch_size=BATCH_SIZE, capacity=100, min_after_dequeue=BATCH_SIZE, allow_smaller_final_batch=True) - - - - val_reader = tf.TFRecordReader() - val_filename_queue = tf.train.string_input_producer(['val_full.tfrecords'], num_epochs=N_EPOCHS) - _, val_serialized_example = val_reader.read(val_filename_queue) - # Decode the record read by the reader - val_feature = {'val/image': tf.FixedLenFeature([], tf.string), 'val/label': tf.FixedLenFeature([], tf.string)} - val_features = tf.parse_single_example(val_serialized_example, features=val_feature) - # Convert the image data from string back to the numbers - val_image = tf.decode_raw(val_features['val/image'], tf.uint8) - val_label = tf.decode_raw(val_features['val/label'], tf.float32) - # Reshape image data into the original shape - val_image = tf.reshape(val_image, [224, 224, 3]) - val_label = tf.reshape(val_label, [5]) - val_images, val_labels = tf.train.shuffle_batch([val_image, val_label], batch_size=BATCH_SIZE, capacity=100, min_after_dequeue=BATCH_SIZE, allow_smaller_final_batch=True) - - - - init_op = tf.group(tf.global_variables_initializer(), tf.local_variables_initializer()) - sess.run(init_op) - - coord = tf.train.Coordinator() - threads = tf.train.start_queue_runners(coord=coord) - - - file_list = ["param"+str((60/N_EPOCHS)*(x+1))+".pkl" for x in range(0,N_EPOCHS)] - file_list=["param25.pkl"] - training_accuracy = [] - validation_accuracy = [] - epoch=0 - stime = time.time() - print ("Testing Started") - for pickle_file in file_list: - error=0 - model.load_trained_model(pickle_file, sess) - tr_acc_list = [] - val_acc_list=[] - - i=0 - while i=5: - break - error+=1 - continue - output = sess.run([model.output], feed_dict = {imgs: epoch_x.astype(np.float32)}) - tr_mean_acc = np.mean(1-np.absolute(output-epoch_y)) - tr_acc_list.append(tr_mean_acc) - if not i%20000: - print (i, "images completed in training") - - tr_mean_acc = np.mean(tr_acc_list) - training_accuracy.append(tr_mean_acc) - - i=0 - while i=5: - break - error+=1 - continue - output = sess.run([model.output], feed_dict = {imgs: epoch_x.astype(np.float32)}) - val_mean_acc = np.mean(1-np.absolute(output-epoch_y)) - val_acc_list.append(val_mean_acc) - if not i%20000: - print (i, "images completed in validation") - sess.run(tf.local_variables_initializer()) - - val_mean_acc = np.mean(val_acc_list) - validation_accuracy.append(val_mean_acc) - - print("Epoch"+ str(epoch+1)+" completed out of "+str(N_EPOCHS)) - print("Tr. Mean Acc:"+str(round(tr_mean_acc,4))+", Val. Mean Acc:"+str(round(val_mean_acc,4))) - - ftime = time.time() - remtime = (ftime-stime)*(N_EPOCHS-epoch-1) - stime=ftime - printTime(remtime) - epoch+=1 - if not epoch%(N_EPOCHS/2): - with open("acc_plot25.pkl", "wb") as nfile: - pickle.dump([training_accuracy, validation_accuracy], nfile) - print ("Half testing saved") - - - - coord.request_stop() - # Wait for threads to stop - coord.join(threads) - - print ("Testing done... Values saved successfully") + + model = DAN(imgs, REG_PENALTY=REG_PENALTY, preprocess="vggface") + # output = model.output + + tr_reader = tf.TFRecordReader() + tr_filename_queue = tf.train.string_input_producer( + ["train_full.tfrecords"], num_epochs=N_EPOCHS + ) + _, tr_serialized_example = tr_reader.read(tr_filename_queue) + # Decode the record read by the reader + tr_feature = { + "train/image": tf.FixedLenFeature([], tf.string), + "train/label": tf.FixedLenFeature([], tf.string), + } + tr_features = tf.parse_single_example(tr_serialized_example, features=tr_feature) + # Convert the image data from string back to the numbers + tr_image = tf.decode_raw(tr_features["train/image"], tf.uint8) + tr_label = tf.decode_raw(tr_features["train/label"], tf.float32) + # Reshape image data into the original shape + tr_image = tf.reshape(tr_image, [224, 224, 3]) + tr_label = tf.reshape(tr_label, [5]) + tr_images, tr_labels = tf.train.shuffle_batch( + [tr_image, tr_label], + batch_size=BATCH_SIZE, + capacity=100, + min_after_dequeue=BATCH_SIZE, + allow_smaller_final_batch=True, + ) + + val_reader = tf.TFRecordReader() + val_filename_queue = tf.train.string_input_producer( + ["val_full.tfrecords"], num_epochs=N_EPOCHS + ) + _, val_serialized_example = val_reader.read(val_filename_queue) + # Decode the record read by the reader + val_feature = { + "val/image": tf.FixedLenFeature([], tf.string), + "val/label": tf.FixedLenFeature([], tf.string), + } + val_features = tf.parse_single_example(val_serialized_example, features=val_feature) + # Convert the image data from string back to the numbers + val_image = tf.decode_raw(val_features["val/image"], tf.uint8) + val_label = tf.decode_raw(val_features["val/label"], tf.float32) + # Reshape image data into the original shape + val_image = tf.reshape(val_image, [224, 224, 3]) + val_label = tf.reshape(val_label, [5]) + val_images, val_labels = tf.train.shuffle_batch( + [val_image, val_label], + batch_size=BATCH_SIZE, + capacity=100, + min_after_dequeue=BATCH_SIZE, + allow_smaller_final_batch=True, + ) + + init_op = tf.group( + tf.global_variables_initializer(), tf.local_variables_initializer() + ) + sess.run(init_op) + + coord = tf.train.Coordinator() + threads = tf.train.start_queue_runners(coord=coord) + + file_list = [ + "param" + str((60 / N_EPOCHS) * (x + 1)) + ".pkl" for x in range(0, N_EPOCHS) + ] + file_list = ["param25.pkl"] + training_accuracy = [] + validation_accuracy = [] + epoch = 0 + stime = time.time() + print("Testing Started") + for pickle_file in file_list: + error = 0 + model.load_trained_model(pickle_file, sess) + tr_acc_list = [] + val_acc_list = [] + + i = 0 + while i < NUM_IMAGES: + i += BATCH_SIZE + try: + epoch_x, epoch_y = sess.run([tr_images, tr_labels]) + except: + print("Error in reading this batch") + if error >= 5: + break + error += 1 + continue + output = sess.run( + [model.output], feed_dict={imgs: epoch_x.astype(np.float32)} + ) + tr_mean_acc = np.mean(1 - np.absolute(output - epoch_y)) + tr_acc_list.append(tr_mean_acc) + if not i % 20000: + print(i, "images completed in training") + + tr_mean_acc = np.mean(tr_acc_list) + training_accuracy.append(tr_mean_acc) + + i = 0 + while i < NUM_TEST_IMAGES: + i += BATCH_SIZE + try: + epoch_x, epoch_y = sess.run([val_images, val_labels]) + except: + print("Error in reading this batch") + if error >= 5: + break + error += 1 + continue + output = sess.run( + [model.output], feed_dict={imgs: epoch_x.astype(np.float32)} + ) + val_mean_acc = np.mean(1 - np.absolute(output - epoch_y)) + val_acc_list.append(val_mean_acc) + if not i % 20000: + print(i, "images completed in validation") + sess.run(tf.local_variables_initializer()) + + val_mean_acc = np.mean(val_acc_list) + validation_accuracy.append(val_mean_acc) + + print("Epoch" + str(epoch + 1) + " completed out of " + str(N_EPOCHS)) + print( + "Tr. Mean Acc:" + + str(round(tr_mean_acc, 4)) + + ", Val. Mean Acc:" + + str(round(val_mean_acc, 4)) + ) + + ftime = time.time() + remtime = (ftime - stime) * (N_EPOCHS - epoch - 1) + stime = ftime + printTime(remtime) + epoch += 1 + if not epoch % (N_EPOCHS / 2): + with open("acc_plot25.pkl", "wb") as nfile: + pickle.dump([training_accuracy, validation_accuracy], nfile) + print("Half testing saved") + + coord.request_stop() + # Wait for threads to stop + coord.join(threads) + + print("Testing done... Values saved successfully") diff --git a/train.py b/train.py index 4ecabe1..badee98 100644 --- a/train.py +++ b/train.py @@ -1,10 +1,12 @@ -import tensorflow as tf +import pickle +import time +import warnings + import numpy as np +import tensorflow as tf + from dan import DAN -import time from remtime import * -import warnings -import pickle warnings.filterwarnings("ignore") @@ -13,161 +15,192 @@ BATCH_SIZE = 25 N_EPOCHS = 2 REG_PENALTY = 0 -PER=0.2 -NUM_IMAGES = 599900 +PER = 0.2 +NUM_IMAGES = 599900 NUM_TEST_IMAGES = 199900 +imgs = tf.placeholder("float", [None, 224, 224, 3], name="image_placeholder") +values = tf.placeholder("float", [None, 5], name="value_placeholder") - -imgs = tf.placeholder('float', [None, 224, 224, 3], name="image_placeholder") -values = tf.placeholder('float', [None, 5], name="value_placeholder") - -gpu_options = tf.GPUOptions(per_process_gpu_memory_fraction=0.8,allow_growth=True) -config = tf.ConfigProto(allow_soft_placement=True,gpu_options=gpu_options) +gpu_options = tf.GPUOptions(per_process_gpu_memory_fraction=0.8, allow_growth=True) +config = tf.ConfigProto(allow_soft_placement=True, gpu_options=gpu_options) with tf.Session(config=config) as sess: - - model = DAN(imgs, REG_PENALTY=REG_PENALTY, preprocess='vggface') - output = model.output - cost = tf.reduce_mean(tf.squared_difference(model.output, values))+ model.cost_reg - optimizer = tf.train.AdamOptimizer(learning_rate=LEARNING_RATE).minimize(cost) - - - - tr_reader = tf.TFRecordReader() - tr_filename_queue = tf.train.string_input_producer(['train_full.tfrecords'], num_epochs=2*N_EPOCHS) - _, tr_serialized_example = tr_reader.read(tr_filename_queue) - # Decode the record read by the reader - tr_feature = {'train/image': tf.FixedLenFeature([], tf.string), 'train/label': tf.FixedLenFeature([], tf.string)} - tr_features = tf.parse_single_example(tr_serialized_example, features=tr_feature) - # Convert the image data from string back to the numbers - tr_image = tf.decode_raw(tr_features['train/image'], tf.uint8) - tr_label = tf.decode_raw(tr_features['train/label'], tf.float32) - # Reshape image data into the original shape - tr_image = tf.reshape(tr_image, [224, 224, 3]) - tr_label = tf.reshape(tr_label, [5]) - tr_images, tr_labels = tf.train.shuffle_batch([tr_image, tr_label], batch_size=BATCH_SIZE, capacity=100, min_after_dequeue=BATCH_SIZE, allow_smaller_final_batch=True) - - - - val_reader = tf.TFRecordReader() - val_filename_queue = tf.train.string_input_producer(['val_full.tfrecords'], num_epochs=N_EPOCHS) - _, val_serialized_example = val_reader.read(val_filename_queue) - # Decode the record read by the reader - val_feature = {'val/image': tf.FixedLenFeature([], tf.string), 'val/label': tf.FixedLenFeature([], tf.string)} - val_features = tf.parse_single_example(val_serialized_example, features=val_feature) - # Convert the image data from string back to the numbers - val_image = tf.decode_raw(val_features['val/image'], tf.uint8) - val_label = tf.decode_raw(val_features['val/label'], tf.float32) - # Reshape image data into the original shape - val_image = tf.reshape(val_image, [224, 224, 3]) - val_label = tf.reshape(val_label, [5]) - val_images, val_labels = tf.train.shuffle_batch([val_image, val_label], batch_size=BATCH_SIZE, capacity=100, min_after_dequeue=BATCH_SIZE, allow_smaller_final_batch=True) - - - - init_op = tf.group(tf.global_variables_initializer(), tf.local_variables_initializer()) - sess.run(init_op) - - coord = tf.train.Coordinator() - threads = tf.train.start_queue_runners(coord=coord) - - model.initialize_with_vggface('vgg-face.mat', sess) - loss_list=[] - param_num = 1 - for epoch in range(N_EPOCHS): - tr_acc_list = [] - val_acc_list=[] - sess.run(tf.local_variables_initializer()) - i=0 - error=0 - stime = time.time() - - while i10: - break - continue - _, c = sess.run([optimizer, cost], feed_dict = {imgs: epoch_x.astype(np.float32), values: epoch_y}) - loss_list.append(np.power(c,0.5)) - - x=100/PER - if not i%2000: - per = float(i)/NUM_IMAGES*100 - print("Epoch:"+str(round(per,2))+"% Of "+str(epoch+1)+"/"+str(N_EPOCHS)+", Batch loss:"+str(round(c,4))) - ftime = time.time() - remtime = (ftime-stime)*((NUM_IMAGES-i)/(NUM_IMAGES/x)) - stime=ftime - printTime(remtime) - if not i%20000: - with open('param'+str(param_num)+'.pkl', 'wb') as pfile: - pickle.dump(sess.run(model.parameters), pfile, pickle.HIGHEST_PROTOCOL) - print (str(param_num)+" weights Saved!!") - param_num+=1 - - with open('param'+str(param_num)+'.pkl', 'wb') as pfile: - pickle.dump(sess.run(model.parameters), pfile, pickle.HIGHEST_PROTOCOL) - print (str(param_num)+" weights Saved!!") - param_num+=1 - - - sess.run(tf.local_variables_initializer()) - print("Computing Training Accuracy..") - i=0 - error=0 - while i10: - break - continue - output = sess.run([model.output], feed_dict = {imgs: epoch_x.astype(np.float32)}) - tr_mean_acc = np.mean(1-np.absolute(output-epoch_y)) - tr_acc_list.append(tr_mean_acc) - - tr_mean_acc = np.mean(tr_acc_list) - - print("Computing Validation Accuracy..") - i=0 - error=0 - while i10: - break - continue - output = sess.run([model.output], feed_dict = {imgs: epoch_x.astype(np.float32)}) - val_mean_acc = np.mean(1-np.absolute(output-epoch_y)) - val_acc_list.append(val_mean_acc) - - val_mean_acc = np.mean(val_acc_list) - print("Epoch"+ str(epoch+1)+" completed out of "+str(N_EPOCHS)) - print("Tr. Mean Acc:"+str(round(tr_mean_acc,4))) - print("Val. Mean Acc:"+str(round(val_mean_acc,4))) - - - - coord.request_stop() - # Wait for threads to stop - coord.join(threads) - - saver = tf.train.Saver() - saver.save(sess, 'model_full') - print ("Session Saved!!") - with open('loss_full.pkl', 'wb') as pfile: - pickle.dump(loss_list, pfile, pickle.HIGHEST_PROTOCOL) - print ("Loss List Saved!!") + + model = DAN(imgs, REG_PENALTY=REG_PENALTY, preprocess="vggface") + output = model.output + cost = tf.reduce_mean(tf.squared_difference(model.output, values)) + model.cost_reg + optimizer = tf.train.AdamOptimizer(learning_rate=LEARNING_RATE).minimize(cost) + + tr_reader = tf.TFRecordReader() + tr_filename_queue = tf.train.string_input_producer( + ["train_full.tfrecords"], num_epochs=2 * N_EPOCHS + ) + _, tr_serialized_example = tr_reader.read(tr_filename_queue) + # Decode the record read by the reader + tr_feature = { + "train/image": tf.FixedLenFeature([], tf.string), + "train/label": tf.FixedLenFeature([], tf.string), + } + tr_features = tf.parse_single_example(tr_serialized_example, features=tr_feature) + # Convert the image data from string back to the numbers + tr_image = tf.decode_raw(tr_features["train/image"], tf.uint8) + tr_label = tf.decode_raw(tr_features["train/label"], tf.float32) + # Reshape image data into the original shape + tr_image = tf.reshape(tr_image, [224, 224, 3]) + tr_label = tf.reshape(tr_label, [5]) + tr_images, tr_labels = tf.train.shuffle_batch( + [tr_image, tr_label], + batch_size=BATCH_SIZE, + capacity=100, + min_after_dequeue=BATCH_SIZE, + allow_smaller_final_batch=True, + ) + + val_reader = tf.TFRecordReader() + val_filename_queue = tf.train.string_input_producer( + ["val_full.tfrecords"], num_epochs=N_EPOCHS + ) + _, val_serialized_example = val_reader.read(val_filename_queue) + # Decode the record read by the reader + val_feature = { + "val/image": tf.FixedLenFeature([], tf.string), + "val/label": tf.FixedLenFeature([], tf.string), + } + val_features = tf.parse_single_example(val_serialized_example, features=val_feature) + # Convert the image data from string back to the numbers + val_image = tf.decode_raw(val_features["val/image"], tf.uint8) + val_label = tf.decode_raw(val_features["val/label"], tf.float32) + # Reshape image data into the original shape + val_image = tf.reshape(val_image, [224, 224, 3]) + val_label = tf.reshape(val_label, [5]) + val_images, val_labels = tf.train.shuffle_batch( + [val_image, val_label], + batch_size=BATCH_SIZE, + capacity=100, + min_after_dequeue=BATCH_SIZE, + allow_smaller_final_batch=True, + ) + + init_op = tf.group( + tf.global_variables_initializer(), tf.local_variables_initializer() + ) + sess.run(init_op) + + coord = tf.train.Coordinator() + threads = tf.train.start_queue_runners(coord=coord) + + model.initialize_with_vggface("vgg-face.mat", sess) + loss_list = [] + param_num = 1 + for epoch in range(N_EPOCHS): + tr_acc_list = [] + val_acc_list = [] + sess.run(tf.local_variables_initializer()) + i = 0 + error = 0 + stime = time.time() + + while i < NUM_IMAGES: + i += BATCH_SIZE + try: + epoch_x, epoch_y = sess.run([tr_images, tr_labels]) + except: + print(error, ": Error in reading this batch") + error += 1 + if error > 10: + break + continue + _, c = sess.run( + [optimizer, cost], + feed_dict={imgs: epoch_x.astype(np.float32), values: epoch_y}, + ) + loss_list.append(np.power(c, 0.5)) + + x = 100 / PER + if not i % 2000: + per = float(i) / NUM_IMAGES * 100 + print( + "Epoch:" + + str(round(per, 2)) + + "% Of " + + str(epoch + 1) + + "/" + + str(N_EPOCHS) + + ", Batch loss:" + + str(round(c, 4)) + ) + ftime = time.time() + remtime = (ftime - stime) * ((NUM_IMAGES - i) / (NUM_IMAGES / x)) + stime = ftime + printTime(remtime) + if not i % 20000: + with open("param" + str(param_num) + ".pkl", "wb") as pfile: + pickle.dump( + sess.run(model.parameters), pfile, pickle.HIGHEST_PROTOCOL + ) + print(str(param_num) + " weights Saved!!") + param_num += 1 + + with open("param" + str(param_num) + ".pkl", "wb") as pfile: + pickle.dump(sess.run(model.parameters), pfile, pickle.HIGHEST_PROTOCOL) + print(str(param_num) + " weights Saved!!") + param_num += 1 + + sess.run(tf.local_variables_initializer()) + print("Computing Training Accuracy..") + i = 0 + error = 0 + while i < NUM_IMAGES: + i += BATCH_SIZE + try: + epoch_x, epoch_y = sess.run([tr_images, tr_labels]) + except: + print("Error in reading this batch") + error += 1 + if error > 10: + break + continue + output = sess.run( + [model.output], feed_dict={imgs: epoch_x.astype(np.float32)} + ) + tr_mean_acc = np.mean(1 - np.absolute(output - epoch_y)) + tr_acc_list.append(tr_mean_acc) + + tr_mean_acc = np.mean(tr_acc_list) + + print("Computing Validation Accuracy..") + i = 0 + error = 0 + while i < NUM_TEST_IMAGES: + i += BATCH_SIZE + try: + epoch_x, epoch_y = sess.run([val_images, val_labels]) + except: + print("Error in reading this batch") + error += 1 + if error > 10: + break + continue + output = sess.run( + [model.output], feed_dict={imgs: epoch_x.astype(np.float32)} + ) + val_mean_acc = np.mean(1 - np.absolute(output - epoch_y)) + val_acc_list.append(val_mean_acc) + + val_mean_acc = np.mean(val_acc_list) + print("Epoch" + str(epoch + 1) + " completed out of " + str(N_EPOCHS)) + print("Tr. Mean Acc:" + str(round(tr_mean_acc, 4))) + print("Val. Mean Acc:" + str(round(val_mean_acc, 4))) + + coord.request_stop() + # Wait for threads to stop + coord.join(threads) + + saver = tf.train.Saver() + saver.save(sess, "model_full") + print("Session Saved!!") + with open("loss_full.pkl", "wb") as pfile: + pickle.dump(loss_list, pfile, pickle.HIGHEST_PROTOCOL) + print("Loss List Saved!!") diff --git a/vid_to_wav.py b/vid_to_wav.py index 58f54ad..ba25fb6 100644 --- a/vid_to_wav.py +++ b/vid_to_wav.py @@ -1,44 +1,46 @@ -import subprocess import os +import subprocess import zipfile ## Runnin a loop throught all the zipped training file to extract all .wav audio files -for i in range(1,76): - if i<10: - zipfilename = 'training80_0'+str(i)+'.zip' +for i in range(1, 76): + if i < 10: + zipfilename = "training80_0" + str(i) + ".zip" else: - zipfilename = 'training80_'+str(i)+'.zip' + zipfilename = "training80_" + str(i) + ".zip" ## Accessing the zipfile i - archive = zipfile.ZipFile('data/'+zipfilename, 'r') - zipfilename = zipfilename.split('.zip')[0] - #archive.extractall('unzippedData/'+zipfilename) + archive = zipfile.ZipFile("data/" + zipfilename, "r") + zipfilename = zipfilename.split(".zip")[0] + # archive.extractall('unzippedData/'+zipfilename) for file_name in archive.namelist(): - file_name=(file_name.split('.mp4'))[0] + file_name = (file_name.split(".mp4"))[0] try: - if not os.path.exists('VoiceData/trainingData/'): - os.makedirs('VoiceData/trainingData/') + if not os.path.exists("VoiceData/trainingData/"): + os.makedirs("VoiceData/trainingData/") except OSError: - print ('Error: Creating directory of data') - command = "ffmpeg -i unzippedData/{}/{}.mp4 -ab 320k -ac 2 -ar 44100 -vn VoiceData/trainingData/{}.wav".format(zipfilename,file_name,file_name) + print("Error: Creating directory of data") + command = "ffmpeg -i unzippedData/{}/{}.mp4 -ab 320k -ac 2 -ar 44100 -vn VoiceData/trainingData/{}.wav".format( + zipfilename, file_name, file_name + ) subprocess.call(command, shell=True) -for i in range(1,26): - if i<10: - zipfilename = 'validation80_0'+str(i)+'.zip' +for i in range(1, 26): + if i < 10: + zipfilename = "validation80_0" + str(i) + ".zip" else: - zipfilename = 'validation80_'+str(i)+'.zip' + zipfilename = "validation80_" + str(i) + ".zip" ## Accessing the zipfile i - archive = zipfile.ZipFile('data/'+zipfilename, 'r') - zipfilename = zipfilename.split('.zip')[0] - #archive.extractall('unzippedData/'+zipfilename) + archive = zipfile.ZipFile("data/" + zipfilename, "r") + zipfilename = zipfilename.split(".zip")[0] + # archive.extractall('unzippedData/'+zipfilename) for file_name in archive.namelist(): - file_name=(file_name.split('.mp4'))[0] + file_name = (file_name.split(".mp4"))[0] try: - if not os.path.exists('VoiceData/validationData/'): - os.makedirs('VoiceData/validationData/') + if not os.path.exists("VoiceData/validationData/"): + os.makedirs("VoiceData/validationData/") except OSError: - print ('Error: Creating directory of data') - command = "ffmpeg -i unzippedData/{}/{}.mp4 -ab 320k -ac 2 -ar 44100 -vn VoiceData/validationData/{}.wav".format(zipfilename,file_name,file_name) + print("Error: Creating directory of data") + command = "ffmpeg -i unzippedData/{}/{}.mp4 -ab 320k -ac 2 -ar 44100 -vn VoiceData/validationData/{}.wav".format( + zipfilename, file_name, file_name + ) subprocess.call(command, shell=True) - - \ No newline at end of file