buildingnet / buildingnet_dataset

https://buildingnet.org/
56 stars 17 forks source link

Missing alpha values for points in point cloud data #12

Closed JiachengDeng closed 1 year ago

JiachengDeng commented 1 year ago

When I follow the steps given by the author to pre-process the data, python -m lib.datasets.preprocessing.buildingnet the following error occurs:

File "/ssd/djc/Challenge/buildingnet_dataset/MinkowskiNet/lib/datasets/preprocessing/buildingnet.py", line 50, in <module>
    save_point_cloud_with_normals(processed, out_filepath, with_label=True, verbose=False)
  File "/ssd/djc/Challenge/buildingnet_dataset/MinkowskiNet/lib/pc_utils.py", line 79, in save_point_cloud_with_normals
    assert points_3d.shape[1] == 11
AssertionError

I checked through debug mode and found that the BuildingNetV1 dataset seems to be missing alpha values, resulting in only 10 rather than 11 dimensions of Coordinates(3)/Normals(3)/RGB(3)/Label(1) information for each point. Looking forward to the author's reply!

buildingnet commented 1 year ago

The alpha values were removed from the BuildingNet v1 dataset, since in most cases points had the same value (alpha=1.0). The current MinkowskiNet implementation was build based on the v0 dataset. You will need to make some changes to be able to train the network using the current code e.g. change lines 78-82 in the MinkowskiNet/lib/pc_utils.py to this:

assert points_3d.shape[1] == 10
python_types = (float, float, float, float, float, float, float, float, float, int)
npy_types = [('x', 'f4'), ('y', 'f4'), ('z', 'f4'), ('nx', 'f4'), ('ny', 'f4'), ('nz', 'f4'), ('red', 'f4'),
             ('green', 'f4'), ('blue', 'f4'), ('label', 'u1')]

We are currently working on releasing the MinkNet implementation for the v1 dataset, were we also upgraded the Minkowski Engine to the latest version (v0.5.4).

JiachengDeng commented 1 year ago

Thank you for such a quick reply which settled my query very well!Also, I‘m looking forward to your release of the BuildingNetV1 related networks soon.