NielsRogge / Transformers-Tutorials

This repository contains demos I made with the Transformers library by HuggingFace.
MIT License
9.16k stars 1.42k forks source link

Integrating DINOv2 Backbone into Mask2Former for Semantic Segmentation #343

Open hrishikeshps94 opened 1 year ago

hrishikeshps94 commented 1 year ago

@NielsRogge

Has anyone come across notebooks that can assist in integrating DINOv2 as the backbone for Mask2Former for semantic segmentation? I attempted this integration, but when configuring Mask2Former with the DINOv2 backbone, I encountered the following error:

ValueError: Unrecognized configuration class <class 'transformers.models.dinov2.configuration_dinov2.Dinov2Config'> for this kind of AutoModel: AutoBackbone. Model type should be one of BitConfig, ConvNextConfig, ConvNextV2Config, DinatConfig, FocalNetConfig, MaskFormerSwinConfig, NatConfig, ResNetConfig, SwinConfig, TimmBackboneConfig.

hrishikeshps94 commented 1 year ago

@NielsRogge Should I wait till the PR get merged

NielsRogge commented 1 year ago

Yes :)

hrishikeshps94 commented 1 year ago

Ok, Thank you for the prompt reply and confirmation.