It is the code for the paper: DE-FAKE: Detection and Attribution of Fake Images Generated by Text-to-Image Generation Models.
You first need to build the environment by:
conda env create -f environment.yaml
conda activate defake
For the usage, You can download our model on
and
for the encoder and classifier.
Then test on
python test.py --image_path XXX
If you want to train the detector yourself, please enter the correct file path in train.py.
Then
python train.py
DeFake is licensed under the term of thr MIT license. See LICENSE for more details.