MCPcopy Create free account
hub / github.com/WentianZhang-ML/FRT-PAD

github.com/WentianZhang-ML/FRT-PAD @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
60 symbols 168 edges 8 files 9 documented · 15% updated 3y ago★ 39

Browse by type

Functions 48 Types & classes 12
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

FRT-PAD

This is an official pytorch implementation of 'Effective Presentation Attack Detection Driven by Face Related Task'. (Accepted by ECCV 2022)

Effective Presentation Attack Detection Driven by Face Related Task

Method

Requirements

  • numpy>=1.17.0
  • scipy>=1.5.2
  • Pillow>=8.2.0
  • pytorch>=1.7.1
  • torchvision>=0.8.2
  • tqdm>=4.59.0
  • scikit-learn>= 0.24.2

Datasets

The proposed method is evaluated on four publicly-available datasets, i.e.

Usage

The proposed FRT-PAD method is trained through three steps: * Data Preparation

Generate the image list:
```
python data_find.py \
--data_path {Four paths of saved datasets}
```

For example, 
`python data_find.py --data_path ['msu_path', 'casia_path', 'idiap_path', 'oulu_path']`

And then you can get four lists containing images and corresponding labels in './label/' to establish cross-dataset.
  • Pre-trained Model Preparation

    FRT-PAD method consists of CNN-based PA Detector, Face-Related Tasks and Cross-Modal Adapter. For CNN-based PA Detector (i.e. baseline), the pre-trained model is carried on ImageNet, and you can download the weights from resnet18. For Face-Related Tasks, we applied three different models.

In Face Recognition model, we use a Pre-trained ResNet-18, and you can download the weights from ms1mv3_arcface_r18_fp16/backbone.

In Face Expression Recognition model, we also use a pre-trained ResNet-18, and you can download the weights from SCN.

In Face Attribute Editing model, we only use its Discriminator, which can be downloaded from pretrained-celeba-128x128.

  • Training and testing model python train_main.py \ --train_data [om/ci] --test_data [ci/om] --downstream [FE/FR/FA] --graph_type [direct/dense]

Core symbols most depended-on inside this repo

browse all functions →

Shape

Method 27
Function 21
Class 12

Languages

Python100%

Modules by API surface

models/networks.py19 symbols
utils/utils.py12 symbols
models/layers.py11 symbols
utils/evaluate.py7 symbols
models/pad_model.py4 symbols
data_find.py4 symbols
train_main.py2 symbols
utils/config.py1 symbols

For agents

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

⬇ download graph artifact

Ask about this repo answers extend the page