Code for Iris Presentation Attack Detection based on DenseNet Architecture.
Pytorch, Numpy, Scipy, Pillow
The D-NetPAD takes a cropped iris image as input and produces a PA score between 0 and 1, where 0 means bonafide and 1 means presentation attack. Sample cropped iris images are provided in CroppedImages folder.
The model can be downloaded from here. Copy the model into the Model folder and run the following command:
python test_D-NetPAD.py -imageFolder CroppedImages
PA score CSV file will be created in the folder of images.
python train_D-NetPAD.py -csvPath cseFilePath -datasetPath datasetImagesPath -outputPath resultPath
CSV file contains ground truth of dataset images. The format of the dataset CSV file is
train,Live,imageFile1.png
train,Spoof,imageFile2.png
test,Live,imageFile3.png
test,Spoof,imageFile4.png
python fineTrain_D-NetPAD.py -csvPath cseFilePath -datasetPath datasetImagesPath -outputPath resultPath
If you are using the code, please cite the paper:
Renu Sharma, Arun Ross, D-NetPAD: An Explainable and Interpretable Iris Presentation Attack Detector, arXiv:2007.01381, 2020.