oawiles / X2Face

Pytorch code for ECCV 2018 paper

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unclear on how to run training

wanshun123 opened this issue · comments

I have download the train/test splits as follows:

img1

In VoxCelebData_withmask.py I have edited lines 26 and 28 as follows:

assert(os.path.exists('/home/paperspace/x2f/x2f/files/landmarks_samevideoimg_%d25thframe_5imgs_%d.npz' % (dataset, num_views)))
files = np.load('/home/paperspace/x2f/x2f/files/landmarks_samevideoimg_%d25thframe_5imgs_%d.npz' % (dataset, num_views))

Upon trying to train as follows:

python3 train_model.py --results_folder '/home/paperspace/x2f/x2f/tensorboard_files' --model_epoch_path '/home/paperspace/x2f/x2f/models'

I get the following error (not finding the file):

File "/home/paperspace/x2f/x2f/UnwrapMosaic/VoxCelebData_withmask.py", line 26, in __init__
assert(os.path.exists('/home/paperspace/x2f/x2f/files/landmarks_samevideoimg_%d25thframe_5imgs_%d.npz' % (dataset, num_views)))

In this case how should the line be edited? I am also a bit confused by line 49 in VoxCelebData_withmask.py:

img_name = img_name.replace('koepke/voxceleb/faces/', 'ow/voxceleb/faces/faces/')

My faces data is download from http://www.robots.ox.ac.uk/~vgg/research/CMBiometrics/data/zippedFaces.tar.gz and looks like the following:

img2

How should line 49 then be edited?

For the first part it's not finding the file: check the filename and what it is looking for -- something is not the same.

For the second part. The image names were saved with their full path. So you need to find the base part of the filename that is specific to the operating system and replace it with the path you stored. So I think they are at /scratch/local/ssd/koepke/voxceleb/faces but you have the saved at /home/paperspace/x2f/x2f/unzippedFaces. So you need to do something like img_name.replace('/scratch/local/ssd/koepke/voxceleb/faces/', '/home/paperspace/x2f/x2f/unzippedFaces').