Welcome to ShapeNet Q&A, where you can ask questions and receive answers from other members of the community.

How are the samples of ShapeNetCore v2 transformed w.r.t. the ones of v1?

+3 votes

I would like to ask what are the transformation used to align the data samples coming from v1 and v2? As explained in the README, the v2 samples are rotated by 90 degrees around y-axis, but visualization of the corresponding samples from v1 and v2 reveals that there is also a translation and scale applied to some of the samples. Even though each sample from v2 comes with a model_normalized.json file, it is not clear how to interpret the values stored in these files, since all the "min", "max" and "centroid" values are too huge and represent 3D points lying way out of the 3D models of either v1 or v2. Could you please point me to where I can find the transformations applied to the samples from v2 so that it would be possible to align them with v1?

Thank you

asked Oct 20, 2020 by janbednarik (150 points)

1 Answer

0 votes

I've done some extensive research and finally find the answer:

  • For shapenet v1, v1_norm = (v-center) / norm(diag)
  • For shapenet v2, v2_norm = (v-centroid) / norm(diag)


  •  'diag' stands for the bounding box diagonal vector, calculated by 'max' - 'min' from the json.
  • 'center' stands for the bounding box center, calculated by ('max'+'min')/2. from the json.
  • and the 'centroid' stands for the mean point of all mesh's vertices, from the 'centroid' in the json.

so, v1_norm = v2_norm + (centroid - center) / norm(diag)

and v2_norm = v1_norm + (center - centroid) / norm(diag)

After re-scale, the rotation matrix (left-multiply):

from v2 to v1: np.array([[0, 0, 1], [0, 1, 0], [-1, 0, 0]])

from v1 to v2: np.array([[0, 0, -1], [0, 1, 0], [1, 0, 0]])

answered Apr 16, 2021 by jianfeiguo (210 points)
edited Apr 26, 2021 by jianfeiguo