This project is a system for 3D reconstruction of heritage sites using photogrammetry and Gaussian Splatting. It consists of a Vue.js frontend and a set of backend services deployed on Modal.
- Node.js (v18+ recommended)
- Python (v3.10+ recommended)
- Modal Account: You need a Modal account to deploy the backend.
- Modal CLI: Installed and authenticated (
pip install modal,modal setup).
The backend is composed of multiple Modal applications that communicate with each other. You must deploy them in the following order to ensure dependencies are met.
-
Deploy Model Inference Service This service runs the Pi3 model for initial 3D point cloud generation.
modal deploy backend/model_endpoint.py
-
Deploy WebSocket & Worker Service This service handles real-time updates and processes the reconstruction queue.
modal deploy backend/websocket_light.py
Note: After deployment, Modal will display a URL ending in
.modal.run(e.g.,https://your-username--websocket-light-fastapi-app.modal.run). Copy this URL; you will need it for the frontend configuration asVITE_WS_API_URL. -
Deploy Splatting Service This service handles training of Gaussian Splatting models.
modal deploy backend/splat_server.py
-
Deploy Baking Service This service handles conversion to COLMAP and Bundle Adjustment.
modal deploy backend/baking_server.py
-
Deploy Main API Service This is the main entry point for the frontend, handling scene management and file uploads.
modal deploy backend/modal_server.py
Note: Copy the URL displayed after deployment (e.g.,
https://your-username--ut3c-heritage-backend-brute-fastapi-app.modal.run). You will need it for the frontend configuration asVITE_API_BASE_URL.
-
Navigate to the frontend directory:
cd frontend -
Install dependencies:
npm install
-
Configure Environment Variables: Create a file named
.envin thefrontend/directory (you can copy.env.exampleif it exists, or create new) and add the backend URLs you obtained during deployment:# URL from step 5 (Main API) VITE_API_BASE_URL=https://your-username--ut3c-heritage-backend-brute-fastapi-app.modal.run # URL from step 2 (WebSocket Service) VITE_WS_API_URL=https://your-username--websocket-light-fastapi-app.modal.run
-
Run the Development Server:
npm run dev
-
Access the App: Open your browser and navigate to the URL shown in the terminal (usually
http://localhost:5173).
- Frontend: Vue.js 3 + Vite + Three.js (for PLY visualization).
- Backend (Modal):
ut3c-heritage-backend-brute: Main REST API (FastAPI).websocket-light: Manages WebSockets for real-time updates and orchestrates background workers.pi3-inference: GPU-accelerated inference using Pi3.ut3c-heritage-baking: Handles heavy processing tasks like COLMAP conversion and Bundle Adjustment.ut3c-heritage-splat: Handles training of 3D Gaussian Splatting models.
- Storage: All services share a Modal Volume named
ut3c-heritage.
- Open the web interface.
- Click on "Crear Nueva Escena Compartida" to create a new project.
- Upload images to the scene. The system will automatically:
- Process the images using the Pi3 model.
- Generate a point cloud.
- Update the viewer in real-time via WebSockets.
- For advanced reconstruction, use the available tools in the UI (if exposed) or API endpoints to trigger COLMAP conversion and Gaussian Splatting training.