Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
039c550
Set map scale during map creation during scene import
daddo-intel Jan 13, 2026
96d26c5
Merge branch 'main' of https://github.com/open-edge-platform/scenescape
daddo-intel Jan 15, 2026
23f8d8d
Merge branch 'main' of https://github.com/open-edge-platform/scenescape
daddo-intel Jan 21, 2026
0968474
Merge branch 'main' of https://github.com/open-edge-platform/scenescape
daddo-intel Jan 22, 2026
491e473
Merge branch 'main' of https://github.com/open-edge-platform/scenescape
daddo-intel Jan 26, 2026
154c85b
Merge branch 'main' of https://github.com/open-edge-platform/scenescape
daddo-intel Jan 27, 2026
4254d2f
Merge branch 'main' of https://github.com/open-edge-platform/scenescape
daddo-intel Jan 27, 2026
90d0488
Merge branch 'main' of https://github.com/open-edge-platform/scenescape
daddo-intel Jan 27, 2026
74adad9
Merge branch 'main' of https://github.com/open-edge-platform/scenescape
daddo-intel Jan 29, 2026
73361cf
Merge branch 'main' of https://github.com/open-edge-platform/scenescape
daddo-intel Feb 3, 2026
54fdfa8
Merge branch 'main' of https://github.com/open-edge-platform/scenescape
daddo-intel Feb 3, 2026
70058d8
Merge branch 'main' of https://github.com/open-edge-platform/scenescape
daddo-intel Feb 4, 2026
aab521e
Merge branch 'main' of https://github.com/open-edge-platform/scenescape
daddo-intel Feb 5, 2026
89f7bf4
Merge branch 'main' of https://github.com/open-edge-platform/scenescape
daddo-intel Feb 9, 2026
3a1e0a7
Merge branch 'main' of https://github.com/open-edge-platform/scenescape
daddo-intel Feb 11, 2026
b449578
Merge branch 'main' of https://github.com/open-edge-platform/scenescape
daddo-intel Feb 12, 2026
7797509
Merge branch 'main' of https://github.com/open-edge-platform/scenescape
daddo-intel Feb 13, 2026
9af0ff3
Merge branch 'main' of https://github.com/open-edge-platform/scenescape
daddo-intel Feb 17, 2026
39f818d
Merge branch 'main' of https://github.com/open-edge-platform/scenescape
daddo-intel Feb 17, 2026
26321bd
Merge branch 'main' of https://github.com/open-edge-platform/scenescape
daddo-intel Feb 18, 2026
a9417db
Merge branch 'main' of https://github.com/open-edge-platform/scenescape
daddo-intel Feb 22, 2026
a41ff1c
Merge branch 'main' of https://github.com/open-edge-platform/scenescape
daddo-intel Feb 25, 2026
6395dd2
Merge branch 'main' of https://github.com/open-edge-platform/scenescape
daddo-intel Feb 26, 2026
0636785
Merge branch 'main' of https://github.com/open-edge-platform/scenescape
daddo-intel Mar 2, 2026
2cb8972
Merge branch 'main' of https://github.com/open-edge-platform/scenescape
daddo-intel Mar 2, 2026
8730e38
Fix camera pose
daddo-intel Mar 2, 2026
d2af6a5
Fix camera & analytics pose for vggt mapping model
daddo-intel Mar 5, 2026
af4b6e6
Merge branch 'main' into fix/ITEP-84336-incorrect-cam-pose-vggt
daddo-intel Mar 5, 2026
ecd1077
Merge branch 'main' into fix/ITEP-84336-incorrect-cam-pose-vggt
daddo-intel Mar 5, 2026
726e3d4
Fix indentation
daddo-intel Mar 5, 2026
38d7560
Merge branch 'main' into fix/ITEP-84336-incorrect-cam-pose-vggt
daddo-intel Mar 9, 2026
f57e1fc
Merge branch 'main' into fix/ITEP-84336-incorrect-cam-pose-vggt
dmytroye Mar 9, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 41 additions & 2 deletions manager/src/django/mesh_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
from scene_common.mesh_util import mergeMesh
from scene_common.options import QUATERNION
from scene_common import log
from manager.serializers import CamSerializer

ALLOWED_VIDEO_MIME_TYPES = {
"video/mp4",
Expand Down Expand Up @@ -157,6 +158,7 @@ def startReconstructMesh(
self,
images: Dict[str, Dict],
camera_order: List[str],
camera_location_order: List,
mesh_type: str = "mesh",
uploaded_map=None,
):
Expand All @@ -178,6 +180,10 @@ def startReconstructMesh(
"mesh_type": mesh_type,
}

camera_loc_by_id = {
cam_id: cam_loc
for cam_id, cam_loc in zip(camera_order, camera_location_order)
}
log.info(f"Sending {len(images)} images to mapping service for reconstruction")

files = []
Expand All @@ -201,6 +207,18 @@ def startReconstructMesh(
)
)
files.append(("camera_ids", (None, camera_id)))
cam_loc = camera_loc_by_id.get(camera_id)
if cam_loc is not None:
cam_loc = camera_loc_by_id.get(camera_id)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

redundant if statement

if cam_loc is not None:
cam_loc_clean = {
"translation": list(cam_loc["translation"]),
"rotation": list(cam_loc["rotation"]),
"scale": list(cam_loc.get("scale", [1.0, 1.0, 1.0])),
}
files.append(("camera_locations", (None, json.dumps(cam_loc_clean))))
else:
log.warning(f"No camera location for {camera_id}")
else:
log.warning(
f"Camera {camera_id} in camera_order but not in images dict"
Expand Down Expand Up @@ -414,9 +432,30 @@ def startMeshGeneration(self, scene, mesh_type='mesh', uploaded_map=None):
log.info(f"Collected {len(images)} images, calling mapping service")
# Call mapping service to generate mesh
# Pass camera IDs in order to ensure correct pose association
camera_order = [camera.sensor_id for camera in cameras]

camera_location_order = []
camera_order = []
serializer = CamSerializer()

for camera in cameras:
cam_id = camera.sensor_id
camera_order.append(cam_id)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

camera_order.append(camera.sensor_id)


t = serializer.get_translation(camera)
q = serializer.get_rotation(camera)
s = serializer.get_scale(camera) or [1.0, 1.0, 1.0]

if t is None or q is None:
raise ValueError(f"Missing pose for camera {cam_id}: t={t} q={q}")

camera_location_order.append({
"translation": list(t),
"rotation": list(q),
"scale": list(s),
})

started = self.mapping_client.startReconstructMesh(
images, camera_order, mesh_type, uploaded_map_path
images, camera_order, camera_location_order, mesh_type, uploaded_map_path
)
rid = started.get("request_id")
if not rid:
Expand Down
24 changes: 19 additions & 5 deletions mapping/src/api_service_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
from werkzeug.utils import secure_filename
import uuid
import threading
import json

from flask import Flask, request, jsonify
from flask_cors import CORS
Expand Down Expand Up @@ -215,6 +216,7 @@ def reconstruct3D():
image_files = request.files.getlist("images")
video_file = request.files.get("video")
camera_ids = request.form.getlist("camera_ids")
camera_locations = request.form.getlist("camera_locations", None)

if (not image_files) and (video_file is None):
set_status(request_id, state="failed", updated_at=time.time(), error="Provide images and/or video")
Expand All @@ -228,17 +230,29 @@ def reconstruct3D():
images = None
if image_files:
images = []
pairs = zip(image_files, camera_ids) if camera_ids else [(f, None) for f in image_files]
for f, cam_id in pairs:

for idx, f in enumerate(image_files):
if not f or not f.filename:
continue

raw = f.read()
if not raw:
continue

cam_id = camera_ids[idx] if idx < len(camera_ids) else None

cam_loc = None
if camera_locations and idx < len(camera_locations):
try:
cam_loc = json.loads(camera_locations[idx])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe we should log that camera_locations[idx] is not a valid json. Because on runtime we wouldn't know if something was provided but invalid or just empty and everything is fine

except Exception:
cam_loc = None

images.append({
"filename": secure_filename(f.filename),
"camera_id": cam_id,
"data": base64.b64encode(raw).decode("utf-8"),
"filename": secure_filename(f.filename),
"camera_id": cam_id,
"camera_location": cam_loc, # Only populated if provided
"data": base64.b64encode(raw).decode("utf-8"),
})

if not images:
Expand Down
Loading
Loading