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 β¦