MCPcopy Create free account
hub / github.com/ml-explore/mlx-examples / __init__

Method __init__

clip/image_processor.py:18–35  ·  view source on GitHub ↗
(
        self,
        crop_size: int = 224,
        do_center_crop: bool = True,
        do_normalize: bool = True,
        do_resize: bool = True,
        image_mean: List[float] = [0.48145466, 0.4578275, 0.40821073],
        image_std: List[float] = [0.26862954, 0.26130258, 0.27577711],
        size: int = 224,
        **kwargs
    )

Source from the content-addressed store, hash-verified

16 """
17
18 def __init__(
19 self,
20 crop_size: int = 224,
21 do_center_crop: bool = True,
22 do_normalize: bool = True,
23 do_resize: bool = True,
24 image_mean: List[float] = [0.48145466, 0.4578275, 0.40821073],
25 image_std: List[float] = [0.26862954, 0.26130258, 0.27577711],
26 size: int = 224,
27 **kwargs
28 ) -> None:
29 self.crop_size = crop_size
30 self.do_center_crop = do_center_crop
31 self.do_normalize = do_normalize
32 self.do_resize = do_resize
33 self.image_mean = mx.array(image_mean)
34 self.image_std = mx.array(image_std)
35 self.size = size
36
37 def __call__(self, images: List[Image]) -> mx.array:
38 return mx.concatenate(

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected