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

DINOv2 - Segmentation #393

Open
VINIT777 opened this issue Mar 1, 2024 · 1 comment
Open

DINOv2 - Segmentation #393

VINIT777 opened this issue Mar 1, 2024 · 1 comment

Comments

@VINIT777
Copy link

VINIT777 commented Mar 1, 2024

If i have image embeddings extracted using dinov2 base - then how can use them for image segmentation.

I refered to your dinov2 notebooks - but it was more about finetuning linear head for segmentation.

How to use dinov2 out of the box for segmentation like we use SAM?

@NielsRogge
Copy link
Owner

Hi,

You cannot use DINOv2 out-of-the-box for segmentation as in SAM. You need to explicitly train DINOv2 + some segmentation head (like a linear layer, or a more complex one like a Mask2Former decoder) to predict a segmentation map.

The authors did release some DINOv2 + linear layer and DINOv2 + Mask2Former decoder checkpoints as shown here: https://github.com/facebookresearch/dinov2/blob/main/notebooks/semantic_segmentation.ipynb.

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