How sannn-boo/scgproject works
This repository provides a web app for turning multi-view photos into calibrated, reviewable 3D measurements. Users upload and frame a capture, run a background reconstruction job, review and adjust cut planes, then inspect mesh and volume results; precomputed samples also support browsing without the GPU service. The backend orchestrates image preparation, VGGT inference, mesh cleanup and volume computation. The graph shows documented/import-indexed relationships; several stage internals and backend-to-pipeline wiring were not excerpted, so uncertain links are omitted.
Main entry points: orchestrator.py Pipeline orchestrator · page.tsx Screen flow · vggt.py VGGT model · clean.py Mesh cleanup
Components 33
Web experience
- Screen flow
src/app/page.tsx - Capture screens
src/components/screens/Framing.tsx - Processing screen
src/components/screens/Processing.tsx - Review screen
src/components/screens/Review.tsx - Results screen
src/components/screens/Result.tsx - Sample data
src/lib/data.ts - Job API client
src/lib/api.ts - Cut review
src/components/three/CutReview.tsx - PLY loader
src/components/three/usePly.ts
Job service
- HTTP service
service/app.py - Job management
service/jobs.py
Reconstruction pipeline
- Pipeline orchestrator
pipeline/orchestrator.py - Frame preparation
pipeline/stages/prep.py - Capture preparation
pipeline/stage0_prep.py - VGGT inference
pipeline/stages/inference.py - Point cloud stage
pipeline/stages/pointcloud.py - Mesh cleanup
pipeline/stages/clean.py - Cloud segmentation
pipeline/core/segmentation.py - Ghost removal
pipeline/ghost.py - Mesh reconstruction
pipeline/stages/reconstruct.py - Watertight check
pipeline/stages/watertight.py - Volume measurement
pipeline/stages/volume.py - Measurement config
pipeline/config.py
VGGT model
- VGGT model
vggt/models/vggt.py - Feature aggregator
vggt/models/aggregator.py - Depth head
vggt/heads/dpt_head.py - Camera head
vggt/heads/camera_head.py - Tracking head
vggt/heads/track_head.py - Transformer blocks
vggt/layers/block.py - Attention
vggt/layers/attention.py - MLP layers
vggt/layers/mlp.py - Head activations
vggt/heads/head_act.py
Other components
- User
Connections 32
- User → Screen flow: uses
src/app/page.tsx - Screen flow → Capture screens: shows
src/app/page.tsx - Screen flow → Processing screen: shows
src/app/page.tsx - Screen flow → Review screen: shows
src/app/page.tsx - Screen flow → Results screen: shows
src/app/page.tsx - Screen flow → Job API client: starts jobs
src/app/page.tsx - Review screen → Sample data: loads measurements
src/components/screens/Review.tsx - Review screen → Cut review: renders
src/components/screens/Review.tsx - Cut review → PLY loader: loads mesh
src/components/three/CutReview.tsx - Job API client → HTTP service: calls service
- HTTP service → Job management: delegates jobs
service/app.py - Pipeline orchestrator → Capture preparation: runs
pipeline/orchestrator.py - Pipeline orchestrator → VGGT inference: runs
pipeline/orchestrator.py - Pipeline orchestrator → Point cloud stage: runs
pipeline/orchestrator.py - Pipeline orchestrator → Mesh cleanup: runs
pipeline/orchestrator.py - Pipeline orchestrator → Mesh reconstruction: runs
pipeline/orchestrator.py - Pipeline orchestrator → Watertight check: runs
pipeline/orchestrator.py - Pipeline orchestrator → Volume measurement: runs
pipeline/orchestrator.py - Capture preparation → Frame preparation: uses
pipeline/stage0_prep.py - VGGT inference → VGGT model: runs model
pipeline/stages/inference.py - Mesh cleanup → Cloud segmentation: uses
pipeline/stages/clean.py - Mesh cleanup → Ghost removal: uses
pipeline/stages/clean.py - Frame preparation → Measurement config: reads settings
pipeline/stages/prep.py - Mesh cleanup → Measurement config: reads settings
pipeline/stages/clean.py - VGGT model → Feature aggregator: aggregates features
vggt/models/vggt.py - VGGT model → Depth head: predicts depth
vggt/models/vggt.py - VGGT model → Camera head: predicts cameras
vggt/models/vggt.py - VGGT model → Tracking head: predicts tracks
vggt/models/vggt.py - Feature aggregator → Transformer blocks: uses blocks
vggt/models/aggregator.py - Transformer blocks → Attention: applies attention
vggt/layers/block.py - Transformer blocks → MLP layers: applies MLP
vggt/layers/block.py - Depth head → Head activations: uses activations
vggt/heads/dpt_head.py