MCPcopy Index your code
hub / github.com/TARTRL/Deepfake_Detection

github.com/TARTRL/Deepfake_Detection @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
1,146 symbols 3,086 edges 87 files 318 documented · 28%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Deepfake Detection

Introduction

  • Use deep models to detect fake images.

  • Distributed training with Pytorch for deepfake detection.

  • Check out this repo to know more about deepfake images.

  • Real image:

  • Fake image:

Install

  • Python 3+
  • pip install -r requirements.txt
  • pip install .

Training

cd scripts
./train.sh

Testing

You need download the pretrained model from BaiduYun:

Download link: https://pan.baidu.com/s/16NIV5BVUITKwolQzPbj9Zw Password:r3i8

And put the model(model_half.pth.tar) under ./models. Then you can run python script as below:

cd scripts
./test.sh

Cite

Please cite our code if you use this code or our models in your own work:

@misc{deepfake_detection,
  title={Deepfake Detection},
  author={Huang, Shiyu},
  howpublished={\url{https://github.com/tartrl/deepfake_detection}},
  year={2020}
}

Core symbols most depended-on inside this repo

load_pretrained
called by 123
dfd/timm/models/helpers.py
format
called by 85
dfd/timm/utils.py
_cfg
called by 75
dfd/timm/models/efficientnet.py
_gen_efficientnet
called by 41
dfd/timm/models/efficientnet.py
_cfg
called by 40
dfd/timm/models/resnet.py
feat_mult
called by 33
dfd/timm/models/layers/adaptive_avgmax_pool.py
_cfg
called by 24
dfd/timm/models/gluon_resnet.py
create_conv2d
called by 21
dfd/timm/models/layers/create_conv2d.py

Shape

Method 521
Function 444
Class 181

Languages

Python100%

Modules by API surface

dfd/timm/models/efficientnet.py112 symbols
dfd/timm/models/resnet.py59 symbols
dfd/timm/data/auto_augment.py59 symbols
dfd/timm/data/dataset.py51 symbols
dfd/timm/models/efficientnet_blocks.py44 symbols
dfd/timm/models/nasnet.py43 symbols
dfd/timm/data/transforms.py40 symbols
dfd/timm/models/dla.py35 symbols
dfd/timm/models/layers/activations.py34 symbols
dfd/timm/models/inception_v4.py34 symbols
dfd/timm/models/senet.py33 symbols
dfd/timm/models/pnasnet.py30 symbols

For agents

$ claude mcp add Deepfake_Detection \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact