Skip to content

sireeshdevaraj/Image-attack-detection-with-enhancement

Repository files navigation

WORKING WITH NBIS

Download the NBIS latest release software from the following LINK on your UBUNTU

It is recommended to have a ubuntu version 20.04 or older. You might experience errors while installing NBIS on ubuntu 22.04 (The latest one).

Open terminal in the the downloaded directory

  • define the setup folder where you want to install the software
  • ./setup.sh /home/kuuhaku/Desktop/NBIS_TOOL --without-X11 --STDLIBS --64
  • make sure you have the GCC installed before running the setup
  • sudo apt install gcc-9
  • sudo make config
  • if you get a error of make is not found then follow my steps
    • first update the sudo apt with sudo apt-get update
    • sudo apt-get install -y make
    • sudo apt install build-essential
  • sudo make it
  • sudo make install LIBNBIS=yes

you can check the NBIS_installation_folder, you can find all the required files inside the directory

  • Download the Sample data sets to TEST
  • If the Data Sets are in *.tif ,you may need to convert these to *.jpeg
  • Just a Quick info on tif vs jpeg
  • TIF means TAG IMAGE FILE FORMAT
  • TIFF files are much larger than JPEGs, but they're also lossless. TIFF files are perfect for images that require big editing jobs in Photoshop or other photo editing software.
  • Convert the TIF files to JPG by running the main.py file in the Data Set which can convert all the files at once
  • Extracting Data from given Data sets
  • Copy and place the data set directory inside our NBIS_INSTALLED_FOLDER
  • cd into our Dataset /Desktop/nbis_tool/DB1_B and run the following shell script for file in *.jpg; do ../bin/mindtct /home/kuuhaku/Desktop/nbis_tool/DB1_B/"$file" /home/kuuhaku/Desktop/nbis_tool/output/"$file"; done
  • this will extract all the data from the given set of finger print data sets.
  • You have the Data now and can try to get the match score of two fingerprint data ../bin/bozorth3 -m1 101_2.jpg.xyt 102_6.jpg.xyt
  • Gives out the score betweent the given two fingerprints!!

Read Image Transformations

DenseNet Classifier

  • DenseNet is a Image Classification algorithm, developed to improve accuracy of a model by handling vanishing gradient problem.
  • DenseNet provides high accuracy compared to many other convolutional neural networks by connecting every layer directly with each other.
  • In DenseNet121 architecture we will be having 4 dense blocks.
  • In every dense block the layers present are all connected to eachother.
  • Each layer gets some feature maps from it's previous layer, each layer adds some feature maps to the existing feature maps.
  • Concatenation of feature maps is done only if the size of feature maps recieved from previous layers and the size of feature maps generated is similar.
  • There exist a transition layer between any two dense blocks

Advantages of dense block over other classifiers

  • In normal convolutional neural networks the classifier classifies the image on the basis of the feature maps recieved from the final layer
  • These feature maps recieved from the final layer are called high level feature maps.
  • But DenseNet classifies the image usinf the feature maps generated by all the layers.
  • DenseNet classifier has ->Strengthen feature propagation ->Encourage Feature reuse
  • Growth rate in DenseNet121 is defined as thenumber of feature maps that a layer can produce

DenseNet121 Architecture DenseNet121 Readme DenseNet121 Implementation using pytorch

NOTE:

  • All the processed images are saved using pyplot in python
  • This Readme and Project are still in the initial phase and the readme is not completed yet

Tabnet:

  • TabNet is to effectively apply deep neural networks on tabular data which still consists of a large portion of users and processed data across various applications such as healthcare, banking, retail, finance, marketing, etc.

Tabnet Architecture

DenseNet121 implementation and accuracy table

Scanners LivDet2015 LivDet2017 LivDet2019
Train Score Valid Score ACE% Train Score Valid Score ACE% Train Score Valid Score ACE%
DigitalPersona 87.8 87.9 12 91.1 87.2 13 86.7 62.4 38
CrossMatch 88.9 90.5 9.5
HiScan 87.9 90.4 9
GreenBit 88.8 89.8 11 86.9 84.8 15 86.8 87.2 13
Orcathus 91.4 85.9 14 91.3 94.4 56

Cross Dataset Training and accuracy table

Train Scanner Test Scanner Training score Testing score ACE%
Digital Persona GreenBit 91.04 0.62 38
DigitalPersona Orcathus 90 66 34
GreenBit DigitalPersona 84.7 82 18
GreenBit Orcathus 91.1 87.2 13
Orcathus DigitalPersona 91.09 0.55 45
Orcathus GreenBit 91.6 0.64 36

Accuracy of tabnet classifier for LivDet2015 Data set

Scanner Total Features Selected Features Threshold Train Score Valid score Final Test score Ace%
Hi scan 28 28 - 84.4 83.01 89.2 11.8
Cross match 28 28 - 99.47 98.48 97.4 2.6
DigitalPersona 28 9 0.4 86.88 86.86 81.4 18.6
Training 28 12 0.2 98.58 96.89 92 8

Accuracy of tabnet classifier

Train Scanner Optimizer Selected no of features Final Test score ACE
Cross match adam 28 97.4 2.6
Digital Persona adam 9 81.8 18.2
Hi scan adam 28 89 11
Training adam 12 98 2

Accuracy of TabNet classifier for LivDet2015 and LivDet2017 features extracted using olsen method(11 features extracted totally)

Scanner Selected Feat thresh train score valid score final test score ACE%
digitalpersona2017 8 0.2 86.9 86.4 83.5 16.5
GreenBit2017 4 0.3 79.79 79.77 85.1 14.9
Orcathus2017 5 0.4 89.8 91.1 86.9 13.1
DigitalPersona2019 7 0.2 89.7 90.6 89.7 10.3
GreenBit2019 7 0.2 88.8 90.7 82.7 17.3
Orcathus2019 6 0.2 89.9 90.43 94.4 5.6