SooLab / Part2Object

[ECCV 2024] The official PyTorch implementation of the "Part2Object: Hierarchical Unsupervised 3D Instance Segmentation".
MIT License
16 stars 1 forks source link

Issue about using dinov2 when generating 2d embedding #7

Open LydJason opened 2 weeks ago

LydJason commented 2 weeks ago

When I tried to run project_feature.py, I encountered problem at :

https://github.com/SooLab/Part2Object/blob/65d728edecdb461bf6fd88c173996874ae862c45/pseudo_mask_gen/project_feature.py#L183

I print the shape of dinov2_vitb14(color), it seem to be [1, 768], which can't be reshape to [68, 91, 768]:

$ python pseudo_mask_gen/project_feature.py
projecting multiview features to point cloud...
processing scene0000_00...
torch.Size([1, 768])
Traceback (most recent call last):
  File "/home/lyd/Part2Object/pseudo_mask_gen/project_feature.py", line 185, in <module>
    image_embedding = image_embedding.reshape((68, 91, 768)).permute(2, 0, 1).unsqueeze(0)
RuntimeError: shape '[68, 91, 768]' is invalid for input of size 768

Here, I use the full version of scannet, for each color image come with 1296*968 pixels, the dino model I use is dinov2_vitb14_pretrain.pth according to the original code. Am I using the wrong input? Please let me know, thank you.

zhangyl4 commented 6 days ago

This error is strange and we can't seem to reproduce your problem. Can you get features for any selected test image? Or provide more detailed information about how the program runs?