VISION-SJTU / RECCE

[CVPR2022] End-to-End Reconstruction-Classification Learning for Face Forgery Detection
MIT License
103 stars 14 forks source link

关于pickle文件 #18

Closed wym-dlone closed 1 year ago

wym-dlone commented 1 year ago

您好,非常抱歉打扰您,我想请问一下pickle文件的一个结构,具体是怎么存储数据的呢,方便提供一下吗,我在训练的时候这个文件一直没有处理好。非常感谢您!

XJay18 commented 1 year ago

Hi, sorry for the late reply. I assume that you are asking about the pickle files used in dataloaders. The pickle files store image paths (just strings) for loading images. You may create your own pickle files by storing the image paths in a list, and then store it using torch.save api.

For the pickle files used in dataset/faceforensics.py, it has the following structure:

[('path/to/img1.jpg',0), ('path/to/img2.jpg',0), ..., ('path/to/imgN.jpg',1)]

where the first item in the tuple is the image path, and the second item is the binary label.

For the pickle files used in dataset/wild_deepfake.py, it has the following structure:

['path/to/img1.png', 'path/to/img2.png', ..., 'path/to/imgN.png']
XJay18 commented 1 year ago

Close due to inactivation. Please feel free to reopen this issue if you still have related problems.