(self, image, mask=None)
| 45 | self.processor.model.to(device) |
| 46 | |
| 47 | def __call__(self, image, mask=None): |
| 48 | width, height = image.size |
| 49 | if self.processor_id == "openpose": |
| 50 | kwargs = { |
| 51 | "include_body": True, |
| 52 | "include_hand": True, |
| 53 | "include_face": True |
| 54 | } |
| 55 | else: |
| 56 | kwargs = {} |
| 57 | if self.processor is not None: |
| 58 | detect_resolution = self.detect_resolution if self.detect_resolution is not None else min(width, height) |
| 59 | image = self.processor(image, detect_resolution=detect_resolution, image_resolution=min(width, height), **kwargs) |
| 60 | image = image.resize((width, height)) |
| 61 | return image |
| 62 |
nothing calls this directly
no outgoing calls
no test coverage detected