MCPcopy
hub / github.com/datalab-to/surya / processor

Method processor

surya/detection/loader.py:48–53  ·  view source on GitHub ↗
(
        self,
        device: Optional[torch.device | str] = None,
        dtype: Optional[torch.dtype | str] = None,
    )

Source from the content-addressed store, hash-verified

46 return model
47
48 def processor(
49 self,
50 device: Optional[torch.device | str] = None,
51 dtype: Optional[torch.dtype | str] = None,
52 ) -> SegformerImageProcessor:
53 return SegformerImageProcessor.from_pretrained(self.checkpoint)

Callers 1

prepare_imageMethod · 0.45

Calls 1

from_pretrainedMethod · 0.80

Tested by

no test coverage detected