Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
d1295a4
moved post process ply to point_cloud_utils
samcts-auki Mar 18, 2026
a3d1920
added update refinement function
samcts-auki Mar 18, 2026
1572c27
exported ply and post processing it
samcts-auki Mar 18, 2026
fb4366b
added save manifest directly from reference model
samcts-auki Mar 18, 2026
093cb24
added fetching portals from csv file, and add new portals to manifest
samcts-auki Mar 18, 2026
e6217c5
comments
samcts-auki Mar 18, 2026
43f9910
fix paths
samcts-auki Mar 19, 2026
88c4274
fix portals coordinates
samcts-auki Mar 20, 2026
e33d71b
changed paths
samcts-auki Mar 20, 2026
27de4e0
added update-refinement capability
samcts-auki Mar 20, 2026
49cc81f
append the dataIDs with previous refinement dataIDs, keep track of wh…
samcts-auki Mar 23, 2026
3173851
fix format
samcts-auki Mar 23, 2026
8d077ff
fix build warning
samcts-auki Mar 23, 2026
649f898
Apply suggestions from code review
samcts-auki Mar 24, 2026
6c8f31e
added expected input and output of each compute capability
samcts-auki Mar 24, 2026
0281509
fix typing
samcts-auki Mar 24, 2026
13f0b03
updating comments and fixing types
samcts-auki Mar 24, 2026
3a60521
Merge branch 'develop' into feature/update-refinement
samcts-auki Mar 24, 2026
d64488e
change suffix
samcts-auki Mar 24, 2026
b5cd7db
downloads frames and rigs too
samcts-auki Mar 24, 2026
1510cb4
removed debug print
samcts-auki Mar 24, 2026
ffd1997
make it optional to validate when read model
samcts-auki Mar 24, 2026
992e270
remove extra loops
samcts-auki Mar 24, 2026
36084f0
removed debug print
samcts-auki Mar 24, 2026
6465fc0
removed extra import
samcts-auki Mar 24, 2026
3c1e641
more comments and string updates
samcts-auki Mar 24, 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
1 change: 1 addition & 0 deletions README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ For more information on the reconstruction service, please refer to our [whitepa
- [Minimum Requirements](docs/minimum-requirements.md)
- [Deployment](docs/deployment.md)
- [Development Guide](docs/development.md)
- [Compute Capability](docs/compute-capability.md)

## Acknowledgments

Expand Down
146 changes: 146 additions & 0 deletions docs/compute-capability.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
# Compute Capability

Expected Input and Output Files from each compute capability

<details>
<summary>/reconstruction/local-refinement/v1</summary>

### Input
```bash
# Input Files
{job_root_path}
├── datasets
│ └── {dataset}
│ ├── Frames.mp4
│ ├── Accel.csv
│ ├── ARposes.csv
│ ├── CameraIntrinsics.csv
│ ├── FeaturePoints.ply
│ ├── gyro_accel.csv
│ ├── Gyro.csv
│ ├── PortalDetections.csv
│ └── Manifest.json
```

### Output
```bash
# Output Files
{job_root_path}
├── refined
│ └── local
│ └── {dataset}
│ ├── colmap_rec
│ │ ├── cameras.bin
│ │ ├── frames.bin
│ │ ├── images.bin
│ │ ├── points3D.bin
│ │ └── rigs.bin
│ ├── sfm
│ │ ├── cameras.bin # Uploaded as zip
│ │ ├── database.db
│ │ ├── feature.h5
│ │ ├── frames.bin # Uploaded as zip
│ │ ├── global_features.h5
│ │ ├── images.bin # Uploaded as zip
│ │ ├── matches.bin
│ │ ├── pairs-sfm.txt
│ │ ├── points3D.bin # Uploaded as zip
│ │ ├── portals.csv # Portal poses relative to colmap world coordinates. Uploaded as zip
│ │ └── rigs.bin # Uploaded as zip
│ └── local_logs
```

</details>


<details>
<summary>/reconstruction/global-refinement/v1</summary>

### Input
```bash
# Input Files
{job_root_path}
├── refined
│ └── local
│ └── {dataset}
│ └── reconstruction_refined_x1.zip # this is what is expected to downloaded from domain server
```

### Output
```bash
# Output Files
{job_root_path}
├── refined
│ └── global
│ ├── refined_sfm_combined
│ │ ├── cameras.bin
│ │ ├── frames.bin
│ │ ├── images.bin
│ │ ├── points3D.bin
│ │ └── rigs.bin
│ ├── topology
│ │ ├── topology_downsampled_0.111.glb # Uploaded as zip
│ │ ├── topology_downsampled_0.111.obj
│ │ ├── topology_downsampled_0.333.glb
│ │ ├── topology_downsampled_0.333.obj # Uploaded as zip
│ │ ├── topology.glb
│ │ └── topology.obj # Uploaded as zip
│ ├── refined_manifest.json
│ ├── RefinedPointCloud.ply
│ ├── RefinedPointCloud.ply.drc
│ ├── RefinedPointCloudFloat.ply
│ ├── RefinedPointCloudReduced.ply
│ └── global_logs
```

</details>

<details>
<summary>/reconstruction/update-refinement/v1</summary>

### Input
```bash
# Input Files
{job_root_path}
├── refined
│ ├── local
│ │ └── {dataset}
│ │ └── reconstruction_refined_x1.zip # this is what is expected to downloaded from domain server
│ └── global
│ ├── refined_sfm_combined
│ │ ├── cameras.bin
│ │ ├── frames.bin
│ │ ├── images.bin
│ │ ├── points3D.bin
│ │ └── rigs.bin
│ └── refined_manifest.json
```

### Output
```bash
# Output Files
{job_root_path}
├── refined
│ └── update
│ ├── refined_sfm_combined
│ │ ├── cameras.bin
│ │ ├── frames.bin
│ │ ├── images.bin
│ │ ├── points3D.bin
│ │ └── rigs.bin
│ ├── topology
│ │ ├── topology_downsampled_0.111.glb # Uploaded as zip
│ │ ├── topology_downsampled_0.111.obj
│ │ ├── topology_downsampled_0.333.glb
│ │ ├── topology_downsampled_0.333.obj # Uploaded as zip
│ │ ├── topology.glb
│ │ └── topology.obj # Uploaded as zip
│ ├── refined_manifest.json
│ ├── RefinedPointCloud.ply
│ ├── RefinedPointCloud.ply.drc
│ ├── RefinedPointCloudFloat.ply
│ ├── RefinedPointCloudReduced.ply
│ └── update_logs
```

</details>
28 changes: 1 addition & 27 deletions global_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,33 +3,7 @@
import os
from utils.data_utils import get_data_paths, setup_logger
from utils.dataset_utils import stitching_helper
from utils.point_cloud_utils import filter_ply, downsample_ply_to_max_size, reduce_decimals_ply, draco_compress_ply

def post_process_ply(output_path, logger):
ply_path = output_path / "RefinedPointCloud.ply"
filter_ply(ply_path, ply_path, convert_opencv_to_opengl=True, logger=logger)

# Ensure ply fits in domain data
logger.info("Downsampling ply if needed to be under 20 MB file size...")
ply_path_reduced = output_path / "RefinedPointCloudReduced.ply"
try:
downsample_ply_to_max_size(ply_path, ply_path_reduced, 20000000, logger=logger)
except Exception as e:
logger.error(f"Failed to downsample PLY file: {str(e)}")

logger.info("Draco compressing the PLY file...")
try:
# Must be float to do draco compression, but open3d outputs double precision.
ply_path_float = output_path / "RefinedPointCloudFloat.ply"
try:
reduce_decimals_ply(ply_path, ply_path_float, 3, logger=logger)
except Exception as e:
logger.error(f"Failed to reduce decimals in PLY file: {str(e)}")

draco_compress_ply(ply_path_float, output_path / "RefinedPointCloud.ply.drc", logger=logger)
except Exception as e:
logger.error(f"Failed to draco compress the PLY file: {str(e)}")

from utils.point_cloud_utils import post_process_ply

def main(args):
# Create and configure logger
Expand Down
20 changes: 20 additions & 0 deletions server/rust/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions server/rust/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[workspace]
members = [
"runner-reconstruction-update",
"runner-reconstruction-global",
"runner-reconstruction-local",
"bin",
Expand Down
1 change: 1 addition & 0 deletions server/rust/bin/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ compute-runner-api = { package = "posemesh-compute-node-runner-api", version = "
posemesh-compute-node = { version = "0.3.1" }
runner-reconstruction-local = { path = "../runner-reconstruction-local" }
runner-reconstruction-global = { path = "../runner-reconstruction-global" }
runner-reconstruction-update = { path = "../runner-reconstruction-update" }
anyhow = "1"
tokio = { version = "1", features = ["rt-multi-thread", "macros", "net"] }

Expand Down
3 changes: 3 additions & 0 deletions server/rust/bin/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ async fn main() -> anyhow::Result<()> {
for runner in runner_reconstruction_global::RunnerReconstructionGlobal::for_all_capabilities() {
reg = reg.register(runner);
}
for runner in runner_reconstruction_update::RunnerReconstructionUpdate::for_all_capabilities() {
reg = reg.register(runner);
}

let capabilities = reg.capabilities();
posemesh_compute_node::dds::register::spawn_registration_if_configured(&cfg, &capabilities)?;
Expand Down
6 changes: 6 additions & 0 deletions server/rust/bin/tests/bin_wiring.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,19 @@ async fn registry_contains_scaffold_runners_and_run_node_ok() {
for runner in runner_reconstruction_global::RunnerReconstructionGlobal::for_all_capabilities() {
reg = reg.register(runner);
}
for runner in runner_reconstruction_update::RunnerReconstructionUpdate::for_all_capabilities() {
reg = reg.register(runner);
}

for cap in runner_reconstruction_local::CAPABILITIES {
assert!(reg.get(cap).is_some());
}
for cap in runner_reconstruction_global::CAPABILITIES {
assert!(reg.get(cap).is_some());
}
for cap in runner_reconstruction_update::CAPABILITIES {
assert!(reg.get(cap).is_some());
}

// Engine now waits for shutdown; ensure it stays pending.
let result = timeout(
Expand Down
26 changes: 26 additions & 0 deletions server/rust/runner-reconstruction-update/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
[package]
name = "runner-reconstruction-update"
version = "0.1.0"
edition = "2021"
publish = false

[lib]
path = "src/lib.rs"

[dependencies]
compute-runner-api = { package = "posemesh-compute-node-runner-api", version = "0.1.2" }
anyhow = "1"
async-trait = "0.1"
chrono = { version = "0.4", features = ["serde"] }
serde = { version = "1", features = ["derive"] }
serde_json = "1"
tempfile = "3"
tokio = { version = "1", features = ["rt-multi-thread", "macros", "process", "io-util", "sync", "time", "fs"] }
tokio-util = { version = "0.7", features = ["rt"] }
tracing = "0.1"
posemesh-domain-http = "1.5.1"
uuid = { version = "1", features = ["v4"] }
zip = { version = "0.6", default-features = false, features = ["deflate"] }

[package.metadata]
description = "Scaffold runner for update refinement, no HTTP wiring."
Loading
Loading