π§ Custom CNN for classifying Ancient Egyptian artifacts β 96% accuracy, built from scratch with live API deployment.
# π§ Image Classification from Scratch using CNN
This deep learning project demonstrates the end-to-end development of an image classification system using a **custom Convolutional Neural Network (CNN)** architecture, built entirely **from scratch** β without relying on pre-trained models.
> π **Key Achievements:**
> β
Built CNN model from zero (no transfer learning)
> β
Achieved **96% test accuracy** on unseen data
> β
Designed a robust pipeline including cleaning, augmentation, training, evaluation, and deployment
> β
Deployed on Hugging Face with live API access
---
## π Project Contents
| Notebook | Description |
|-------------------------|----------------------------------------------------------|
| `01_data_analysis.ipynb` | Initial EDA, class distribution analysis, imbalance insights |
| `02_data_augmentation_static.ipynb` | Data augmentation techniques to address class imbalance |
| `03_model_attempt1_88acc.ipynb` | First baseline CNN model with 88% accuracy |
| `04_model_final_96acc.ipynb` | Final refined CNN model with 96% accuracy |
| `class_info.json`| Contains general descriptive information about each class, used to display names during testing and inference |
| `deployment/` | Scripts and links for online inference API |
| `example_request.ipynb` | Upload an image and send it to the deployed Hugging Face API for testing |
> ποΈ **Note:** The notebooks `01_data_analysis.ipynb` and `02_data_augmentation_static.ipynb` contain some printed messages in Arabic. This **does not affect any code functionality** or the results.
---
## π§Ό Dataset Preparation & Cleaning
The dataset was originally based on publicly available resources, including:
- Egypt Monuments Dataset on GitHub
Additionally, more images were **manually collected** from various online websites to enrich and balance the dataset.
- Broken/corrupted images were dete β¦