GenRecon web app — phone video to walkable 3D PWA (genrecon.suby.pl). Prebuilt + locally tested for issue i-opavuyaq.

Oivo Agent 2dbaf7647b GenRecon PWA + reconstruction backend (prebuilt for i-opavuyaq) il y a 1 semaine
backend 2dbaf7647b GenRecon PWA + reconstruction backend (prebuilt for i-opavuyaq) il y a 1 semaine
frontend 2dbaf7647b GenRecon PWA + reconstruction backend (prebuilt for i-opavuyaq) il y a 1 semaine
sample 2dbaf7647b GenRecon PWA + reconstruction backend (prebuilt for i-opavuyaq) il y a 1 semaine
.gitignore 2dbaf7647b GenRecon PWA + reconstruction backend (prebuilt for i-opavuyaq) il y a 1 semaine
README.md 2dbaf7647b GenRecon PWA + reconstruction backend (prebuilt for i-opavuyaq) il y a 1 semaine
test.cjs 2dbaf7647b GenRecon PWA + reconstruction backend (prebuilt for i-opavuyaq) il y a 1 semaine

README.md

GenRecon web app — phone video → walkable 3D (PWA)

Front-to-back app for genrecon.suby.pl: upload a phone video → server reconstructs a 3D scene with GenRecon → walk through it first-person in the browser. Built to drop onto the genrecon LXC from issue i-opavuyaq.

backend/    FastAPI service: upload → ffmpeg → COLMAP → reconstruct_scene → chunked_to_glb → scene.glb
frontend/   PWA: upload UI, live progress, three.js first-person walkthrough (Octree collision)
            vendor/ = three.js r161 (vendored, offline-capable) · demo.glb = bundled sample scene
sample/     a sample walkable scene.glb (also used as the MOCK output)

Run locally WITHOUT a GPU (mock mode)

python3 -m venv .venv && . .venv/bin/activate
pip install -r backend/requirements.txt
GENRECON_MOCK=1 GENRECON_JOBS_DIR="$PWD/_jobs" \
  GENRECON_FRONTEND_DIR="$PWD/frontend" GENRECON_SAMPLE_GLB="$PWD/sample/scene.glb" \
  uvicorn app:app --app-dir backend --host 0.0.0.0 --port 8000
# open http://localhost:8000  → "Zobacz przykładową scenę 3D", or upload any file (mock ignores content)

Deploy on the genrecon machine (real pipeline)

Prereqs from issue i-opavuyaq Step 2 (GenRecon at /opt/genrecon/src, checkpoints at /opt/genrecon/ckpts, conda env genrecon, COLMAP + ffmpeg installed).

git clone <this-repo> /opt/genrecon/app
pip install -r /opt/genrecon/app/backend/requirements.txt      # into the system/base python
cp /opt/genrecon/app/backend/genrecon-app.service /etc/systemd/system/
systemctl enable --now genrecon-app
# then add the Caddy route on the suby edge:  genrecon.suby.pl → <genrecon-ip>:8000

Service config lives in backend/genrecon-app.service (env vars: jobs dir, GenRecon paths, conda env, GENRECON_CUDA_DEVICE — pin to a free GPU, e.g. 5). Set GENRECON_MOCK=1 there to serve the demo scene before the model is ready.

API

Method Path
POST /api/jobs multipart video{id}
GET /api/jobs/{id} {status, stage, progress, message, error}
GET /api/jobs/{id}/scene.glb the reconstructed scene
GET /api/jobs/{id}/log raw pipeline log
GET /api/health

⚠️ Verify against the real GenRecon Iphone layout

backend/pipeline.py assembles <job>/images/ + <job>/colmap/{cameras,images,points3D}.txt (what the README implies). During the i-opavuyaq Step-2 smoke test, confirm reconstruct_scene.py --mode Iphone actually finds that layout; adjust run_colmap / _reconstruct_cmd if not.