Neural-Point-Cloud-Rendering-via-Multi-Plane-Projection icon indicating copy to clipboard operation
Neural-Point-Cloud-Rendering-via-Multi-Plane-Projection copied to clipboard

Error while voxelizing Matterport scene 1pXnuDYAj8r

Open eliasnd opened this issue 3 years ago • 3 comments

I've run into an issue while running voxelization_aggregation_Matterport.py -- point cloud generation and simplification finish without any issue, but then I get a numpy error. The output is:

load ply time: 288.33994913101196 reproject_time: 1.1659584045410156 calculate_distance: 0.06809496879577637 split_time: 1.872243881225586 group_time: 5.481501817703247 16.21328639984131 Voxelization_time: 19.274898290634155s reproject_time: 1.2333552837371826 calculate_distance: 0.03957533836364746 split_time: 1.1322336196899414 group_time: 3.3575806617736816 9.221171855926514 Voxelization_time: 11.327202558517456s reproject_time: 1.1684355735778809 calculate_distance: 0.0046308040618896484 split_time: 0.19063854217529297 group_time: 0.7786960601806641 4.613387107849121 Voxelization_time: 5.040992259979248s reproject_time: 1.1694424152374268 calculate_distance: 0.014956235885620117 split_time: 0.518805980682373 Traceback (most recent call last): File "voxelization_aggregation_Matterport.py", line 334, in distance = Voxelization(target_w, target_h, intrinsic_matrix, extrinsic_matrix, point_clouds, near, far, num) File "voxelization_aggregation_Matterport.py", line 179, in Voxelization groups_each_index[group_begin:(ii+1)] = array[0:(ii+1 - group_begin)] ValueError: could not broadcast input array from shape (1000) into shape (1031)

eliasnd avatar May 27 '21 19:05 eliasnd

You can try to modify line 165 in "voxelization_aggregation_Matterport.py", I pre-define the number of points less than 1000, you can enlarge this value.

daipengwa avatar May 28 '21 01:05 daipengwa

That fixed it! Unfortunately, I'm now running into another issue with the same file -- after completing 658 voxelization iterations, I get:

Traceback (most recent call last): File "voxelization_aggregation_Matterport.py", line 335, in distance = Voxelization(target_w, target_h, intrinsic_matrix, extrinsic_matrix, point_clouds, near, far, num) File "voxelization_aggregation_Matterport.py", line 134, in Voxelization valid_d_min = valid_d_sorted[num_valids - 1] # near depth plane IndexError: index -1 is out of bounds for axis 0 with size 0

eliasnd avatar May 31 '21 19:05 eliasnd

It seems that there is no point under this camera view. You can check how many points are projected to this camera view.

daipengwa avatar Jun 01 '21 04:06 daipengwa