An end-to-end deep learning project for detecting Adenocarcinoma cancer from chest CT scan images. The project is designed with production-grade MLOps practices, covering everything from data ingestion and training to deployment with automated CI/CD pipelines.
- Transfer Learning using EfficientNetB0
- Modular, reusable training pipeline
- MLflow for experiment tracking & model versioning
- DVC for reproducible data and pipeline management
- FastAPI-based REST API
- Simple web UI with image upload support
- Model lazy loading & caching for fast inference
- Health-check endpoint for monitoring
- CI/CD pipelines using GitHub Actions
- Dockerized application for consistent deployment
- AWS ECS ready deployment workflow
- Environment-based configuration for secrets
- TensorFlow & Keras
- EfficientNetB0
- NumPy, Pandas
- MLflow
- DVC
- DagHub
- FastAPI
- Uvicorn
- Python-multipart
- HTML + TailwindCSS
- Vanilla JavaScript
- Docker
- GitHub Actions
- AWS ECS & ECR
├── .github/
│ └── workflows/
│ └── main.yaml # CI/CD pipeline
├── artifacts/
│ ├── data_ingestion/ # Raw & processed data
│ ├── prepare_base_model/ # Base & updated models
│ └── training/ # Trained models & logs
├── config/
│ └── config.yaml # Central configuration
├── src/cnnClassifier/
│ ├── components/ # Core ML components
│ ├── pipeline/ # Training & inference pipelines
│ ├── config/ # Configuration manager
│ ├── entity/ # Dataclasses
│ ├── utils/ # Utility helpers
│ └── constants/
├── templates/
│ └── index.html # Web UI
├── app.py # FastAPI app
├── main.py # Training pipeline entry
├── dvc.yaml # DVC pipeline
├── params.yaml # Model parameters
├── requirements.txt
├── Dockerfile
├── .dockerignore
└── README.md
- Python 3.10+
- Docker (optional)
- AWS CLI (for cloud deployment)
-
Clone the repository
git clone https://github.com/CodeBy-HP/Chest-Cancer-Classification.git cd Chest-Cancer-Classification -
Create & activate virtual environment
python -m venv venv source venv/bin/activate # Linux / macOS # venv\\Scripts\\activate # Windows
-
Install dependencies
pip install -r requirements.txt
-
Configure environment variables
cp .env.example .env # update credentials inside .env -
Run the application
python app.py
Visit: http://localhost:8000
# Build image
docker build -t chest-cancer-classifier .
# Run container
docker run -p 8000:8000 --env-file .env chest-cancer-classifier# Run full training pipeline
python main.py
# Or via DVC
dvc repro⭐ Star this repository if you find it useful ⭐