A web application for segmenting liver anomalies from CT scans using AI. Upload a CT scan to view segmentation results and preview the output.
- Upload CT scans in
.niior.nii.gzformat - AI-based segmentation (UNet, PyTorch Lightning, TorchIO)
- Segmentation preview in browser
- Gradio interface for interactive exploration
- Modern UI with Tailwind CSS
app.py # Flask backend (API endpoint for segmentation)
index.html # Frontend UI
main.js # Handles upload and preview logic
model.py # AI model, training, and Gradio app
- Python 3.8+
- Recommended: Create a virtual environment
pip install flask flask-cors nibabel gradio matplotlib numpy celluloid torch torchio pytorch-lightningpython app.py- The Flask server will start at
http://127.0.0.1:5000
- Open
index.htmlin your browser - Upload a CT scan and click "Segment & Preview"
python model.py- Launches an interactive Gradio app for segmentation
- Request: Multipart form with
ct_scanfile - Response:
{ "preview": "data:image/png;base64,..." }(if implemented){ "message": "CT scan uploaded successfully. No AI processing performed." }(default)
- Zayed
- Gaayatri
MIT