[to #42322933]fix image_open func, support url

Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/10548014

    * fix image_open func
This commit is contained in:
yichang.zyc
2022-10-27 16:02:44 +08:00
committed by yingda.chen
parent 8886c3c1ae
commit bdadea9791

View File

@@ -157,7 +157,7 @@ class MPlugPreprocessor(Preprocessor):
def image_open(self, path: str) -> Tuple[Image.Image, int]:
if path not in self._image_map:
index = len(self._image_map)
self._image_map[path] = (Image.open(path), index)
self._image_map[path] = (load_image(path), index)
return self._image_map[path]
def __call__(