zou-longkun / GAST

24 stars 5 forks source link

shapeNet data array reshape fialed #7

Open mengyays opened 2 years ago

mengyays commented 2 years ago

error follow: GAST/data/dataloader_Norm.py : cannot reshape array of size 5 into shape (1,4,1) , I think the code split one term of data [:3] and [3: ] by index pointcloud = np.load(self.pc_list[item])[:, :3].astype(np.float32) norm_curv = np.load(self.pc_list[item])[:, 3:].astype(np.float32) bu when reshape a array norm_curv[5] to norm_curv[1][4][1],centroid_norm_curv = norm_curv[batch_indices, :, farthest].reshape(B, 4, 1), meanwhile the dimension of shapeNet dataset is (6110, 2048, 8), the last demension is 8 ,after spliting, two parts of data devided ,is [0,1,2] and [3,4,5,6,7], is the data load failed? other aspect, bu running compute_norm_curv*.py,cannot got compute_norm_curv , but compute_norm_curv_angl, is right?

XLechter commented 2 years ago

Hi, @mengyays, I meet the same problem. I sovle this by changing the second part to [3,4,5,6] as the current vervsion compute_norm_curv_angl seems to include an angle information, meaning that norm+curv+angle occupies 5 channels but norm+curv occupies 4 channels.

Starak-x commented 1 year ago

I meet the same problem. Did you solve this problem? 2023-04-28 09-20-35 的屏幕截图 This is the code that reported the error in pc_utils_Norm.py. I print the norm_curv.shape, and the output is (1,5,2048)

2023-04-28 09-22-38 的屏幕截图

Starak-x commented 1 year ago

In compute_norm_curv.py and compute_norm_curv_scannet.py, the code compute angle and append angle to the prepared data. I think comment out the code that calculates angle or don't load the last element of 'norm_curv' can solve this problem

2023-04-28 10-04-03 的屏幕截图