Skip to main content

Detect spoofing attack

Project description

Anti spoofing with the Datasouls dataset

Installation

pip install -U datasouls_antispoof

Example inference

Colab notebook with the example: Open In Colab

Dataset

ID & RD anti spoofing challenge

Four types of images:

  • real
  • replay
  • printed
  • mask2d

Training

Define the config.

Example at datasoluls_antispoof/configs

Define the environmental variable IMAGE_PATH that points to the folder with the dataset.

Example:

export IMAGE_PATH=<path to the folder with images>

Inference

python -m torch.distributed.launch --nproc_per_node=<num_gpu> datasouls_antispoof/inference.py \
                                   -i <path to images> \
                                   -c <path to config> \
                                   -w <path to weights> \
                                   -o <output-path> \
                                   --fp16

Pre-trained models

Models Validation accuracy Config file Weights
swsl_resnext50_32x4d 0.9673 Link Link
tf_efficientnet_b3_ns 0.9927 Link Link

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

datasouls_antispoof-0.0.4.tar.gz (6.8 kB view hashes)

Uploaded Source

Built Distribution

datasouls_antispoof-0.0.4-py2.py3-none-any.whl (11.7 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page