This repository contains Jupyter notebooks, dataset organization, and training/evaluation experiments for building deep convolutional neural networks to detect oral (tongue) lesions and visualize model decisions using Grad-CAM.
-
*.ipynb— Several Jupyter notebooks for dataset splitting, augmentation, training and Grad-CAM visualizations. Notable notebooks:1_traintestvalsplit.ipynb— data split (train/test/val)2_Augmentation.ipynb— augmentation pipeline used during experimentscnn-basemodel-training-and-eval.ipynb— baseline CNN training and evaluationdensenet-training-and-eval.ipynb— DenseNet-based experimentsinception-training-and-eval.ipynb— Inception-based experimentsmobilenet-training-and-eval.ipynb— MobileNet experimentsxception-training-and-eval.ipynb— Xception experimentsGrad-cam-mobilenet-roi_48.ipynb,Grad-cam-mobilenet-roi-56.ipynb,Grad-cam-mobilenet-roi-65.ipynb,Grad-cam-mobilenet-roi-121.ipynb— Grad-CAM visualization notebooks for different MobileNet variants and ROI sizes
-
Tonguedata/— dataset folder with class subfolders:normal/potential_benign/potential_malignant/
Note: This repository currently uses Jupyter notebooks as the primary artefacts. If you plan to run full training outside notebooks, consider extracting code into Python scripts for reproducibility.
The Tonguedata/ used in this project is derived from the "Oral Images Dataset" (2021). We gratefully acknowledge the original dataset creators:
Authors:
- H. Chandrashekar
- A. G. Kiran
- S. Murali
- M. Dinesh
- B. Nanditha
Source: The dataset is available on Mendeley Data:
License: This dataset is licensed under the Creative Commons Attribution 4.0 International License.
When using this code or the dataset, please cite the original work:
Chandrashekar, H., Kiran, A. G., Murali, S., Dinesh, M., & Nanditha, B. (2021). Oral Images Dataset [Data set]. Mendeley Data, V2. https://doi.org/10.17632/mhjyrn35p4.2
- Train CNN models to classify tongue images into normal / potential_benign / potential_malignant
- Evaluate models (accuracy, confusion matrix, class-wise metrics)
- Produce Grad-CAM visual explanations to localize evidence for model decisions
- Python 3.8–3.10
- Jupyter (Notebook or Lab)
- TensorFlow (2.x) or Keras (if using a separate Keras installation)
- Common data science packages: numpy, pandas, scikit-learn, matplotlib, seaborn
- OpenCV (cv2) for image processing
If you have a GPU and want to leverage it, install the appropriate tensorflow build that supports your CUDA/cuDNN versions (see TensorFlow official install guide).
- Start the Jupyter server from the project root:
jupyter lab
# or
jupyter notebook- Open the notebook you want to run. Typical workflow:
- Run
1_traintestvalsplit.ipynbto produce the train/val/test splits (or confirm the existing splits) - Run
2_Augmentation.ipynbto preview augmentation settings - Run a training notebook such as
mobilenet-training-and-eval.ipynbordensenet-training-and-eval.ipynb - Open the corresponding
Grad-cam-*.ipynbnotebook to generate visual explanations for selected images/models
- Run
Notes:
- Some notebooks may assume specific directory paths or precomputed splits; open the first cells in a notebook and adjust paths if necessary.
- Evaluation metrics and plots (training curves, confusion matrices)
- Grad-CAM heatmap overlays demonstrating which regions influenced predictions
This project is licensed under the MIT License - see the LICENSE file for details.
For questions about the experiments or dataset, contact the repository owner.