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 details)

Uploaded Source

Built Distribution

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

Uploaded Python 2 Python 3

File details

Details for the file datasouls_antispoof-0.0.4.tar.gz.

File metadata

  • Download URL: datasouls_antispoof-0.0.4.tar.gz
  • Upload date:
  • Size: 6.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/50.3.0.post20201006 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.7.3

File hashes

Hashes for datasouls_antispoof-0.0.4.tar.gz
Algorithm Hash digest
SHA256 2414002aa150234b8a041fabf918c12638c9125c198e73232f985322e438b9e3
MD5 dd3bfda72103fbbefcad9f760d86679c
BLAKE2b-256 b8fcaabce976e9f7e6ea62e74623694d5a6ba41a45a25cf195430c854da9b236

See more details on using hashes here.

File details

Details for the file datasouls_antispoof-0.0.4-py2.py3-none-any.whl.

File metadata

  • Download URL: datasouls_antispoof-0.0.4-py2.py3-none-any.whl
  • Upload date:
  • Size: 11.7 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/50.3.0.post20201006 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.7.3

File hashes

Hashes for datasouls_antispoof-0.0.4-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 e528a2d2d414a927f070dba4a68f4169f189cfa5dd0f43ad5dfee601f4644dd0
MD5 a29db17aabfe51e4ba3cfdecbe6428c4
BLAKE2b-256 01ae9fe758bbddf806f5b0ab4215b569312321789173c567e25f119dc7afca04

See more details on using hashes here.

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