simple interface to load an image from file or url Args: image_path_or_url (str): image file path or http url
(image_path_or_url: str)
| 124 | |
| 125 | |
| 126 | def load_image(image_path_or_url: str) -> Image.Image: |
| 127 | """ simple interface to load an image from file or url |
| 128 | |
| 129 | Args: |
| 130 | image_path_or_url (str): image file path or http url |
| 131 | """ |
| 132 | loader = LoadImage() |
| 133 | return loader(image_path_or_url)['img'] |
| 134 | |
| 135 | |
| 136 | @PREPROCESSORS.register_module( |
searching dependent graphs…