(self)
| 9 | |
| 10 | class ContentDetector: |
| 11 | def __init__(self): |
| 12 | |
| 13 | model_name = "openai/clip-vit-large-patch14" |
| 14 | |
| 15 | self.model = CLIPModel.from_pretrained(model_name, cache_dir=annotator_ckpts_path).cuda().eval() |
| 16 | self.processor = AutoProcessor.from_pretrained(model_name, cache_dir=annotator_ckpts_path) |
| 17 | |
| 18 | def __call__(self, img): |
| 19 | assert img.ndim == 3 |
nothing calls this directly
no outgoing calls
no test coverage detected