W2D: 2 dimensional warping for image recognition
Description
W2D is a software package for appearance based image recognition
supporting different pixel to pixel deformation models:
- no deformation
- image distortion model (IDM)
- warped wake two-dimensional hidden Markov model (WW)
- pseudo two-dimensional hidden Markov model (P2DHMM)
- pseudo two-dimensional hidden Markov distortion model (P2DHMDM)
- simulated annealing two-dimensional hidden Markov distortion model (SA)
- NEW: Hungarian distortion model (HDM)
Authors
W2D was developed in the course of the diploma thesis of Christian
Gollan in 2003 (tutor: D. Keysers, supervisor: H. Ney). It has been
(and continues to be)
extended by Daniel
Keysers and
Thomas Deselaers with some new deformation models.
License
W2D is released unter the GNU General Public
License Version 2.
Download
w2dsrc.tar.bz2
You are welcome to use the code under the terms of the licence for
research or commercial purposes, however please acknowledge its
use with a citation to one of the publications below, e.g. [1]
for handwritten characters or general images and [2] for medical
images.
The code is in constant development and more features will be
added in the future. If you find bugs or have questions please contact
one of the authors.
Publications
-
D. Keysers, C. Gollan, and H. Ney.
Local Context in Non-linear Deformation Models for Handwritten Character Recognition.
In ICPR
2004, International Conference on Pattern Recognition,
Cambridge, UK, August 2004.
-
D. Keysers, C. Gollan, and H. Ney. Classification
of Medical Images using Non-linear Distortion Models. In
BVM
2004, Bildverarbeitung für die Medizin 2004,
Berlin, Germany, pages 366-370, March 2004. (.pdf)
- C. Gollan. Non-Linear Deformation Models for Image Object
Recognition (in German). Diploma Thesis, Lehrstuhl für
Informatik VI, RWTH Aachen University, Aachen, Germany,
September 2003. .pdf, .ps,
.ps.gz)
Results
Usage
-
Example usage to obtain a result of 2.4% error rate on the USPS
corpus with the image distortion model:
W2D usps_train.jf usps_test.jf -Dsobelv:euc2rec3x3:0.5,sobelh:euc2rec3x3:0.5 -MID -W2 | classifier -
meaning:
- use usps_train.jf as train data, usps_test.jf as test data
- use the following features: vertical sobel with 3x3 sub
images and squared Euclidean distance and weight 0.5, same
for horizontal gradient
- use the distortion method ID, i.e. image distortion model
method
- use warp range 2
-
Example usage to obtain a result of 2.2% error rate on the USPS
corpus using the Hungarian distortion model:
W2D usps_train.jf usps_test.jf -Dsobelv:euc2rec3x3:0.5,sobelh:euc2rec3x3:0.5,posx:euc2:0.005,posy:euc2:0.005 -MHUNG | classifier -
meaning:
- use usps_train.jf as train data, usps_test.jf as test data
- use the following features: vertical sobel with 3x3 sub
images and squared Euclidean distance and weight 0.5, same
for horizontal gradient, x-position with squared Euclidean
distance and weigth 0.005, same for y-position
- use the distortion method HUNG, i.e. Hungarian distortion
method
-
Example usage to obtain a result of 1.9% error rate on the USPS
corpus using the pseudo-2D hidden Markov distortion model:
W2D usps_train.jf usps_test.jf -Dsobelv:euc2rec3x3:0.5,sobelh:euc2rec3x3:0.5 -MP2DHMD -O3 -LNO-N1000-Dimage:euc2:1.disdat.gz | classifier -k3 -
meaning:
- use usps_train.jf as train data, usps_test.jf as test data
- use the following features: vertical sobel with 3x3 sub
images and squared Euclidean distance and weight 0.5, same
for horizontal gradient
- use the distortion method P2DHM, i.e. pseudo-2D hidden
Markov distortion model
- add a border of 3 pixels around the images
- use the first 1000 nearest neighbors according to the
file
NO-N1000-Dimage:euc2:1.disdat.gz
(which
was produced using NO distortion and "pure" Euclidean
distance)
- use the 3-nearest neighbor classifier
Examples
left to right: test image, distorted reference image, distortion grid, reference image (produced using the -x -p options to W2D)
- HDM
- IDM
- HDM
- HDM
- IDM
- IDM
- P2DHMM
- P2DHMM
- P2DHMDM

- P2DHMDM

- WW

- WW

Christian Gollan,Thomas Deselaers, Daniel Keysers
Last modified: Tue Jun 1 23:06:28 CEST 2004