euler-preprocess 2.0.0__tar.gz → 2.1.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_preprocess-2.0.0 → euler_preprocess-2.1.0}/PKG-INFO +1 -1
- {euler_preprocess-2.0.0 → euler_preprocess-2.1.0}/euler_preprocess/common/output.py +21 -3
- {euler_preprocess-2.0.0 → euler_preprocess-2.1.0}/euler_preprocess.egg-info/PKG-INFO +1 -1
- {euler_preprocess-2.0.0 → euler_preprocess-2.1.0}/pyproject.toml +1 -1
- {euler_preprocess-2.0.0 → euler_preprocess-2.1.0}/tests/test_fog_aux_outputs.py +70 -0
- {euler_preprocess-2.0.0 → euler_preprocess-2.1.0}/README.md +0 -0
- {euler_preprocess-2.0.0 → euler_preprocess-2.1.0}/euler_preprocess/__init__.py +0 -0
- {euler_preprocess-2.0.0 → euler_preprocess-2.1.0}/euler_preprocess/cli.py +0 -0
- {euler_preprocess-2.0.0 → euler_preprocess-2.1.0}/euler_preprocess/common/__init__.py +0 -0
- {euler_preprocess-2.0.0 → euler_preprocess-2.1.0}/euler_preprocess/common/dataset.py +0 -0
- {euler_preprocess-2.0.0 → euler_preprocess-2.1.0}/euler_preprocess/common/device.py +0 -0
- {euler_preprocess-2.0.0 → euler_preprocess-2.1.0}/euler_preprocess/common/intrinsics.py +0 -0
- {euler_preprocess-2.0.0 → euler_preprocess-2.1.0}/euler_preprocess/common/io.py +0 -0
- {euler_preprocess-2.0.0 → euler_preprocess-2.1.0}/euler_preprocess/common/logging.py +0 -0
- {euler_preprocess-2.0.0 → euler_preprocess-2.1.0}/euler_preprocess/common/noise.py +0 -0
- {euler_preprocess-2.0.0 → euler_preprocess-2.1.0}/euler_preprocess/common/normalize.py +0 -0
- {euler_preprocess-2.0.0 → euler_preprocess-2.1.0}/euler_preprocess/common/sampling.py +0 -0
- {euler_preprocess-2.0.0 → euler_preprocess-2.1.0}/euler_preprocess/common/transform.py +0 -0
- {euler_preprocess-2.0.0 → euler_preprocess-2.1.0}/euler_preprocess/fog/__init__.py +0 -0
- {euler_preprocess-2.0.0 → euler_preprocess-2.1.0}/euler_preprocess/fog/airlight_from_sky.py +0 -0
- {euler_preprocess-2.0.0 → euler_preprocess-2.1.0}/euler_preprocess/fog/dcp_airlight.py +0 -0
- {euler_preprocess-2.0.0 → euler_preprocess-2.1.0}/euler_preprocess/fog/dcp_airlight_torch.py +0 -0
- {euler_preprocess-2.0.0 → euler_preprocess-2.1.0}/euler_preprocess/fog/dcp_heuristic_airlight.py +0 -0
- {euler_preprocess-2.0.0 → euler_preprocess-2.1.0}/euler_preprocess/fog/dcp_heuristic_airlight_torch.py +0 -0
- {euler_preprocess-2.0.0 → euler_preprocess-2.1.0}/euler_preprocess/fog/foggify.py +0 -0
- {euler_preprocess-2.0.0 → euler_preprocess-2.1.0}/euler_preprocess/fog/foggify_logging.py +0 -0
- {euler_preprocess-2.0.0 → euler_preprocess-2.1.0}/euler_preprocess/fog/logging.py +0 -0
- {euler_preprocess-2.0.0 → euler_preprocess-2.1.0}/euler_preprocess/fog/models.py +0 -0
- {euler_preprocess-2.0.0 → euler_preprocess-2.1.0}/euler_preprocess/fog/transform.py +0 -0
- {euler_preprocess-2.0.0 → euler_preprocess-2.1.0}/euler_preprocess/radial/__init__.py +0 -0
- {euler_preprocess-2.0.0 → euler_preprocess-2.1.0}/euler_preprocess/radial/transform.py +0 -0
- {euler_preprocess-2.0.0 → euler_preprocess-2.1.0}/euler_preprocess/sky_depth/__init__.py +0 -0
- {euler_preprocess-2.0.0 → euler_preprocess-2.1.0}/euler_preprocess/sky_depth/transform.py +0 -0
- {euler_preprocess-2.0.0 → euler_preprocess-2.1.0}/euler_preprocess.egg-info/SOURCES.txt +0 -0
- {euler_preprocess-2.0.0 → euler_preprocess-2.1.0}/euler_preprocess.egg-info/dependency_links.txt +0 -0
- {euler_preprocess-2.0.0 → euler_preprocess-2.1.0}/euler_preprocess.egg-info/entry_points.txt +0 -0
- {euler_preprocess-2.0.0 → euler_preprocess-2.1.0}/euler_preprocess.egg-info/requires.txt +0 -0
- {euler_preprocess-2.0.0 → euler_preprocess-2.1.0}/euler_preprocess.egg-info/top_level.txt +0 -0
- {euler_preprocess-2.0.0 → euler_preprocess-2.1.0}/setup.cfg +0 -0
- {euler_preprocess-2.0.0 → euler_preprocess-2.1.0}/tests/test_airlight_fallback.py +0 -0
- {euler_preprocess-2.0.0 → euler_preprocess-2.1.0}/tests/test_dcp_heuristic_airlight.py +0 -0
- {euler_preprocess-2.0.0 → euler_preprocess-2.1.0}/tests/test_foggify_integration.py +0 -0
- {euler_preprocess-2.0.0 → euler_preprocess-2.1.0}/tests/test_radial.py +0 -0
- {euler_preprocess-2.0.0 → euler_preprocess-2.1.0}/tests/test_sky_depth.py +0 -0
- {euler_preprocess-2.0.0 → euler_preprocess-2.1.0}/tests/test_source_backed_output.py +0 -0
- {euler_preprocess-2.0.0 → euler_preprocess-2.1.0}/tests/test_zip_output.py +0 -0
|
@@ -381,11 +381,29 @@ def _select_pipeline_target(
|
|
|
381
381
|
f"pipeline.output_targets does not contain slot '{slot}'"
|
|
382
382
|
)
|
|
383
383
|
|
|
384
|
-
|
|
385
|
-
|
|
384
|
+
# Auxiliary slot names declared by the transform are reserved for
|
|
385
|
+
# OUTPUT_SLOT_SPECS and routed by prepare_output_backends; ignore them
|
|
386
|
+
# when picking the *primary* target. This lets pipeline configs use
|
|
387
|
+
# arbitrary slot aliases (e.g. ``"fog"`` for the primary RGB output)
|
|
388
|
+
# alongside named auxiliary outputs.
|
|
389
|
+
aux_slots = set((getattr(transform_class, "OUTPUT_SLOT_SPECS", None) or {}).keys())
|
|
390
|
+
primary_candidates = [
|
|
391
|
+
t for t in pipeline.output_targets if t.slot not in aux_slots
|
|
392
|
+
]
|
|
393
|
+
|
|
394
|
+
if len(primary_candidates) == 1:
|
|
395
|
+
return primary_candidates[0]
|
|
396
|
+
|
|
397
|
+
if not primary_candidates:
|
|
398
|
+
raise ValueError(
|
|
399
|
+
f"pipeline.output_targets has no primary target for "
|
|
400
|
+
f"{transform_class.__name__}; only auxiliary slots present "
|
|
401
|
+
f"({sorted(aux_slots)}). Add a target for the primary output."
|
|
402
|
+
)
|
|
386
403
|
|
|
387
404
|
raise ValueError(
|
|
388
|
-
"pipeline.output_targets contains multiple entries
|
|
405
|
+
"pipeline.output_targets contains multiple primary entries "
|
|
406
|
+
f"({[t.slot for t in primary_candidates]}); set top-level "
|
|
389
407
|
"'output_slot' to select the target for this transform."
|
|
390
408
|
)
|
|
391
409
|
|
|
@@ -331,6 +331,76 @@ def test_aux_outputs_carry_correct_index_metadata(tmp_path: Path) -> None:
|
|
|
331
331
|
assert airlight_index["euler_train"]["used_as"] == "target"
|
|
332
332
|
|
|
333
333
|
|
|
334
|
+
def test_primary_slot_auto_selected_when_aliased(tmp_path: Path) -> None:
|
|
335
|
+
"""A pipeline target whose slot is *not* one of the aux slot names is
|
|
336
|
+
automatically picked up as the primary RGB target — even when its slot
|
|
337
|
+
name doesn't match the transform's primary slot (e.g. ``"fog"``).
|
|
338
|
+
"""
|
|
339
|
+
dataset = _make_dataset(tmp_path)
|
|
340
|
+
pipeline_root = tmp_path / "pipeline_root_alias"
|
|
341
|
+
manifest_path = pipeline_root / ".euler_pipeline" / "pipeline_outputs.json"
|
|
342
|
+
config = {
|
|
343
|
+
"pipeline": {
|
|
344
|
+
"output_root": str(pipeline_root),
|
|
345
|
+
"outputs_manifest_path": str(manifest_path),
|
|
346
|
+
"output_targets": [
|
|
347
|
+
{
|
|
348
|
+
"slot": "fog",
|
|
349
|
+
"datasetType": "rgb",
|
|
350
|
+
"relativePath": "foggy_rgb.zip",
|
|
351
|
+
"path": str(pipeline_root / "foggy_rgb.zip"),
|
|
352
|
+
"storage": "zip",
|
|
353
|
+
},
|
|
354
|
+
{
|
|
355
|
+
"slot": ATMOSPHERIC_LIGHT_SLOT,
|
|
356
|
+
"datasetType": "rgb",
|
|
357
|
+
"relativePath": "atmospheric_light.zip",
|
|
358
|
+
"path": str(pipeline_root / "atmospheric_light.zip"),
|
|
359
|
+
"storage": "zip",
|
|
360
|
+
},
|
|
361
|
+
{
|
|
362
|
+
"slot": SCATTERING_COEFFICIENT_SLOT,
|
|
363
|
+
"datasetType": "rgb",
|
|
364
|
+
"relativePath": "scattering_coefficient.zip",
|
|
365
|
+
"path": str(pipeline_root / "scattering_coefficient.zip"),
|
|
366
|
+
"storage": "zip",
|
|
367
|
+
},
|
|
368
|
+
],
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
backends = prepare_output_backends(config, dataset, FogTransform)
|
|
373
|
+
|
|
374
|
+
assert set(backends.keys()) == {
|
|
375
|
+
"rgb",
|
|
376
|
+
SCATTERING_COEFFICIENT_SLOT,
|
|
377
|
+
ATMOSPHERIC_LIGHT_SLOT,
|
|
378
|
+
}
|
|
379
|
+
# Primary backend points at the "fog" target, not a literal "rgb" target.
|
|
380
|
+
assert backends["rgb"].root == pipeline_root / "foggy_rgb.zip"
|
|
381
|
+
|
|
382
|
+
transform = FogTransform(
|
|
383
|
+
config_path=str(_write_fog_config(tmp_path / "fog_cfg.json")),
|
|
384
|
+
out_path=str(backends["rgb"].root),
|
|
385
|
+
output_backends=backends,
|
|
386
|
+
)
|
|
387
|
+
transform.run(dataset)
|
|
388
|
+
|
|
389
|
+
import zipfile
|
|
390
|
+
|
|
391
|
+
with zipfile.ZipFile(pipeline_root / "foggy_rgb.zip", "r") as zf:
|
|
392
|
+
assert "Scene01/Camera_0/00001.png" in zf.namelist()
|
|
393
|
+
with zipfile.ZipFile(pipeline_root / "scattering_coefficient.zip", "r") as zf:
|
|
394
|
+
assert "Scene01/Camera_0/00001.npy" in zf.namelist()
|
|
395
|
+
with zipfile.ZipFile(pipeline_root / "atmospheric_light.zip", "r") as zf:
|
|
396
|
+
assert "Scene01/Camera_0/00001.npy" in zf.namelist()
|
|
397
|
+
|
|
398
|
+
# Manifest still lists every active slot in declaration order.
|
|
399
|
+
manifest = json.loads(manifest_path.read_text())
|
|
400
|
+
slots = [target["slot"] for target in manifest["outputs"]]
|
|
401
|
+
assert slots == ["fog", SCATTERING_COEFFICIENT_SLOT, ATMOSPHERIC_LIGHT_SLOT]
|
|
402
|
+
|
|
403
|
+
|
|
334
404
|
def test_apply_model_returns_full_size_maps_for_uniform() -> None:
|
|
335
405
|
"""Sanity-check the broadcast logic on the model layer."""
|
|
336
406
|
from euler_preprocess.fog.models import apply_model
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{euler_preprocess-2.0.0 → euler_preprocess-2.1.0}/euler_preprocess/fog/dcp_airlight_torch.py
RENAMED
|
File without changes
|
{euler_preprocess-2.0.0 → euler_preprocess-2.1.0}/euler_preprocess/fog/dcp_heuristic_airlight.py
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{euler_preprocess-2.0.0 → euler_preprocess-2.1.0}/euler_preprocess.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
{euler_preprocess-2.0.0 → euler_preprocess-2.1.0}/euler_preprocess.egg-info/entry_points.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
|
|
File without changes
|
|
File without changes
|