import{S as zn,i as Dn,s as Cn,e as o,k as m,w as _,t as s,M as Nn,c as a,d as t,m as c,a as n,x as b,h as i,b as p,G as e,g,y,q as v,o as $,B as w,v as Jn,L as Un}from"../../chunks/vendor-hf-doc-builder.js";import{T as kn}from"../../chunks/Tip-hf-doc-builder.js";import{D as M}from"../../chunks/Docstring-hf-doc-builder.js";import{C as jn}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as Ja}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as En}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function Zn(H){let f,P,I,h,E;return h=new jn({props:{code:"JTIzJTIwV2UlMjBjYW4ndCUyMGluc3RhbnRpYXRlJTIwZGlyZWN0bHklMjB0aGUlMjBiYXNlJTIwY2xhc3MlMjAqSW1hZ2VQcm9jZXNzaW5nTWl4aW4qJTIwc28lMjBsZXQncyUyMHNob3clMjB0aGUlMjBleGFtcGxlcyUyMG9uJTIwYSUwQSUyMyUyMGRlcml2ZWQlMjBjbGFzcyUzQSUyMCpDTElQSW1hZ2VQcm9jZXNzb3IqJTBBaW1hZ2VfcHJvY2Vzc29yJTIwJTNEJTIwQ0xJUEltYWdlUHJvY2Vzc29yLmZyb21fcHJldHJhaW5lZCglMEElMjAlMjAlMjAlMjAlMjJvcGVuYWklMkZjbGlwLXZpdC1iYXNlLXBhdGNoMzIlMjIlMEEpJTIwJTIwJTIzJTIwRG93bmxvYWQlMjBpbWFnZV9wcm9jZXNzaW5nX2NvbmZpZyUyMGZyb20lMjBodWdnaW5nZmFjZS5jbyUyMGFuZCUyMGNhY2hlLiUwQWltYWdlX3Byb2Nlc3NvciUyMCUzRCUyMENMSVBJbWFnZVByb2Nlc3Nvci5mcm9tX3ByZXRyYWluZWQoJTBBJTIwJTIwJTIwJTIwJTIyLiUyRnRlc3QlMkZzYXZlZF9tb2RlbCUyRiUyMiUwQSklMjAlMjAlMjMlMjBFLmcuJTIwaW1hZ2UlMjBwcm9jZXNzb3IlMjAob3IlMjBtb2RlbCklMjB3YXMlMjBzYXZlZCUyMHVzaW5nJTIwKnNhdmVfcHJldHJhaW5lZCgnLiUyRnRlc3QlMkZzYXZlZF9tb2RlbCUyRicpKiUwQWltYWdlX3Byb2Nlc3NvciUyMCUzRCUyMENMSVBJbWFnZVByb2Nlc3Nvci5mcm9tX3ByZXRyYWluZWQoJTIyLiUyRnRlc3QlMkZzYXZlZF9tb2RlbCUyRnByZXByb2Nlc3Nvcl9jb25maWcuanNvbiUyMiklMEFpbWFnZV9wcm9jZXNzb3IlMjAlM0QlMjBDTElQSW1hZ2VQcm9jZXNzb3IuZnJvbV9wcmV0cmFpbmVkKCUwQSUyMCUyMCUyMCUyMCUyMm9wZW5haSUyRmNsaXAtdml0LWJhc2UtcGF0Y2gzMiUyMiUyQyUyMGRvX25vcm1hbGl6ZSUzREZhbHNlJTJDJTIwZm9vJTNERmFsc2UlMEEpJTBBYXNzZXJ0JTIwaW1hZ2VfcHJvY2Vzc29yLmRvX25vcm1hbGl6ZSUyMGlzJTIwRmFsc2UlMEFpbWFnZV9wcm9jZXNzb3IlMkMlMjB1bnVzZWRfa3dhcmdzJTIwJTNEJTIwQ0xJUEltYWdlUHJvY2Vzc29yLmZyb21fcHJldHJhaW5lZCglMEElMjAlMjAlMjAlMjAlMjJvcGVuYWklMkZjbGlwLXZpdC1iYXNlLXBhdGNoMzIlMjIlMkMlMjBkb19ub3JtYWxpemUlM0RGYWxzZSUyQyUyMGZvbyUzREZhbHNlJTJDJTIwcmV0dXJuX3VudXNlZF9rd2FyZ3MlM0RUcnVlJTBBKSUwQWFzc2VydCUyMGltYWdlX3Byb2Nlc3Nvci5kb19ub3JtYWxpemUlMjBpcyUyMEZhbHNlJTBBYXNzZXJ0JTIwdW51c2VkX2t3YXJncyUyMCUzRCUzRCUyMCU3QiUyMmZvbyUyMiUzQSUyMEZhbHNlJTdE",highlighted:`<span class="hljs-comment"># We can&#x27;t instantiate directly the base class *ImageProcessingMixin* so let&#x27;s show the examples on a</span>
<span class="hljs-comment"># derived class: *CLIPImageProcessor*</span>
image_processor = CLIPImageProcessor.from_pretrained(
    <span class="hljs-string">&quot;openai/clip-vit-base-patch32&quot;</span>
)  <span class="hljs-comment"># Download image_processing_config from huggingface.co and cache.</span>
image_processor = CLIPImageProcessor.from_pretrained(
    <span class="hljs-string">&quot;./test/saved_model/&quot;</span>
)  <span class="hljs-comment"># E.g. image processor (or model) was saved using *save_pretrained(&#x27;./test/saved_model/&#x27;)*</span>
image_processor = CLIPImageProcessor.from_pretrained(<span class="hljs-string">&quot;./test/saved_model/preprocessor_config.json&quot;</span>)
image_processor = CLIPImageProcessor.from_pretrained(
    <span class="hljs-string">&quot;openai/clip-vit-base-patch32&quot;</span>, do_normalize=<span class="hljs-literal">False</span>, foo=<span class="hljs-literal">False</span>
)
<span class="hljs-keyword">assert</span> image_processor.do_normalize <span class="hljs-keyword">is</span> <span class="hljs-literal">False</span>
image_processor, unused_kwargs = CLIPImageProcessor.from_pretrained(
    <span class="hljs-string">&quot;openai/clip-vit-base-patch32&quot;</span>, do_normalize=<span class="hljs-literal">False</span>, foo=<span class="hljs-literal">False</span>, return_unused_kwargs=<span class="hljs-literal">True</span>
)
<span class="hljs-keyword">assert</span> image_processor.do_normalize <span class="hljs-keyword">is</span> <span class="hljs-literal">False</span>
<span class="hljs-keyword">assert</span> unused_kwargs == {<span class="hljs-string">&quot;foo&quot;</span>: <span class="hljs-literal">False</span>}`}}),{c(){f=o("p"),P=s("Examples:"),I=m(),_(h.$$.fragment)},l(d){f=a(d,"P",{});var T=n(f);P=i(T,"Examples:"),T.forEach(t),I=c(d),b(h.$$.fragment,d)},m(d,T){g(d,f,T),e(f,P),g(d,I,T),y(h,d,T),E=!0},p:Un,i(d){E||(v(h.$$.fragment,d),E=!0)},o(d){$(h.$$.fragment,d),E=!1},d(d){d&&t(f),d&&t(I),w(h,d)}}}function Wn(H){let f,P,I,h,E;return h=new jn({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9JbWFnZVByb2Nlc3NvciUwQSUwQWltYWdlJTIwcHJvY2Vzc29yJTIwJTNEJTIwQXV0b0ltYWdlUHJvY2Vzc29yLmZyb21fcHJldHJhaW5lZCglMjJiZXJ0LWJhc2UtY2FzZWQlMjIpJTBBJTBBJTIzJTIwUHVzaCUyMHRoZSUyMGltYWdlJTIwcHJvY2Vzc29yJTIwdG8lMjB5b3VyJTIwbmFtZXNwYWNlJTIwd2l0aCUyMHRoZSUyMG5hbWUlMjAlMjJteS1maW5ldHVuZWQtYmVydCUyMi4lMEFpbWFnZSUyMHByb2Nlc3Nvci5wdXNoX3RvX2h1YiglMjJteS1maW5ldHVuZWQtYmVydCUyMiklMEElMEElMjMlMjBQdXNoJTIwdGhlJTIwaW1hZ2UlMjBwcm9jZXNzb3IlMjB0byUyMGFuJTIwb3JnYW5pemF0aW9uJTIwd2l0aCUyMHRoZSUyMG5hbWUlMjAlMjJteS1maW5ldHVuZWQtYmVydCUyMi4lMEFpbWFnZSUyMHByb2Nlc3Nvci5wdXNoX3RvX2h1YiglMjJodWdnaW5nZmFjZSUyRm15LWZpbmV0dW5lZC1iZXJ0JTIyKQ==",highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoImageProcessor

image processor = AutoImageProcessor.from_pretrained(<span class="hljs-string">&quot;bert-base-cased&quot;</span>)

<span class="hljs-comment"># Push the image processor to your namespace with the name &quot;my-finetuned-bert&quot;.</span>
image processor.push_to_hub(<span class="hljs-string">&quot;my-finetuned-bert&quot;</span>)

<span class="hljs-comment"># Push the image processor to an organization with the name &quot;my-finetuned-bert&quot;.</span>
image processor.push_to_hub(<span class="hljs-string">&quot;huggingface/my-finetuned-bert&quot;</span>)`}}),{c(){f=o("p"),P=s("Examples:"),I=m(),_(h.$$.fragment)},l(d){f=a(d,"P",{});var T=n(f);P=i(T,"Examples:"),T.forEach(t),I=c(d),b(h.$$.fragment,d)},m(d,T){g(d,f,T),e(f,P),g(d,I,T),y(h,d,T),E=!0},p:Un,i(d){E||(v(h.$$.fragment,d),E=!0)},o(d){$(h.$$.fragment,d),E=!1},d(d){d&&t(f),d&&t(I),w(h,d)}}}function Ln(H){let f,P;return{c(){f=o("p"),P=s("This API is experimental and may have some slight breaking changes in the next releases.")},l(I){f=a(I,"P",{});var h=n(f);P=i(h,"This API is experimental and may have some slight breaking changes in the next releases."),h.forEach(t)},m(I,h){g(I,f,h),e(f,P)},d(I){I&&t(f)}}}function qn(H){let f,P,I,h,E,d,T,ar,Tt,Fr,Re,Pt,Rr,Be,Et,Br,q,Q,nr,he,Ut,sr,jt,Ar,S,ue,zt,U,Dt,ir,Ct,Nt,mr,Jt,kt,cr,Zt,Wt,Xr,j,_e,Lt,lr,qt,St,dr,Vt,Yr,z,be,Ft,pr,Rt,Bt,gr,At,Or,V,ye,Xt,fr,Yt,Gr,D,ve,Ot,C,Gt,hr,Ht,Qt,ur,Kt,eo,_r,ro,to,oo,br,ao,Hr,F,$e,no,N,so,yr,io,mo,vr,co,lo,$r,po,go,Qr,R,we,fo,wr,ho,Kr,B,Ie,uo,A,_o,Ir,bo,yo,xr,vo,$o,et,X,xe,wo,J,Io,Mr,xo,Mo,Tr,To,Po,Pr,Eo,Uo,rt,Y,Me,jo,Te,zo,Er,Do,Co,tt,O,K,Ur,Pe,No,jr,Jo,ot,u,Ee,ko,zr,Zo,Wo,ee,Ue,Lo,je,qo,Ae,So,Vo,Fo,re,ze,Ro,De,Bo,Xe,Ao,Xo,Yo,Z,Ce,Oo,Ne,Go,Ye,Ho,Qo,Ko,te,ea,oe,Je,ra,k,ta,Dr,oa,aa,Cr,na,sa,Nr,ia,ma,ca,W,ke,la,Jr,da,pa,ae,ga,L,Ze,fa,We,ha,kr,ua,_a,ba,ne,ya,se,Le,va,G,$a,Zr,wa,Ia,Oe,xa,Ma,Ta,ie,qe,Pa,Wr,Ea,Ua,me,Se,ja,Lr,za,Da,ce,Ve,Ca,qr,Na,at;return d=new Ja({}),he=new Ja({}),ue=new M({props:{name:"transformers.image_transforms.center_crop",anchor:"transformers.image_transforms.center_crop",parameters:[{name:"image",val:": ndarray"},{name:"size",val:": typing.Tuple[int, int]"},{name:"data_format",val:": typing.Union[transformers.image_utils.ChannelDimension, str, NoneType] = None"},{name:"input_data_format",val:": typing.Union[transformers.image_utils.ChannelDimension, str, NoneType] = None"},{name:"return_numpy",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.image_transforms.center_crop.image",description:`<strong>image</strong> (<code>np.ndarray</code>) &#x2014;
The image to crop.`,name:"image"},{anchor:"transformers.image_transforms.center_crop.size",description:`<strong>size</strong> (<code>Tuple[int, int]</code>) &#x2014;
The target size for the cropped image.`,name:"size"},{anchor:"transformers.image_transforms.center_crop.data_format",description:`<strong>data_format</strong> (<code>str</code> or <code>ChannelDimension</code>, <em>optional</em>) &#x2014;
The channel dimension format for the output image. Can be one of:<ul>
<li><code>&quot;channels_first&quot;</code> or <code>ChannelDimension.FIRST</code>: image in (num_channels, height, width) format.</li>
<li><code>&quot;channels_last&quot;</code> or <code>ChannelDimension.LAST</code>: image in (height, width, num_channels) format.
If unset, will use the inferred format of the input image.</li>
</ul>`,name:"data_format"},{anchor:"transformers.image_transforms.center_crop.input_data_format",description:`<strong>input_data_format</strong> (<code>str</code> or <code>ChannelDimension</code>, <em>optional</em>) &#x2014;
The channel dimension format for the input image. Can be one of:<ul>
<li><code>&quot;channels_first&quot;</code> or <code>ChannelDimension.FIRST</code>: image in (num_channels, height, width) format.</li>
<li><code>&quot;channels_last&quot;</code> or <code>ChannelDimension.LAST</code>: image in (height, width, num_channels) format.
If unset, will use the inferred format of the input image.</li>
</ul>`,name:"input_data_format"},{anchor:"transformers.image_transforms.center_crop.return_numpy",description:`<strong>return_numpy</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the cropped image as a numpy array. Used for backwards compatibility with the
previous ImageFeatureExtractionMixin method.<ul>
<li>Unset: will return the same type as the input image.</li>
<li><code>True</code>: will return a numpy array.</li>
<li><code>False</code>: will return a <code>PIL.Image.Image</code> object.</li>
</ul>`,name:"return_numpy"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/image_transforms.py#L402",returnDescription:`
<p>The cropped image.</p>
`,returnType:`
<p><code>np.ndarray</code></p>
`}}),_e=new M({props:{name:"transformers.image_transforms.center_to_corners_format",anchor:"transformers.image_transforms.center_to_corners_format",parameters:[{name:"bboxes_center",val:": TensorType"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/image_transforms.py#L532"}}),be=new M({props:{name:"transformers.image_transforms.corners_to_center_format",anchor:"transformers.image_transforms.corners_to_center_format",parameters:[{name:"bboxes_corners",val:": TensorType"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/image_transforms.py#L592"}}),ye=new M({props:{name:"transformers.image_transforms.id_to_rgb",anchor:"transformers.image_transforms.id_to_rgb",parameters:[{name:"id_map",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/image_transforms.py#L626"}}),ve=new M({props:{name:"transformers.image_transforms.normalize",anchor:"transformers.image_transforms.normalize",parameters:[{name:"image",val:": ndarray"},{name:"mean",val:": typing.Union[float, typing.Iterable[float]]"},{name:"std",val:": typing.Union[float, typing.Iterable[float]]"},{name:"data_format",val:": typing.Optional[transformers.image_utils.ChannelDimension] = None"},{name:"input_data_format",val:": typing.Union[transformers.image_utils.ChannelDimension, str, NoneType] = None"}],parametersDescription:[{anchor:"transformers.image_transforms.normalize.image",description:`<strong>image</strong> (<code>np.ndarray</code>) &#x2014;
The image to normalize.`,name:"image"},{anchor:"transformers.image_transforms.normalize.mean",description:`<strong>mean</strong> (<code>float</code> or <code>Iterable[float]</code>) &#x2014;
The mean to use for normalization.`,name:"mean"},{anchor:"transformers.image_transforms.normalize.std",description:`<strong>std</strong> (<code>float</code> or <code>Iterable[float]</code>) &#x2014;
The standard deviation to use for normalization.`,name:"std"},{anchor:"transformers.image_transforms.normalize.data_format",description:`<strong>data_format</strong> (<code>ChannelDimension</code>, <em>optional</em>) &#x2014;
The channel dimension format of the output image. If unset, will use the inferred format from the input.`,name:"data_format"},{anchor:"transformers.image_transforms.normalize.input_data_format",description:`<strong>input_data_format</strong> (<code>ChannelDimension</code>, <em>optional</em>) &#x2014;
The channel dimension format of the input image. If unset, will use the inferred format from the input.`,name:"input_data_format"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/image_transforms.py#L347"}}),$e=new M({props:{name:"transformers.image_transforms.pad",anchor:"transformers.image_transforms.pad",parameters:[{name:"image",val:": ndarray"},{name:"padding",val:": typing.Union[int, typing.Tuple[int, int], typing.Iterable[typing.Tuple[int, int]]]"},{name:"mode",val:": PaddingMode = <PaddingMode.CONSTANT: 'constant'>"},{name:"constant_values",val:": typing.Union[float, typing.Iterable[float]] = 0.0"},{name:"data_format",val:": typing.Union[transformers.image_utils.ChannelDimension, str, NoneType] = None"},{name:"input_data_format",val:": typing.Union[transformers.image_utils.ChannelDimension, str, NoneType] = None"}],parametersDescription:[{anchor:"transformers.image_transforms.pad.image",description:`<strong>image</strong> (<code>np.ndarray</code>) &#x2014;
The image to pad.`,name:"image"},{anchor:"transformers.image_transforms.pad.padding",description:`<strong>padding</strong> (<code>int</code> or <code>Tuple[int, int]</code> or <code>Iterable[Tuple[int, int]]</code>) &#x2014;
Padding to apply to the edges of the height, width axes. Can be one of three formats:<ul>
<li><code>((before_height, after_height), (before_width, after_width))</code> unique pad widths for each axis.</li>
<li><code>((before, after),)</code> yields same before and after pad for height and width.</li>
<li><code>(pad,)</code> or int is a shortcut for before = after = pad width for all axes.</li>
</ul>`,name:"padding"},{anchor:"transformers.image_transforms.pad.mode",description:`<strong>mode</strong> (<code>PaddingMode</code>) &#x2014;
The padding mode to use. Can be one of:<ul>
<li><code>&quot;constant&quot;</code>: pads with a constant value.</li>
<li><code>&quot;reflect&quot;</code>: pads with the reflection of the vector mirrored on the first and last values of the
vector along each axis.</li>
<li><code>&quot;replicate&quot;</code>: pads with the replication of the last value on the edge of the array along each axis.</li>
<li><code>&quot;symmetric&quot;</code>: pads with the reflection of the vector mirrored along the edge of the array.</li>
</ul>`,name:"mode"},{anchor:"transformers.image_transforms.pad.constant_values",description:`<strong>constant_values</strong> (<code>float</code> or <code>Iterable[float]</code>, <em>optional</em>) &#x2014;
The value to use for the padding if <code>mode</code> is <code>&quot;constant&quot;</code>.`,name:"constant_values"},{anchor:"transformers.image_transforms.pad.data_format",description:`<strong>data_format</strong> (<code>str</code> or <code>ChannelDimension</code>, <em>optional</em>) &#x2014;
The channel dimension format for the output image. Can be one of:<ul>
<li><code>&quot;channels_first&quot;</code> or <code>ChannelDimension.FIRST</code>: image in (num_channels, height, width) format.</li>
<li><code>&quot;channels_last&quot;</code> or <code>ChannelDimension.LAST</code>: image in (height, width, num_channels) format.
If unset, will use same as the input image.</li>
</ul>`,name:"data_format"},{anchor:"transformers.image_transforms.pad.input_data_format",description:`<strong>input_data_format</strong> (<code>str</code> or <code>ChannelDimension</code>, <em>optional</em>) &#x2014;
The channel dimension format for the input image. Can be one of:<ul>
<li><code>&quot;channels_first&quot;</code> or <code>ChannelDimension.FIRST</code>: image in (num_channels, height, width) format.</li>
<li><code>&quot;channels_last&quot;</code> or <code>ChannelDimension.LAST</code>: image in (height, width, num_channels) format.
If unset, will use the inferred format of the input image.</li>
</ul>`,name:"input_data_format"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/image_transforms.py#L656",returnDescription:`
<p>The padded image.</p>
`,returnType:`
<p><code>np.ndarray</code></p>
`}}),we=new M({props:{name:"transformers.image_transforms.rgb_to_id",anchor:"transformers.image_transforms.rgb_to_id",parameters:[{name:"color",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/image_transforms.py#L615"}}),Ie=new M({props:{name:"transformers.image_transforms.rescale",anchor:"transformers.image_transforms.rescale",parameters:[{name:"image",val:": ndarray"},{name:"scale",val:": float"},{name:"data_format",val:": typing.Optional[transformers.image_utils.ChannelDimension] = None"},{name:"dtype",val:": dtype = <class 'numpy.float32'>"},{name:"input_data_format",val:": typing.Union[transformers.image_utils.ChannelDimension, str, NoneType] = None"}],parametersDescription:[{anchor:"transformers.image_transforms.rescale.image",description:`<strong>image</strong> (<code>np.ndarray</code>) &#x2014;
The image to rescale.`,name:"image"},{anchor:"transformers.image_transforms.rescale.scale",description:`<strong>scale</strong> (<code>float</code>) &#x2014;
The scale to use for rescaling the image.`,name:"scale"},{anchor:"transformers.image_transforms.rescale.data_format",description:`<strong>data_format</strong> (<code>ChannelDimension</code>, <em>optional</em>) &#x2014;
The channel dimension format of the image. If not provided, it will be the same as the input image.`,name:"data_format"},{anchor:"transformers.image_transforms.rescale.dtype",description:`<strong>dtype</strong> (<code>np.dtype</code>, <em>optional</em>, defaults to <code>np.float32</code>) &#x2014;
The dtype of the output image. Defaults to <code>np.float32</code>. Used for backwards compatibility with feature
extractors.`,name:"dtype"},{anchor:"transformers.image_transforms.rescale.input_data_format",description:`<strong>input_data_format</strong> (<code>ChannelDimension</code>, <em>optional</em>) &#x2014;
The channel dimension format of the input image. If not provided, it will be inferred from the input image.`,name:"input_data_format"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/image_transforms.py#L92",returnDescription:`
<p>The rescaled image.</p>
`,returnType:`
<p><code>np.ndarray</code></p>
`}}),xe=new M({props:{name:"transformers.image_transforms.resize",anchor:"transformers.image_transforms.resize",parameters:[{name:"image",val:""},{name:"size",val:": typing.Tuple[int, int]"},{name:"resample",val:": PILImageResampling = None"},{name:"reducing_gap",val:": typing.Optional[int] = None"},{name:"data_format",val:": typing.Optional[transformers.image_utils.ChannelDimension] = None"},{name:"return_numpy",val:": bool = True"},{name:"input_data_format",val:": typing.Union[transformers.image_utils.ChannelDimension, str, NoneType] = None"}],parametersDescription:[{anchor:"transformers.image_transforms.resize.image",description:`<strong>image</strong> (<code>PIL.Image.Image</code> or <code>np.ndarray</code> or <code>torch.Tensor</code>) &#x2014;
The image to resize.`,name:"image"},{anchor:"transformers.image_transforms.resize.size",description:`<strong>size</strong> (<code>Tuple[int, int]</code>) &#x2014;
The size to use for resizing the image.`,name:"size"},{anchor:"transformers.image_transforms.resize.resample",description:`<strong>resample</strong> (<code>int</code>, <em>optional</em>, defaults to <code>PILImageResampling.BILINEAR</code>) &#x2014;
The filter to user for resampling.`,name:"resample"},{anchor:"transformers.image_transforms.resize.reducing_gap",description:`<strong>reducing_gap</strong> (<code>int</code>, <em>optional</em>) &#x2014;
Apply optimization by resizing the image in two steps. The bigger <code>reducing_gap</code>, the closer the result to
the fair resampling. See corresponding Pillow documentation for more details.`,name:"reducing_gap"},{anchor:"transformers.image_transforms.resize.data_format",description:`<strong>data_format</strong> (<code>ChannelDimension</code>, <em>optional</em>) &#x2014;
The channel dimension format of the output image. If unset, will use the inferred format from the input.`,name:"data_format"},{anchor:"transformers.image_transforms.resize.return_numpy",description:`<strong>return_numpy</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to return the resized image as a numpy array. If False a <code>PIL.Image.Image</code> object is
returned.`,name:"return_numpy"},{anchor:"transformers.image_transforms.resize.input_data_format",description:`<strong>input_data_format</strong> (<code>ChannelDimension</code>, <em>optional</em>) &#x2014;
The channel dimension format of the input image. If unset, will use the inferred format from the input.`,name:"input_data_format"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/image_transforms.py#L276",returnDescription:`
<p>The resized image.</p>
`,returnType:`
<p><code>np.ndarray</code></p>
`}}),Me=new M({props:{name:"transformers.image_transforms.to_pil_image",anchor:"transformers.image_transforms.to_pil_image",parameters:[{name:"image",val:": typing.Union[numpy.ndarray, ForwardRef('PIL.Image.Image'), ForwardRef('torch.Tensor'), ForwardRef('tf.Tensor'), ForwardRef('jnp.ndarray')]"},{name:"do_rescale",val:": typing.Optional[bool] = None"},{name:"input_data_format",val:": typing.Union[transformers.image_utils.ChannelDimension, str, NoneType] = None"}],parametersDescription:[{anchor:"transformers.image_transforms.to_pil_image.image",description:`<strong>image</strong> (<code>PIL.Image.Image</code> or <code>numpy.ndarray</code> or <code>torch.Tensor</code> or <code>tf.Tensor</code>) &#x2014;
The image to convert to the <code>PIL.Image</code> format.`,name:"image"},{anchor:"transformers.image_transforms.to_pil_image.do_rescale",description:`<strong>do_rescale</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to apply the scaling factor (to make pixel values integers between 0 and 255). Will default
to <code>True</code> if the image type is a floating type and casting to <code>int</code> would result in a loss of precision,
and <code>False</code> otherwise.`,name:"do_rescale"},{anchor:"transformers.image_transforms.to_pil_image.input_data_format",description:`<strong>input_data_format</strong> (<code>ChannelDimension</code>, <em>optional</em>) &#x2014;
The channel dimension format of the input image. If unset, will use the inferred format from the input.`,name:"input_data_format"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/image_transforms.py#L157",returnDescription:`
<p>The converted image.</p>
`,returnType:`
<p><code>PIL.Image.Image</code></p>
`}}),Pe=new Ja({}),Ee=new M({props:{name:"class transformers.ImageProcessingMixin",anchor:"transformers.ImageProcessingMixin",parameters:[{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/image_processing_utils.py#L62"}}),Ue=new M({props:{name:"from_dict",anchor:"transformers.ImageProcessingMixin.from_dict",parameters:[{name:"image_processor_dict",val:": typing.Dict[str, typing.Any]"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.ImageProcessingMixin.from_dict.image_processor_dict",description:`<strong>image_processor_dict</strong> (<code>Dict[str, Any]</code>) &#x2014;
Dictionary that will be used to instantiate the image processor object. Such a dictionary can be
retrieved from a pretrained checkpoint by leveraging the
<a href="/docs/transformers/main/en/internal/image_processing_utils#transformers.ImageProcessingMixin.to_dict">to_dict()</a> method.`,name:"image_processor_dict"},{anchor:"transformers.ImageProcessingMixin.from_dict.kwargs",description:`<strong>kwargs</strong> (<code>Dict[str, Any]</code>) &#x2014;
Additional parameters from which to initialize the image processor object.`,name:"kwargs"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/image_processing_utils.py#L374",returnDescription:`
<p>The image processor object instantiated from those
parameters.</p>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/image_processor#transformers.ImageProcessingMixin"
>ImageProcessingMixin</a></p>
`}}),ze=new M({props:{name:"from_json_file",anchor:"transformers.ImageProcessingMixin.from_json_file",parameters:[{name:"json_file",val:": typing.Union[str, os.PathLike]"}],parametersDescription:[{anchor:"transformers.ImageProcessingMixin.from_json_file.json_file",description:`<strong>json_file</strong> (<code>str</code> or <code>os.PathLike</code>) &#x2014;
Path to the JSON file containing the parameters.`,name:"json_file"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/image_processing_utils.py#L431",returnDescription:`
<p>The image_processor object
instantiated from that JSON file.</p>
`,returnType:`
<p>A image processor of type <a
  href="/docs/transformers/main/en/main_classes/image_processor#transformers.ImageProcessingMixin"
>ImageProcessingMixin</a></p>
`}}),Ce=new M({props:{name:"from_pretrained",anchor:"transformers.ImageProcessingMixin.from_pretrained",parameters:[{name:"pretrained_model_name_or_path",val:": typing.Union[str, os.PathLike]"},{name:"cache_dir",val:": typing.Union[str, os.PathLike, NoneType] = None"},{name:"force_download",val:": bool = False"},{name:"local_files_only",val:": bool = False"},{name:"token",val:": typing.Union[bool, str, NoneType] = None"},{name:"revision",val:": str = 'main'"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.ImageProcessingMixin.from_pretrained.pretrained_model_name_or_path",description:`<strong>pretrained_model_name_or_path</strong> (<code>str</code> or <code>os.PathLike</code>) &#x2014;
This can be either:</p>
<ul>
<li>a string, the <em>model id</em> of a pretrained image_processor hosted inside a model repo on
huggingface.co. Valid model ids can be located at the root-level, like <code>bert-base-uncased</code>, or
namespaced under a user or organization name, like <code>dbmdz/bert-base-german-cased</code>.</li>
<li>a path to a <em>directory</em> containing a image processor file saved using the
<a href="/docs/transformers/main/en/main_classes/image_processor#transformers.ImageProcessingMixin.save_pretrained">save_pretrained()</a> method, e.g.,
<code>./my_model_directory/</code>.</li>
<li>a path or url to a saved image processor JSON <em>file</em>, e.g.,
<code>./my_model_directory/preprocessor_config.json</code>.</li>
</ul>`,name:"pretrained_model_name_or_path"},{anchor:"transformers.ImageProcessingMixin.from_pretrained.cache_dir",description:`<strong>cache_dir</strong> (<code>str</code> or <code>os.PathLike</code>, <em>optional</em>) &#x2014;
Path to a directory in which a downloaded pretrained model image processor should be cached if the
standard cache should not be used.`,name:"cache_dir"},{anchor:"transformers.ImageProcessingMixin.from_pretrained.force_download",description:`<strong>force_download</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to force to (re-)download the image processor files and override the cached versions if
they exist.`,name:"force_download"},{anchor:"transformers.ImageProcessingMixin.from_pretrained.resume_download",description:`<strong>resume_download</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to delete incompletely received file. Attempts to resume the download if such a file
exists.`,name:"resume_download"},{anchor:"transformers.ImageProcessingMixin.from_pretrained.proxies",description:`<strong>proxies</strong> (<code>Dict[str, str]</code>, <em>optional</em>) &#x2014;
A dictionary of proxy servers to use by protocol or endpoint, e.g., <code>{&apos;http&apos;: &apos;foo.bar:3128&apos;, &apos;http://hostname&apos;: &apos;foo.bar:4012&apos;}.</code> The proxies are used on each request.`,name:"proxies"},{anchor:"transformers.ImageProcessingMixin.from_pretrained.token",description:`<strong>token</strong> (<code>str</code> or <code>bool</code>, <em>optional</em>) &#x2014;
The token to use as HTTP bearer authorization for remote files. If <code>True</code>, or not specified, will use
the token generated when running <code>huggingface-cli login</code> (stored in <code>~/.huggingface</code>).`,name:"token"},{anchor:"transformers.ImageProcessingMixin.from_pretrained.revision",description:`<strong>revision</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;main&quot;</code>) &#x2014;
The specific model version to use. It can be a branch name, a tag name, or a commit id, since we use a
git-based system for storing models and other artifacts on huggingface.co, so <code>revision</code> can be any
identifier allowed by git.`,name:"revision"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/image_processing_utils.py#L86",returnDescription:`
<p>A image processor of type <a
  href="/docs/transformers/main/en/main_classes/image_processor#transformers.ImageProcessingMixin"
>ImageProcessingMixin</a>.</p>
`}}),te=new En({props:{anchor:"transformers.ImageProcessingMixin.from_pretrained.example",$$slots:{default:[Zn]},$$scope:{ctx:H}}}),Je=new M({props:{name:"get_image_processor_dict",anchor:"transformers.ImageProcessingMixin.get_image_processor_dict",parameters:[{name:"pretrained_model_name_or_path",val:": typing.Union[str, os.PathLike]"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.ImageProcessingMixin.get_image_processor_dict.pretrained_model_name_or_path",description:`<strong>pretrained_model_name_or_path</strong> (<code>str</code> or <code>os.PathLike</code>) &#x2014;
The identifier of the pre-trained checkpoint from which we want the dictionary of parameters.`,name:"pretrained_model_name_or_path"},{anchor:"transformers.ImageProcessingMixin.get_image_processor_dict.subfolder",description:`<strong>subfolder</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&quot;</code>) &#x2014;
In case the relevant files are located inside a subfolder of the model repo on huggingface.co, you can
specify the folder name here.`,name:"subfolder"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/image_processing_utils.py#L260",returnDescription:`
<p>The dictionary(ies) that will be used to instantiate the image processor object.</p>
`,returnType:`
<p><code>Tuple[Dict, Dict]</code></p>
`}}),ke=new M({props:{name:"push_to_hub",anchor:"transformers.ImageProcessingMixin.push_to_hub",parameters:[{name:"repo_id",val:": str"},{name:"use_temp_dir",val:": typing.Optional[bool] = None"},{name:"commit_message",val:": typing.Optional[str] = None"},{name:"private",val:": typing.Optional[bool] = None"},{name:"token",val:": typing.Union[bool, str, NoneType] = None"},{name:"max_shard_size",val:": typing.Union[int, str, NoneType] = '10GB'"},{name:"create_pr",val:": bool = False"},{name:"safe_serialization",val:": bool = False"},{name:"**deprecated_kwargs",val:""}],parametersDescription:[{anchor:"transformers.ImageProcessingMixin.push_to_hub.repo_id",description:`<strong>repo_id</strong> (<code>str</code>) &#x2014;
The name of the repository you want to push your image processor to. It should contain your organization name
when pushing to a given organization.`,name:"repo_id"},{anchor:"transformers.ImageProcessingMixin.push_to_hub.use_temp_dir",description:`<strong>use_temp_dir</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to use a temporary directory to store the files saved before they are pushed to the Hub.
Will default to <code>True</code> if there is no directory named like <code>repo_id</code>, <code>False</code> otherwise.`,name:"use_temp_dir"},{anchor:"transformers.ImageProcessingMixin.push_to_hub.commit_message",description:`<strong>commit_message</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Message to commit while pushing. Will default to <code>&quot;Upload image processor&quot;</code>.`,name:"commit_message"},{anchor:"transformers.ImageProcessingMixin.push_to_hub.private",description:`<strong>private</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not the repository created should be private.`,name:"private"},{anchor:"transformers.ImageProcessingMixin.push_to_hub.token",description:`<strong>token</strong> (<code>bool</code> or <code>str</code>, <em>optional</em>) &#x2014;
The token to use as HTTP bearer authorization for remote files. If <code>True</code>, will use the token generated
when running <code>huggingface-cli login</code> (stored in <code>~/.huggingface</code>). Will default to <code>True</code> if <code>repo_url</code>
is not specified.`,name:"token"},{anchor:"transformers.ImageProcessingMixin.push_to_hub.max_shard_size",description:`<strong>max_shard_size</strong> (<code>int</code> or <code>str</code>, <em>optional</em>, defaults to <code>&quot;10GB&quot;</code>) &#x2014;
Only applicable for models. The maximum size for a checkpoint before being sharded. Checkpoints shard
will then be each of size lower than this size. If expressed as a string, needs to be digits followed
by a unit (like <code>&quot;5MB&quot;</code>).`,name:"max_shard_size"},{anchor:"transformers.ImageProcessingMixin.push_to_hub.create_pr",description:`<strong>create_pr</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to create a PR with the uploaded files or directly commit.`,name:"create_pr"},{anchor:"transformers.ImageProcessingMixin.push_to_hub.safe_serialization",description:`<strong>safe_serialization</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to convert the model weights in safetensors format for safer serialization.`,name:"safe_serialization"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/utils/hub.py#L776"}}),ae=new En({props:{anchor:"transformers.ImageProcessingMixin.push_to_hub.example",$$slots:{default:[Wn]},$$scope:{ctx:H}}}),Ze=new M({props:{name:"register_for_auto_class",anchor:"transformers.ImageProcessingMixin.register_for_auto_class",parameters:[{name:"auto_class",val:" = 'AutoImageProcessor'"}],parametersDescription:[{anchor:"transformers.ImageProcessingMixin.register_for_auto_class.auto_class",description:`<strong>auto_class</strong> (<code>str</code> or <code>type</code>, <em>optional</em>, defaults to <code>&quot;AutoImageProcessor &quot;</code>) &#x2014;
The auto class to register this new image processor with.`,name:"auto_class"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/image_processing_utils.py#L485"}}),ne=new kn({props:{warning:!0,$$slots:{default:[Ln]},$$scope:{ctx:H}}}),Le=new M({props:{name:"save_pretrained",anchor:"transformers.ImageProcessingMixin.save_pretrained",parameters:[{name:"save_directory",val:": typing.Union[str, os.PathLike]"},{name:"push_to_hub",val:": bool = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.ImageProcessingMixin.save_pretrained.save_directory",description:`<strong>save_directory</strong> (<code>str</code> or <code>os.PathLike</code>) &#x2014;
Directory where the image processor JSON file will be saved (will be created if it does not exist).`,name:"save_directory"},{anchor:"transformers.ImageProcessingMixin.save_pretrained.push_to_hub",description:`<strong>push_to_hub</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to push your model to the Hugging Face model hub after saving it. You can specify the
repository you want to push to with <code>repo_id</code> (will default to the name of <code>save_directory</code> in your
namespace).`,name:"push_to_hub"},{anchor:"transformers.ImageProcessingMixin.save_pretrained.kwargs",description:`<strong>kwargs</strong> (<code>Dict[str, Any]</code>, <em>optional</em>) &#x2014;
Additional key word arguments passed along to the <a href="/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig.push_to_hub">push_to_hub()</a> method.`,name:"kwargs"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/image_processing_utils.py#L200"}}),qe=new M({props:{name:"to_dict",anchor:"transformers.ImageProcessingMixin.to_dict",parameters:[],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/image_processing_utils.py#L419",returnDescription:`
<p>Dictionary of all the attributes that make up this image processor instance.</p>
`,returnType:`
<p><code>Dict[str, Any]</code></p>
`}}),Se=new M({props:{name:"to_json_file",anchor:"transformers.ImageProcessingMixin.to_json_file",parameters:[{name:"json_file_path",val:": typing.Union[str, os.PathLike]"}],parametersDescription:[{anchor:"transformers.ImageProcessingMixin.to_json_file.json_file_path",description:`<strong>json_file_path</strong> (<code>str</code> or <code>os.PathLike</code>) &#x2014;
Path to the JSON file in which this image_processor instance&#x2019;s parameters will be saved.`,name:"json_file_path"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/image_processing_utils.py#L471"}}),Ve=new M({props:{name:"to_json_string",anchor:"transformers.ImageProcessingMixin.to_json_string",parameters:[],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/image_processing_utils.py#L450",returnDescription:`
<p>String containing all the attributes that make up this feature_extractor instance in JSON format.</p>
`,returnType:`
<p><code>str</code></p>
`}}),{c(){f=o("meta"),P=m(),I=o("h1"),h=o("a"),E=o("span"),_(d.$$.fragment),T=m(),ar=o("span"),Tt=s("Utilities for Image Processors"),Fr=m(),Re=o("p"),Pt=s(`This page lists all the utility functions used by the image processors, mainly the functional
transformations used to process the images.`),Rr=m(),Be=o("p"),Et=s("Most of those are only useful if you are studying the code of the image processors in the library."),Br=m(),q=o("h2"),Q=o("a"),nr=o("span"),_(he.$$.fragment),Ut=m(),sr=o("span"),jt=s("Image Transformations"),Ar=m(),S=o("div"),_(ue.$$.fragment),zt=m(),U=o("p"),Dt=s("Crops the "),ir=o("code"),Ct=s("image"),Nt=s(" to the specified "),mr=o("code"),Jt=s("size"),kt=s(` using a center crop. Note that if the image is too small to be cropped to
the size given, it will be padded (so the returned result will always be of size `),cr=o("code"),Zt=s("size"),Wt=s(")."),Xr=m(),j=o("div"),_(_e.$$.fragment),Lt=m(),lr=o("p"),qt=s("Converts bounding boxes from center format to corners format."),St=m(),dr=o("p"),Vt=s(`center format: contains the coordinate for the center of the box and its width, height dimensions
(center_x, center_y, width, height)
corners format: contains the coodinates for the top-left and bottom-right corners of the box
(top_left_x, top_left_y, bottom_right_x, bottom_right_y)`),Yr=m(),z=o("div"),_(be.$$.fragment),Ft=m(),pr=o("p"),Rt=s("Converts bounding boxes from corners format to center format."),Bt=m(),gr=o("p"),At=s(`corners format: contains the coodinates for the top-left and bottom-right corners of the box
(top_left_x, top_left_y, bottom_right_x, bottom_right_y)
center format: contains the coordinate for the center of the box and its the width, height dimensions
(center_x, center_y, width, height)`),Or=m(),V=o("div"),_(ye.$$.fragment),Xt=m(),fr=o("p"),Yt=s("Converts unique ID to RGB color."),Gr=m(),D=o("div"),_(ve.$$.fragment),Ot=m(),C=o("p"),Gt=s("Normalizes "),hr=o("code"),Ht=s("image"),Qt=s(" using the mean and standard deviation specified by "),ur=o("code"),Kt=s("mean"),eo=s(" and "),_r=o("code"),ro=s("std"),to=s("."),oo=m(),br=o("p"),ao=s("image = (image - mean) / std"),Hr=m(),F=o("div"),_($e.$$.fragment),no=m(),N=o("p"),so=s("Pads the "),yr=o("code"),io=s("image"),mo=s(" with the specified (height, width) "),vr=o("code"),co=s("padding"),lo=s(" and "),$r=o("code"),po=s("mode"),go=s("."),Qr=m(),R=o("div"),_(we.$$.fragment),fo=m(),wr=o("p"),ho=s("Converts RGB color to unique ID."),Kr=m(),B=o("div"),_(Ie.$$.fragment),uo=m(),A=o("p"),_o=s("Rescales "),Ir=o("code"),bo=s("image"),yo=s(" by "),xr=o("code"),vo=s("scale"),$o=s("."),et=m(),X=o("div"),_(xe.$$.fragment),wo=m(),J=o("p"),Io=s("Resizes "),Mr=o("code"),xo=s("image"),Mo=s(" to "),Tr=o("code"),To=s("(height, width)"),Po=s(" specified by "),Pr=o("code"),Eo=s("size"),Uo=s(" using the PIL library."),rt=m(),Y=o("div"),_(Me.$$.fragment),jo=m(),Te=o("p"),zo=s("Converts "),Er=o("code"),Do=s("image"),Co=s(` to a PIL Image. Optionally rescales it and puts the channel dimension back as the last axis if
needed.`),tt=m(),O=o("h2"),K=o("a"),Ur=o("span"),_(Pe.$$.fragment),No=m(),jr=o("span"),Jo=s("ImageProcessingMixin"),ot=m(),u=o("div"),_(Ee.$$.fragment),ko=m(),zr=o("p"),Zo=s(`This is an image processor mixin used to provide saving/loading functionality for sequential and image feature
extractors.`),Wo=m(),ee=o("div"),_(Ue.$$.fragment),Lo=m(),je=o("p"),qo=s("Instantiates a type of "),Ae=o("a"),So=s("ImageProcessingMixin"),Vo=s(" from a Python dictionary of parameters."),Fo=m(),re=o("div"),_(ze.$$.fragment),Ro=m(),De=o("p"),Bo=s("Instantiates a image processor of type "),Xe=o("a"),Ao=s("ImageProcessingMixin"),Xo=s(` from the path to a JSON
file of parameters.`),Yo=m(),Z=o("div"),_(Ce.$$.fragment),Oo=m(),Ne=o("p"),Go=s("Instantiate a type of "),Ye=o("a"),Ho=s("ImageProcessingMixin"),Qo=s(" from an image processor."),Ko=m(),_(te.$$.fragment),ea=m(),oe=o("div"),_(Je.$$.fragment),ra=m(),k=o("p"),ta=s("From a "),Dr=o("code"),oa=s("pretrained_model_name_or_path"),aa=s(`, resolve to a dictionary of parameters, to be used for instantiating a
image processor of type `),Cr=o("code"),na=s("~image_processor_utils.ImageProcessingMixin"),sa=s(" using "),Nr=o("code"),ia=s("from_dict"),ma=s("."),ca=m(),W=o("div"),_(ke.$$.fragment),la=m(),Jr=o("p"),da=s("Upload the image processor file to the \u{1F917} Model Hub."),pa=m(),_(ae.$$.fragment),ga=m(),L=o("div"),_(Ze.$$.fragment),fa=m(),We=o("p"),ha=s(`Register this class with a given auto class. This should only be used for custom image processors as the ones
in the library are already mapped with `),kr=o("code"),ua=s("AutoImageProcessor "),_a=s("."),ba=m(),_(ne.$$.fragment),ya=m(),se=o("div"),_(Le.$$.fragment),va=m(),G=o("p"),$a=s("Save an image processor object to the directory "),Zr=o("code"),wa=s("save_directory"),Ia=s(`, so that it can be re-loaded using the
`),Oe=o("a"),xa=s("from_pretrained()"),Ma=s(" class method."),Ta=m(),ie=o("div"),_(qe.$$.fragment),Pa=m(),Wr=o("p"),Ea=s("Serializes this instance to a Python dictionary."),Ua=m(),me=o("div"),_(Se.$$.fragment),ja=m(),Lr=o("p"),za=s("Save this instance to a JSON file."),Da=m(),ce=o("div"),_(Ve.$$.fragment),Ca=m(),qr=o("p"),Na=s("Serializes this instance to a JSON string."),this.h()},l(r){const l=Nn('[data-svelte="svelte-1phssyn"]',document.head);f=a(l,"META",{name:!0,content:!0}),l.forEach(t),P=c(r),I=a(r,"H1",{class:!0});var Fe=n(I);h=a(Fe,"A",{id:!0,class:!0,href:!0});var Sr=n(h);E=a(Sr,"SPAN",{});var Vr=n(E);b(d.$$.fragment,Vr),Vr.forEach(t),Sr.forEach(t),T=c(Fe),ar=a(Fe,"SPAN",{});var ka=n(ar);Tt=i(ka,"Utilities for Image Processors"),ka.forEach(t),Fe.forEach(t),Fr=c(r),Re=a(r,"P",{});var Za=n(Re);Pt=i(Za,`This page lists all the utility functions used by the image processors, mainly the functional
transformations used to process the images.`),Za.forEach(t),Rr=c(r),Be=a(r,"P",{});var Wa=n(Be);Et=i(Wa,"Most of those are only useful if you are studying the code of the image processors in the library."),Wa.forEach(t),Br=c(r),q=a(r,"H2",{class:!0});var nt=n(q);Q=a(nt,"A",{id:!0,class:!0,href:!0});var La=n(Q);nr=a(La,"SPAN",{});var qa=n(nr);b(he.$$.fragment,qa),qa.forEach(t),La.forEach(t),Ut=c(nt),sr=a(nt,"SPAN",{});var Sa=n(sr);jt=i(Sa,"Image Transformations"),Sa.forEach(t),nt.forEach(t),Ar=c(r),S=a(r,"DIV",{class:!0});var st=n(S);b(ue.$$.fragment,st),zt=c(st),U=a(st,"P",{});var le=n(U);Dt=i(le,"Crops the "),ir=a(le,"CODE",{});var Va=n(ir);Ct=i(Va,"image"),Va.forEach(t),Nt=i(le," to the specified "),mr=a(le,"CODE",{});var Fa=n(mr);Jt=i(Fa,"size"),Fa.forEach(t),kt=i(le,` using a center crop. Note that if the image is too small to be cropped to
the size given, it will be padded (so the returned result will always be of size `),cr=a(le,"CODE",{});var Ra=n(cr);Zt=i(Ra,"size"),Ra.forEach(t),Wt=i(le,")."),le.forEach(t),st.forEach(t),Xr=c(r),j=a(r,"DIV",{class:!0});var Ge=n(j);b(_e.$$.fragment,Ge),Lt=c(Ge),lr=a(Ge,"P",{});var Ba=n(lr);qt=i(Ba,"Converts bounding boxes from center format to corners format."),Ba.forEach(t),St=c(Ge),dr=a(Ge,"P",{});var Aa=n(dr);Vt=i(Aa,`center format: contains the coordinate for the center of the box and its width, height dimensions
(center_x, center_y, width, height)
corners format: contains the coodinates for the top-left and bottom-right corners of the box
(top_left_x, top_left_y, bottom_right_x, bottom_right_y)`),Aa.forEach(t),Ge.forEach(t),Yr=c(r),z=a(r,"DIV",{class:!0});var He=n(z);b(be.$$.fragment,He),Ft=c(He),pr=a(He,"P",{});var Xa=n(pr);Rt=i(Xa,"Converts bounding boxes from corners format to center format."),Xa.forEach(t),Bt=c(He),gr=a(He,"P",{});var Ya=n(gr);At=i(Ya,`corners format: contains the coodinates for the top-left and bottom-right corners of the box
(top_left_x, top_left_y, bottom_right_x, bottom_right_y)
center format: contains the coordinate for the center of the box and its the width, height dimensions
(center_x, center_y, width, height)`),Ya.forEach(t),He.forEach(t),Or=c(r),V=a(r,"DIV",{class:!0});var it=n(V);b(ye.$$.fragment,it),Xt=c(it),fr=a(it,"P",{});var Oa=n(fr);Yt=i(Oa,"Converts unique ID to RGB color."),Oa.forEach(t),it.forEach(t),Gr=c(r),D=a(r,"DIV",{class:!0});var Qe=n(D);b(ve.$$.fragment,Qe),Ot=c(Qe),C=a(Qe,"P",{});var de=n(C);Gt=i(de,"Normalizes "),hr=a(de,"CODE",{});var Ga=n(hr);Ht=i(Ga,"image"),Ga.forEach(t),Qt=i(de," using the mean and standard deviation specified by "),ur=a(de,"CODE",{});var Ha=n(ur);Kt=i(Ha,"mean"),Ha.forEach(t),eo=i(de," and "),_r=a(de,"CODE",{});var Qa=n(_r);ro=i(Qa,"std"),Qa.forEach(t),to=i(de,"."),de.forEach(t),oo=c(Qe),br=a(Qe,"P",{});var Ka=n(br);ao=i(Ka,"image = (image - mean) / std"),Ka.forEach(t),Qe.forEach(t),Hr=c(r),F=a(r,"DIV",{class:!0});var mt=n(F);b($e.$$.fragment,mt),no=c(mt),N=a(mt,"P",{});var pe=n(N);so=i(pe,"Pads the "),yr=a(pe,"CODE",{});var en=n(yr);io=i(en,"image"),en.forEach(t),mo=i(pe," with the specified (height, width) "),vr=a(pe,"CODE",{});var rn=n(vr);co=i(rn,"padding"),rn.forEach(t),lo=i(pe," and "),$r=a(pe,"CODE",{});var tn=n($r);po=i(tn,"mode"),tn.forEach(t),go=i(pe,"."),pe.forEach(t),mt.forEach(t),Qr=c(r),R=a(r,"DIV",{class:!0});var ct=n(R);b(we.$$.fragment,ct),fo=c(ct),wr=a(ct,"P",{});var on=n(wr);ho=i(on,"Converts RGB color to unique ID."),on.forEach(t),ct.forEach(t),Kr=c(r),B=a(r,"DIV",{class:!0});var lt=n(B);b(Ie.$$.fragment,lt),uo=c(lt),A=a(lt,"P",{});var Ke=n(A);_o=i(Ke,"Rescales "),Ir=a(Ke,"CODE",{});var an=n(Ir);bo=i(an,"image"),an.forEach(t),yo=i(Ke," by "),xr=a(Ke,"CODE",{});var nn=n(xr);vo=i(nn,"scale"),nn.forEach(t),$o=i(Ke,"."),Ke.forEach(t),lt.forEach(t),et=c(r),X=a(r,"DIV",{class:!0});var dt=n(X);b(xe.$$.fragment,dt),wo=c(dt),J=a(dt,"P",{});var ge=n(J);Io=i(ge,"Resizes "),Mr=a(ge,"CODE",{});var sn=n(Mr);xo=i(sn,"image"),sn.forEach(t),Mo=i(ge," to "),Tr=a(ge,"CODE",{});var mn=n(Tr);To=i(mn,"(height, width)"),mn.forEach(t),Po=i(ge," specified by "),Pr=a(ge,"CODE",{});var cn=n(Pr);Eo=i(cn,"size"),cn.forEach(t),Uo=i(ge," using the PIL library."),ge.forEach(t),dt.forEach(t),rt=c(r),Y=a(r,"DIV",{class:!0});var pt=n(Y);b(Me.$$.fragment,pt),jo=c(pt),Te=a(pt,"P",{});var gt=n(Te);zo=i(gt,"Converts "),Er=a(gt,"CODE",{});var ln=n(Er);Do=i(ln,"image"),ln.forEach(t),Co=i(gt,` to a PIL Image. Optionally rescales it and puts the channel dimension back as the last axis if
needed.`),gt.forEach(t),pt.forEach(t),tt=c(r),O=a(r,"H2",{class:!0});var ft=n(O);K=a(ft,"A",{id:!0,class:!0,href:!0});var dn=n(K);Ur=a(dn,"SPAN",{});var pn=n(Ur);b(Pe.$$.fragment,pn),pn.forEach(t),dn.forEach(t),No=c(ft),jr=a(ft,"SPAN",{});var gn=n(jr);Jo=i(gn,"ImageProcessingMixin"),gn.forEach(t),ft.forEach(t),ot=c(r),u=a(r,"DIV",{class:!0});var x=n(u);b(Ee.$$.fragment,x),ko=c(x),zr=a(x,"P",{});var fn=n(zr);Zo=i(fn,`This is an image processor mixin used to provide saving/loading functionality for sequential and image feature
extractors.`),fn.forEach(t),Wo=c(x),ee=a(x,"DIV",{class:!0});var ht=n(ee);b(Ue.$$.fragment,ht),Lo=c(ht),je=a(ht,"P",{});var ut=n(je);qo=i(ut,"Instantiates a type of "),Ae=a(ut,"A",{href:!0});var hn=n(Ae);So=i(hn,"ImageProcessingMixin"),hn.forEach(t),Vo=i(ut," from a Python dictionary of parameters."),ut.forEach(t),ht.forEach(t),Fo=c(x),re=a(x,"DIV",{class:!0});var _t=n(re);b(ze.$$.fragment,_t),Ro=c(_t),De=a(_t,"P",{});var bt=n(De);Bo=i(bt,"Instantiates a image processor of type "),Xe=a(bt,"A",{href:!0});var un=n(Xe);Ao=i(un,"ImageProcessingMixin"),un.forEach(t),Xo=i(bt,` from the path to a JSON
file of parameters.`),bt.forEach(t),_t.forEach(t),Yo=c(x),Z=a(x,"DIV",{class:!0});var er=n(Z);b(Ce.$$.fragment,er),Oo=c(er),Ne=a(er,"P",{});var yt=n(Ne);Go=i(yt,"Instantiate a type of "),Ye=a(yt,"A",{href:!0});var _n=n(Ye);Ho=i(_n,"ImageProcessingMixin"),_n.forEach(t),Qo=i(yt," from an image processor."),yt.forEach(t),Ko=c(er),b(te.$$.fragment,er),er.forEach(t),ea=c(x),oe=a(x,"DIV",{class:!0});var vt=n(oe);b(Je.$$.fragment,vt),ra=c(vt),k=a(vt,"P",{});var fe=n(k);ta=i(fe,"From a "),Dr=a(fe,"CODE",{});var bn=n(Dr);oa=i(bn,"pretrained_model_name_or_path"),bn.forEach(t),aa=i(fe,`, resolve to a dictionary of parameters, to be used for instantiating a
image processor of type `),Cr=a(fe,"CODE",{});var yn=n(Cr);na=i(yn,"~image_processor_utils.ImageProcessingMixin"),yn.forEach(t),sa=i(fe," using "),Nr=a(fe,"CODE",{});var vn=n(Nr);ia=i(vn,"from_dict"),vn.forEach(t),ma=i(fe,"."),fe.forEach(t),vt.forEach(t),ca=c(x),W=a(x,"DIV",{class:!0});var rr=n(W);b(ke.$$.fragment,rr),la=c(rr),Jr=a(rr,"P",{});var $n=n(Jr);da=i($n,"Upload the image processor file to the \u{1F917} Model Hub."),$n.forEach(t),pa=c(rr),b(ae.$$.fragment,rr),rr.forEach(t),ga=c(x),L=a(x,"DIV",{class:!0});var tr=n(L);b(Ze.$$.fragment,tr),fa=c(tr),We=a(tr,"P",{});var $t=n(We);ha=i($t,`Register this class with a given auto class. This should only be used for custom image processors as the ones
in the library are already mapped with `),kr=a($t,"CODE",{});var wn=n(kr);ua=i(wn,"AutoImageProcessor "),wn.forEach(t),_a=i($t,"."),$t.forEach(t),ba=c(tr),b(ne.$$.fragment,tr),tr.forEach(t),ya=c(x),se=a(x,"DIV",{class:!0});var wt=n(se);b(Le.$$.fragment,wt),va=c(wt),G=a(wt,"P",{});var or=n(G);$a=i(or,"Save an image processor object to the directory "),Zr=a(or,"CODE",{});var In=n(Zr);wa=i(In,"save_directory"),In.forEach(t),Ia=i(or,`, so that it can be re-loaded using the
`),Oe=a(or,"A",{href:!0});var xn=n(Oe);xa=i(xn,"from_pretrained()"),xn.forEach(t),Ma=i(or," class method."),or.forEach(t),wt.forEach(t),Ta=c(x),ie=a(x,"DIV",{class:!0});var It=n(ie);b(qe.$$.fragment,It),Pa=c(It),Wr=a(It,"P",{});var Mn=n(Wr);Ea=i(Mn,"Serializes this instance to a Python dictionary."),Mn.forEach(t),It.forEach(t),Ua=c(x),me=a(x,"DIV",{class:!0});var xt=n(me);b(Se.$$.fragment,xt),ja=c(xt),Lr=a(xt,"P",{});var Tn=n(Lr);za=i(Tn,"Save this instance to a JSON file."),Tn.forEach(t),xt.forEach(t),Da=c(x),ce=a(x,"DIV",{class:!0});var Mt=n(ce);b(Ve.$$.fragment,Mt),Ca=c(Mt),qr=a(Mt,"P",{});var Pn=n(qr);Na=i(Pn,"Serializes this instance to a JSON string."),Pn.forEach(t),Mt.forEach(t),x.forEach(t),this.h()},h(){p(f,"name","hf:doc:metadata"),p(f,"content",JSON.stringify(Sn)),p(h,"id","utilities-for-image-processors"),p(h,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),p(h,"href","#utilities-for-image-processors"),p(I,"class","relative group"),p(Q,"id","transformers.image_transforms.center_crop"),p(Q,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),p(Q,"href","#transformers.image_transforms.center_crop"),p(q,"class","relative group"),p(S,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(j,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(V,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(D,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(F,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(R,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(B,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(X,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(Y,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(K,"id","transformers.ImageProcessingMixin"),p(K,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),p(K,"href","#transformers.ImageProcessingMixin"),p(O,"class","relative group"),p(Ae,"href","/docs/transformers/main/en/main_classes/image_processor#transformers.ImageProcessingMixin"),p(ee,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(Xe,"href","/docs/transformers/main/en/main_classes/image_processor#transformers.ImageProcessingMixin"),p(re,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(Ye,"href","/docs/transformers/main/en/main_classes/image_processor#transformers.ImageProcessingMixin"),p(Z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(oe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(W,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(L,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(Oe,"href","/docs/transformers/main/en/main_classes/image_processor#transformers.ImageProcessingMixin.from_pretrained"),p(se,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(ie,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(me,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(ce,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(u,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(r,l){e(document.head,f),g(r,P,l),g(r,I,l),e(I,h),e(h,E),y(d,E,null),e(I,T),e(I,ar),e(ar,Tt),g(r,Fr,l),g(r,Re,l),e(Re,Pt),g(r,Rr,l),g(r,Be,l),e(Be,Et),g(r,Br,l),g(r,q,l),e(q,Q),e(Q,nr),y(he,nr,null),e(q,Ut),e(q,sr),e(sr,jt),g(r,Ar,l),g(r,S,l),y(ue,S,null),e(S,zt),e(S,U),e(U,Dt),e(U,ir),e(ir,Ct),e(U,Nt),e(U,mr),e(mr,Jt),e(U,kt),e(U,cr),e(cr,Zt),e(U,Wt),g(r,Xr,l),g(r,j,l),y(_e,j,null),e(j,Lt),e(j,lr),e(lr,qt),e(j,St),e(j,dr),e(dr,Vt),g(r,Yr,l),g(r,z,l),y(be,z,null),e(z,Ft),e(z,pr),e(pr,Rt),e(z,Bt),e(z,gr),e(gr,At),g(r,Or,l),g(r,V,l),y(ye,V,null),e(V,Xt),e(V,fr),e(fr,Yt),g(r,Gr,l),g(r,D,l),y(ve,D,null),e(D,Ot),e(D,C),e(C,Gt),e(C,hr),e(hr,Ht),e(C,Qt),e(C,ur),e(ur,Kt),e(C,eo),e(C,_r),e(_r,ro),e(C,to),e(D,oo),e(D,br),e(br,ao),g(r,Hr,l),g(r,F,l),y($e,F,null),e(F,no),e(F,N),e(N,so),e(N,yr),e(yr,io),e(N,mo),e(N,vr),e(vr,co),e(N,lo),e(N,$r),e($r,po),e(N,go),g(r,Qr,l),g(r,R,l),y(we,R,null),e(R,fo),e(R,wr),e(wr,ho),g(r,Kr,l),g(r,B,l),y(Ie,B,null),e(B,uo),e(B,A),e(A,_o),e(A,Ir),e(Ir,bo),e(A,yo),e(A,xr),e(xr,vo),e(A,$o),g(r,et,l),g(r,X,l),y(xe,X,null),e(X,wo),e(X,J),e(J,Io),e(J,Mr),e(Mr,xo),e(J,Mo),e(J,Tr),e(Tr,To),e(J,Po),e(J,Pr),e(Pr,Eo),e(J,Uo),g(r,rt,l),g(r,Y,l),y(Me,Y,null),e(Y,jo),e(Y,Te),e(Te,zo),e(Te,Er),e(Er,Do),e(Te,Co),g(r,tt,l),g(r,O,l),e(O,K),e(K,Ur),y(Pe,Ur,null),e(O,No),e(O,jr),e(jr,Jo),g(r,ot,l),g(r,u,l),y(Ee,u,null),e(u,ko),e(u,zr),e(zr,Zo),e(u,Wo),e(u,ee),y(Ue,ee,null),e(ee,Lo),e(ee,je),e(je,qo),e(je,Ae),e(Ae,So),e(je,Vo),e(u,Fo),e(u,re),y(ze,re,null),e(re,Ro),e(re,De),e(De,Bo),e(De,Xe),e(Xe,Ao),e(De,Xo),e(u,Yo),e(u,Z),y(Ce,Z,null),e(Z,Oo),e(Z,Ne),e(Ne,Go),e(Ne,Ye),e(Ye,Ho),e(Ne,Qo),e(Z,Ko),y(te,Z,null),e(u,ea),e(u,oe),y(Je,oe,null),e(oe,ra),e(oe,k),e(k,ta),e(k,Dr),e(Dr,oa),e(k,aa),e(k,Cr),e(Cr,na),e(k,sa),e(k,Nr),e(Nr,ia),e(k,ma),e(u,ca),e(u,W),y(ke,W,null),e(W,la),e(W,Jr),e(Jr,da),e(W,pa),y(ae,W,null),e(u,ga),e(u,L),y(Ze,L,null),e(L,fa),e(L,We),e(We,ha),e(We,kr),e(kr,ua),e(We,_a),e(L,ba),y(ne,L,null),e(u,ya),e(u,se),y(Le,se,null),e(se,va),e(se,G),e(G,$a),e(G,Zr),e(Zr,wa),e(G,Ia),e(G,Oe),e(Oe,xa),e(G,Ma),e(u,Ta),e(u,ie),y(qe,ie,null),e(ie,Pa),e(ie,Wr),e(Wr,Ea),e(u,Ua),e(u,me),y(Se,me,null),e(me,ja),e(me,Lr),e(Lr,za),e(u,Da),e(u,ce),y(Ve,ce,null),e(ce,Ca),e(ce,qr),e(qr,Na),at=!0},p(r,[l]){const Fe={};l&2&&(Fe.$$scope={dirty:l,ctx:r}),te.$set(Fe);const Sr={};l&2&&(Sr.$$scope={dirty:l,ctx:r}),ae.$set(Sr);const Vr={};l&2&&(Vr.$$scope={dirty:l,ctx:r}),ne.$set(Vr)},i(r){at||(v(d.$$.fragment,r),v(he.$$.fragment,r),v(ue.$$.fragment,r),v(_e.$$.fragment,r),v(be.$$.fragment,r),v(ye.$$.fragment,r),v(ve.$$.fragment,r),v($e.$$.fragment,r),v(we.$$.fragment,r),v(Ie.$$.fragment,r),v(xe.$$.fragment,r),v(Me.$$.fragment,r),v(Pe.$$.fragment,r),v(Ee.$$.fragment,r),v(Ue.$$.fragment,r),v(ze.$$.fragment,r),v(Ce.$$.fragment,r),v(te.$$.fragment,r),v(Je.$$.fragment,r),v(ke.$$.fragment,r),v(ae.$$.fragment,r),v(Ze.$$.fragment,r),v(ne.$$.fragment,r),v(Le.$$.fragment,r),v(qe.$$.fragment,r),v(Se.$$.fragment,r),v(Ve.$$.fragment,r),at=!0)},o(r){$(d.$$.fragment,r),$(he.$$.fragment,r),$(ue.$$.fragment,r),$(_e.$$.fragment,r),$(be.$$.fragment,r),$(ye.$$.fragment,r),$(ve.$$.fragment,r),$($e.$$.fragment,r),$(we.$$.fragment,r),$(Ie.$$.fragment,r),$(xe.$$.fragment,r),$(Me.$$.fragment,r),$(Pe.$$.fragment,r),$(Ee.$$.fragment,r),$(Ue.$$.fragment,r),$(ze.$$.fragment,r),$(Ce.$$.fragment,r),$(te.$$.fragment,r),$(Je.$$.fragment,r),$(ke.$$.fragment,r),$(ae.$$.fragment,r),$(Ze.$$.fragment,r),$(ne.$$.fragment,r),$(Le.$$.fragment,r),$(qe.$$.fragment,r),$(Se.$$.fragment,r),$(Ve.$$.fragment,r),at=!1},d(r){t(f),r&&t(P),r&&t(I),w(d),r&&t(Fr),r&&t(Re),r&&t(Rr),r&&t(Be),r&&t(Br),r&&t(q),w(he),r&&t(Ar),r&&t(S),w(ue),r&&t(Xr),r&&t(j),w(_e),r&&t(Yr),r&&t(z),w(be),r&&t(Or),r&&t(V),w(ye),r&&t(Gr),r&&t(D),w(ve),r&&t(Hr),r&&t(F),w($e),r&&t(Qr),r&&t(R),w(we),r&&t(Kr),r&&t(B),w(Ie),r&&t(et),r&&t(X),w(xe),r&&t(rt),r&&t(Y),w(Me),r&&t(tt),r&&t(O),w(Pe),r&&t(ot),r&&t(u),w(Ee),w(Ue),w(ze),w(Ce),w(te),w(Je),w(ke),w(ae),w(Ze),w(ne),w(Le),w(qe),w(Se),w(Ve)}}}const Sn={local:"utilities-for-image-processors",sections:[{local:"transformers.image_transforms.center_crop",title:"Image Transformations"},{local:"transformers.ImageProcessingMixin",title:"ImageProcessingMixin"}],title:"Utilities for Image Processors"};function Vn(H){return Jn(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class On extends zn{constructor(f){super();Dn(this,f,Vn,qn,Cn,{})}}export{On as default,Sn as metadata};
