Handwritten Digit Recognition With CNNs

Machine LearningTensorFlowOpenCVComputer Vision

Built a handwritten digit recognition system that goes beyond single digits. It can automatically segment them and read them in the right order.

What it does: recognizes single digits with 98%+ accuracy, automatically segments and reads multi-digit numbers, runs a real-time drawing interface with instant predictions, shows confidence scores for each digit, and works with numbers up to 6 digits long.

Tech stack: TensorFlow/Keras for the CNN model, OpenCV for image processing and digit segmentation, tkinter for the GUI, and NumPy for data handling.

The biggest challenge was the segmentation algorithm. Had to use contour detection and morphological operations to separate digits that might be touching or have weird spacing, then ensure the digits are read left-to-right in the correct sequence.

Results: 99% training accuracy, 98.5% test accuracy, and predictions happen in under 100ms. Could be useful for postal code recognition, form processing, or any application that needs to read handwritten numbers.