Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Character Recognition Neural Network (NumPy, from scratch)

35-class classifier: uppercase letters A-Z and digits 1-9. Implemented with NumPy only (no TensorFlow/PyTorch/Keras).

How to run

pip install numpy pillow matplotlib

# 1. Generate the dataset (synthetic, font-rendered + augmented, no internet needed)
python3 data/generate_dataset.py

# 2. (optional) sanity-check preprocessing/splits
python3 data/preprocess.py

# 3. Train the network (forward -> backprop -> gradient descent, with validation loop)
python3 train.py

# 4. Evaluate on the held-out test set (confusion matrix, precision/recall/F1, error analysis)
python3 evaluate.py

Files

  • data/generate_dataset.py - synthetic dataset generation (fonts + augmentation)
  • data/preprocess.py - flatten / normalize / one-hot / stratified split
  • model/neural_network.py - the from-scratch NumPy neural network
  • train.py - training loop + validation loop
  • evaluate.py - test evaluation, confusion matrix, error analysis
  • outputs/ - saved trained weights, training history, eval results, final report
  • report_assets/ - generated figures (sample grid, training curves, confusion matrix, errors)

Results

  • Test accuracy:84.19%
  • Macro F1: 84.19%

See outputs/Character_Recognition_NN_Report.docx for the full methodology and analysis report.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages