Skip to content

Issue about using dinov2 when generating 2d embedding #7

Description

@LydJason

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

image_embedding = dinov2_vitb14(color).reshape((68, 91, 768)).permute(2, 0, 1).unsqueeze(0)

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions