This repository contains code and resources for detecting gastric cancer from Whole Slide Images (WSI) (processed into patch images) using deep learning models.
- Deep Learning Models: Implementations of VGG16, ResNet50, and EfficientNetB0 for image classification.
- Data Processing: Scripts for preprocessing and augmenting WSI data into patch images - smaller images.
- Training and Evaluation: Training models and evaluating their performance.
- Web Application: A simple web interface for uploading and classifying new images.
Data/
: Directory for storing datasets (can be excluded if too large) & script for image processing.TrainModel/
: Scripts for training models.Web/
: Flask web application for image classification.requirements.txt
: Required Python packages.
git clone https://github.com/Harito97/GasHisClassifier.git
cd GasHisClassifier
If you can not download, then zip the repository and download the zip file of all the repository.
Create a virtual environment and install the required packages:
python -m venv env
source env/bin/activate # On Windows, use `env\Scripts\activate`
pip install -r requirements.txt
If the Data/
directory is too large, you can exclude it during the download. The code assumes you have a dataset ready in the Data/
directory. You can organize your dataset as follows:
data_version_xx/
└── train/
├── class1/
├── class2/
└── ...
└── valid/
├── class1/
├── class2/
└── ...
└── test/
├── class1/
├── class2/
└── ...
-
Data Exploration and Clustering:
Include some techniques to explore the data, use clustering algorithms to try classification of images and preprocess the data to make data version 2.
-
Training the Model:
Run Python files with the format
Train_*.py
inTrainModel/
, where*
can beVGGxx
,ResNetxx
,EfficientNetxx
.
-
Start the Web Server:
python Web/app.py
-
Access the Web Application:
Open your browser and navigate to
http://localhost:5000
.
Contributions are welcome! Please open an issue or submit a pull request for any improvements.
This project is licensed under the MIT License.