Skip to content

A Custom CNN model aims to assist in the automated analysis of histopathological images, potentially aiding in early cancer diagnosis and medical research.

License

Notifications You must be signed in to change notification settings

Ghost-141/Lung_Colon_Cancer_Classification_with_CNN

Repository files navigation

Lung-Colon Cancer Classifier Logo Deep Learning based Lung-Colon Cancer Classifier

A Custom Deep Learning model designed to distinguish between different types of lung and colon cancer from histopathological images (Dataset)

The dataset consists of 5 Classes:

  1. Colon Adenocarcinoma (colon_aca),
  2. Normal Colon Tissue (colon_n),
  3. Lung Adenocarcinoma (lung_aca),
  4. Normal Lung Tissue (lung_n)
  5. Lung Squamous Cell_Carcinoma (lung_scc).

This repository contains a pre-trained model, a Jupyter notebook demonstrating the model preparation process, and a Gradio-powered web interface for testing the model.

Table of Contents

Introduction

This project utilizes the PyTorch framework and a Convolutional Neural Network (CNN) model to classify histopathological images of lung and colon cancer across five different classes. The model is trained to distinguish between different types of lung and colon tissue samples, leveraging deep learning for accurate classification.

Usage

  • Download the folder and make sure to install all libraries from the requirements file.
  • Ensure that the pre-trained LungDisease_Classfier file is in the project directory
  • Run the classify.py file to launch the web-interface and upload image to classify it's class.

Features

  • Custom pre-trained model for quick use on lung and colon cancer classification task.
  • Jupyter notebook to demonstrate the whole process of model training and testing using pytorch.
  • Gradio web interface for easy testing and interaction.
  • Lightweight model without any quantization for deployment on edge device.

Installation

  • for pip installation use command pip install -r requirements.txt
  • for conda installation use command conda install --file requirements.txt
  • make sure to run the commands in administrator mode to avoid any issue.

Model Info

  • Achieved an accuracy of 97% on test dataset.
  • Model was only trained for 10 epochs.
  • Lightweight model with a size of only 18.1 MB

Web Interface

  • Used the gradio to make a simple web interface for simplified user interaction.
  • Test the app using the sample images.

Conclusion

  • Having any issue or suggestion feel free to reach out.
  • Please give it a star if you find it useful.

About

A Custom CNN model aims to assist in the automated analysis of histopathological images, potentially aiding in early cancer diagnosis and medical research.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published