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.
- Overview
- Features
- Models
- Prerequisites
- Installation
- Model Setup
- Usage
- Project Structure
- Technologies Used
- Contributing
- License
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.
- 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
The project includes four pre-trained deep learning models:
- best_model_2.h5 - Primary cancer classification model
- UC.h5 - Specialized classification model
- my_gall.h5 - Gallery-based classification model
- organclassifier.h5 - Organ classification model
All models are built using Keras/TensorFlow and saved in HDF5 format.
- Python 3.7 or higher
- pip (Python package installer)
- Virtual environment (recommended)
git clone https://github.com/kartik912/cancerClassificationAndPrediction.git
cd cancerClassificationAndPrediction# Windows
python -m venv venv
venv\Scripts\activate
# Linux/Mac
python3 -m venv venv
source venv/bin/activatepip install -r requirements.txtThe trained models need to be downloaded separately due to their large file sizes. Follow these steps:
Download all four model files from the following Google Drive links:
- best_model_2.h5: Download Link
- UC.h5: Download Link
- my_gall.h5: Download Link
- organclassifier.h5: Download Link
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
- Ensure all models are placed in the
model21folder - Navigate to the project directory
- Run the Django development server:
python manage.py runserver- Open your web browser and navigate to:
http://127.0.0.1:8000/
python manage.py runserver 8080Then access at: http://127.0.0.1:8080/
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]
- Backend Framework: Django
- Deep Learning: TensorFlow/Keras
- Model Format: HDF5 (.h5)
- Database: SQLite (default Django database)
- Python Libraries: Listed in
requirements.txt
Issue: Application crashes or throws "model not found" error
Solution: Ensure all four .h5 files are downloaded and placed in the model21 folder
Issue: Import errors when running the server
Solution: Make sure all dependencies are installed via pip install -r requirements.txt
Issue: Port 8000 is already occupied
Solution: Use a different port: python manage.py runserver 8080
Contributions are welcome! Please follow these steps:
- Fork the repository
- Create a new branch (
git checkout -b feature/improvement) - Make your changes
- Commit your changes (
git commit -am 'Add new feature') - Push to the branch (
git push origin feature/improvement) - Create a Pull Request
For questions or support, please open an issue in the GitHub repository.
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.
- 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.