How sanket124w/brain-tumor-prediction works
NeuroScan AI is a Flask web app that accepts brain MRI images and returns a binary tumor prediction with confidence. The main workflow runs from browser upload, through the /predict endpoint, image preprocessing, CNN inference, and result display; the server removes the temporary image after processing. The README also describes drag-and-drop, responsive presentation, and real-time feedback. The model file is documented but absent from the supplied tree. Source excerpts show the backend and JavaScript interactions; template and styling relationships are documented but not directly inspected.
Main entry points: app.py Flask routes · main.js Upload and results · index.html Scan interface · style.css Responsive styling
Components 9
Web interface
- Scan interface
templates/index.html - Upload and results
static/js/main.js - Responsive styling
static/css/style.css
Prediction workflow
- Image preprocessing
app.py - Pre-trained CNN
- Decision and confidence
app.py
Flask runtime
- Flask routes
app.py - Temporary image
uploads
Other components
- User
Connections 10
- User → Scan interface: uses
README.md - Upload and results → Flask routes: POSTs scan
static/js/main.js - Flask routes → Scan interface: renders
app.py - Scan interface → Responsive styling: styled by
README.md - Flask routes → Temporary image: saves and deletes
app.py - Flask routes → Image preprocessing: preprocesses image
app.py - Flask routes → Pre-trained CNN: runs inference
app.py - Flask routes → Decision and confidence: classifies output
app.py - Flask routes → Upload and results: returns prediction
app.py - Upload and results → User: shows result
static/js/main.js