ChangChrisLiu commited on
Commit
f82c0e8
·
verified ·
1 Parent(s): 18aba28

Expose aligned multi-view RGB for realtime final graphs

Browse files
Files changed (1) hide show
  1. gwam_v12_sparse_v2/README.md +38 -0
gwam_v12_sparse_v2/README.md CHANGED
@@ -2445,3 +2445,41 @@ view evidence: sparse masks / evidence per visible pair
2445
  visual features: sparse visible-only visual_features_sparse.npz
2446
  dynamic relations: contact and visibility_change JSONL events
2447
  ```
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2445
  visual features: sparse visible-only visual_features_sparse.npz
2446
  dynamic relations: contact and visibility_change JSONL events
2447
  ```
2448
+
2449
+ ## Multi-view RGB / graph alignment contract
2450
+
2451
+ For joint training, evaluation, and real-time inference, the model-facing online call is:
2452
+
2453
+ ```python
2454
+ snapshot = extractor.extract_final_graph(visual_backend=visual_backend)
2455
+ graph = snapshot["gnn_graph"] # x [N_real,342], edge_attr [E,8]
2456
+ rgb_frames = snapshot["rgb_frames"] # dict: view_id -> uint8[256,256,3]
2457
+ rgb_frame_cameras = snapshot["rgb_frame_cameras"] # ordered camera names for those view ids
2458
+ ```
2459
+
2460
+ All fields in one `snapshot` are produced from the same current simulator state before the policy/env step advances:
2461
+
2462
+ ```text
2463
+ current qpos/qvel/contact state
2464
+ + current segmentation renders from the ordered camera list
2465
+ + current RGB renders from the same ordered camera list
2466
+ + current visible RLE masks indexed by (node slot n, view id v)
2467
+ + SAM2 masked pooling on rgb_frames[v] using that same mask
2468
+ = final graph x [N_real,342]
2469
+ ```
2470
+
2471
+ The ordered multi-view camera contract is:
2472
+
2473
+ ```text
2474
+ v=0 robot0_agentview_right
2475
+ v=1 robot0_agentview_left
2476
+ v=2 robot0_eye_in_hand
2477
+ ```
2478
+
2479
+ Alignment rules for downstream integration:
2480
+
2481
+ - `view_visible[n,v]`, `view_centroid[n,v]`, `view_area[n,v]`, `view_bbox[n,v]`, `rle_masks[*]["v"]`, `visual_features_sparse["v"]`, and `rgb_frames[v]` use the same view id.
2482
+ - `visual_features_sparse["n"]` uses the original padded node slot id; `gnn_graph["slot_ids"]` maps active GNN rows back to those padded slots.
2483
+ - `rgb_frames[v]` is an upright `uint8[256,256,3]` RGB frame rendered with the same vertical flip convention as the segmentation/mask path.
2484
+ - `save_realtime_graph_snapshot(snapshot, out_dir)` writes `rgb/view_<v>_<camera>.npy` plus `rgb_manifest.json`, so saved debug/eval snapshots contain graph data first and aligned RGB images alongside it.
2485
+