Skip to content
/ DmyT Public
forked from beuve/DmyT

Dummy Triplet Loss for Deepfake Detection

Notifications You must be signed in to change notification settings

AEP-WYK/DmyT

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

DmyT: Dummy Triplet Loss for Deepfake Detection

This is a Pytorch implementation of "DmyT: Dummy Triplet Loss for Deepfake Detection"

Prepare your dataset

Your need to organise your data as follow:

dataset
├── train
│   ├── fake
|   |   ╰ ...
│   ╰── real
|       ╰ ...
├── test
│   ├── fake
|   |   ╰ ...
│   ╰── real
|       ╰ ...
╰── valid
    ├── fake
    |   ╰ ...
    ╰── real
        ╰ ...

Training

Training can be performed using the script src/train.py. You can use this bash script and complete the parameters

# Learning rate (ex: 2e-5)
LR = 
# Number of epochs
EPOCH = 
# Model name from TIMM library
MODEL=
# Batch Size
BATCH= 
# Trained model location
OUTPUT=
# Loss name (either BCE - DmyT - Triplet)
LOSS=
# Path to the dataset
DATASET=

python src/train.py --lr      $LR     \\
                    --epoch   $EPOCH  \\
                    --model   $MODEL  \\
                    --batch   $BATCH  \\
                    --output  $OUTPUT \\
                    --loss    $LOSS   \\
                    --dataset $DATASET

Testing

Testing can be performed using the script src/test.py. You can use this bash script and complete the parameters

# Model name from TIMM library
MODEL=
# Location of the saved weights
WEIGHTS=
# Loss name (either BCE - DmyT - Triplet)
LOSS=
# Path to the dataset
DATASET=

python src/test.py  --model   $MODEl   \\
                    --weights $WEIGHTS \\
                    --loss    $LOSS    \\
                    --dataset $DATASET \\

About

Dummy Triplet Loss for Deepfake Detection

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%