Skip to content

Fake Naira Detector

CNN experiment with training and test scripts for distinguishing Naira images from synthetically altered examples.

How it’s built

How it’s built

Fake Naira Detector · CNN that classifies Naira notes as genuine or synthetically counterfeit

I built a small Keras CNN that classifies Naira notes as genuine or counterfeit from 64x64 RGB images. I generated the counterfeit class by applying random colormaps, contrast, brightness, noise and blur to genuine notes, giving 576 images across four denominations. A Streamlit app shows training curves and the classification report and runs predictions on uploads.

images (286 genuine, 290 counterfeit) across 4 denominations
576
model parameters
3,937,538
accuracy measured on the training set
0.92
training epochs
9

Technology and what it does here

Keras 3.3 / TensorFlow 2.16
Conv2D(32) > MaxPool > Flatten > Dense(128) > Dense(2 softmax), Adam, categorical cross-entropy
OpenCV + Pillow
Preprocessor.py synthesises counterfeit notes with colormaps, noise and Gaussian blur
Streamlit
Multipage app with charts, sample notes and upload prediction
scikit-learn
Classification_report and accuracy for result/result.csv
pandas
Loads result CSVs and training history for the app's tables and charts

Implementation details

  • Each counterfeit is derived from a real note by grayscale conversion, a random cv2 colormap, random contrast (0.5-1.2) and brightness (0.8-1.5), Gaussian noise and optional blur.
  • The app loads model/fake-naira-notes-detector.h5 and shows per-class probabilities in a dialog.

Technologies

  • Keras
  • Image Classification
  • Synthetic Data

Next project · Quant Trader

Sigmant

Portfolio assistant

Gabriel’s projects, experience, and research