euler-inference 2.6.0__tar.gz → 2.7.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {euler_inference-2.6.0 → euler_inference-2.7.0}/PKG-INFO +1 -1
- {euler_inference-2.6.0 → euler_inference-2.7.0}/README.md +29 -2
- {euler_inference-2.6.0 → euler_inference-2.7.0}/euler_inference/_outputs.py +13 -1
- {euler_inference-2.6.0 → euler_inference-2.7.0}/euler_inference.egg-info/PKG-INFO +1 -1
- {euler_inference-2.6.0 → euler_inference-2.7.0}/pyproject.toml +1 -1
- {euler_inference-2.6.0 → euler_inference-2.7.0}/tests/test_writer_integration.py +36 -0
- {euler_inference-2.6.0 → euler_inference-2.7.0}/euler_inference/__init__.py +0 -0
- {euler_inference-2.6.0 → euler_inference-2.7.0}/euler_inference/__main__.py +0 -0
- {euler_inference-2.6.0 → euler_inference-2.7.0}/euler_inference/api.py +0 -0
- {euler_inference-2.6.0 → euler_inference-2.7.0}/euler_inference/config.py +0 -0
- {euler_inference-2.6.0 → euler_inference-2.7.0}/euler_inference/inference.py +0 -0
- {euler_inference-2.6.0 → euler_inference-2.7.0}/euler_inference/model_card.py +0 -0
- {euler_inference-2.6.0 → euler_inference-2.7.0}/euler_inference/models/__init__.py +0 -0
- {euler_inference-2.6.0 → euler_inference-2.7.0}/euler_inference/models/external_model.py +0 -0
- {euler_inference-2.6.0 → euler_inference-2.7.0}/euler_inference.egg-info/SOURCES.txt +0 -0
- {euler_inference-2.6.0 → euler_inference-2.7.0}/euler_inference.egg-info/dependency_links.txt +0 -0
- {euler_inference-2.6.0 → euler_inference-2.7.0}/euler_inference.egg-info/entry_points.txt +0 -0
- {euler_inference-2.6.0 → euler_inference-2.7.0}/euler_inference.egg-info/requires.txt +0 -0
- {euler_inference-2.6.0 → euler_inference-2.7.0}/euler_inference.egg-info/top_level.txt +0 -0
- {euler_inference-2.6.0 → euler_inference-2.7.0}/setup.cfg +0 -0
- {euler_inference-2.6.0 → euler_inference-2.7.0}/tests/test_intrinsics_resolution.py +0 -0
- {euler_inference-2.6.0 → euler_inference-2.7.0}/tests/test_model_card.py +0 -0
- {euler_inference-2.6.0 → euler_inference-2.7.0}/tests/test_model_metadata.py +0 -0
- {euler_inference-2.6.0 → euler_inference-2.7.0}/tests/test_save_path.py +0 -0
|
@@ -447,7 +447,34 @@ output_base_path/
|
|
|
447
447
|
|
|
448
448
|
If `outputs[].source_modality` is set explicitly but the named modality is missing, or no `euler-loading` writer is available for it, inference fails instead of silently falling back.
|
|
449
449
|
|
|
450
|
-
`points_3d`
|
|
450
|
+
`points_3d` and `intrinsics` are built-in legacy output modalities. Configure them with NumPy output types (`npy` or `npz`) and return float-compatible arrays with shapes `(3, H, W)` and `(3, 3)`, respectively. Their output datasets are indexed with the corresponding functions from the `generic` euler-loading loader, so recent `euler-loading` versions can read them without an explicit loader.
|
|
451
|
+
|
|
452
|
+
For an explicit model card configuration (useful when the metadata must also work with older euler-inference versions), use:
|
|
453
|
+
|
|
454
|
+
```json
|
|
455
|
+
{
|
|
456
|
+
"outputs": [
|
|
457
|
+
{
|
|
458
|
+
"key": "intrinsics",
|
|
459
|
+
"type": "npy",
|
|
460
|
+
"writer": {
|
|
461
|
+
"euler_train": {"used_as": "condition", "modality_type": "intrinsics"},
|
|
462
|
+
"euler_loading": {"loader": "generic", "function": "intrinsics", "version": "2.0.0"},
|
|
463
|
+
"meta": {"shape": [3, 3], "coordinate_frame": "camera"}
|
|
464
|
+
}
|
|
465
|
+
},
|
|
466
|
+
{
|
|
467
|
+
"key": "points_3d",
|
|
468
|
+
"type": "npy",
|
|
469
|
+
"writer": {
|
|
470
|
+
"euler_train": {"used_as": "target", "modality_type": "points_3d"},
|
|
471
|
+
"euler_loading": {"loader": "generic", "function": "points_3d", "version": "2.0.0"},
|
|
472
|
+
"meta": {"shape": [3, "H", "W"], "coordinate_frame": "camera"}
|
|
473
|
+
}
|
|
474
|
+
}
|
|
475
|
+
]
|
|
476
|
+
}
|
|
477
|
+
```
|
|
451
478
|
|
|
452
479
|
### Pipeline Manifest
|
|
453
480
|
|
|
@@ -481,7 +508,7 @@ Legacy outputs are written via ds-crawler's `DatasetWriter`/`ZipDatasetWriter`,
|
|
|
481
508
|
| `name` | Input dataset's name (from its `output.json`), or the output key if unavailable | `outputs[].writer.name` |
|
|
482
509
|
| `type` | Output key (e.g. `"depth"`) | `outputs[].writer.type` |
|
|
483
510
|
| `euler_train` | `{"used_as": "target", "modality_type": "<key>"}` | `outputs[].writer.euler_train` |
|
|
484
|
-
| `euler_loading` | *(omitted; `points_3d`
|
|
511
|
+
| `euler_loading` | *(omitted; `points_3d` and `intrinsics` default to their matching `generic` loader functions)* | `outputs[].writer.euler_loading` |
|
|
485
512
|
| `separator` | `null` | — |
|
|
486
513
|
| `meta` | *(omitted)* | `outputs[].writer.meta` |
|
|
487
514
|
|
|
@@ -20,6 +20,10 @@ PIPELINE_OUTPUTS_MANIFEST_VERSION = 1
|
|
|
20
20
|
|
|
21
21
|
_NUMPY_OUTPUT_TYPES = {"npy", "npz"}
|
|
22
22
|
_LOADABLE_LEGACY_OUTPUTS = {
|
|
23
|
+
"intrinsics": {
|
|
24
|
+
"euler_loading": {"loader": "generic", "function": "intrinsics"},
|
|
25
|
+
"output_types": _NUMPY_OUTPUT_TYPES,
|
|
26
|
+
},
|
|
23
27
|
"points_3d": {
|
|
24
28
|
"euler_loading": {"loader": "generic", "function": "points_3d"},
|
|
25
29
|
"output_types": _NUMPY_OUTPUT_TYPES,
|
|
@@ -209,9 +213,17 @@ def _prepare_legacy_output_data(data: Any, output_config: OutputConfig) -> Any:
|
|
|
209
213
|
writer_meta,
|
|
210
214
|
strict=True,
|
|
211
215
|
)
|
|
212
|
-
if modality_type
|
|
216
|
+
if modality_type not in {"intrinsics", "points_3d"}:
|
|
213
217
|
return arr
|
|
214
218
|
|
|
219
|
+
if modality_type == "intrinsics":
|
|
220
|
+
if arr.shape != (3, 3):
|
|
221
|
+
raise ValueError(
|
|
222
|
+
"intrinsics output must have shape (3, 3), "
|
|
223
|
+
f"got {arr.shape}"
|
|
224
|
+
)
|
|
225
|
+
return arr.astype(np.float32, copy=False)
|
|
226
|
+
|
|
215
227
|
if arr.ndim != 3 or arr.shape[0] != 3:
|
|
216
228
|
raise ValueError(
|
|
217
229
|
"points_3d output must have shape (3, H, W), "
|
|
@@ -299,6 +299,26 @@ class TestGetWriterKwargs:
|
|
|
299
299
|
assert kw["euler_train"]["modality_type"] == "points_3d"
|
|
300
300
|
assert kw["euler_loading"]["function"] == "points_3d"
|
|
301
301
|
|
|
302
|
+
def test_intrinsics_defaults_to_generic_loader_metadata(self):
|
|
303
|
+
oc = OutputConfig(key="intrinsics", type="npy")
|
|
304
|
+
kw = _get_writer_kwargs(oc, strict=True)
|
|
305
|
+
assert kw["type"] == "intrinsics"
|
|
306
|
+
assert kw["euler_train"] == {
|
|
307
|
+
"used_as": "target",
|
|
308
|
+
"modality_type": "intrinsics",
|
|
309
|
+
}
|
|
310
|
+
assert kw["euler_loading"] == {
|
|
311
|
+
"used_as": "target",
|
|
312
|
+
"modality_type": "intrinsics",
|
|
313
|
+
"loader": "generic",
|
|
314
|
+
"function": "intrinsics",
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
def test_intrinsics_rejects_non_numpy_output_format(self):
|
|
318
|
+
oc = OutputConfig(key="intrinsics", type="png")
|
|
319
|
+
with pytest.raises(ValueError, match="intrinsics outputs must use"):
|
|
320
|
+
_get_writer_kwargs(oc, strict=True)
|
|
321
|
+
|
|
302
322
|
def test_points_3d_rejects_non_numpy_output_format(self):
|
|
303
323
|
oc = OutputConfig(key="points_3d", type="png")
|
|
304
324
|
with pytest.raises(ValueError, match="points_3d outputs must use"):
|
|
@@ -570,6 +590,22 @@ class TestOutputResourceCleanup:
|
|
|
570
590
|
np.array([[0, 2, 4], [6, 8, 10]], dtype=np.float32),
|
|
571
591
|
)
|
|
572
592
|
|
|
593
|
+
def test_intrinsics_output_is_validated_and_converted_to_float32(self):
|
|
594
|
+
result = _prepare_legacy_output_data(
|
|
595
|
+
np.eye(3, dtype=np.float64),
|
|
596
|
+
OutputConfig(key="intrinsics", type="npy"),
|
|
597
|
+
)
|
|
598
|
+
|
|
599
|
+
assert result.shape == (3, 3)
|
|
600
|
+
assert result.dtype == np.float32
|
|
601
|
+
|
|
602
|
+
def test_intrinsics_output_rejects_wrong_shape(self):
|
|
603
|
+
with pytest.raises(ValueError, match=r"shape \(3, 3\)"):
|
|
604
|
+
_prepare_legacy_output_data(
|
|
605
|
+
np.zeros((4, 4), dtype=np.float32),
|
|
606
|
+
OutputConfig(key="intrinsics", type="npy"),
|
|
607
|
+
)
|
|
608
|
+
|
|
573
609
|
def test_finalize_writers_closes_all_writers_when_save_fails(self):
|
|
574
610
|
class Writer:
|
|
575
611
|
def __init__(self, save_error=None):
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{euler_inference-2.6.0 → euler_inference-2.7.0}/euler_inference.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|