How 2kdietga/computer-vision works
This is a Django image-segmentation web app. A visitor submits a supported image; the view validates and normalizes it, invokes CPU inference, then renders the original, binary mask, blended overlay, and predicted area percentage. Inference loads a configured checkpoint and runs the U-Net model. The excerpts show the request path and prediction flow, but not the template contents or unsampled deployment wiring; the checkpoint is represented as an external artifact.
Main entry points: inference.py Image inference · views.py Upload view · urls.py URL routing · index.html Result page
Components 8
Web request
- URL routing
config/urls.py - Upload view
segmentation/views.py - Result page
segmentation/templates/segmentation/index.html
Prediction
- Image inference
segmentation/inference.py - U-Net model
segmentation/network.py - Model checkpoint
Configuration
- App settings
config/settings.py
Other components
- Visitor
Connections 7
- Visitor → URL routing: requests page
config/urls.py - URL routing → Upload view: routes to
config/urls.py - Upload view → Image inference: calls prediction
segmentation/views.py - Image inference → U-Net model: runs model
segmentation/inference.py - Image inference → App settings: reads model path
segmentation/inference.py - Image inference → Model checkpoint: loads weights
segmentation/inference.py - Upload view → Result page: renders results
segmentation/views.py