import{S as Xa,i as Ya,s as Oa,e as o,k as m,w as u,t as s,M as Ga,c as n,d as t,m as c,a,x as _,h as i,b as d,G as e,g,y as b,q as y,o as v,B as $,v as Ha,L as Ra}from"../../chunks/vendor-hf-doc-builder.js";import{T as Qa}from"../../chunks/Tip-hf-doc-builder.js";import{D as M}from"../../chunks/Docstring-hf-doc-builder.js";import{C as Aa}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as Gn}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as Ba}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function Ka(Q){let h,P,x,I,E;return I=new Aa({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(){h=o("p"),P=s("Examples:"),x=m(),u(I.$$.fragment)},l(p){h=n(p,"P",{});var T=a(h);P=i(T,"Examples:"),T.forEach(t),x=c(p),_(I.$$.fragment,p)},m(p,T){g(p,h,T),e(h,P),g(p,x,T),b(I,p,T),E=!0},p:Ra,i(p){E||(y(I.$$.fragment,p),E=!0)},o(p){v(I.$$.fragment,p),E=!1},d(p){p&&t(h),p&&t(x),$(I,p)}}}function es(Q){let h,P,x,I,E;return I=new Aa({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(){h=o("p"),P=s("Examples:"),x=m(),u(I.$$.fragment)},l(p){h=n(p,"P",{});var T=a(h);P=i(T,"Examples:"),T.forEach(t),x=c(p),_(I.$$.fragment,p)},m(p,T){g(p,h,T),e(h,P),g(p,x,T),b(I,p,T),E=!0},p:Ra,i(p){E||(y(I.$$.fragment,p),E=!0)},o(p){v(I.$$.fragment,p),E=!1},d(p){p&&t(h),p&&t(x),$(I,p)}}}function rs(Q){let h,P;return{c(){h=o("p"),P=s("This API is experimental and may have some slight breaking changes in the next releases.")},l(x){h=n(x,"P",{});var I=a(h);P=i(I,"This API is experimental and may have some slight breaking changes in the next releases."),I.forEach(t)},m(x,I){g(x,h,I),e(h,P)},d(x){x&&t(h)}}}function ts(Q){let h,P,x,I,E,p,T,mr,Ct,Or,Xe,Nt,Gr,Ye,Jt,Hr,S,K,cr,ue,kt,lr,Zt,Qr,V,_e,Wt,j,Lt,dr,qt,St,pr,Vt,Ft,gr,Bt,Rt,Kr,U,be,At,fr,Xt,Yt,hr,Ot,et,z,ye,Gt,ur,Ht,Qt,_r,Kt,rt,F,ve,eo,br,ro,tt,D,$e,to,C,oo,yr,no,ao,vr,so,io,$r,mo,co,lo,Ir,po,ot,B,Ie,go,N,fo,wr,ho,uo,xr,_o,bo,Mr,yo,vo,nt,R,we,$o,Tr,Io,at,A,xe,wo,X,xo,Pr,Mo,To,Er,Po,Eo,st,Y,Me,jo,J,Uo,jr,zo,Do,Ur,Co,No,zr,Jo,ko,it,O,Te,Zo,Pe,Wo,Dr,Lo,qo,mt,G,ee,Cr,Ee,So,Nr,Vo,ct,f,je,Fo,Jr,Bo,Ro,Z,Ue,Ao,ze,Xo,kr,Yo,Oo,Go,Zr,Ho,Qo,re,De,Ko,Ce,en,Oe,rn,tn,on,te,Ne,nn,Je,an,Ge,sn,mn,cn,W,ke,ln,Ze,dn,He,pn,gn,fn,oe,hn,ne,We,un,k,_n,Wr,bn,yn,Lr,vn,$n,qr,In,wn,xn,L,Le,Mn,Sr,Tn,Pn,ae,En,q,qe,jn,Se,Un,Vr,zn,Dn,Cn,se,Nn,ie,Ve,Jn,H,kn,Fr,Zn,Wn,Qe,Ln,qn,Sn,me,Fe,Vn,Br,Fn,Bn,ce,Be,Rn,Rr,An,Xn,le,Re,Yn,Ar,On,lt;return p=new Gn({}),ue=new Gn({}),_e=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>
`}}),be=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"}}),ye=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"}}),ve=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"}}),$e=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"}}),Ie=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"}}),xe=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>
`}}),Me=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>
`}}),Te=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>
`}}),Ee=new Gn({}),je=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#L68"}}),Ue=new M({props:{name:"fetch_images",anchor:"transformers.ImageProcessingMixin.fetch_images",parameters:[{name:"image_url_or_urls",val:": typing.Union[str, typing.List[str]]"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/image_processing_utils.py#L517"}}),De=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#L380",returnDescription:`
<p>The image processor object instantiated from those
parameters.</p>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/internal/image_processing_utils#transformers.ImageProcessingMixin"
>ImageProcessingMixin</a></p>
`}}),Ne=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#L437",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/internal/image_processing_utils#transformers.ImageProcessingMixin"
>ImageProcessingMixin</a></p>
`}}),ke=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[str, bool, 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/internal/image_processing_utils#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#L92",returnDescription:`
<p>A image processor of type <a
  href="/docs/transformers/main/en/internal/image_processing_utils#transformers.ImageProcessingMixin"
>ImageProcessingMixin</a>.</p>
`}}),oe=new Ba({props:{anchor:"transformers.ImageProcessingMixin.from_pretrained.example",$$slots:{default:[Ka]},$$scope:{ctx:Q}}}),We=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#L266",returnDescription:`
<p>The dictionary(ies) that will be used to instantiate the image processor object.</p>
`,returnType:`
<p><code>Tuple[Dict, Dict]</code></p>
`}}),Le=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:"revision",val:": str = None"},{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"},{anchor:"transformers.ImageProcessingMixin.push_to_hub.revision",description:`<strong>revision</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Branch to push the uploaded files to.`,name:"revision"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/utils/hub.py#L786"}}),ae=new Ba({props:{anchor:"transformers.ImageProcessingMixin.push_to_hub.example",$$slots:{default:[es]},$$scope:{ctx:Q}}}),qe=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#L491"}}),se=new Qa({props:{warning:!0,$$slots:{default:[rs]},$$scope:{ctx:Q}}}),Ve=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/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.push_to_hub">push_to_hub()</a> method.`,name:"kwargs"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/image_processing_utils.py#L206"}}),Fe=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#L425",returnDescription:`
<p>Dictionary of all the attributes that make up this image processor instance.</p>
`,returnType:`
<p><code>Dict[str, Any]</code></p>
`}}),Be=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#L477"}}),Re=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#L456",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(){h=o("meta"),P=m(),x=o("h1"),I=o("a"),E=o("span"),u(p.$$.fragment),T=m(),mr=o("span"),Ct=s("Utilities for Image Processors"),Or=m(),Xe=o("p"),Nt=s(`This page lists all the utility functions used by the image processors, mainly the functional
transformations used to process the images.`),Gr=m(),Ye=o("p"),Jt=s("Most of those are only useful if you are studying the code of the image processors in the library."),Hr=m(),S=o("h2"),K=o("a"),cr=o("span"),u(ue.$$.fragment),kt=m(),lr=o("span"),Zt=s("Image Transformations"),Qr=m(),V=o("div"),u(_e.$$.fragment),Wt=m(),j=o("p"),Lt=s("Crops the "),dr=o("code"),qt=s("image"),St=s(" to the specified "),pr=o("code"),Vt=s("size"),Ft=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 `),gr=o("code"),Bt=s("size"),Rt=s(")."),Kr=m(),U=o("div"),u(be.$$.fragment),At=m(),fr=o("p"),Xt=s("Converts bounding boxes from center format to corners format."),Yt=m(),hr=o("p"),Ot=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)`),et=m(),z=o("div"),u(ye.$$.fragment),Gt=m(),ur=o("p"),Ht=s("Converts bounding boxes from corners format to center format."),Qt=m(),_r=o("p"),Kt=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)`),rt=m(),F=o("div"),u(ve.$$.fragment),eo=m(),br=o("p"),ro=s("Converts unique ID to RGB color."),tt=m(),D=o("div"),u($e.$$.fragment),to=m(),C=o("p"),oo=s("Normalizes "),yr=o("code"),no=s("image"),ao=s(" using the mean and standard deviation specified by "),vr=o("code"),so=s("mean"),io=s(" and "),$r=o("code"),mo=s("std"),co=s("."),lo=m(),Ir=o("p"),po=s("image = (image - mean) / std"),ot=m(),B=o("div"),u(Ie.$$.fragment),go=m(),N=o("p"),fo=s("Pads the "),wr=o("code"),ho=s("image"),uo=s(" with the specified (height, width) "),xr=o("code"),_o=s("padding"),bo=s(" and "),Mr=o("code"),yo=s("mode"),vo=s("."),nt=m(),R=o("div"),u(we.$$.fragment),$o=m(),Tr=o("p"),Io=s("Converts RGB color to unique ID."),at=m(),A=o("div"),u(xe.$$.fragment),wo=m(),X=o("p"),xo=s("Rescales "),Pr=o("code"),Mo=s("image"),To=s(" by "),Er=o("code"),Po=s("scale"),Eo=s("."),st=m(),Y=o("div"),u(Me.$$.fragment),jo=m(),J=o("p"),Uo=s("Resizes "),jr=o("code"),zo=s("image"),Do=s(" to "),Ur=o("code"),Co=s("(height, width)"),No=s(" specified by "),zr=o("code"),Jo=s("size"),ko=s(" using the PIL library."),it=m(),O=o("div"),u(Te.$$.fragment),Zo=m(),Pe=o("p"),Wo=s("Converts "),Dr=o("code"),Lo=s("image"),qo=s(` to a PIL Image. Optionally rescales it and puts the channel dimension back as the last axis if
needed.`),mt=m(),G=o("h2"),ee=o("a"),Cr=o("span"),u(Ee.$$.fragment),So=m(),Nr=o("span"),Vo=s("ImageProcessingMixin"),ct=m(),f=o("div"),u(je.$$.fragment),Fo=m(),Jr=o("p"),Bo=s(`This is an image processor mixin used to provide saving/loading functionality for sequential and image feature
extractors.`),Ro=m(),Z=o("div"),u(Ue.$$.fragment),Ao=m(),ze=o("p"),Xo=s("Convert a single or a list of urls into the corresponding "),kr=o("code"),Yo=s("PIL.Image"),Oo=s(" objects."),Go=m(),Zr=o("p"),Ho=s(`If a single url is passed, the return value will be a single object. If a list is passed a list of objects is
returned.`),Qo=m(),re=o("div"),u(De.$$.fragment),Ko=m(),Ce=o("p"),en=s("Instantiates a type of "),Oe=o("a"),rn=s("ImageProcessingMixin"),tn=s(" from a Python dictionary of parameters."),on=m(),te=o("div"),u(Ne.$$.fragment),nn=m(),Je=o("p"),an=s("Instantiates a image processor of type "),Ge=o("a"),sn=s("ImageProcessingMixin"),mn=s(` from the path to a JSON
file of parameters.`),cn=m(),W=o("div"),u(ke.$$.fragment),ln=m(),Ze=o("p"),dn=s("Instantiate a type of "),He=o("a"),pn=s("ImageProcessingMixin"),gn=s(" from an image processor."),fn=m(),u(oe.$$.fragment),hn=m(),ne=o("div"),u(We.$$.fragment),un=m(),k=o("p"),_n=s("From a "),Wr=o("code"),bn=s("pretrained_model_name_or_path"),yn=s(`, resolve to a dictionary of parameters, to be used for instantiating a
image processor of type `),Lr=o("code"),vn=s("~image_processor_utils.ImageProcessingMixin"),$n=s(" using "),qr=o("code"),In=s("from_dict"),wn=s("."),xn=m(),L=o("div"),u(Le.$$.fragment),Mn=m(),Sr=o("p"),Tn=s("Upload the image processor file to the \u{1F917} Model Hub."),Pn=m(),u(ae.$$.fragment),En=m(),q=o("div"),u(qe.$$.fragment),jn=m(),Se=o("p"),Un=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 `),Vr=o("code"),zn=s("AutoImageProcessor "),Dn=s("."),Cn=m(),u(se.$$.fragment),Nn=m(),ie=o("div"),u(Ve.$$.fragment),Jn=m(),H=o("p"),kn=s("Save an image processor object to the directory "),Fr=o("code"),Zn=s("save_directory"),Wn=s(`, so that it can be re-loaded using the
`),Qe=o("a"),Ln=s("from_pretrained()"),qn=s(" class method."),Sn=m(),me=o("div"),u(Fe.$$.fragment),Vn=m(),Br=o("p"),Fn=s("Serializes this instance to a Python dictionary."),Bn=m(),ce=o("div"),u(Be.$$.fragment),Rn=m(),Rr=o("p"),An=s("Save this instance to a JSON file."),Xn=m(),le=o("div"),u(Re.$$.fragment),Yn=m(),Ar=o("p"),On=s("Serializes this instance to a JSON string."),this.h()},l(r){const l=Ga('[data-svelte="svelte-1phssyn"]',document.head);h=n(l,"META",{name:!0,content:!0}),l.forEach(t),P=c(r),x=n(r,"H1",{class:!0});var Ae=a(x);I=n(Ae,"A",{id:!0,class:!0,href:!0});var Xr=a(I);E=n(Xr,"SPAN",{});var Yr=a(E);_(p.$$.fragment,Yr),Yr.forEach(t),Xr.forEach(t),T=c(Ae),mr=n(Ae,"SPAN",{});var Hn=a(mr);Ct=i(Hn,"Utilities for Image Processors"),Hn.forEach(t),Ae.forEach(t),Or=c(r),Xe=n(r,"P",{});var Qn=a(Xe);Nt=i(Qn,`This page lists all the utility functions used by the image processors, mainly the functional
transformations used to process the images.`),Qn.forEach(t),Gr=c(r),Ye=n(r,"P",{});var Kn=a(Ye);Jt=i(Kn,"Most of those are only useful if you are studying the code of the image processors in the library."),Kn.forEach(t),Hr=c(r),S=n(r,"H2",{class:!0});var dt=a(S);K=n(dt,"A",{id:!0,class:!0,href:!0});var ea=a(K);cr=n(ea,"SPAN",{});var ra=a(cr);_(ue.$$.fragment,ra),ra.forEach(t),ea.forEach(t),kt=c(dt),lr=n(dt,"SPAN",{});var ta=a(lr);Zt=i(ta,"Image Transformations"),ta.forEach(t),dt.forEach(t),Qr=c(r),V=n(r,"DIV",{class:!0});var pt=a(V);_(_e.$$.fragment,pt),Wt=c(pt),j=n(pt,"P",{});var de=a(j);Lt=i(de,"Crops the "),dr=n(de,"CODE",{});var oa=a(dr);qt=i(oa,"image"),oa.forEach(t),St=i(de," to the specified "),pr=n(de,"CODE",{});var na=a(pr);Vt=i(na,"size"),na.forEach(t),Ft=i(de,` 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 `),gr=n(de,"CODE",{});var aa=a(gr);Bt=i(aa,"size"),aa.forEach(t),Rt=i(de,")."),de.forEach(t),pt.forEach(t),Kr=c(r),U=n(r,"DIV",{class:!0});var Ke=a(U);_(be.$$.fragment,Ke),At=c(Ke),fr=n(Ke,"P",{});var sa=a(fr);Xt=i(sa,"Converts bounding boxes from center format to corners format."),sa.forEach(t),Yt=c(Ke),hr=n(Ke,"P",{});var ia=a(hr);Ot=i(ia,`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)`),ia.forEach(t),Ke.forEach(t),et=c(r),z=n(r,"DIV",{class:!0});var er=a(z);_(ye.$$.fragment,er),Gt=c(er),ur=n(er,"P",{});var ma=a(ur);Ht=i(ma,"Converts bounding boxes from corners format to center format."),ma.forEach(t),Qt=c(er),_r=n(er,"P",{});var ca=a(_r);Kt=i(ca,`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)`),ca.forEach(t),er.forEach(t),rt=c(r),F=n(r,"DIV",{class:!0});var gt=a(F);_(ve.$$.fragment,gt),eo=c(gt),br=n(gt,"P",{});var la=a(br);ro=i(la,"Converts unique ID to RGB color."),la.forEach(t),gt.forEach(t),tt=c(r),D=n(r,"DIV",{class:!0});var rr=a(D);_($e.$$.fragment,rr),to=c(rr),C=n(rr,"P",{});var pe=a(C);oo=i(pe,"Normalizes "),yr=n(pe,"CODE",{});var da=a(yr);no=i(da,"image"),da.forEach(t),ao=i(pe," using the mean and standard deviation specified by "),vr=n(pe,"CODE",{});var pa=a(vr);so=i(pa,"mean"),pa.forEach(t),io=i(pe," and "),$r=n(pe,"CODE",{});var ga=a($r);mo=i(ga,"std"),ga.forEach(t),co=i(pe,"."),pe.forEach(t),lo=c(rr),Ir=n(rr,"P",{});var fa=a(Ir);po=i(fa,"image = (image - mean) / std"),fa.forEach(t),rr.forEach(t),ot=c(r),B=n(r,"DIV",{class:!0});var ft=a(B);_(Ie.$$.fragment,ft),go=c(ft),N=n(ft,"P",{});var ge=a(N);fo=i(ge,"Pads the "),wr=n(ge,"CODE",{});var ha=a(wr);ho=i(ha,"image"),ha.forEach(t),uo=i(ge," with the specified (height, width) "),xr=n(ge,"CODE",{});var ua=a(xr);_o=i(ua,"padding"),ua.forEach(t),bo=i(ge," and "),Mr=n(ge,"CODE",{});var _a=a(Mr);yo=i(_a,"mode"),_a.forEach(t),vo=i(ge,"."),ge.forEach(t),ft.forEach(t),nt=c(r),R=n(r,"DIV",{class:!0});var ht=a(R);_(we.$$.fragment,ht),$o=c(ht),Tr=n(ht,"P",{});var ba=a(Tr);Io=i(ba,"Converts RGB color to unique ID."),ba.forEach(t),ht.forEach(t),at=c(r),A=n(r,"DIV",{class:!0});var ut=a(A);_(xe.$$.fragment,ut),wo=c(ut),X=n(ut,"P",{});var tr=a(X);xo=i(tr,"Rescales "),Pr=n(tr,"CODE",{});var ya=a(Pr);Mo=i(ya,"image"),ya.forEach(t),To=i(tr," by "),Er=n(tr,"CODE",{});var va=a(Er);Po=i(va,"scale"),va.forEach(t),Eo=i(tr,"."),tr.forEach(t),ut.forEach(t),st=c(r),Y=n(r,"DIV",{class:!0});var _t=a(Y);_(Me.$$.fragment,_t),jo=c(_t),J=n(_t,"P",{});var fe=a(J);Uo=i(fe,"Resizes "),jr=n(fe,"CODE",{});var $a=a(jr);zo=i($a,"image"),$a.forEach(t),Do=i(fe," to "),Ur=n(fe,"CODE",{});var Ia=a(Ur);Co=i(Ia,"(height, width)"),Ia.forEach(t),No=i(fe," specified by "),zr=n(fe,"CODE",{});var wa=a(zr);Jo=i(wa,"size"),wa.forEach(t),ko=i(fe," using the PIL library."),fe.forEach(t),_t.forEach(t),it=c(r),O=n(r,"DIV",{class:!0});var bt=a(O);_(Te.$$.fragment,bt),Zo=c(bt),Pe=n(bt,"P",{});var yt=a(Pe);Wo=i(yt,"Converts "),Dr=n(yt,"CODE",{});var xa=a(Dr);Lo=i(xa,"image"),xa.forEach(t),qo=i(yt,` to a PIL Image. Optionally rescales it and puts the channel dimension back as the last axis if
needed.`),yt.forEach(t),bt.forEach(t),mt=c(r),G=n(r,"H2",{class:!0});var vt=a(G);ee=n(vt,"A",{id:!0,class:!0,href:!0});var Ma=a(ee);Cr=n(Ma,"SPAN",{});var Ta=a(Cr);_(Ee.$$.fragment,Ta),Ta.forEach(t),Ma.forEach(t),So=c(vt),Nr=n(vt,"SPAN",{});var Pa=a(Nr);Vo=i(Pa,"ImageProcessingMixin"),Pa.forEach(t),vt.forEach(t),ct=c(r),f=n(r,"DIV",{class:!0});var w=a(f);_(je.$$.fragment,w),Fo=c(w),Jr=n(w,"P",{});var Ea=a(Jr);Bo=i(Ea,`This is an image processor mixin used to provide saving/loading functionality for sequential and image feature
extractors.`),Ea.forEach(t),Ro=c(w),Z=n(w,"DIV",{class:!0});var or=a(Z);_(Ue.$$.fragment,or),Ao=c(or),ze=n(or,"P",{});var $t=a(ze);Xo=i($t,"Convert a single or a list of urls into the corresponding "),kr=n($t,"CODE",{});var ja=a(kr);Yo=i(ja,"PIL.Image"),ja.forEach(t),Oo=i($t," objects."),$t.forEach(t),Go=c(or),Zr=n(or,"P",{});var Ua=a(Zr);Ho=i(Ua,`If a single url is passed, the return value will be a single object. If a list is passed a list of objects is
returned.`),Ua.forEach(t),or.forEach(t),Qo=c(w),re=n(w,"DIV",{class:!0});var It=a(re);_(De.$$.fragment,It),Ko=c(It),Ce=n(It,"P",{});var wt=a(Ce);en=i(wt,"Instantiates a type of "),Oe=n(wt,"A",{href:!0});var za=a(Oe);rn=i(za,"ImageProcessingMixin"),za.forEach(t),tn=i(wt," from a Python dictionary of parameters."),wt.forEach(t),It.forEach(t),on=c(w),te=n(w,"DIV",{class:!0});var xt=a(te);_(Ne.$$.fragment,xt),nn=c(xt),Je=n(xt,"P",{});var Mt=a(Je);an=i(Mt,"Instantiates a image processor of type "),Ge=n(Mt,"A",{href:!0});var Da=a(Ge);sn=i(Da,"ImageProcessingMixin"),Da.forEach(t),mn=i(Mt,` from the path to a JSON
file of parameters.`),Mt.forEach(t),xt.forEach(t),cn=c(w),W=n(w,"DIV",{class:!0});var nr=a(W);_(ke.$$.fragment,nr),ln=c(nr),Ze=n(nr,"P",{});var Tt=a(Ze);dn=i(Tt,"Instantiate a type of "),He=n(Tt,"A",{href:!0});var Ca=a(He);pn=i(Ca,"ImageProcessingMixin"),Ca.forEach(t),gn=i(Tt," from an image processor."),Tt.forEach(t),fn=c(nr),_(oe.$$.fragment,nr),nr.forEach(t),hn=c(w),ne=n(w,"DIV",{class:!0});var Pt=a(ne);_(We.$$.fragment,Pt),un=c(Pt),k=n(Pt,"P",{});var he=a(k);_n=i(he,"From a "),Wr=n(he,"CODE",{});var Na=a(Wr);bn=i(Na,"pretrained_model_name_or_path"),Na.forEach(t),yn=i(he,`, resolve to a dictionary of parameters, to be used for instantiating a
image processor of type `),Lr=n(he,"CODE",{});var Ja=a(Lr);vn=i(Ja,"~image_processor_utils.ImageProcessingMixin"),Ja.forEach(t),$n=i(he," using "),qr=n(he,"CODE",{});var ka=a(qr);In=i(ka,"from_dict"),ka.forEach(t),wn=i(he,"."),he.forEach(t),Pt.forEach(t),xn=c(w),L=n(w,"DIV",{class:!0});var ar=a(L);_(Le.$$.fragment,ar),Mn=c(ar),Sr=n(ar,"P",{});var Za=a(Sr);Tn=i(Za,"Upload the image processor file to the \u{1F917} Model Hub."),Za.forEach(t),Pn=c(ar),_(ae.$$.fragment,ar),ar.forEach(t),En=c(w),q=n(w,"DIV",{class:!0});var sr=a(q);_(qe.$$.fragment,sr),jn=c(sr),Se=n(sr,"P",{});var Et=a(Se);Un=i(Et,`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 `),Vr=n(Et,"CODE",{});var Wa=a(Vr);zn=i(Wa,"AutoImageProcessor "),Wa.forEach(t),Dn=i(Et,"."),Et.forEach(t),Cn=c(sr),_(se.$$.fragment,sr),sr.forEach(t),Nn=c(w),ie=n(w,"DIV",{class:!0});var jt=a(ie);_(Ve.$$.fragment,jt),Jn=c(jt),H=n(jt,"P",{});var ir=a(H);kn=i(ir,"Save an image processor object to the directory "),Fr=n(ir,"CODE",{});var La=a(Fr);Zn=i(La,"save_directory"),La.forEach(t),Wn=i(ir,`, so that it can be re-loaded using the
`),Qe=n(ir,"A",{href:!0});var qa=a(Qe);Ln=i(qa,"from_pretrained()"),qa.forEach(t),qn=i(ir," class method."),ir.forEach(t),jt.forEach(t),Sn=c(w),me=n(w,"DIV",{class:!0});var Ut=a(me);_(Fe.$$.fragment,Ut),Vn=c(Ut),Br=n(Ut,"P",{});var Sa=a(Br);Fn=i(Sa,"Serializes this instance to a Python dictionary."),Sa.forEach(t),Ut.forEach(t),Bn=c(w),ce=n(w,"DIV",{class:!0});var zt=a(ce);_(Be.$$.fragment,zt),Rn=c(zt),Rr=n(zt,"P",{});var Va=a(Rr);An=i(Va,"Save this instance to a JSON file."),Va.forEach(t),zt.forEach(t),Xn=c(w),le=n(w,"DIV",{class:!0});var Dt=a(le);_(Re.$$.fragment,Dt),Yn=c(Dt),Ar=n(Dt,"P",{});var Fa=a(Ar);On=i(Fa,"Serializes this instance to a JSON string."),Fa.forEach(t),Dt.forEach(t),w.forEach(t),this.h()},h(){d(h,"name","hf:doc:metadata"),d(h,"content",JSON.stringify(os)),d(I,"id","utilities-for-image-processors"),d(I,"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"),d(I,"href","#utilities-for-image-processors"),d(x,"class","relative group"),d(K,"id","transformers.image_transforms.center_crop"),d(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"),d(K,"href","#transformers.image_transforms.center_crop"),d(S,"class","relative group"),d(V,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(U,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(F,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(D,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(B,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(R,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(A,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Y,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(O,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(ee,"id","transformers.ImageProcessingMixin"),d(ee,"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"),d(ee,"href","#transformers.ImageProcessingMixin"),d(G,"class","relative group"),d(Z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Oe,"href","/docs/transformers/main/en/internal/image_processing_utils#transformers.ImageProcessingMixin"),d(re,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Ge,"href","/docs/transformers/main/en/internal/image_processing_utils#transformers.ImageProcessingMixin"),d(te,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(He,"href","/docs/transformers/main/en/internal/image_processing_utils#transformers.ImageProcessingMixin"),d(W,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(ne,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(L,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Qe,"href","/docs/transformers/main/en/internal/image_processing_utils#transformers.ImageProcessingMixin.from_pretrained"),d(ie,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(me,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(ce,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(le,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(f,"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,h),g(r,P,l),g(r,x,l),e(x,I),e(I,E),b(p,E,null),e(x,T),e(x,mr),e(mr,Ct),g(r,Or,l),g(r,Xe,l),e(Xe,Nt),g(r,Gr,l),g(r,Ye,l),e(Ye,Jt),g(r,Hr,l),g(r,S,l),e(S,K),e(K,cr),b(ue,cr,null),e(S,kt),e(S,lr),e(lr,Zt),g(r,Qr,l),g(r,V,l),b(_e,V,null),e(V,Wt),e(V,j),e(j,Lt),e(j,dr),e(dr,qt),e(j,St),e(j,pr),e(pr,Vt),e(j,Ft),e(j,gr),e(gr,Bt),e(j,Rt),g(r,Kr,l),g(r,U,l),b(be,U,null),e(U,At),e(U,fr),e(fr,Xt),e(U,Yt),e(U,hr),e(hr,Ot),g(r,et,l),g(r,z,l),b(ye,z,null),e(z,Gt),e(z,ur),e(ur,Ht),e(z,Qt),e(z,_r),e(_r,Kt),g(r,rt,l),g(r,F,l),b(ve,F,null),e(F,eo),e(F,br),e(br,ro),g(r,tt,l),g(r,D,l),b($e,D,null),e(D,to),e(D,C),e(C,oo),e(C,yr),e(yr,no),e(C,ao),e(C,vr),e(vr,so),e(C,io),e(C,$r),e($r,mo),e(C,co),e(D,lo),e(D,Ir),e(Ir,po),g(r,ot,l),g(r,B,l),b(Ie,B,null),e(B,go),e(B,N),e(N,fo),e(N,wr),e(wr,ho),e(N,uo),e(N,xr),e(xr,_o),e(N,bo),e(N,Mr),e(Mr,yo),e(N,vo),g(r,nt,l),g(r,R,l),b(we,R,null),e(R,$o),e(R,Tr),e(Tr,Io),g(r,at,l),g(r,A,l),b(xe,A,null),e(A,wo),e(A,X),e(X,xo),e(X,Pr),e(Pr,Mo),e(X,To),e(X,Er),e(Er,Po),e(X,Eo),g(r,st,l),g(r,Y,l),b(Me,Y,null),e(Y,jo),e(Y,J),e(J,Uo),e(J,jr),e(jr,zo),e(J,Do),e(J,Ur),e(Ur,Co),e(J,No),e(J,zr),e(zr,Jo),e(J,ko),g(r,it,l),g(r,O,l),b(Te,O,null),e(O,Zo),e(O,Pe),e(Pe,Wo),e(Pe,Dr),e(Dr,Lo),e(Pe,qo),g(r,mt,l),g(r,G,l),e(G,ee),e(ee,Cr),b(Ee,Cr,null),e(G,So),e(G,Nr),e(Nr,Vo),g(r,ct,l),g(r,f,l),b(je,f,null),e(f,Fo),e(f,Jr),e(Jr,Bo),e(f,Ro),e(f,Z),b(Ue,Z,null),e(Z,Ao),e(Z,ze),e(ze,Xo),e(ze,kr),e(kr,Yo),e(ze,Oo),e(Z,Go),e(Z,Zr),e(Zr,Ho),e(f,Qo),e(f,re),b(De,re,null),e(re,Ko),e(re,Ce),e(Ce,en),e(Ce,Oe),e(Oe,rn),e(Ce,tn),e(f,on),e(f,te),b(Ne,te,null),e(te,nn),e(te,Je),e(Je,an),e(Je,Ge),e(Ge,sn),e(Je,mn),e(f,cn),e(f,W),b(ke,W,null),e(W,ln),e(W,Ze),e(Ze,dn),e(Ze,He),e(He,pn),e(Ze,gn),e(W,fn),b(oe,W,null),e(f,hn),e(f,ne),b(We,ne,null),e(ne,un),e(ne,k),e(k,_n),e(k,Wr),e(Wr,bn),e(k,yn),e(k,Lr),e(Lr,vn),e(k,$n),e(k,qr),e(qr,In),e(k,wn),e(f,xn),e(f,L),b(Le,L,null),e(L,Mn),e(L,Sr),e(Sr,Tn),e(L,Pn),b(ae,L,null),e(f,En),e(f,q),b(qe,q,null),e(q,jn),e(q,Se),e(Se,Un),e(Se,Vr),e(Vr,zn),e(Se,Dn),e(q,Cn),b(se,q,null),e(f,Nn),e(f,ie),b(Ve,ie,null),e(ie,Jn),e(ie,H),e(H,kn),e(H,Fr),e(Fr,Zn),e(H,Wn),e(H,Qe),e(Qe,Ln),e(H,qn),e(f,Sn),e(f,me),b(Fe,me,null),e(me,Vn),e(me,Br),e(Br,Fn),e(f,Bn),e(f,ce),b(Be,ce,null),e(ce,Rn),e(ce,Rr),e(Rr,An),e(f,Xn),e(f,le),b(Re,le,null),e(le,Yn),e(le,Ar),e(Ar,On),lt=!0},p(r,[l]){const Ae={};l&2&&(Ae.$$scope={dirty:l,ctx:r}),oe.$set(Ae);const Xr={};l&2&&(Xr.$$scope={dirty:l,ctx:r}),ae.$set(Xr);const Yr={};l&2&&(Yr.$$scope={dirty:l,ctx:r}),se.$set(Yr)},i(r){lt||(y(p.$$.fragment,r),y(ue.$$.fragment,r),y(_e.$$.fragment,r),y(be.$$.fragment,r),y(ye.$$.fragment,r),y(ve.$$.fragment,r),y($e.$$.fragment,r),y(Ie.$$.fragment,r),y(we.$$.fragment,r),y(xe.$$.fragment,r),y(Me.$$.fragment,r),y(Te.$$.fragment,r),y(Ee.$$.fragment,r),y(je.$$.fragment,r),y(Ue.$$.fragment,r),y(De.$$.fragment,r),y(Ne.$$.fragment,r),y(ke.$$.fragment,r),y(oe.$$.fragment,r),y(We.$$.fragment,r),y(Le.$$.fragment,r),y(ae.$$.fragment,r),y(qe.$$.fragment,r),y(se.$$.fragment,r),y(Ve.$$.fragment,r),y(Fe.$$.fragment,r),y(Be.$$.fragment,r),y(Re.$$.fragment,r),lt=!0)},o(r){v(p.$$.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(Ie.$$.fragment,r),v(we.$$.fragment,r),v(xe.$$.fragment,r),v(Me.$$.fragment,r),v(Te.$$.fragment,r),v(Ee.$$.fragment,r),v(je.$$.fragment,r),v(Ue.$$.fragment,r),v(De.$$.fragment,r),v(Ne.$$.fragment,r),v(ke.$$.fragment,r),v(oe.$$.fragment,r),v(We.$$.fragment,r),v(Le.$$.fragment,r),v(ae.$$.fragment,r),v(qe.$$.fragment,r),v(se.$$.fragment,r),v(Ve.$$.fragment,r),v(Fe.$$.fragment,r),v(Be.$$.fragment,r),v(Re.$$.fragment,r),lt=!1},d(r){t(h),r&&t(P),r&&t(x),$(p),r&&t(Or),r&&t(Xe),r&&t(Gr),r&&t(Ye),r&&t(Hr),r&&t(S),$(ue),r&&t(Qr),r&&t(V),$(_e),r&&t(Kr),r&&t(U),$(be),r&&t(et),r&&t(z),$(ye),r&&t(rt),r&&t(F),$(ve),r&&t(tt),r&&t(D),$($e),r&&t(ot),r&&t(B),$(Ie),r&&t(nt),r&&t(R),$(we),r&&t(at),r&&t(A),$(xe),r&&t(st),r&&t(Y),$(Me),r&&t(it),r&&t(O),$(Te),r&&t(mt),r&&t(G),$(Ee),r&&t(ct),r&&t(f),$(je),$(Ue),$(De),$(Ne),$(ke),$(oe),$(We),$(Le),$(ae),$(qe),$(se),$(Ve),$(Fe),$(Be),$(Re)}}}const os={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 ns(Q){return Ha(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class ds extends Xa{constructor(h){super();Ya(this,h,ns,ts,Oa,{})}}export{ds as default,os as metadata};
