Writer-independent Feature Learning for Offline
Writer-independent Feature Learning for Offline
CNN
training
Writer-Dependent training
Generalization
Decision
(Accept/Reject)
Feature Extraction Verification
Signature Extracted
Image ( ) features ( )
New Sample (from )
Figure 2. The proposed architecture for writer-independent feature learning and writer-dependent classification.
Convolutional Neural Network (detailed in the next section). The second approach consisted in first normalizing the
The result is a function φ(.), learned from data, that projects images to the largest image size, by padding the images with
the input images X to another feature space: φ(X) ∈ Rm , white background. In this case, we centered the signatures in
where m is the dimensionality of the projected feature space. a canvas of size 840 x 1360 pixels, aligning the center of mass
Our expectation is that the features learned using D will be of the signature to the center of the image, similar to previous
useful to separate genuine signatures and forgeries from other approaches in the literature, e.g. [17]. We then rescaled the
users. After the CNN is trained, we create a training dataset images to the desired input size of the neural network.
for each user in set E, using a subset of the user’s genuine With the first approach, less fine-grained information is
signatures, and random forgeries. We use the CNN as a feature lost during the rescaling, specially for the users that have
extractor, obtaining a feature vector φ(X) for each signature small signatures. On the other hand, the width of the pen
X in the user’s dataset. This new representation is then used to strokes becomes inconsistent: for the smaller signatures the
train a binary classifier f . For a new sample Xnew , we first use pen strokes become much thicker than the pen strokes from
the CNN to “extract features” (i.e. obtain the feature vector the larger signatures.
φ(Xnew )) and feed the feature vector to the binary classifier, Besides resizing the images to a standard size, we also
obtaining a final decision f (φ(Xnew )). The next sections detail performed the following pre-processing steps:
the WI and WD training procedures. • Removed the background: we used OTSU’s algorithm
[18] to find the optimum threshold between foreground
A. Pre-processing
and background pixel intensities. Pixels with intensity
For all signatures from both datasets (D and E), we apply larger than the threshold were set to white (intensity
the same pre-processing strategy. The signatures from the 255). The signature pixels (with intensity less than the
GPDS dataset have a variable size, ranging from 153 x 258 threshold) remain unchanged in this step.
pixels to 819 x 1137 pixels. Since for training a neural network • Inverted the images: we inverted the images so that
we need the inputs to have all the same size, we need to the white background corresponded to pixel intensity
normalize the signature images. We evaluated two approaches: 0. That is, each pixel of the image is calculated as:
In the simplest approach, we resized the images to a Iinverted (i, j) ← 255 − I(i, j).
fixed size, using bi-linear interpolation. We perform rescaling • Normalized the input: we normalized the input to the
without deformations, that is, when the original image had a neural network by dividing each pixel by the standard
different width-to-height ratio, we cropped the excess in the deviation of all pixel intensities (from all images in
larger dimension. D). We do not normalize the data to have mean 0
(another common pre-processing step) since we want the Table I
background pixels to be zero-valued. S UMMARY OF THE CNN LAYERS
Brazilian (PUC-PR) 1,5,10,15,30 samples 108 x 30 = 3240 samples 10 samples 10 random, 10 simple, 10 skilled
GPDS-160 4, 8, 12, 14 samples 721 x 14 = 10094 samples 10 samples 30 skilled
GPDS-300 4, 8, 12, 14 samples 581 x 14 = 8134 samples 10 samples 30 skilled
Table IV
C LASSIFICATION ERRORS ON GPDS (%) AND MEAN AUC
Features Classifier FRR FARrandom FARsimple FARskilled EERgenuine + skilled Mean AUCgenuine + skilled
CNN_Brazilian SVM (Linear) 1.00 0.00 1.67 27.17 7.33 0.9668
CNN_Brazilian SVM (RBF) 2.83 0.17 0.17 14.17 4.17 0.9837
CNN_GPDS SVM (Linear) 1.83 0.00 1.33 27.83 11.50 0.9413
CNN_GPDS SVM (RBF) 6.50 0.17 1.17 15.17 8.50 0.9601
CNN_GPDSnorm SVM (Linear) 0.17 0.00 1.67 29.00 6.67 0.9653
CNN_GPDSnorm SVM (RBF) 2.17 0.17 0.50 13.00 4.17 0.9800
Table VI
C OMPARISON WITH THE STATE - OF - THE - ART ON THE B RAZILIAN PUC-PR DATASET ( ERRORS IN %)
Reference Features Classifier FRR FAR_random FAR_simple FAR_skilled AER AERgenuine + skilled EERgenuine + skilled
Bertolini et al. [26] Graphometric SVM (RBF) 10.16 3.16 2.8 6.48 5.65 8.32 -
Batista et al. [27] Pixel density HMM + SVM 7.5 0.33 0.5 13.5 5.46 10.5 -
Rivard et al. [28] ESC + DPDF Adaboost 11 0 0.19 11.15 5.59 11.08 -
Eskander et al. [16] ESC + DPDF Adaboost 7.83 0.02 0.17 13.5 5.38 10.67 -
Present Work CNN_GPDSnorm SVM (RBF) 2.17 0.17 0.50 13.00 3.96 7.59 4.17
with low FAR, while for the Brazilian dataset we obtained the
opposite. This suggests that a global threshold is not sufficient,
and user-specific thresholds should be considered. Better user-
specific thresholds will be explored in future work.
It is worth noting that in the present work we trained the
WD classifiers with a combination of genuine signatures and
random forgeries. This considers a hypothesis that separating
random forgeries from genuine signatures will also make the
classifier separate genuine signatures from skilled forgeries.
This is a weak hypothesis, as we expect the skilled forgeries to
have much more resemblance to the genuine signatures, where
random forgeries should be quite different. However, given
Figure 5. Performance on the Brazilian PUC-PR dataset varying the number that we only have genuine signatures available for training, this
of samples per user for WD training. The error bars show the smallest and
largest AUC of users in the exploitation dataset. is a reasonable option, and has been used extensively in the
literature for Writer-Dependent classification. An alternative is
Table VII to use one-class classification to model only the distribution
C OMPARISON WITH STATE - OF - THE ART ON GPDS-160 ( ERRORS IN %) of the genuine signatures (e.g. [31]), which can be explored
as future work.
Reference Features Classifier FRR FAR EER
We would like to point out that, although the EER metric
Hu and Chen [29] LBP, GLCM, HOG Adaboost - - 7.66
Yilmaz [30] LBP SVM (RBF) - - 9.64 (Equal Error Rate) is useful to have a single number to
Yilmaz [30] LBP, HOG Ensemble of SVMs - - 6.97
Guerbai et al. [31] Curvelet transform OC-SVM 12.5 19.4 -
compare different systems, it relies on implicitly selecting
Present work CNN_GPDSnorm SVM (RBF) 19.81 5.99 10.70 the decision thresholds using information from the test set.
Therefore, it considers the error rate that can be achieved
with the optimal decision threshold for each user. In a real
to compare - the False Acceptance rates for different types of application, the decision thresholds can only be defined using
forgery and the Average Error Rate among all types of error. data from the enrolled users (i.e. using only genuine signature
Besides using these metrics, we also compare with an average from the training/validation set), or in a writer-independent
error rate considering only genuine signatures and skilled way (a single global threshold). Therefore, besides reporting
forgeries, which is more comparable to the results on GPDS. EER, we consider beneficial to also report FAR and FRR,
In this dataset, the proposed method achieves state-of-the-art stating the procedure used to select the thresholds.
performance. The large gap between AERgenuine + skilled and Lastly, we would like to point out that the WD training
EERgenuine + skilled also shows that optimization of user-specific datasets are significantly imbalanced. We have only a few pos-
decision thresholds is necessary to obtain a good system: in itive samples(1-30), and a large amount of random forgeries
the present work the decision thresholds were kept as default (up to 10 thousand for GPDS-160). Methods betters suited for
(scores larger than 0 were considered forgeries). We notice such scenario can also be explored in future work to improve
that, for GPDS, this default threshold achieved a large FRR, the performance of the system.
VI. C ONCLUSION
[12] Y. Bengio, “Learning Deep Architectures for AI,” Foundations and
We presented a two-stage framework for offline signature Trends in Machine Learning, vol. 2, no. 1, pp. 1–127, Jan. 2009.
verification, based on writer-independent feature learning and [13] B. Ribeiro, I. Gonçalves, S. Santos, and A. Kovacec, “Deep learning
networks for off-line handwritten signature recognition,” in Progress in
writer-dependent classification. This method do not rely on Pattern Recognition, Image Analysis, Computer Vision, and Applica-
hand-crafted features, but instead learn them from data in an tions. Springer, 2011, pp. 523–532.
writer-independent format. Experiments conducted on GPDS [14] H. Khalajzadeh, M. Mansouri, and M. Teshnehlab, “Persian Signature
and the Brazilian PUC-PR datasets demonstrate that this Verification using Convolutional Neural Networks,” in International
Journal of Engineering Research and Technology, vol. 1. ESRSA
method is promising, achieving performance close to the Publications, 2012.
state-of-the-art for GPDS and surpassing the state-of-the-art [15] Y. Sun, Y. Chen, X. Wang, and X. Tang, “Deep Learning Face Rep-
performance in the Brazilian PUC-PR dataset. We have shown resentation by Joint Identification-Verification,” in Advances in Neural
Information Processing Systems, 2014, pp. 1988–1996.
that the features seem to generalize well, by learning the
[16] G. Eskander, R. Sabourin, and E. Granger, “Hybrid writer-independent-
features in the GPDS dataset and achieving good results on writer-dependent offline signature verification system,” IET Biometrics,
the Brazilian PUC-PR dataset. Results with small number of vol. 2, no. 4, pp. 169–181, Dec. 2013.
samples per user also demonstrated that this method can be [17] M. R. Pourshahabi, M. H. Sigari, and H. R. Pourreza, “Offline handwrit-
ten signature identification and verification using contourlet transform,”
effective even with few samples per user (4-5 samples). in Soft Computing and Pattern Recognition, International Conference
Lastly, we note that although these methods achieve low of. IEEE, 2009, pp. 670–673.
Equal Error Rates, the actual False Rejection and False Accep- [18] N. Otsu, “A threshold selection method from gray-level histograms,”
tance rates are very imbalanced, and not stable across multiple Automatica, vol. 11, no. 285-296, pp. 23–27, 1975.
[19] G. E. Hinton, N. Srivastava, A. Krizhevsky, I. Sutskever, and R. R.
users and datasets. This highlights the importance of a good Salakhutdinov, “Improving neural networks by preventing co-adaptation
method for defining user-specific thresholds, which we intend of feature detectors,” arXiv e-print 1207.0580, Jul. 2012.
to explore in future work. [20] X. Glorot and Y. Bengio, “Understanding the difficulty of training deep
feedforward neural networks,” in Artificial Intelligence and Statistics,
ACKNOWLEDGMENT International conference on, 2010, pp. 249–256.
[21] J. Bergstra, O. Breuleux, F. Bastien, P. Lamblin, R. Pascanu, G. Des-
This research has been supported by the CNPq grant jardins, J. Turian, D. Warde-Farley, and Y. Bengio, “Theano: a CPU
#206318/2014-6. and GPU math expression compiler,” in Proceedings of the Python for
scientific computing conference (SciPy), vol. 4. Austin, TX, 2010, p. 3.
R EFERENCES [22] S. Dieleman, J. Schlüter, C. Raffel, E. Olson, S. K. Sønderby, D. Nouri,
D. Maturana, M. Thoma, E. Battenberg, J. Kelly, J. D. Fauw, M. Heil-
[1] A. K. Jain, A. Ross, and S. Prabhakar, “An introduction to biometric
man, diogo149, B. McFee, H. Weideman, takacsg84, peterderivaz, Jon,
recognition,” Circuits and Systems for Video Technology, IEEE Trans-
instagibbs, D. K. Rasul, CongLiu, Britefury, and J. Degrave, “Lasagne:
actions on, vol. 14, no. 1, pp. 4–20, 2004.
First release.” Aug. 2015.
[2] R. Plamondon and S. N. Srihari, “Online and off-line handwriting
recognition: a comprehensive survey,” Pattern Analysis and Machine [23] M. Oquab, L. Bottou, I. Laptev, and J. Sivic, “Learning and Transfer-
Intelligence, IEEE Transactions on, vol. 22, no. 1, pp. 63–84, 2000. ring Mid-level Image Representations Using Convolutional Neural Net-
[3] L. G. Hafemann, R. Sabourin, and L. S. Oliveira, “Offline Hand- works,” in Computer Vision and Pattern Recognition, IEEE Conference
written Signature Verification-Literature Review,” arXiv preprint on, Jun. 2014, pp. 1717–1724.
arXiv:1507.07909, 2015. [24] L. G. Hafemann, L. S. Oliveira, P. R. Cavalin, and R. Sabourin, “Transfer
[4] M. Ferrer, M. Diaz-Cabrera, and A. Morales, “Static Signature Synthe- Learning between Texture Classification Tasks using Convolutional
sis: A Neuromotor Inspired Approach for Biometrics,” Pattern Analysis Neural Networks,” in Neural Networks, The 2015 International Joint
and Machine Intelligence, IEEE Transactions on, vol. 37, no. 3, pp. Conference on, 2015.
667–680, Mar. 2015. [25] C. Cortes and V. Vapnik, “Support-vector networks,” Machine Learning,
[5] J. Vargas, M. Ferrer, C. Travieso, and J. Alonso, “Off-line Handwritten vol. 20, no. 3, pp. 273–297, Sep. 1995.
Signature GPDS-960 Corpus,” in Document Analysis and Recognition, [26] D. Bertolini, L. S. Oliveira, E. Justino, and R. Sabourin, “Reducing
9th International Conference on, vol. 2, Sep. 2007, pp. 764–768. forgeries in writer-independent off-line signature verification through
[6] Y. Serdouk, H. Nemmour, and Y. Chibani, “Off-line handwritten sig- ensemble of classifiers,” Pattern Recognition, vol. 43, no. 1, pp. 387–
nature verification using variants of local binary patterns,” Networking 396, Jan. 2010.
and Advanced Systems, 2nd International Conference on, p. 75, 2015. [27] L. Batista, E. Granger, and R. Sabourin, “Dynamic selection of genera-
[7] S. Pal, S. Chanda, U. Pal, K. Franke, and M. Blumenstein, “Off-line tive–discriminative ensembles for off-line signature verification,” Pattern
signature verification using G-SURF,” in Intelligent Systems Design and Recognition, vol. 45, no. 4, pp. 1326–1340, Apr. 2012.
Applications, 12th International Conference on. IEEE, 2012, pp. 586–
[28] D. Rivard, E. Granger, and R. Sabourin, “Multi-feature extraction and
591.
selection in writer-independent off-line signature verification,” Interna-
[8] A. Krizhevsky, I. Sutskever, and G. E. Hinton, “ImageNet Classification
tional Journal on Document Analysis and Recognition, vol. 16, no. 1,
with Deep Convolutional Neural Networks,” in Advances in Neural
pp. 83–103, 2013.
Information Processing Systems 25, 2012, pp. 1097–1105.
[9] C. Freitas, M. Morita, L. Oliveira, E. Justino, A. Yacoubi, E. Lethelier, [29] J. Hu and Y. Chen, “Offline Signature Verification Using Real Adaboost
F. Bortolozzi, and R. Sabourin, “Bases de dados de cheques bancarios Classifier Combination of Pseudo-dynamic Features,” in Document
brasileiros,” in XXVI Conferencia Latinoamericana de Informatica, Analysis and Recognition, 12th International Conference on, Aug. 2013,
2000. pp. 1345–1349.
[10] N. A. Murshed, F. Bortolozzi, and R. Sabourin, “Binary image com- [30] M. B. Yilmaz, “Offline Signature Verification With User-Based And
pression using identity mapping backpropagation neural network,” in Global Classifiers Of Local Features,” Ph.D. dissertation, Sabancı Uni-
Electronic Imaging’97. International Society for Optics and Photonics, versity, 2015.
1997, pp. 29–35. [31] Y. Guerbai, Y. Chibani, and B. Hadjadji, “The effective use of the
[11] N. A. Murshed, R. Sabourin, and F. Bortolozzi, “A cognitive approach to one-class SVM classifier for handwritten signature verification based
off-line signature verification,” International Journal of Pattern Recog- on writer-independent parameters,” Pattern Recognition, vol. 48, no. 1,
nition and Artificial Intelligence, vol. 11, no. 05, pp. 801–825, 1997. pp. 103–113, Jan. 2015.