A simple K-Nearest Neighbors (KNN) classifier to recognize handwritten digit input, trained on the MNIST dataset kindly borrowed from THE MNIST DATABASE of handwritten digits.
- Clone the repo
- Upload a handwritten digit (black number on white background) to the
local_test_image/
folder. Setimage_path
to the respective file path - Run the program
python main.py
The output will display handwritten digit prediction and its nearest three neighbors (if uncommented in display_results()
)