princeton-vl/SimpleView

Visualizing SimpleView

Closed this issue · 1 comments

Saved the input point cloud (into .npz files) and the 6 views using the below code in the mv.py file.

    pc = pc.cuda()
    # Save input point cloud
    input_pc = pc.detach().cpu().numpy()
    np.savez('input_pc', tensorname=input_pc)

    img = self.get_img(pc)
    # save views
    proj = img.view((pc.shape[0],-1, 128, 128)).detach().cpu().numpy()
    np.savez('proj', tensorname=proj)

From the input_pc.npz file I have confirmed object 3 is a chair (visualized below).
image

Then used a simple below code to visualize.

from PIL import Image
import numpy as np
data = np.load('proj.npz')['tensorname']

img = Image.fromarray(data[3][1], 'RGB') # here 3 is an object (chair) and 1 one of the 6 views
img.show()

And found the below view.
image

It looks like the side view of a chair. However, the chair is repeated.
Can you please help me understand why the chair is repeated?

Thanks in Advance.

My apologies for creating this issue.
I used matplotlib for visualization and it shows the view correctly.