How jhaabhijeet864/depthwizard works
DepthWizard turns uploaded optical imagery or DEMs into elevation rasters, then presents them as interactive 3D terrain for inspection, calibration, hazard visualization, and export. The main upload-to-result path is visible in the frontend API hook and backend depth route; true DEMs bypass neural inference in the depth engine. The README documents additional calibration, local inference, and export capabilities. Some wiring is unsampled, so those links are shown only where supported by the tree or explicit documentation.
Main entry points: DepthMesh.tsx Terrain mesh · UploadForm.tsx Upload form · depth.py Depth endpoint · api.ts API client
Components 19
Operator workflow
- Dashboard
frontend/src/pages/DashboardView.tsx - Upload form
frontend/src/components/layout/UploadForm.tsx - App state
frontend/src/store/useAppStore.ts - Depth API hook
frontend/src/hooks/useDepthApi.ts - API client
frontend/src/lib/api.ts
Elevation processing
- Depth endpoint
backend/api/routes/depth.py - Depth engine
backend/services/depth_engine.py - GIS geometry
backend/services/gis_utils.py - Browser inference
frontend/src/lib/clientDepth.ts
3D terrain
- Viewport
frontend/src/pages/ViewportView.tsx - Scene renderer
frontend/src/components/scene/ViewportScene.tsx - Terrain mesh
frontend/src/components/scene/DepthMesh.tsx - Terrain shading
frontend/src/shaders/displacement.glsl.ts - Telemetry HUD
frontend/src/components/scene/TelemetryHUD.tsx
Calibration and export
- Calibration endpoint
backend/api/routes/calibrate.py - Geometry services
backend/services/geometry.py - Terrain controls
frontend/src/components/layout/RightSidebar.tsx - Export utilities
frontend/src/lib/exportUtils.ts
Other components
- Operator
Connections 24
- Operator → Dashboard: opens
- Dashboard → Upload form: presents
- Upload form → Depth API hook: requests estimate
- Depth API hook → API client: calls
- API client → Depth endpoint: posts image
- Depth endpoint → Depth engine: estimates depth
- Depth endpoint → GIS geometry: exports raster
- Depth endpoint → API client: returns raster
- Upload form → App state: stores upload
- Depth API hook → App state: updates results
- Upload form → Browser inference: may infer locally
- Operator → Viewport: inspects terrain
- Viewport → Scene renderer: renders
- Scene renderer → Terrain mesh: mounts
- Terrain mesh → App state: reads terrain state
- Terrain mesh → Terrain shading: applies shading
- Terrain mesh → Telemetry HUD: provides hover data
- Operator → Terrain controls: sets analysis options
- Terrain controls → App state: updates controls
- Operator → Calibration endpoint: submits calibration
- Calibration endpoint → Geometry services: fits calibration
- Terrain controls → Export utilities: starts export
- Export utilities → API client: requests GeoTIFF
- Export utilities → Terrain mesh: exports mesh