MCPcopy Create free account
hub / github.com/CompVis/zigma / setup

Method setup

utils/torchmetric_fdd.py:83–91  ·  view source on GitHub ↗
(self, arch=None, clean_resize: bool = False)

Source from the content-addressed store, hash-verified

81
82class DINOv2Encoder(Encoder):
83 def setup(self, arch=None, clean_resize: bool = False):
84 if arch is None:
85 arch = "vitl14"
86
87 self.arch = arch
88
89 arch_str = f"dinov2_{self.arch}"
90
91 self.model = torch.hub.load("facebookresearch/dinov2", arch_str)
92
93 def transform(self, image):
94

Callers

nothing calls this directly

Calls 1

loadMethod · 0.80

Tested by

no test coverage detected