A comprehensive web application for detecting and classifying brain tumors from MRI scans using deep learning.
The system follows a microservice architecture with three main components:
- Frontend (React/TypeScript): User interface for uploading MRI scans, viewing results, and managing user data.
- Backend API (Node.js/Express): Main API server handling authentication, user management, and analysis storage.
- ML Service (Python/FastAPI): Specialized microservice for ML inference that processes MRI images and returns tumor detection results.
+-------------------+ +--------------------+ +--------------------+
| | | | | |
| React Frontend |----->| Node.js Backend |----->| Python ML Service |
| | | | | |
+-------------------+ +--------------------+ +--------------------+
^ |
| v
| +-------------------+
+------------------| MongoDB |
+-------------------+
- Node.js (v14+) and npm
- Python 3.8+ and pip
- MongoDB database (local or Atlas)
-
Navigate to the server directory:
cd server -
Install Python dependencies:
pip install -r requirements.txt -
Configure environment variables by editing
.env.fastapifile:- Set
MODEL_PATHto the location of your model file - Set
PORTto the desired port (default: 6000)
- Set
-
Start the ML Service:
python main.py
-
Navigate to the server directory:
cd server -
Install Node.js dependencies:
npm install -
Configure environment variables by editing
.envfile:- Set
MONGODB_URIto your MongoDB connection string - Set
JWT_SECRETand other security settings - Ensure
ML_SERVICE_URLpoints to your running ML Service
- Set
-
Start the Node.js server:
npm run dev
-
Navigate to the frontend directory:
cd cortex-view-app-main -
Install dependencies:
npm install -
Start the development server:
npm run dev
The system uses a deep learning model trained on MRI brain scans to detect and classify four categories:
- Meningioma: A tumor that grows in the membranes that cover the brain and spinal cord
- Glioma: Tumors that grow in the brain or spinal cord, starting in the glial cells
- Pituitary: Tumors that affect the pituitary gland
- No Tumor: Normal brain tissue without abnormal cell growth