signature recognition using neural networks

Upload: luis-rei

Post on 06-Apr-2018

216 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/3/2019 Signature Recognition Using Neural Networks

    1/6

    Signature Recognition Using Neural

    Networks

    25 May 2007(translated from portuguese: 18 January 2010)

    by

    Luis Rei

    [email protected]

  • 8/3/2019 Signature Recognition Using Neural Networks

    2/6

    Objective

    ! The objective of this project is to present a solution to a simple learning task. Thetask chosen was signature recognition and the solution was to use an Artificial NeuralNetwork (ANN). ANN is a computational model that tries to simulate aspects of biological

    neural networks. To use an ANN it is necessary first to design its structure, define how itfunctions and to train it to perform the task at hand, in this case, to recognize signatures.

    Program Structure

    The program can be divided into three separate modules.

    Signature Processing

    ! The signature processing module allows reading and processing images for laterclassification. Currently, it accepts images in the Bitmap format (Windows BMP) with fixeddimensions of 512x128 and 256 colors (8 bits).

    ! To reduce the probability of errors and facilitate the use of the signatures in futureoperations by following modules, after loading, the signatures are normalized byoperations of scaling and translation. Firstly, the image is reduced to 128x32 pixels andconverted to black&white (binary value, no shades of gray) then the signature is aligned tothe right upper corner of the image and then the signature is scale to fill as much space aspossible within the image without being distorted.

    Figure 1: Image normalization

  • 8/3/2019 Signature Recognition Using Neural Networks

    3/6

    Feature Extraction

    ! One could feed the entire normalized signature (the output of the previous module)directly to the neural net. However the results wouldnt be particularly good and it wouldrequire many input nodes which would also result in a much slower running program.! This module extracts the projections of the signature at different angles, namely at0 and 90.

    ! Each image (the projections) is divided into 8x2 blocks. The number of black pixelsin each block is used as the input to the neural network. As such the input of the networkwill be 8x2x2 = 32 integer values. This value seems to be the minimum possible forobtaining good results with the signatures used in the tests.

    The following is an example of how a signature is processed from normalization to featureextraction:

    Figure 2: signature projections

  • 8/3/2019 Signature Recognition Using Neural Networks

    4/6

    Finally the corresponding array that will be the input of the neural network is:

    402001153121614800117160000000120000100

    The Artificial Neural Network

    ! The neural network module does the actual signature recognition based on theoutput of the feature extraction module. The network implemented has 3 layers: an inputlayer, a middle (also known as hidden) layer and an output layer. The input layer has thesame number of neurons (nodes) as the number of the ouputs of the previous module, 32.The output layer has as many as neurons as different people using the system i.e. thenumber of people that supplied signatures to be identified. The number of neurons in themiddle layer can be specified by the program user at runtime, by default, 30 neurons areused as this number yielded good results in the experiments.! There are 3 additional values that specify the ANN: alpha (also known asmomentum) which was set at 0.1, beta (also known as learning coefficient) which was setat 0.3 and the threshold, the value of the Mean Squared Error beneath which the ANNtraining ends, which was set at 0.0001, the highest value which did not noticeably reduceaccuracy during the experiments (the higher this value the quicker the training phase willend).

    ! The output of the ANN is an array of doubles (one value for each output neuron)which indicates the probability (between 0 and 1) of the signature tested corresponding toa particular person whose signatures are in the database and that corresponds to thatoutput neuron. Thus each different possible identity corresponds to a different output

    neuron.

    Figure 3: Original Signature, normalized signature, projection at 0 and projection at 90

    Figure 4: Division in blocks (8x2)

  • 8/3/2019 Signature Recognition Using Neural Networks

    5/6

    ! Each neuron of a layer has a weighted link to every neuron of the following layer(feedforward) - there are no links to nodes in the previous layers (feedback). Theseweights represent the knowledge of the ANN (memory or state of learning). Initially theweights are random values and are changed as the ANN is trained, supervised learningusing Back-propagation according to the following algorithm:

    1. Initialize the weights in the network (often randomly)2. 2. repeat* foreach example e in the training set do

    1. O = neural-net-output(network, e) ; forward pass2. T = teacher output for e3. Calculate error (T - O) at the output units4. Compute delta_wi for all weights from hidden layer to

    output layer ; backward pass5. Compute delta_wi for all weights from input layer to

    hidden layer ; backward pass continued6. Update the weights in the network

    * end3. until all examples classified correctly or stopping criterion satisfied4. return(network)

    State of the Project

    ! In its present state the program allows:!

    1 - Importing signatures for the learning phase;! 2 - Training the network using those signatures;! 3 - Signature recognition according to the training;

    Figure 5: ANN shcema. n corresponds to the number of different people(signatures) using the system.

  • 8/3/2019 Signature Recognition Using Neural Networks

    6/6

    ! 4 - Verify the matching percentage of the tested signature to each person in thesystem.

    Currently the program only executes in UNIX platforms because of of the functions usecalls to the UNIX API, namely those functions which require manipulating the filesystem.

    It is important to note that the signatures used for testing recognition are always differentfrom those used to train the network.

    Performance Evaluation

    The most important criteria for the selection of a signature recognition program are:- Accuracy of the answers i.e. if the signatures are correctly identified;- Average time for signature recognition;- Time taken by the training phase.

    The accuracy seems to be pretty good. Occasionally the program is unable to correctlyrecognize a signature (from the test database) or very rarely, two signatures. Most of thetime it is able to correctly recognize all of them (100% accuracy). A curious fact is that thenumber of errors (1, occasionally 2) seems to be constant: when it was presented with 17signatures it would occasionally fail to recognize 1. As the number of signatures in the testdatabase progressively grew to 34, it still only failed to recognize 1 (very rarely, 2)signatures. The test signatures misidentified where not the same.The accuracy of the program thus seems to be good enough but, as expected, not perfect.

    Recognizing a single signature takes only an instant while training the ANN takes several

    minutes depending mainly on the configuration of the network but this is acceptablebecause in real use training would be done rarely (only when adding a new personssignature to the system) in comparison with testing.

    Bibliography

    Hugo Rodrigues, Mrio Lopes, Pedro Pinto, Reconhecimento de Assinaturas Utilizando Redes

    Neuronais

    J. Coetzer, B. M. Herbst, J. A. du Preez, Offline Signature Verification Using the Discrete Radon

    Transform and a Hidden Markov Model

    S.Russel, P.Norvig, Prentice-Hall, "Artificial Intelligence: A Modern Approach"

    Rasha Abbas, A Prototype System For Off-Line Signature Verification Using Multilayered

    Feedforward Neural Networks

    Wikipedia, Brackpopagation

    H. Shivanan, Coding a Pattern Recognition Engine: An Implementation Of Artificial Neural

    Networks