def from_zip(zip_src: Union[str, Path], pattern: str = '*.JPEG') -> Image:
    """
    Load the image.zip from url/path as towhee's Image object.

    Args:
        zip_src (`Union[str, path]`):
            The path leads to the image.
        pattern (`str`):
            The image pattern to extract.

    Returns:
        (`towhee.types.Image`)
            The image wrapepd as towhee's Image.
    """
    if RepoNormalize(str(zip_src)).url_valid():
        with urlopen(zip_src) as zip_file:
            zip_path = BytesIO(zip_file.read())
    else:
        zip_path = str(Path(zip_src).resolve())
    with ZipFile(zip_path, 'r') as zfile:
        file_list = zfile.namelist()
        path_list = glob.fnmatch.filter(file_list, pattern)
        img_list = []
        for path in path_list:
            data = zfile.read(path)
            ndarray_img = cv2.imdecode(np.frombuffer(data, np.uint8), 1)
            rgb_img = cv2.cvtColor(ndarray_img, cv2.COLOR_BGR2RGB)
            img = from_ndarray(rgb_img, 'RGB')
            img_list.append(img)

    return img_list
Load the image.zip from url/path as towhee's Image object.

Args:
zip_src (`Union[str, path]`):
The path leads to the image.
pattern (`str`):
The image pattern to extract.

Returns:
(`towhee.types.Image`)
The image wrapepd as towhee's Image.
towhee/utils/ndarray_utils.py