Skip to content

Commit

Permalink
Merge pull request #86 from IGNF/patch-support-empty-tiles-in-hdf5-cr…
Browse files Browse the repository at this point in the history
…eation

fix: support edge case where src LAZ has no valid patch
  • Loading branch information
CharlesGaydon authored Sep 14, 2023
2 parents 53ee7a9 + 8590b97 commit 8103d80
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down
6 changes: 4 additions & 2 deletions myria3d/pctl/dataset/hdf5.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]:
Expand Down Expand Up @@ -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
2 changes: 1 addition & 1 deletion package_metadata.yaml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down

0 comments on commit 8103d80

Please sign in to comment.