Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: support edge case where src LAZ has no valid patch #86

Merged
merged 4 commits into from
Sep 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading