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

why normalize_3d_coordiante is needed? #34

Closed
qiminchen opened this issue Sep 5, 2021 · 4 comments
Closed

why normalize_3d_coordiante is needed? #34

qiminchen opened this issue Sep 5, 2021 · 4 comments

Comments

@qiminchen
Copy link

Hi, I'm wondering why normalize_3d_coordiante is needed if the point coordinate is in range of [-0.5, 0.5]?

p_nor = normalize_3d_coordinate(p.clone(), padding=self.padding)

@pengsongyou
Copy link
Member

Hi @qiminchen,

If you check

def normalize_3d_coordinate(p, padding=0.1):

you can notice that we normalize the coordinates to the range of [0, 1] with the padding as well (since we define the entire 3D space in the range of [-0.55, 0.55]). With the normalized coordintes, we can easily calculate the indices, which is later used for scatter_mean operation.

Hope it answers your questions.

@qiminchen
Copy link
Author

qiminchen commented Sep 6, 2021

thanks, that makes sense, is there any specific reason you define the 3d space in the range of [-0.55, 0.55]? If the 3d space is in the range of [-0.5, 0.5] (which I guess it's more common?), padding should be set to 0, right?

@pengsongyou
Copy link
Member

thanks, that makes sense, is there any specific reason you define the 3d space in the range of [-0.55, 0.55]? If the 3d space is in the range of [-0.5, 0.5] (which I guess it's more common?), padding should be set to 0, right?

We were using the ShapeNet data processed and provided by Occupancy Networks, where they define the 3D space in the range of [-0.55, 0.55], so we simply followed it. You are right, if your space is in the range of [-0.5, 0.5], then you can set padding to 0.

@qiminchen
Copy link
Author

great, thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants