How srirammulukuntla11/mim-unet-building-segmentation works
MiM-UNet Building Segmentation is an application for generating building-footprint masks from uploaded aerial or satellite images, with a web interface for reviewing predictions, history, and analytics. The main workflow is upload → image preprocessing → MiM-UNet inference → mask postprocessing and coverage calculation → saved result and history record. A separate training workflow prepares dataset splits, trains and evaluates the model. The graph includes documented UI capabilities, but the README gives no further architecture detail; frontend-to-API links are shown as unverified because the excerpts do not show the HTTP call implementation.
Main entry points: predict.py Prediction and data routes · train.py Training and evaluation · App.jsx Application routes · History.jsx History page
Components 26
Web application
- Application routes
frontend/src/App.jsx - Dashboard
frontend/src/pages/Dashboard.jsx - Prediction page
frontend/src/pages/Predict.jsx - Image upload
frontend/src/components/prediction/UploadBox.jsx - Result viewer
frontend/src/components/prediction/ResultViewer.jsx - Analytics page
frontend/src/pages/Analytics.jsx - History page
frontend/src/pages/History.jsx - History views
frontend/src/components/history/HistoryCards.jsx - History table
frontend/src/components/history/HistoryTable.jsx - History controls
frontend/src/components/history/SearchBar.jsx - API client
frontend/src/services/api.js
Prediction API
- API application
backend/app.py - Prediction and data routes
backend/routes/predict.py - Image preprocessing
backend/utils/preprocess.py - Mask postprocessing
backend/utils/postprocess.py - Prediction history
- Saved image outputs
Segmentation model
- MiM-UNet
backend/model/mim_unet.py - Encoder-decoder blocks
backend/model/blocks.py - Attention module
backend/model/attention.py
Model training
- Training and evaluation
training/train.py - Dataset loading and splits
training/dataset.py - Training configuration
training/config.py - Training loss
training/loss.py - Evaluation metrics
training/metrics.py
Other components
- User
Connections 29
- User → Application routes: uses
frontend/src/App.jsx - Application routes → Dashboard: routes to
frontend/src/App.jsx - Application routes → Prediction page: routes to
frontend/src/App.jsx - Application routes → Analytics page: routes to
frontend/src/App.jsx - Application routes → History page: routes to
frontend/src/App.jsx - Prediction page → Image upload: renders
frontend/src/pages/Predict.jsx - Prediction page → Result viewer: renders
frontend/src/pages/Predict.jsx - Image upload → API client: calls
frontend/src/components/prediction/UploadBox.jsx - API client → Prediction and data routes: sends requests
- Analytics page → API client: fetches analytics
frontend/src/pages/Analytics.jsx - History page → API client: fetches history
frontend/src/pages/History.jsx - History page → History views: renders
frontend/src/pages/History.jsx - History page → History table: renders
frontend/src/pages/History.jsx - History page → History controls: renders
frontend/src/pages/History.jsx - API application → Prediction and data routes: mounts routes
backend/app.py - Prediction and data routes → Image preprocessing: preprocesses image
backend/routes/predict.py - Prediction and data routes → MiM-UNet: runs inference
backend/routes/predict.py - Prediction and data routes → Mask postprocessing: postprocesses mask
backend/routes/predict.py - Prediction and data routes → Prediction history: reads and writes
backend/routes/predict.py - Prediction and data routes → Saved image outputs: saves and deletes images
backend/routes/predict.py - API application → Saved image outputs: serves files
backend/app.py - MiM-UNet → Encoder-decoder blocks: uses blocks
backend/model/mim_unet.py - MiM-UNet → Attention module: uses attention
backend/model/mim_unet.py - Training and evaluation → Dataset loading and splits: loads splits
training/train.py - Training and evaluation → Training configuration: uses settings
training/train.py - Training and evaluation → Training loss: computes loss
training/train.py - Training and evaluation → Evaluation metrics: computes metrics
training/train.py - Training and evaluation → MiM-UNet: trains model
training/train.py - Dataset loading and splits → Training configuration: reads settings
training/dataset.py