Skip to content

Commit 47fb880

Browse files
committed
scale observation update to v4.1 research, scene mask annotation, docs cleanup
1 parent dcd6c79 commit 47fb880

38 files changed

Lines changed: 3040 additions & 290 deletions

docs/annotation/object_mask_annotation_3d.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -628,10 +628,12 @@ Recommended use:
628628
and higher closed-set COCO segmentation accuracy is preferred.
629629
- Use `yoloe-26l-seg-pf.pt` when broad prompt-free annotation is more important
630630
than COCO-only precision.
631-
- Treat `yoloe-26l-seg-pf.pt` as an annotation model for now. It is not yet a
632-
strong fit for ScaleObservation, because most of its 4,585 labels do not yet
633-
have calibrated metric object-size priors. ScaleObservation-specific guidance
634-
will be documented separately.
631+
- For ScaleObservation, `yoloe-26l-seg-pf.pt` can provide additional useful
632+
labels such as desks, cabinets, monitors, doors, and appliances. Most of its
633+
4,585 labels still do not have calibrated metric priors, so unsupported labels
634+
are ignored by the scale estimator. See
635+
[Scale Observation](../observation/scale_observation.md#supported-scale-priors)
636+
for the current prior list.
635637

636638
The supported prompt-free labels are listed and grouped here:
637639

docs/annotation/scene_mask_annotation_3d.md

Lines changed: 392 additions & 0 deletions
Large diffs are not rendered by default.
27.4 KB
Loading
1.34 MB
Loading
29.7 MB
Binary file not shown.

docs/index.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,13 @@ Each task lives in its own module under `vizion3d/<category>/` and exposes exact
210210
| Task | Status | Docs |
211211
|---|---|---|
212212
| Object mask annotation 3D | Stable | [Object Mask Annotation 3D](annotation/object_mask_annotation_3d.md) |
213+
| Scene mask annotation 3D | Stable | [Scene Mask Annotation 3D](annotation/scene_mask_annotation_3d.md) |
214+
215+
### Observation
216+
217+
| Task | Status | Docs |
218+
|---|---|---|
219+
| Scale Observation | Stable | [Scale Observation](observation/scale_observation.md) |
213220

214221
---
215222

docs/observation/scale_observation.md

Lines changed: 29 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Scale Observation
22

33
**Category:** Observation
4-
**Experimental:** Yes
4+
**Experimental:** No
55

66
`ScaleObservation` estimates a single metric scale factor for a generated point
77
cloud. It is intended for monocular-depth point clouds whose shape is plausible
@@ -12,9 +12,10 @@ The task consumes a point cloud plus object annotations from
1212
evidence, and can return the estimated scale, candidate diagnostics, a scaled
1313
point cloud, and a reprojected scaled depth image.
1414

15-
> **Experimental status:** Scale Observation is still being improved. Accuracy,
16-
> candidate selection, and reporting are expected to get better as evaluation
17-
> expands, with the goal of reaching a stable non-experimental state soon.
15+
> **Accuracy note:** Scale Observation is a rough metric-scale estimator, not a
16+
> measurement system. It can put a relative monocular-depth cloud into a more
17+
> plausible physical size range, but confidence and candidate diagnostics should
18+
> stay visible in downstream applications.
1819
1920
---
2021

@@ -160,8 +161,11 @@ object is reliable enough to produce metric scale candidates.
160161

161162
## Inference Features
162163

163-
The runtime estimator evaluates the same evidence used by the promoted V4
164-
research path:
164+
The runtime estimator follows the promoted V4.1 research path:
165+
`v4_1_yoloe_strong_dimension_class_trimmed_huber`. V4.1 preserves the promoted
166+
V4 results while removing the dormant scene-extent cap, so the final scale flows
167+
from object evidence, trimmed Huber aggregation, and prior blending without an
168+
upper scene-size guard.
165169

166170
| Feature | Purpose |
167171
|---|---|
@@ -175,26 +179,34 @@ research path:
175179
| Dimension reliability | Gives each class/dimension a learned trust weight. |
176180
| Learned calibration | Applies per-class/per-dimension scale correction factors. |
177181
| Scene plausibility | Downweights candidates that imply implausible scene dimensions. |
178-
| Scene extent guard | Optionally limits the final scale if configured. |
182+
| Final prior blend | Blends object evidence with a weak global prior when confidence is low. |
179183

180184
---
181185

182186
## Supported Scale Priors
183187

184-
The default annotation checkpoint can detect 80 COCO classes, but only a subset
185-
has useful metric-size priors for scale estimation. Objects outside this table
186-
can still appear in annotation results, but they are marked as missing a scale
187-
prior and do not produce scale candidates.
188+
Scale candidates are created only for labels with metric-size priors. The table
189+
contains the COCO-aligned labels used by the default object annotation model and
190+
the expanded prompt-free YOLOE labels that V4.1 can consume when
191+
`ObjectMaskAnnotation3D` is run with the YOLOE prompt-free checkpoint. Objects
192+
outside these priors can still appear in annotation results, but they are marked
193+
as missing a scale prior and do not produce scale candidates.
188194

189195
| Group | Classes with scale priors |
190196
|---|---|
191197
| People | `person` |
192-
| Furniture | `chair`, `couch`, `bed`, `dining table`, `toilet` |
193-
| Electronics | `tv`, `laptop`, `keyboard`, `mouse` |
194-
| Indoor objects | `book`, `vase`, `potted plant` |
195-
| Appliances and fixtures | `refrigerator`, `microwave`, `oven`, `sink` |
198+
| Core COCO furniture | `chair`, `couch`, `bed`, `dining table`, `toilet` |
199+
| Expanded furniture and fixtures | `armchair`, `office chair`, `stool`, `bench`, `desk`, `office desk`, `computer desk`, `side table`, `coffee table`, `cabinet`, `file cabinet`, `kitchen cabinet`, `bookshelf`, `bookcase`, `shelf`, `dresser`, `nightstand`, `door`, `window`, `mirror` |
200+
| Electronics | `tv`, `laptop`, `keyboard`, `mouse`, `monitor`, `computer monitor`, `computer`, `desktop computer`, `printer`, `phone`, `smartphone`, `tablet`, `remote` |
201+
| Appliances and fixtures | `refrigerator`, `microwave`, `oven`, `sink`, `toaster`, `blender`, `coffee machine`, `dish washer`, `washing machine`, `faucet`, `shower`, `bathtub` |
202+
| Indoor objects | `book`, `vase`, `potted plant`, `lamp`, `table lamp`, `trash bin`, `waste container`, `backpack`, `suitcase`, `luggage`, `pillow`, `mattress`, `basket`, `bucket`, `box`, `plant`, `houseplant` |
196203
| Tableware | `bottle`, `cup`, `bowl` |
197204

205+
Common aliases are normalised before lookup. Examples include `sofa``couch`,
206+
`fridge``refrigerator`, `table``dining table`, `screen``monitor`,
207+
`swivel chair``office chair`, `washer``washing machine`, and `mug`
208+
`cup`.
209+
198210
---
199211

200212
## Command Parameters
@@ -209,7 +221,7 @@ prior and do not produce scale candidates.
209221
| `return_scaled_point_cloud` | `bool` | No | `False` | If `True`, returns a point cloud whose coordinates are multiplied by `scale_factor`. |
210222
| `return_scaled_depth` | `bool` | No | `False` | If `True`, projects the scaled cloud back into a camera-space depth image. Requires advanced camera fields. |
211223
| `return_report` | `bool` | No | `True` | If `True`, includes bounds, accepted candidates, and rejected candidates in `scale_report`. |
212-
| `config` | `ScaleObservationConfig` | No | promoted V4 defaults | Algorithm-level scale-estimation settings. |
224+
| `config` | `ScaleObservationConfig` | No | promoted V4.1 defaults | Algorithm-level scale-estimation settings. |
213225
| `advanced_config` | `ScaleObservationAdvancedConfig` | No | empty | Camera/image settings. See [Advanced config](#advanced-config). |
214226

215227
---
@@ -467,7 +479,7 @@ Common rejection reasons:
467479
| `weak_multi_axis_agreement` | Candidate dimensions disagree too much. |
468480
| `object_dimensions_disagree` | Candidate dimensions are incompatible. |
469481
| `below_variant_weight_threshold` | Candidate weight was too low. |
470-
| `not_selected_by_variant` | Candidate did not pass final V4 selection. |
482+
| `not_selected_by_variant` | Candidate did not pass final V4.1 selection. |
471483

472484
---
473485

docs/tasks/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ has a direct Python facade and, where available, REST and gRPC adapters.
1515
| Task | Python import | REST |
1616
|---|---|---|
1717
| [Object Mask Annotation 3D](../annotation/object_mask_annotation_3d.md) | `vizion3d.annotation.ObjectMaskAnnotation3D` | `/annotation/object-mask-annotation-3d` |
18+
| [Scene Mask Annotation 3D](../annotation/scene_mask_annotation_3d.md) | `vizion3d.annotation.SceneMaskAnnotation3D` | `/annotation/scene-mask-annotation-3d` |
1819

1920
## Observation
2021

mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ nav:
3636
- Depth Estimation vs Stereo Depth: features/depth_estimation_vs_stereo_depth.md
3737
- Annotation:
3838
- Object Mask Annotation 3D: annotation/object_mask_annotation_3d.md
39+
- Scene Mask Annotation 3D: annotation/scene_mask_annotation_3d.md
3940
- YOLOE-26L Prompt-Free Classes: annotation/yoloe_26l_prompt_free_classes.md
4041
- Observation:
4142
- Scale Observation: observation/scale_observation.md

tests/integration/conftest.py

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,45 @@ def local_annotation_model_path(tmp_path_factory) -> str:
228228
return str(dest)
229229

230230

231+
@pytest.fixture(scope="session")
232+
def local_scene_model_path(tmp_path_factory) -> str:
233+
"""Provide a local .bin path for the SegFormer-B4 scene model.
234+
235+
Resolution order: the vizion3d cache, then the vendored research copy at
236+
``research/2D_SEGMENTATION/segformer_b4_ade20k.bin``, then a fresh download
237+
from the release URL. Skips the test if none is available.
238+
"""
239+
from vizion3d.annotation.scene_defaults import (
240+
DEFAULT_SCENE_MODEL_FILENAME,
241+
DEFAULT_SCENE_MODEL_URL,
242+
)
243+
from vizion3d.lifting.defaults import default_model_cache_dir, download_model
244+
245+
default_cache = default_model_cache_dir() / DEFAULT_SCENE_MODEL_FILENAME
246+
research_copy = (
247+
Path(__file__).parent.parent.parent
248+
/ "research"
249+
/ "2D_SEGMENTATION"
250+
/ DEFAULT_SCENE_MODEL_FILENAME
251+
)
252+
tmp_dir = tmp_path_factory.mktemp("local_scene_model")
253+
dest = tmp_dir / DEFAULT_SCENE_MODEL_FILENAME
254+
255+
if default_cache.exists():
256+
dest.symlink_to(default_cache.resolve())
257+
elif research_copy.exists():
258+
dest.symlink_to(research_copy.resolve())
259+
else:
260+
try:
261+
download_model(DEFAULT_SCENE_MODEL_URL, cache_dir=tmp_dir)
262+
except Exception as exc: # pragma: no cover - network/release dependent
263+
pytest.skip(f"SegFormer scene model unavailable: {exc}")
264+
265+
if not (dest.exists() or dest.is_symlink()):
266+
pytest.skip(f"Scene model not found at {dest}")
267+
return str(dest)
268+
269+
231270
# ──────────────────────────────────────────────────────────────────────────────
232271
# gRPC server + client stub fixture
233272
# ──────────────────────────────────────────────────────────────────────────────

0 commit comments

Comments
 (0)