How mwasifanwar/mediscanai works
Project Type and Purpose
• This is a full-stack, deep-learning–driven medical image diagnosis assistant (“MediScan AI”) with both a web interface (Flask) and a CLI. It ingests multi-modal inputs (images + clinical metadata), runs them through a custom PyTorch model (multi-branch image & clinical encoders + fusion + classifier), produces explainable outputs (Grad-CAM), and can be trained and deployed in Dockerized environments.
File-Structure & Architectural Clues
• Top-level:
• app/ (Flask web server entry point, models, utils)
• train.py, inference.py (CLI entrypoints)
• data/ (sample-data generator)
• config.yaml (system and model parameters)
• tests/ (unit tests)
• app/models: multimodal_model.py (feature encoders + fusion + classifier) & explainable_ai.py (Grad-CAM module)
• app/utils: config management, data loading, preprocessing
• External build/deploy hints: requirements.txt, Docker, Gunicorn
README Insights
• Multi-branch architecture: image encoder (ResNet/DenseNet) + clinical encoder (MLP) → feature fusion → multi-head classifier
• Workflow: data ingestion (DICOM/PNG/JPEG) → preprocessing → multi-modal processing → explainability (Grad-CAM)
• Deployment: Flask REST API, optional React frontend, Docker containerization, Gunicorn WSGI
Diagramming Conventions
• Blue rectangles for “Compute Services” (Flask API, Model Service, Training Engine)
• Orange parallelograms for “Clients” (Browser/React, CLI)
Final Advice
• Be exhaustive: include all major directories/modules as components
• Multi-modal fusion and explainability path
• Keep component names matching file names (e.g., app/utils/data_loader.py → “Data Loader”)