IMU4DData / ncsa /objects /README.md
TianhangCheng7's picture
Add ncsa/objects (meeting-room chair mesh + per-session poses)
c59db60 verified
|
Raw History Blame Contribute Delete
4.28 kB
# NCSA meeting-room chair objects
One shared chair mesh, ten sessions, fifteen static instance poses.
- `assets/chair.obj`: the merged Blender chair geometry, in metres, Z-up,
recentered at its local bounding-box centre. Geometry and size are unchanged.
- `assets/chair.json`: shared asset ID, bounds/extent, mesh hash, source provenance,
and the translation back into the original Blender mesh-local coordinates.
- `sessions/<session>.json`: instance poses, quaternion, translation, local extent,
source matrices, and provenance. All instances reference the same mesh file.
- `manifest.json`: asset/session index.
- `sample_index.json`: existing processed clips mapped to the session annotations.
- `qc/index.html`: all ten sessions rendered back into their three cameras.
- `verification.json`: numerical consistency checks.
## Instances and placement sources
| Sequences | Keys | Pose source |
|---|---|---|
| 1–5 | `chair` | Previously reviewed individual scene_1 fits |
| 6–10 | `chair` (near), `chair__2` (far) | User's unchanged `seq6.blend` placement, reused across the fixed setup |
`source_instance` retains the earlier naming: near = `chair_1` / Blender `chair1`,
far = `chair_0` / Blender `chair2`. The two instances have separate object IDs and
the same `asset_id: ncsa/meeting_room/chair` and `category: chair`.
Seq 4–15 use the same physical camera setup according to the user. Every supplied
calibration file anchors cam_01 with identity extrinsics and identical intrinsics;
per-session refinement of the other cameras does not itself establish a changed
cam_01 frame. Seq 6–10 therefore reuse the exact same two manual pose matrices,
under the stationary-chair assumption checked against the background overlays.
Seq 1–5 retain their own poses rather than assuming identical chair placement.
## Coordinate convention
All saved object poses are in the **calibration / cam_01 world**, in metres:
X = camera right, Y = camera down, Z = camera forward.
`mesh_to_world` uses column-vector convention:
```python
world_vertices = local_vertices @ matrix[:3, :3].T + matrix[:3, 3]
```
The mesh is bounding-box centred. Consequently, `translation_xyz` is the world
position of its bounding-box centre, not the original Blender object origin.
`source_mesh_to_world` separately preserves that original pose. Recentering was
checked to leave all placed world vertices unchanged (tolerance 1e-7 m).
`track` is a static length-10 vector:
`[qw, qx, qy, qz, tx, ty, tz, extent_x, extent_y, extent_z]`.
The extent is in the rotated object's **local axes**, not a world-aligned AABB.
`bbox_convention` is `local_extent_centered_at_track_translation`.
Repeat the vector over a clip's frame count when a `[T,10]` track is needed.
These files are standalone object annotations. Existing sample PKLs, WDS shards,
human motion, and IMUs were not modified. In particular, do not concatenate these
camera-world tracks with the packed IMU-world motion without an explicit coordinate
conversion. `sample_index.json` provides sample-to-session bindings, not an implicit
conversion or loader integration.
## Reading an annotation
```python
import json
from pathlib import Path
import numpy as np
import trimesh
root = Path('data/processed/ncsa/objects')
record = json.loads((root/'sessions/0915_scene_2_seq_6.json').read_text())
obj = record['objects']['chair'] # near chair
mesh = trimesh.load(root/obj['mesh_path'], force='mesh', process=False)
mesh.apply_transform(np.asarray(obj['mesh_to_world']))
```
## Quality and reproducibility
The seq6 manual placement was accepted by the user after three-camera review.
Its remaining mesh/seat/caster discrepancies are preserved; this release does not
claim independently measured geometric ground truth. No scale fitting, deformation,
or additional alignment was applied during publication. QC includes chair-to-chair
occlusion but not occlusion by other room geometry.
From the IMU4D_dev root, reproduce into a **new** output directory:
```bash
OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 \
python -m dataset_process.ncsa.export_chair_objects --out <new-output-directory>
```
The export refuses to overwrite an existing release. The source `.blend`, previous
fit results and original chair mesh are retained.