Daily Python Projects

Daily Python Projects

Recognizing Handwritten Numbers with Python and TensorFlow

Level: Real-World

Ardit Sulce's avatar
Ardit Sulce
Jul 15, 2024
∙ Paid

Project Brief

Today we will build a program that recognizes handwritten digits using Python and the TensorFlow machine learning framework.

Please download this NPZ dataset. The dataset contains both training images and testing images. These are small images of handwritten numbers from 0 to 9. Here is an example of an image containing the digit “7”.

Your steps to building the program would be:

  1. Import the libraries

  2. Load the dataset and preprocess the data

  3. Build and compile the model

  4. Train the model using the training data

  5. Evaluate the model

  6. Make predictions using the testing data

If you want to view the NPZ dataset images before starting with the project, you can use the following Python script. It will display the 34th image of the training data. You can change the “33” index in the code to another number to see another image.

Keep reading with a 7-day free trial

Subscribe to Daily Python Projects to keep reading this post and get 7 days of free access to the full post archives.

Already a paid subscriber? Sign in
© 2025 Ardit Sulce
Privacy ∙ Terms ∙ Collection notice
Start your SubstackGet the app
Substack is the home for great culture