pointnet icon indicating copy to clipboard operation
pointnet copied to clipboard

Each cloud is zero-mean and normalized into an unit sphere.How is this achieved?

Open christinezuzart opened this issue 4 years ago • 2 comments

Hello ,

Any help on how to achieve zero-mean and normalization on a custom data-set is appreciated.

Thanks, Christine

christinezuzart avatar Mar 04 '20 10:03 christinezuzart

I found this code in pointnet/utils/pc_util.py. Maybe it can help you.

centroid = np.mean(points, axis=0)
points -= centroid
furthest_distance = np.max(np.sqrt(np.sum(abs(points)**2,axis=-1)))
points /= furthest_distance

But I got confused about the normalize algorithm. Was the method that author used be the Z-Score Normalization? There is a little difference between Z-score and author's code.

According to the Standard Deviation formula: image And the Z-Score formula: image

I think this step np.sqrt(np.sum(abs(points)**2,axis=-1)) is calculating the standard deviation of x, y, z direction respectively. And this step points /= furthest_distance is calculating the Z-score.

The above is just my thought. But I am wondering: 1. Why there's no 1/N before doing square root in the code? 2. Why it just need to use the maximum value of SD to do

Maybe you guys can also help me about my question.

Hero7749 avatar Apr 07 '20 11:04 Hero7749

@Hero7749 What if the size of the point cloud matters for the task at hand? Should normalization be applied in this case?

adosar avatar Apr 09 '24 21:04 adosar