diff --git a/CHANGELOG.md b/CHANGELOG.md index be024510..189e2d73 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # main +### 3.4.9 +- Support edge-case where source LAZ has no valid subtile (i.e. pre_filter=False for all candidate subtiles) during hdf5 creation + ### 3.4.8 - Raise an informative error in case of unexpected task_name diff --git a/myria3d/pctl/dataset/hdf5.py b/myria3d/pctl/dataset/hdf5.py index 498c2f1b..f9b1dbc6 100644 --- a/myria3d/pctl/dataset/hdf5.py +++ b/myria3d/pctl/dataset/hdf5.py @@ -234,7 +234,7 @@ def create_hdf5( # Useful in case data preparation was interrupted. with h5py.File(hdf5_file_path, "a") as hdf5_file: if basename in hdf5_file[split] and "is_complete" not in hdf5_file[split][basename].attrs: - del hdf5_file[basename] + del hdf5_file[split][basename] # Parse and add subtiles to split group. with h5py.File(hdf5_file_path, "a") as hdf5_file: if basename in hdf5_file[split]: @@ -285,4 +285,6 @@ def create_hdf5( ) # A termination flag to report that all samples for this point cloud were included in the df5 file. - hdf5_file[split][basename].attrs["is_complete"] = True + # Group may not have been created if source cloud had no patch passing the pre_filter step, hence the "if" here. + if basename in hdf5_file[split]: + hdf5_file[split][basename].attrs["is_complete"] = True diff --git a/package_metadata.yaml b/package_metadata.yaml index 72a706c6..4898c136 100644 --- a/package_metadata.yaml +++ b/package_metadata.yaml @@ -1,4 +1,4 @@ -__version__: "3.4.8" +__version__: "3.4.9" __name__: "myria3d" __url__: "https://github.com/IGNF/myria3d" __description__: "Deep Learning for the Semantic Segmentation of Aerial Lidar Point Clouds"