Binary FFPP structure dataset folder
Closed this issue · 1 comments
itlvd commented
Hi,
Can you tell me about the structure of binary classification in the FFPP dataset?
My structure has two folders: Real (origin) and Fake (4 attack methods).
And what happens when I use two folders for two classes for training with train_binary_ffpp.py and testing with test_binary_ffpp.py
Thank you.
honghuy127 commented
Hi,
The code uses the standard torchvision.datasets.ImageFolder
class. As its mechanism, you can add the prefixes 0_
and 1_
to force it to map these folders to [0, 1] labels in order.
You could organize the dataset as follow:
+ FFPP (--dataset)
+ Train (--train_set)
- 0_Real
- 1_Fake
+ Val (--val_set)
- 0_Real
- 1_Fake
+ Test (--test_set)
- 0_Real
- 1_Fake
Since the code can convert any label > 1 to 1, you can go further like:
- 0_Real
- 1_DF
- 2_F2F
- 3_FS
- 4_NT