Handwritten Digit Classification

Subhransu Maji and Jitendra Malik

This page contains the code and details of the paper:
Fast and Accurate Digit Classification.
Subhransu Maji and Jitendra Malik
EECS Department, UCB, Tech. Rep. UCB/EECS-2009-159, Nov. 2009

Abstract :

We explore the use of certain image features, blockwise histograms of local orientations, used in many current object recognition algorithms, for the task of handwritten digit recognition. Existing approaches find that polynomial kernel SVMs trained on raw pixels achieve state of the art performance. However such kernel SVM approaches are impractical as they have a huge complexity at runtime. We demonstrate that with improved features a low complexity classifier, in particular an additive-kernel SVM, can achieve state of the art performance. Our approach achieves an error of 0.79% on the MNIST dataset and 3.4% error on the USPS dataset, while running at speeds comparable to the fastest algorithms on these datasets which are based on multilayer neural networks and are significantly faster and easier to train.


  • Source code : mnist-sphog.tar.gz
      Raw pixel features & Linear/Intersection/Polynomial/RBF kernel SVMs
    • sphog features & Linear/Intersection kernel SVMs


The code is organized into several folders:
  • classifiers:
  • data: MNIST dataset downloaded from url.
  • io : code to read/normalize the data
  • feat-code : code to compute sphog features
  • training : code to train/test models

MNIST Dataset Errors