Skip to content

kartik912/cancerClassificationAndPrediction

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cancer Classification and Prediction

A Django-based web application for cancer classification and prediction using deep learning models. This project implements multiple neural network models for various cancer detection and organ classification tasks.

📋 Table of Contents

🎯 Overview

This application leverages deep learning models to assist in cancer classification and prediction tasks. The system provides a user-friendly web interface built with Django, allowing users to interact with pre-trained neural network models for various diagnostic purposes.

✨ Features

  • Multi-Model Support: Includes multiple trained models for different cancer classification tasks
  • Web-Based Interface: Easy-to-use Django web application
  • Real-time Predictions: Get instant predictions from uploaded medical data
  • Organ Classification: Specialized model for organ classification
  • Scalable Architecture: Built on Django framework for easy expansion

🤖 Models

The project includes four pre-trained deep learning models:

  1. best_model_2.h5 - Primary cancer classification model
  2. UC.h5 - Specialized classification model
  3. my_gall.h5 - Gallery-based classification model
  4. organclassifier.h5 - Organ classification model

All models are built using Keras/TensorFlow and saved in HDF5 format.

📦 Prerequisites

  • Python 3.7 or higher
  • pip (Python package installer)
  • Virtual environment (recommended)

🚀 Installation

1. Clone the Repository

git clone https://github.com/kartik912/cancerClassificationAndPrediction.git
cd cancerClassificationAndPrediction

2. Create Virtual Environment (Optional but Recommended)

# Windows
python -m venv venv
venv\Scripts\activate

# Linux/Mac
python3 -m venv venv
source venv/bin/activate

3. Install Dependencies

pip install -r requirements.txt

📥 Model Setup

The trained models need to be downloaded separately due to their large file sizes. Follow these steps:

1. Download Models

Download all four model files from the following Google Drive links:

2. Place Models in Correct Directory

After downloading, place all four .h5 model files in the model21 folder:

cancerClassificationAndPrediction/
└── model21/
    ├── best_model_2.h5
    ├── UC.h5
    ├── my_gall.h5
    └── organclassifier.h5

💻 Usage

Running the Development Server

  1. Ensure all models are placed in the model21 folder
  2. Navigate to the project directory
  3. Run the Django development server:
python manage.py runserver
  1. Open your web browser and navigate to:
http://127.0.0.1:8000/

Running on a Custom Port

python manage.py runserver 8080

Then access at: http://127.0.0.1:8080/

📁 Project Structure

cancerClassificationAndPrediction/
├── model21/                  # Directory for trained models
│   ├── best_model_2.h5
│   ├── UC.h5
│   ├── my_gall.h5
│   └── organclassifier.h5
├── manage.py                 # Django management script
├── requirements.txt          # Python dependencies
├── db.sqlite3               # SQLite database (created on first run)
└── [other Django app files]

🛠️ Technologies Used

  • Backend Framework: Django
  • Deep Learning: TensorFlow/Keras
  • Model Format: HDF5 (.h5)
  • Database: SQLite (default Django database)
  • Python Libraries: Listed in requirements.txt

🔧 Common Issues and Troubleshooting

Models Not Found Error

Issue: Application crashes or throws "model not found" error
Solution: Ensure all four .h5 files are downloaded and placed in the model21 folder

Module Import Errors

Issue: Import errors when running the server
Solution: Make sure all dependencies are installed via pip install -r requirements.txt

Port Already in Use

Issue: Port 8000 is already occupied
Solution: Use a different port: python manage.py runserver 8080

🤝 Contributing

Contributions are welcome! Please follow these steps:

  1. Fork the repository
  2. Create a new branch (git checkout -b feature/improvement)
  3. Make your changes
  4. Commit your changes (git commit -am 'Add new feature')
  5. Push to the branch (git push origin feature/improvement)
  6. Create a Pull Request

📧 Contact

For questions or support, please open an issue in the GitHub repository.

⚠️ Disclaimer

This application is for educational and research purposes only. It should not be used as a substitute for professional medical advice, diagnosis, or treatment. Always consult with qualified healthcare professionals for medical decisions.

🙏 Acknowledgments

  • Thanks to all contributors and the open-source community
  • Deep learning models trained on publicly available medical datasets

Note: Make sure to keep your models and sensitive data secure. Never commit large model files directly to the repository.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published