MCPcopy Index your code
hub / github.com/modelscope/modelscope / load_image

Function load_image

modelscope/preprocessors/image.py:126–133  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

124
125
126def 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(

Callers 15

created_boxed_imageFunction · 0.90
preprocessMethod · 0.90
forwardMethod · 0.90
preprocessMethod · 0.90
preprocessMethod · 0.90
preprocessMethod · 0.90
forwardMethod · 0.90
preprocessMethod · 0.90
preprocessMethod · 0.90
preprocessMethod · 0.90
post_processFunction · 0.90
preprocessMethod · 0.90

Calls 1

LoadImageClass · 0.85

Tested by 3

preprocessMethod · 0.72
preprocessMethod · 0.72
test_loadMethod · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…