System overview
DepthWizard can be deployed two ways. Both run the same inference engine.
Hosted path: what the web app uses
Section titled “Hosted path: what the web app uses”| Component | Technology | Responsibility |
|---|---|---|
| Web app | React 19, TypeScript, Vite 8, Mantine 9, three.js / React Three Fiber | Upload, 3D viewer, analysis, validation, scenarios, export. Heavy work runs in Web Workers |
| Proxy | Node (server/serve.mjs) or Vercel functions (api/*.js) |
Same-origin routes /hf-space/* and /overpass/*. Keeps HF_TOKEN off the client |
| Inference Space | Gradio on Hugging Face ZeroGPU (private) | Upload, queue, GPU inference (@spaces.GPU, 45 s, or 120 s with TTA), result files |
| Overpass mirrors | OpenStreetMap | Roads, buildings and facilities for georeferenced scenes |
| Terrarium tiles | AWS open data | Coarse terrain for in-browser DEM anchoring |
There is no database, job queue or file store in this path. The Gradio queue handles scheduling, results are fetched as files, and projects are saved client-side (.dwproj files and IndexedDB).
Self-hosted path: FastAPI service
Section titled “Self-hosted path: FastAPI service”Use it for batch processing, air-gapped machines, very large scenes (windowed mode above 40 MP), absolute DSMs with a choice of DEM, and validation against a reference GeoTIFF on the server.
Comparison
Section titled “Comparison”| Hosted (Space + proxy) | Self-hosted (FastAPI) | |
|---|---|---|
| GPU | ZeroGPU quota of the token’s account | Your hardware, or CPU with ONNX |
| Input limit | 512 MB upload in the app | Limited by disk and RAM; windowed above 40 MP |
| Absolute DSM | In-browser anchoring to Terrarium tiles or a DEM file | Server-side, Copernicus / SRTM / NASADEM / CartoDEM / GCPs |
| Outputs | ndsm_m.npy, meta.json, terrain.glb, previews |
Full GeoTIFF set, NPY, GLB/OBJ, HTML report |
| Auth | HF_TOKEN in the proxy |
None built in (put it behind your own gateway) |
Hosted request lifecycleSequence diagram from upload to rendered mesh.
Self-hosted serviceJob state machine, runtime options and directory layout.
API referenceGradio /predict and every FastAPI endpoint.
DeploymentEnvironment variables, Docker, Vercel and the Space.