Skip to content

No way to pass pretrained=False to DINOv2Encoder #17

@barwojcik

Description

@barwojcik

Issue

There is no way to initialize the DINOv2Encoder with random weights. It's problematic because it forces the download even if weights are later loaded. I raised this issue in map anything repo: facebookresearch/map-anything#149

Proposed solution

Pass pretrained parameter here: https://github.com/castacks/UniCeption/blob/main/uniception/models/encoders/dinov2.py#L89
It seems straightforward, check if pretrained is in the kwargs and "pop" them before they are passed to base class. I can submit PR in a spare time if this propositions sounds ok for you.

Metadata

Metadata

Assignees

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