euler-loading 2.29.0__tar.gz → 2.30.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_loading-2.29.0 → euler_loading-2.30.0}/CHANGELOG.md +4 -0
- {euler_loading-2.29.0 → euler_loading-2.30.0}/PKG-INFO +1 -1
- {euler_loading-2.29.0 → euler_loading-2.30.0}/euler_loading/loaders/cpu/generic_dense_depth.py +2 -1
- {euler_loading-2.29.0 → euler_loading-2.30.0}/euler_loading/loaders/cpu/vkitti2.py +2 -1
- {euler_loading-2.29.0 → euler_loading-2.30.0}/euler_loading/loaders/gpu/generic_dense_depth.py +2 -1
- {euler_loading-2.29.0 → euler_loading-2.30.0}/euler_loading/loaders/gpu/vkitti2.py +2 -1
- {euler_loading-2.29.0 → euler_loading-2.30.0}/pyproject.toml +1 -1
- {euler_loading-2.29.0 → euler_loading-2.30.0}/tests/test_loaders.py +19 -1
- {euler_loading-2.29.0 → euler_loading-2.30.0}/.gitignore +0 -0
- {euler_loading-2.29.0 → euler_loading-2.30.0}/LICENSE +0 -0
- {euler_loading-2.29.0 → euler_loading-2.30.0}/README.md +0 -0
- {euler_loading-2.29.0 → euler_loading-2.30.0}/docs/README.md +0 -0
- {euler_loading-2.29.0 → euler_loading-2.30.0}/docs/dataset.md +0 -0
- {euler_loading-2.29.0 → euler_loading-2.30.0}/docs/loaders.md +0 -0
- {euler_loading-2.29.0 → euler_loading-2.30.0}/docs/materialization.md +0 -0
- {euler_loading-2.29.0 → euler_loading-2.30.0}/docs/preprocessing.md +0 -0
- {euler_loading-2.29.0 → euler_loading-2.30.0}/docs/transform-descriptors.md +0 -0
- {euler_loading-2.29.0 → euler_loading-2.30.0}/docs/writing.md +0 -0
- {euler_loading-2.29.0 → euler_loading-2.30.0}/euler_loading/__init__.py +0 -0
- {euler_loading-2.29.0 → euler_loading-2.30.0}/euler_loading/__main__.py +0 -0
- {euler_loading-2.29.0 → euler_loading-2.30.0}/euler_loading/_dataset_contract.py +0 -0
- {euler_loading-2.29.0 → euler_loading-2.30.0}/euler_loading/_ds_crawler_utils.py +0 -0
- {euler_loading-2.29.0 → euler_loading-2.30.0}/euler_loading/_metadata.py +0 -0
- {euler_loading-2.29.0 → euler_loading-2.30.0}/euler_loading/_resolution.py +0 -0
- {euler_loading-2.29.0 → euler_loading-2.30.0}/euler_loading/_writing.py +0 -0
- {euler_loading-2.29.0 → euler_loading-2.30.0}/euler_loading/cli.py +0 -0
- {euler_loading-2.29.0 → euler_loading-2.30.0}/euler_loading/dataset.py +0 -0
- {euler_loading-2.29.0 → euler_loading-2.30.0}/euler_loading/dry_run.py +0 -0
- {euler_loading-2.29.0 → euler_loading-2.30.0}/euler_loading/geometry.py +0 -0
- {euler_loading-2.29.0 → euler_loading-2.30.0}/euler_loading/indexing.py +0 -0
- {euler_loading-2.29.0 → euler_loading-2.30.0}/euler_loading/loaders/__init__.py +0 -0
- {euler_loading-2.29.0 → euler_loading-2.30.0}/euler_loading/loaders/_annotations.py +0 -0
- {euler_loading-2.29.0 → euler_loading-2.30.0}/euler_loading/loaders/_princeton_dense.py +0 -0
- {euler_loading-2.29.0 → euler_loading-2.30.0}/euler_loading/loaders/_sky.py +0 -0
- {euler_loading-2.29.0 → euler_loading-2.30.0}/euler_loading/loaders/_writer_utils.py +0 -0
- {euler_loading-2.29.0 → euler_loading-2.30.0}/euler_loading/loaders/contracts.py +0 -0
- {euler_loading-2.29.0 → euler_loading-2.30.0}/euler_loading/loaders/cpu/__init__.py +0 -0
- {euler_loading-2.29.0 → euler_loading-2.30.0}/euler_loading/loaders/cpu/generic.py +0 -0
- {euler_loading-2.29.0 → euler_loading-2.30.0}/euler_loading/loaders/cpu/muses.py +0 -0
- {euler_loading-2.29.0 → euler_loading-2.30.0}/euler_loading/loaders/cpu/princeton_dense.py +0 -0
- {euler_loading-2.29.0 → euler_loading-2.30.0}/euler_loading/loaders/cpu/real_drive_sim.py +0 -0
- {euler_loading-2.29.0 → euler_loading-2.30.0}/euler_loading/loaders/cpu/synscapes.py +0 -0
- {euler_loading-2.29.0 → euler_loading-2.30.0}/euler_loading/loaders/generate/__init__.py +0 -0
- {euler_loading-2.29.0 → euler_loading-2.30.0}/euler_loading/loaders/generate/__main__.py +0 -0
- {euler_loading-2.29.0 → euler_loading-2.30.0}/euler_loading/loaders/generate/loaders.json +0 -0
- {euler_loading-2.29.0 → euler_loading-2.30.0}/euler_loading/loaders/generic.py +0 -0
- {euler_loading-2.29.0 → euler_loading-2.30.0}/euler_loading/loaders/gpu/__init__.py +0 -0
- {euler_loading-2.29.0 → euler_loading-2.30.0}/euler_loading/loaders/gpu/generic.py +0 -0
- {euler_loading-2.29.0 → euler_loading-2.30.0}/euler_loading/loaders/gpu/muses.py +0 -0
- {euler_loading-2.29.0 → euler_loading-2.30.0}/euler_loading/loaders/gpu/princeton_dense.py +0 -0
- {euler_loading-2.29.0 → euler_loading-2.30.0}/euler_loading/loaders/gpu/real_drive_sim.py +0 -0
- {euler_loading-2.29.0 → euler_loading-2.30.0}/euler_loading/loaders/gpu/synscapes.py +0 -0
- {euler_loading-2.29.0 → euler_loading-2.30.0}/euler_loading/loaders/materialized.py +0 -0
- {euler_loading-2.29.0 → euler_loading-2.30.0}/euler_loading/loaders/muses.py +0 -0
- {euler_loading-2.29.0 → euler_loading-2.30.0}/euler_loading/loaders/princeton_dense.py +0 -0
- {euler_loading-2.29.0 → euler_loading-2.30.0}/euler_loading/loaders/real_drive_sim.py +0 -0
- {euler_loading-2.29.0 → euler_loading-2.30.0}/euler_loading/loaders/synscapes.py +0 -0
- {euler_loading-2.29.0 → euler_loading-2.30.0}/euler_loading/loaders/vkitti2.py +0 -0
- {euler_loading-2.29.0 → euler_loading-2.30.0}/euler_loading/materialization.py +0 -0
- {euler_loading-2.29.0 → euler_loading-2.30.0}/euler_loading/output_encoding.py +0 -0
- {euler_loading-2.29.0 → euler_loading-2.30.0}/euler_loading/preprocessing.py +0 -0
- {euler_loading-2.29.0 → euler_loading-2.30.0}/euler_loading/receipts.py +0 -0
- {euler_loading-2.29.0 → euler_loading-2.30.0}/euler_loading/transform_descriptors.py +0 -0
- {euler_loading-2.29.0 → euler_loading-2.30.0}/examples/README.md +0 -0
- {euler_loading-2.29.0 → euler_loading-2.30.0}/examples/real_drive_sim_preview.py +0 -0
- {euler_loading-2.29.0 → euler_loading-2.30.0}/examples/vkitti2_sample.py +0 -0
- {euler_loading-2.29.0 → euler_loading-2.30.0}/tests/__init__.py +0 -0
- {euler_loading-2.29.0 → euler_loading-2.30.0}/tests/conftest.py +0 -0
- {euler_loading-2.29.0 → euler_loading-2.30.0}/tests/example_rds_calib.json +0 -0
- {euler_loading-2.29.0 → euler_loading-2.30.0}/tests/test_dataset.py +0 -0
- {euler_loading-2.29.0 → euler_loading-2.30.0}/tests/test_dry_run.py +0 -0
- {euler_loading-2.29.0 → euler_loading-2.30.0}/tests/test_id_schema.py +0 -0
- {euler_loading-2.29.0 → euler_loading-2.30.0}/tests/test_indexing.py +0 -0
- {euler_loading-2.29.0 → euler_loading-2.30.0}/tests/test_materialization.py +0 -0
- {euler_loading-2.29.0 → euler_loading-2.30.0}/tests/test_preprocessing.py +0 -0
- {euler_loading-2.29.0 → euler_loading-2.30.0}/tests/test_python_compat.py +0 -0
- {euler_loading-2.29.0 → euler_loading-2.30.0}/tests/test_real_dataset.py +0 -0
- {euler_loading-2.29.0 → euler_loading-2.30.0}/tests/test_sky_class.py +0 -0
- {euler_loading-2.29.0 → euler_loading-2.30.0}/tests/test_synscapes.py +0 -0
- {euler_loading-2.29.0 → euler_loading-2.30.0}/tests/test_transform_descriptors.py +0 -0
- {euler_loading-2.29.0 → euler_loading-2.30.0}/tests/test_writing.py +0 -0
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
- Fix `vkitti2.write_depth` and the 16-bit PNG path of
|
|
6
|
+
`generic_dense_depth.write_depth` on Pillow 13, which rejects
|
|
7
|
+
`Image.fromarray(uint16, mode="I;16")`; a uint16 array becomes an `I;16`
|
|
8
|
+
image without the argument on every supported Pillow.
|
|
5
9
|
- `Modality.function` picks a callable from the loader module the dataset head
|
|
6
10
|
names, instead of its `function`; the writer follows it.
|
|
7
11
|
`Modality(path, function="sky_mask")` reads a `class_segmentation` index as
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: euler-loading
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.30.0
|
|
4
4
|
Summary: Multi-modal PyTorch dataloader using ds-crawler indices
|
|
5
5
|
Project-URL: Homepage, https://github.com/d-rothen/euler-loading
|
|
6
6
|
Project-URL: Repository, https://github.com/d-rothen/euler-loading
|
{euler_loading-2.29.0 → euler_loading-2.30.0}/euler_loading/loaders/cpu/generic_dense_depth.py
RENAMED
|
@@ -240,7 +240,8 @@ def write_depth(path: Union[str, BinaryIO], value: Any, meta: dict[str, Any] | N
|
|
|
240
240
|
save_image(path, Image.fromarray(depth_f32.astype(np.uint8), mode="L"))
|
|
241
241
|
return
|
|
242
242
|
depth_u16 = np.clip(np.rint(depth_f32), 0, 65535).astype(np.uint16)
|
|
243
|
-
|
|
243
|
+
# uint16 becomes an I;16 image; Pillow 13 rejects an explicit mode="I;16".
|
|
244
|
+
save_image(path, Image.fromarray(depth_u16), format="PNG")
|
|
244
245
|
return
|
|
245
246
|
|
|
246
247
|
depth_f32 = depth.astype(np.float32)
|
|
@@ -227,7 +227,8 @@ def write_depth(path: Union[str, BinaryIO], value: Any, meta: dict[str, Any] | N
|
|
|
227
227
|
ensure_parent(path)
|
|
228
228
|
depth_m = to_hw(value, name="depth").astype(np.float32)
|
|
229
229
|
depth_cm = np.clip(np.rint(depth_m * 100.0), 0, 65535).astype(np.uint16)
|
|
230
|
-
|
|
230
|
+
# uint16 becomes an I;16 image; Pillow 13 rejects an explicit mode="I;16".
|
|
231
|
+
save_image(path, Image.fromarray(depth_cm), format="PNG")
|
|
231
232
|
|
|
232
233
|
|
|
233
234
|
@mark_stream_supported
|
{euler_loading-2.29.0 → euler_loading-2.30.0}/euler_loading/loaders/gpu/generic_dense_depth.py
RENAMED
|
@@ -225,7 +225,8 @@ def write_depth(path: Union[str, BinaryIO], value: Any, meta: dict[str, Any] | N
|
|
|
225
225
|
save_image(path, Image.fromarray(depth_f32.astype(np.uint8), mode="L"))
|
|
226
226
|
return
|
|
227
227
|
depth_u16 = np.clip(np.rint(depth_f32), 0, 65535).astype(np.uint16)
|
|
228
|
-
|
|
228
|
+
# uint16 becomes an I;16 image; Pillow 13 rejects an explicit mode="I;16".
|
|
229
|
+
save_image(path, Image.fromarray(depth_u16), format="PNG")
|
|
229
230
|
return
|
|
230
231
|
|
|
231
232
|
depth_f32 = depth.astype(np.float32)
|
|
@@ -214,7 +214,8 @@ def write_depth(path: Union[str, BinaryIO], value: Any, meta: dict[str, Any] | N
|
|
|
214
214
|
ensure_parent(path)
|
|
215
215
|
depth_m = to_hw(value, name="depth").astype(np.float32)
|
|
216
216
|
depth_cm = np.clip(np.rint(depth_m * 100.0), 0, 65535).astype(np.uint16)
|
|
217
|
-
|
|
217
|
+
# uint16 becomes an I;16 image; Pillow 13 rejects an explicit mode="I;16".
|
|
218
|
+
save_image(path, Image.fromarray(depth_cm), format="PNG")
|
|
218
219
|
|
|
219
220
|
|
|
220
221
|
@mark_stream_supported
|
|
@@ -72,7 +72,7 @@ def depth_path(tmp_path):
|
|
|
72
72
|
from PIL import Image
|
|
73
73
|
|
|
74
74
|
arr = np.array([[100, 200], [300, 400]], dtype=np.uint16)
|
|
75
|
-
img = Image.fromarray(arr
|
|
75
|
+
img = Image.fromarray(arr) # uint16 -> I;16
|
|
76
76
|
p = tmp_path / "depth.png"
|
|
77
77
|
img.save(p)
|
|
78
78
|
return str(p)
|
|
@@ -1406,6 +1406,24 @@ class TestCPUGenericLoaders:
|
|
|
1406
1406
|
assert result.shape == (4, 5, 3)
|
|
1407
1407
|
|
|
1408
1408
|
|
|
1409
|
+
class TestGenericDenseDepthWriters:
|
|
1410
|
+
# Values above 255 take the 16-bit PNG path rather than the 8-bit one.
|
|
1411
|
+
DEPTH = np.array([[0, 300], [1000, 65535]], dtype=np.uint16)
|
|
1412
|
+
|
|
1413
|
+
def test_cpu_write_depth_16bit_png_roundtrip(self, tmp_path):
|
|
1414
|
+
path = tmp_path / "depth.png"
|
|
1415
|
+
cpu_generic_dense_depth.write_depth(str(path), self.DEPTH)
|
|
1416
|
+
with Image.open(path) as image:
|
|
1417
|
+
assert image.mode == "I;16"
|
|
1418
|
+
np.testing.assert_array_equal(cpu_generic_dense_depth.depth(str(path)), self.DEPTH)
|
|
1419
|
+
|
|
1420
|
+
def test_gpu_write_depth_16bit_png_roundtrip(self, tmp_path):
|
|
1421
|
+
path = tmp_path / "depth.png"
|
|
1422
|
+
gpu_generic_dense_depth.write_depth(str(path), torch.from_numpy(self.DEPTH.astype(np.int32)))
|
|
1423
|
+
loaded = gpu_generic_dense_depth.depth(str(path))
|
|
1424
|
+
np.testing.assert_array_equal(loaded[0].numpy(), self.DEPTH)
|
|
1425
|
+
|
|
1426
|
+
|
|
1409
1427
|
class TestGenericWriters:
|
|
1410
1428
|
"""Writer round-trip tests for generic loaders."""
|
|
1411
1429
|
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|