This project builds a full image processing and computer vision pipeline to classify South African bank notes across five denominations: R10, R20, R50, R100, and R200, covering both old and new series notes.
# 💵 South African Bank Notes Recognition
This project builds a full image processing and computer vision pipeline to classify South African bank notes across five denominations: R10, R20, R50, R100, and R200, covering both old and new series notes.
The pipeline follows four stages:
1. **Preprocessing and Enhancement** — grayscale conversion, CLAHE, and Gaussian blur to normalise images
2. **Segmentation** — Otsu's thresholding and Canny edge detection to isolate the note from its background
3. **Feature Extraction** — HOG, LBP, and colour histograms combined into one feature vector per image
4. **Classification** — SVM, Random Forest, and KNN trained and compared on the extracted features
The system is invariant to the side photographed (front or back), scale, and rotation.
---
## 🗂️ Repository Structure
```
.
├── South African Bank Note Recognition.ipynb # Main notebook — run this
├── dataset/ # Place your image dataset here (see below)
│ ├── R10/
│ ├── R20/
│ ├── R50/
│ ├── R100/
│ └── R200/
└── README.md
```
---
## 🛠️ Requirements
The notebook runs on Python 3.10 or later. Install dependencies with:
```bash
pip install numpy opencv-python scikit-image scikit-learn matplotlib seaborn Pillow ipywidgets joblib
```
Or if you are on Google Colab, all of these are already available except `ipywidgets`, which Colab also includes by default.
---
## 📂 Dataset Setup
The notebook expects images organised into denomination subfolders. Each subfolder should be named after its denomination exactly as shown below.
**For local execution**, place the `dataset/` folder in the same directory as the notebook:
```
South African Bank Note Recognition.ipynb
dataset/
R10/ ← images of R10 notes (front and back, old and new series)
R20/
R50/
R100/
R200/
```
**For Google Colab**, upload the `dataset/` folder to your Google Drive at the following path before running:
```
MyDrive/dataset/
```
The notebook automatically detects whether it is …