Skip to the content.

Oral Cancer Detection Demo

A production-ready Flask web application for oral cancer detection using deep learning.

πŸš€ Quick Start

1. Install Dependencies

pip install -r requirements.txt

2. Model Included βœ…

Trained CNN model is included:

The app will load this model automatically for real AI predictions.

3. Run the App

python app.py

4. Open Browser

Navigate to: http://localhost:5000

πŸ“ File Structure

oral-cancer-detection-demo/
β”œβ”€β”€ app.py                 # Main Flask application
β”œβ”€β”€ requirements.txt       # Python dependencies
β”œβ”€β”€ README.md             # This file
β”œβ”€β”€ model/                # Model directory
β”‚   └── oral_cancer_model.keras  # Trained CNN model (43MB)
β”œβ”€β”€ uploads/              # Temporary upload directory
β”œβ”€β”€ static/
β”‚   β”œβ”€β”€ css/             # Stylesheets
β”‚   └── js/              # JavaScript files
└── templates/           # HTML templates
    β”œβ”€β”€ index.html       # Upload page
    β”œβ”€β”€ result.html      # Results page
    └── about.html       # About page

πŸ”§ Features

🌐 API Usage

Endpoint: /api/predict

Method: POST

Request:

curl -X POST -F "image=@oral_image.jpg" http://localhost:5000/api/predict

Response:

{
  "success": true,
  "predicted_class": "Normal (Non-Cancerous)",
  "confidence": 92.45,
  "risk_level": "Very Low Risk",
  "recommendation": "βœ… No significant indicators detected...",
  "model_loaded": true
}

🚦 Demo Mode vs Production

Demo Mode:

Production Mode:

πŸ₯ Medical Disclaimer

⚠️ This tool is for research and educational purposes only.

πŸ‘¨β€πŸ’» Developer

Umar Ranginwala

πŸ“„ License

Academic research project - Gujarat University