ilessio-aiflowlab commited on
Commit
c8aa407
·
verified ·
1 Parent(s): bad62ca

Upload folder using huggingface_hub

Browse files
.gitattributes CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ paper.pdf filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,104 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ tags:
3
+ - robotics
4
+ - anima
5
+ - slam
6
+ - gaussian-splatting
7
+ - semantic-slam
8
+ - robot-flow-labs
9
+ library_name: pytorch
10
+ pipeline_tag: robotics
11
+ license: apache-2.0
12
+ ---
13
+
14
+ # GS3LAM — Gaussian Semantic Splatting SLAM
15
+
16
+ Part of the [ANIMA Intelligence Compiler Suite](https://robotflowlabs.com) by Robot Flow Labs.
17
+
18
+ **Wave 7 | Domain: SLAM | Module: slam-gs3lam**
19
+
20
+ ## Paper
21
+
22
+ **GS3LAM: Gaussian Semantic Splatting SLAM**
23
+ Linfei Li, Lin Zhang, Zhong Wang, Ying Shen
24
+ ACM MM 2024 | [arXiv 2603.27781](https://arxiv.org/abs/2603.27781) | [DOI](https://doi.org/10.1145/3664647.3680739)
25
+
26
+ ## Architecture
27
+
28
+ Dense semantic RGB-D SLAM using a Semantic Gaussian Field (SG-Field). Each Gaussian stores position, covariance, opacity, RGB color, and a 16-dimensional semantic feature vector. A lightweight 1x1 Conv2d decoder maps semantic features to per-pixel class logits.
29
+
30
+ Core components:
31
+ - **SG-Field**: 3D Gaussian representation with semantic features
32
+ - **Differentiable Splatting**: CUDA-accelerated rendering via gaussian-semantic-rasterization
33
+ - **Tracking**: Frame-to-model pose optimization (rotation + translation)
34
+ - **Mapping**: Joint optimization of Gaussians + semantic decoder
35
+ - **DSR**: Depth-adaptive Scale Regularization
36
+ - **RSKM**: Random Sampling-based Keyframe Mapping
37
+
38
+ ## Exported Formats
39
+
40
+ | Format | File | Use Case |
41
+ |--------|------|----------|
42
+ | SafeTensors (field) | `pytorch/gs3lam_office2_v1_field.safetensors` | Gaussian field parameters |
43
+ | SafeTensors (decoder) | `pytorch/gs3lam_office2_v1_decoder.safetensors` | Semantic decoder weights |
44
+ | ONNX (decoder) | `onnx/gs3lam_office2_v1_decoder.onnx` | Cross-platform decoder inference |
45
+ | Poses (npy) | `pytorch/gs3lam_office2_v1_poses.npy` | Estimated camera trajectory [N,4,4] |
46
+ | Checkpoint | `checkpoints/best.pt` | Full checkpoint for resuming |
47
+
48
+ **Note**: TensorRT engines must be generated on target hardware due to architecture-specific compilation.
49
+
50
+ ## Training Details
51
+
52
+ - **Scene**: Replica office2 (2000 frames, 1200x680 rendered at 600x340)
53
+ - **Hardware**: NVIDIA L4 23GB
54
+ - **Config**: 20 tracking iterations, 15 mapping iterations (L4-tuned)
55
+ - **Gaussians**: 21K (capped at 80K with periodic pruning)
56
+ - **Duration**: ~5.5 hours
57
+ - **CUDA Extension**: gaussian-semantic-rasterization (sm_89)
58
+
59
+ ### Current Metrics (L4 baseline, reduced resolution)
60
+
61
+ | Metric | Value | Paper Target |
62
+ |--------|-------|-------------|
63
+ | PSNR | 3.39 dB | >= 35.0 dB |
64
+ | ATE | 178 cm | <= 0.50 cm |
65
+
66
+ > **Note**: These metrics reflect an L4-constrained run at half resolution with aggressive Gaussian capping (21K vs paper's ~775K). Paper-quality reproduction requires full resolution on A100/H100 hardware.
67
+
68
+ ## Usage
69
+
70
+ ```python
71
+ import torch
72
+ from anima_slam_gs3lam.export import load_checkpoint, reconstruct_field, reconstruct_decoder
73
+
74
+ ckpt = load_checkpoint("checkpoints/best.pt")
75
+ field = reconstruct_field(ckpt, device="cuda")
76
+ decoder = reconstruct_decoder(ckpt, device="cuda")
77
+ ```
78
+
79
+ ## API
80
+
81
+ ```bash
82
+ # Start service
83
+ python -m anima_slam_gs3lam
84
+
85
+ # Health check
86
+ curl http://localhost:8080/health
87
+ curl http://localhost:8080/ready
88
+ curl http://localhost:8080/info
89
+ ```
90
+
91
+ ## Docker
92
+
93
+ ```bash
94
+ docker compose -f docker-compose.serve.yml --profile api up -d
95
+ ```
96
+
97
+ ## CUDA Extension
98
+
99
+ The gaussian-semantic-rasterization CUDA kernel is shared at:
100
+ `/mnt/forge-data/shared_infra/cuda_extensions/gaussian_semantic_rasterization/`
101
+
102
+ ## License
103
+
104
+ Apache 2.0 — Robot Flow Labs / AIFLOW LABS LIMITED
checkpoints/best.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e0428337471e2af4d4a3773ea198d195b065cba117b3a475217f013596781ab3
3
+ size 3082317
configs/default.toml ADDED
@@ -0,0 +1,84 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [project]
2
+ name = "anima-slam-gs3lam"
3
+ codename = "SLAM-GS3LAM"
4
+ functional_name = "Gaussian Semantic Splatting SLAM"
5
+ wave = 7
6
+ paper_arxiv = "2603.27781"
7
+ python_version = "3.11"
8
+
9
+ [compute]
10
+ backend = "auto" # "mlx", "cuda", "auto"
11
+ precision = "fp32"
12
+ prefer_mlx_on_mac = true
13
+ prefer_cuda_on_linux = true
14
+
15
+ [data]
16
+ shared_volume = "/mnt/forge-data"
17
+ repos_volume = "/mnt/forge-data/repos"
18
+ dataset_root_rel = "datasets/slam/gs3lam"
19
+ model_root_rel = "models/slam/gs3lam"
20
+
21
+ [paper_defaults]
22
+ replica_tracking_iterations = 40
23
+ replica_mapping_iterations = 60
24
+ scannet_tracking_iterations = 100
25
+ scannet_mapping_iterations = 30
26
+ tum_tracking_iterations = 360
27
+ tum_mapping_iterations = 150
28
+ tracking_rotation_lr = 0.0004
29
+ tracking_translation_lr = 0.002
30
+
31
+ [repo_overrides.scannet]
32
+ tracking_iterations = 200
33
+ mapping_iterations = 60
34
+
35
+ [dataset_presets.replica]
36
+ name = "replica"
37
+ sequence = "office0"
38
+ root = "/mnt/forge-data/datasets/slam/gs3lam/Replica"
39
+ desired_image_height = 680
40
+ desired_image_width = 1200
41
+
42
+ [dataset_presets.replica.camera]
43
+ image_height = 680
44
+ image_width = 1200
45
+ fx = 600.0
46
+ fy = 600.0
47
+ cx = 599.5
48
+ cy = 339.5
49
+ png_depth_scale = 6553.5
50
+ crop_edge = 0
51
+
52
+ [dataset_presets.scannet]
53
+ name = "scannet"
54
+ sequence = "scene0059_00"
55
+ root = "/mnt/forge-data/datasets/slam/gs3lam/scannet"
56
+ desired_image_height = 480
57
+ desired_image_width = 640
58
+
59
+ [dataset_presets.scannet.camera]
60
+ image_height = 968
61
+ image_width = 1296
62
+ fx = 1169.621094
63
+ fy = 1167.105103
64
+ cx = 646.295044
65
+ cy = 489.927032
66
+ png_depth_scale = 1000.0
67
+ crop_edge = 0
68
+
69
+ [dataset_presets.tum]
70
+ name = "tum"
71
+ sequence = "rgbd_dataset_freiburg1_desk"
72
+ root = "/mnt/forge-data/datasets/tum"
73
+ desired_image_height = 480
74
+ desired_image_width = 640
75
+
76
+ [dataset_presets.tum.camera]
77
+ image_height = 480
78
+ image_width = 640
79
+ fx = 517.3
80
+ fy = 516.5
81
+ cx = 318.6
82
+ cy = 255.3
83
+ png_depth_scale = 5000.0
84
+ crop_edge = 8
configs/l4_replica.toml ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # L4-tuned config for Replica (23GB VRAM)
2
+ # Reduced resolution + iterations to fit in VRAM
3
+ # Paper uses 40/60 at 1200x680 on RTX 3090 — we halve resolution for L4
4
+
5
+ [project]
6
+ name = "anima-slam-gs3lam"
7
+
8
+ [paper_defaults]
9
+ replica_tracking_iterations = 20
10
+ replica_mapping_iterations = 15
11
+ tracking_rotation_lr = 0.0004
12
+ tracking_translation_lr = 0.002
13
+
14
+ [dataset_presets.replica]
15
+ name = "replica"
16
+ sequence = "office0"
17
+ root = "/mnt/forge-data/datasets/slam/gs3lam/Replica"
18
+ desired_image_height = 340
19
+ desired_image_width = 600
20
+
21
+ [dataset_presets.replica.camera]
22
+ image_height = 680
23
+ image_width = 1200
24
+ # Intrinsics scaled by 0.5 for half-resolution rendering
25
+ fx = 300.0
26
+ fy = 300.0
27
+ cx = 299.75
28
+ cy = 169.75
29
+ png_depth_scale = 6553.5
gs3lam_office2_v1_metadata.json ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "format": "gs3lam",
3
+ "version": "0.1.0",
4
+ "semantic_dim": "16",
5
+ "semantic_classes": "256",
6
+ "num_gaussians": "21016",
7
+ "num_poses": "2000"
8
+ }
logs/eval_office2.json ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "scene": "office2",
3
+ "total_frames": 2000,
4
+ "elapsed_s": 19786.7,
5
+ "num_gaussians": 21016,
6
+ "replica_psnr": 3.3855,
7
+ "replica_ssim": 0.0226,
8
+ "replica_lpips": 0.6932,
9
+ "replica_ate_cm": 178.2363,
10
+ "replica_fps": 0.1,
11
+ "checkpoint": "/mnt/artifacts-datai/checkpoints/project_slam_gs3lam/office2/gs3lam_step_1999.pt"
12
+ }
onnx/gs3lam_office2_v1_decoder.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:422e6ac4f980a61f6803b823ac6ce883ed9ab30cc331da1b10234b6e7cad848b
3
+ size 670
onnx/gs3lam_office2_v1_decoder.onnx.data ADDED
Binary file (17.4 kB). View file
 
paper.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7c3409e74e9bcdd7650aaf299e15f3f0c4655cb0df71fe90644d0deb42b4049d
3
+ size 10677424
pytorch/gs3lam_office2_v1_decoder.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:500579319986847df2dcf930b638666eefd3f5e32b6365671b288bd58f52bbaf
3
+ size 17704
pytorch/gs3lam_office2_v1_field.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:134cace086b4e325641f3d495a2455194f7cdba61ac29cc6a195583d8f79e2c6
3
+ size 2354416
pytorch/gs3lam_office2_v1_poses.npy ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:39be066ffe9b0c04eb033719245f5352baf966ea9670bd57be9591bd3667667f
3
+ size 128128