grey-eye / talking-heads

Our implementation of "Few-Shot Adversarial Learning of Realistic Neural Talking Head Models" (Egor Zakharov et al.)
GNU General Public License v3.0
593 stars 110 forks source link

How to read vid file? #2

Closed keishatsai closed 5 years ago

keishatsai commented 5 years ago

Hi Thank you for the sharing. I am also starting implementing this work and found your work.

I am wondering that why you are using "vid" file extension for storing the random selected frames? Is there particular reason for this? I haven't managed this filetype before, so don't know how to read it when I want to check what are the selected frames look like.

Could you give me some clues? Thank you.

castelo-software commented 5 years ago

Hi @keishatsai. There's no standard "vid" file extension. The processed dataset is stored in pickled lists of dictionaries, with two keys: "frames" and "landmarks", each containing a numpy array with a frame and the corresponding landmarks as an [3, 224, 224] RGB image. I decided to end the viles with ".vid" instead of ".pkl" just becase I wanted to have a distinctive file name that I would be able easily search for, move and delete using "*.vid".

So you can simply read them using pickle. Check the code in the dataset.py file, where the files are created and loaded.

keishatsai commented 5 years ago

Thank you. I was trying to check what the random frames look like, and have trouble to deal with "vid" file. Now, you explain everything. Big help.