import{s as To,o as Co,n as Vr}from"../chunks/scheduler.9bc65507.js";import{S as Po,i as jo,g as o,s as a,u as h,A as Uo,h as n,f as r,c as s,j as g,v as u,y as d,k as c,o as t,a as m,w as _,d as v,t as b,x as y}from"../chunks/index.78c82d43.js";import{T as zo}from"../chunks/Tip.87d55b76.js";import{D as w}from"../chunks/Docstring.4e7352e2.js";import{C as Mo}from"../chunks/CodeBlock.73e038be.js";import{I as Er}from"../chunks/IconCopyLink.bedaa44d.js";import{E as Io}from"../chunks/ExampleCodeBlock.872b014d.js";function No(S){let p,T="Examples:",I,$,M;return $=new Mo({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>}`,wrap:!1}}),{c(){p=o("p"),p.textContent=T,I=a(),h($.$$.fragment)},l(l){p=n(l,"P",{"data-svelte-h":!0}),d(p)!=="svelte-kvfsh7"&&(p.textContent=T),I=s(l),u($.$$.fragment,l)},m(l,C){m(l,p,C),m(l,I,C),_($,l,C),M=!0},p:Vr,i(l){M||(v($.$$.fragment,l),M=!0)},o(l){b($.$$.fragment,l),M=!1},d(l){l&&(r(p),r(I)),y($,l)}}}function ko(S){let p,T="Examples:",I,$,M;return $=new Mo({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>)`,wrap:!1}}),{c(){p=o("p"),p.textContent=T,I=a(),h($.$$.fragment)},l(l){p=n(l,"P",{"data-svelte-h":!0}),d(p)!=="svelte-kvfsh7"&&(p.textContent=T),I=s(l),u($.$$.fragment,l)},m(l,C){m(l,p,C),m(l,I,C),_($,l,C),M=!0},p:Vr,i(l){M||(v($.$$.fragment,l),M=!0)},o(l){b($.$$.fragment,l),M=!1},d(l){l&&(r(p),r(I)),y($,l)}}}function Jo(S){let p,T="This API is experimental and may have some slight breaking changes in the next releases.";return{c(){p=o("p"),p.textContent=T},l(I){p=n(I,"P",{"data-svelte-h":!0}),d(p)!=="svelte-15rpg4"&&(p.textContent=T)},m(I,$){m(I,p,$)},p:Vr,d(I){I&&r(p)}}}function Lo(S){let p,T,I,$,M,l,C,oe,Qt,ze,Hr="Utilities for Image Processors",vt,ne,Fr=`This page lists all the utility functions used by the image processors, mainly the functional
transformations used to process the images.`,bt,ae,Sr="Most of those are only useful if you are studying the code of the image processors in the library.",yt,L,B,gt,se,Ot,Ne,Br="Image Transformations",xt,D,ie,Kt,ke,Rr=`Crops the <code>image</code> to the specified <code>size</code> 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 <code>size</code>).`,$t,P,me,er,Je,Xr="Converts bounding boxes from center format to corners format.",tr,Le,Ar=`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)`,wt,j,le,rr,De,Yr="Converts bounding boxes from corners format to center format.",or,Ze,Gr=`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)`,It,Z,ce,nr,We,Qr="Converts unique ID to RGB color.",Mt,U,de,ar,qe,Or="Normalizes <code>image</code> using the mean and standard deviation specified by <code>mean</code> and <code>std</code>.",sr,Ee,Kr="image = (image - mean) / std",Tt,W,pe,ir,Ve,eo="Pads the <code>image</code> with the specified (height, width) <code>padding</code> and <code>mode</code>.",Ct,q,ge,mr,He,to="Converts RGB color to unique ID.",Pt,E,fe,lr,Fe,ro="Rescales <code>image</code> by <code>scale</code>.",jt,V,he,cr,Se,oo="Resizes <code>image</code> to <code>(height, width)</code> specified by <code>size</code> using the PIL library.",Ut,H,ue,dr,Be,no=`Converts <code>image</code> to a PIL Image. Optionally rescales it and puts the channel dimension back as the last axis if
needed.`,zt,F,R,ft,_e,pr,Re,ao="ImageProcessingMixin",Nt,f,ve,gr,Xe,so=`This is an image processor mixin used to provide saving/loading functionality for sequential and image feature
extractors.`,fr,z,be,hr,Ae,io="Convert a single or a list of urls into the corresponding <code>PIL.Image</code> objects.",ur,Ye,mo=`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.`,_r,X,ye,vr,Ge,lo='Instantiates a type of <a href="/docs/transformers/v4.34.0/en/main_classes/image_processor#transformers.ImageProcessingMixin">ImageProcessingMixin</a> from a Python dictionary of parameters.',br,A,xe,yr,Qe,co=`Instantiates a image processor of type <a href="/docs/transformers/v4.34.0/en/main_classes/image_processor#transformers.ImageProcessingMixin">ImageProcessingMixin</a> from the path to a JSON
file of parameters.`,xr,N,$e,$r,Oe,po='Instantiate a type of <a href="/docs/transformers/v4.34.0/en/main_classes/image_processor#transformers.ImageProcessingMixin">ImageProcessingMixin</a> from an image processor.',wr,Y,Ir,G,we,Mr,Ke,go=`From a <code>pretrained_model_name_or_path</code>, resolve to a dictionary of parameters, to be used for instantiating a
image processor of type <code>~image_processor_utils.ImageProcessingMixin</code> using <code>from_dict</code>.`,Tr,k,Ie,Cr,et,fo="Upload the image processor file to the 🤗 Model Hub.",Pr,Q,jr,J,Me,Ur,tt,ho=`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 <code>AutoImageProcessor </code>.`,zr,O,Nr,K,Te,kr,rt,uo=`Save an image processor object to the directory <code>save_directory</code>, so that it can be re-loaded using the
<a href="/docs/transformers/v4.34.0/en/main_classes/image_processor#transformers.ImageProcessingMixin.from_pretrained">from_pretrained()</a> class method.`,Jr,ee,Ce,Lr,ot,_o="Serializes this instance to a Python dictionary.",Dr,te,Pe,Zr,nt,vo="Save this instance to a JSON file.",Wr,re,je,qr,at,bo="Serializes this instance to a JSON string.",kt,ht,Jt;return oe=new Er({}),se=new Er({}),ie=new w({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/v4.34.0/src/transformers/image_transforms.py#L402",returnDescription:`
<p>The cropped image.</p>
`,returnType:`
<p><code>np.ndarray</code></p>
`}}),me=new w({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/v4.34.0/src/transformers/image_transforms.py#L532"}}),le=new w({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/v4.34.0/src/transformers/image_transforms.py#L592"}}),ce=new w({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/v4.34.0/src/transformers/image_transforms.py#L626"}}),de=new w({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/v4.34.0/src/transformers/image_transforms.py#L347"}}),pe=new w({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/v4.34.0/src/transformers/image_transforms.py#L656",returnDescription:`
<p>The padded image.</p>
`,returnType:`
<p><code>np.ndarray</code></p>
`}}),ge=new w({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/v4.34.0/src/transformers/image_transforms.py#L615"}}),fe=new w({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/v4.34.0/src/transformers/image_transforms.py#L92",returnDescription:`
<p>The rescaled image.</p>
`,returnType:`
<p><code>np.ndarray</code></p>
`}}),he=new w({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/v4.34.0/src/transformers/image_transforms.py#L276",returnDescription:`
<p>The resized image.</p>
`,returnType:`
<p><code>np.ndarray</code></p>
`}}),ue=new w({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/v4.34.0/src/transformers/image_transforms.py#L157",returnDescription:`
<p>The converted image.</p>
`,returnType:`
<p><code>PIL.Image.Image</code></p>
`}}),_e=new Er({}),ve=new w({props:{name:"class transformers.ImageProcessingMixin",anchor:"transformers.ImageProcessingMixin",parameters:[{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/image_processing_utils.py#L68"}}),be=new w({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/v4.34.0/src/transformers/image_processing_utils.py#L517"}}),ye=new w({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/v4.34.0/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/v4.34.0/src/transformers/image_processing_utils.py#L380",returnDescription:`
<p>The image processor object instantiated from those
parameters.</p>
`,returnType:`
<p><a
  href="/docs/transformers/v4.34.0/en/main_classes/image_processor#transformers.ImageProcessingMixin"
>ImageProcessingMixin</a></p>
`}}),xe=new w({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/v4.34.0/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/v4.34.0/en/main_classes/image_processor#transformers.ImageProcessingMixin"
>ImageProcessingMixin</a></p>
`}}),$e=new w({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/v4.34.0/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/v4.34.0/src/transformers/image_processing_utils.py#L92",returnDescription:`
<p>A image processor of type <a
  href="/docs/transformers/v4.34.0/en/main_classes/image_processor#transformers.ImageProcessingMixin"
>ImageProcessingMixin</a>.</p>
`}}),Y=new Io({props:{anchor:"transformers.ImageProcessingMixin.from_pretrained.example",$$slots:{default:[No]},$$scope:{ctx:S}}}),we=new w({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/v4.34.0/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>
`}}),Ie=new w({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/v4.34.0/src/transformers/utils/hub.py#L786"}}),Q=new Io({props:{anchor:"transformers.ImageProcessingMixin.push_to_hub.example",$$slots:{default:[ko]},$$scope:{ctx:S}}}),Me=new w({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/v4.34.0/src/transformers/image_processing_utils.py#L491"}}),O=new zo({props:{warning:!0,$$slots:{default:[Jo]},$$scope:{ctx:S}}}),Te=new w({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/v4.34.0/en/main_classes/processors#transformers.ProcessorMixin.push_to_hub">push_to_hub()</a> method.`,name:"kwargs"}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/image_processing_utils.py#L206"}}),Ce=new w({props:{name:"to_dict",anchor:"transformers.ImageProcessingMixin.to_dict",parameters:[],source:"https://github.com/huggingface/transformers/blob/v4.34.0/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>
`}}),Pe=new w({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/v4.34.0/src/transformers/image_processing_utils.py#L477"}}),je=new w({props:{name:"to_json_string",anchor:"transformers.ImageProcessingMixin.to_json_string",parameters:[],source:"https://github.com/huggingface/transformers/blob/v4.34.0/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(){p=o("meta"),T=a(),I=o("p"),$=a(),M=o("h1"),l=o("a"),C=o("span"),h(oe.$$.fragment),Qt=a(),ze=o("span"),ze.textContent=Hr,vt=a(),ne=o("p"),ne.textContent=Fr,bt=a(),ae=o("p"),ae.textContent=Sr,yt=a(),L=o("h2"),B=o("a"),gt=o("span"),h(se.$$.fragment),Ot=a(),Ne=o("span"),Ne.textContent=Br,xt=a(),D=o("div"),h(ie.$$.fragment),Kt=a(),ke=o("p"),ke.innerHTML=Rr,$t=a(),P=o("div"),h(me.$$.fragment),er=a(),Je=o("p"),Je.textContent=Xr,tr=a(),Le=o("p"),Le.textContent=Ar,wt=a(),j=o("div"),h(le.$$.fragment),rr=a(),De=o("p"),De.textContent=Yr,or=a(),Ze=o("p"),Ze.textContent=Gr,It=a(),Z=o("div"),h(ce.$$.fragment),nr=a(),We=o("p"),We.textContent=Qr,Mt=a(),U=o("div"),h(de.$$.fragment),ar=a(),qe=o("p"),qe.innerHTML=Or,sr=a(),Ee=o("p"),Ee.textContent=Kr,Tt=a(),W=o("div"),h(pe.$$.fragment),ir=a(),Ve=o("p"),Ve.innerHTML=eo,Ct=a(),q=o("div"),h(ge.$$.fragment),mr=a(),He=o("p"),He.textContent=to,Pt=a(),E=o("div"),h(fe.$$.fragment),lr=a(),Fe=o("p"),Fe.innerHTML=ro,jt=a(),V=o("div"),h(he.$$.fragment),cr=a(),Se=o("p"),Se.innerHTML=oo,Ut=a(),H=o("div"),h(ue.$$.fragment),dr=a(),Be=o("p"),Be.innerHTML=no,zt=a(),F=o("h2"),R=o("a"),ft=o("span"),h(_e.$$.fragment),pr=a(),Re=o("span"),Re.textContent=ao,Nt=a(),f=o("div"),h(ve.$$.fragment),gr=a(),Xe=o("p"),Xe.textContent=so,fr=a(),z=o("div"),h(be.$$.fragment),hr=a(),Ae=o("p"),Ae.innerHTML=io,ur=a(),Ye=o("p"),Ye.textContent=mo,_r=a(),X=o("div"),h(ye.$$.fragment),vr=a(),Ge=o("p"),Ge.innerHTML=lo,br=a(),A=o("div"),h(xe.$$.fragment),yr=a(),Qe=o("p"),Qe.innerHTML=co,xr=a(),N=o("div"),h($e.$$.fragment),$r=a(),Oe=o("p"),Oe.innerHTML=po,wr=a(),h(Y.$$.fragment),Ir=a(),G=o("div"),h(we.$$.fragment),Mr=a(),Ke=o("p"),Ke.innerHTML=go,Tr=a(),k=o("div"),h(Ie.$$.fragment),Cr=a(),et=o("p"),et.textContent=fo,Pr=a(),h(Q.$$.fragment),jr=a(),J=o("div"),h(Me.$$.fragment),Ur=a(),tt=o("p"),tt.innerHTML=ho,zr=a(),h(O.$$.fragment),Nr=a(),K=o("div"),h(Te.$$.fragment),kr=a(),rt=o("p"),rt.innerHTML=uo,Jr=a(),ee=o("div"),h(Ce.$$.fragment),Lr=a(),ot=o("p"),ot.textContent=_o,Dr=a(),te=o("div"),h(Pe.$$.fragment),Zr=a(),nt=o("p"),nt.textContent=vo,Wr=a(),re=o("div"),h(je.$$.fragment),qr=a(),at=o("p"),at.textContent=bo,kt=a(),ht=o("p"),this.h()},l(e){const i=Uo("svelte-1phssyn",document.head);p=n(i,"META",{name:!0,content:!0}),i.forEach(r),T=s(e),I=n(e,"P",{}),g(I).forEach(r),$=s(e),M=n(e,"H1",{class:!0});var Ue=g(M);l=n(Ue,"A",{id:!0,class:!0,href:!0});var ut=g(l);C=n(ut,"SPAN",{});var _t=g(C);u(oe.$$.fragment,_t),_t.forEach(r),ut.forEach(r),Qt=s(Ue),ze=n(Ue,"SPAN",{"data-svelte-h":!0}),d(ze)!=="svelte-199g9qg"&&(ze.textContent=Hr),Ue.forEach(r),vt=s(e),ne=n(e,"P",{"data-svelte-h":!0}),d(ne)!=="svelte-nip4ii"&&(ne.textContent=Fr),bt=s(e),ae=n(e,"P",{"data-svelte-h":!0}),d(ae)!=="svelte-60lkqv"&&(ae.textContent=Sr),yt=s(e),L=n(e,"H2",{class:!0});var Lt=g(L);B=n(Lt,"A",{id:!0,class:!0,href:!0});var yo=g(B);gt=n(yo,"SPAN",{});var xo=g(gt);u(se.$$.fragment,xo),xo.forEach(r),yo.forEach(r),Ot=s(Lt),Ne=n(Lt,"SPAN",{"data-svelte-h":!0}),d(Ne)!=="svelte-2azhnc"&&(Ne.textContent=Br),Lt.forEach(r),xt=s(e),D=n(e,"DIV",{class:!0});var Dt=g(D);u(ie.$$.fragment,Dt),Kt=s(Dt),ke=n(Dt,"P",{"data-svelte-h":!0}),d(ke)!=="svelte-2qw57k"&&(ke.innerHTML=Rr),Dt.forEach(r),$t=s(e),P=n(e,"DIV",{class:!0});var st=g(P);u(me.$$.fragment,st),er=s(st),Je=n(st,"P",{"data-svelte-h":!0}),d(Je)!=="svelte-kjzox5"&&(Je.textContent=Xr),tr=s(st),Le=n(st,"P",{"data-svelte-h":!0}),d(Le)!=="svelte-fnusyy"&&(Le.textContent=Ar),st.forEach(r),wt=s(e),j=n(e,"DIV",{class:!0});var it=g(j);u(le.$$.fragment,it),rr=s(it),De=n(it,"P",{"data-svelte-h":!0}),d(De)!=="svelte-m5ejz9"&&(De.textContent=Yr),or=s(it),Ze=n(it,"P",{"data-svelte-h":!0}),d(Ze)!=="svelte-ezkns7"&&(Ze.textContent=Gr),it.forEach(r),It=s(e),Z=n(e,"DIV",{class:!0});var Zt=g(Z);u(ce.$$.fragment,Zt),nr=s(Zt),We=n(Zt,"P",{"data-svelte-h":!0}),d(We)!=="svelte-19ts50v"&&(We.textContent=Qr),Zt.forEach(r),Mt=s(e),U=n(e,"DIV",{class:!0});var mt=g(U);u(de.$$.fragment,mt),ar=s(mt),qe=n(mt,"P",{"data-svelte-h":!0}),d(qe)!=="svelte-cgeryj"&&(qe.innerHTML=Or),sr=s(mt),Ee=n(mt,"P",{"data-svelte-h":!0}),d(Ee)!=="svelte-1vabayc"&&(Ee.textContent=Kr),mt.forEach(r),Tt=s(e),W=n(e,"DIV",{class:!0});var Wt=g(W);u(pe.$$.fragment,Wt),ir=s(Wt),Ve=n(Wt,"P",{"data-svelte-h":!0}),d(Ve)!=="svelte-1v3jx5j"&&(Ve.innerHTML=eo),Wt.forEach(r),Ct=s(e),q=n(e,"DIV",{class:!0});var qt=g(q);u(ge.$$.fragment,qt),mr=s(qt),He=n(qt,"P",{"data-svelte-h":!0}),d(He)!=="svelte-78trhr"&&(He.textContent=to),qt.forEach(r),Pt=s(e),E=n(e,"DIV",{class:!0});var Et=g(E);u(fe.$$.fragment,Et),lr=s(Et),Fe=n(Et,"P",{"data-svelte-h":!0}),d(Fe)!=="svelte-skn2h6"&&(Fe.innerHTML=ro),Et.forEach(r),jt=s(e),V=n(e,"DIV",{class:!0});var Vt=g(V);u(he.$$.fragment,Vt),cr=s(Vt),Se=n(Vt,"P",{"data-svelte-h":!0}),d(Se)!=="svelte-avham3"&&(Se.innerHTML=oo),Vt.forEach(r),Ut=s(e),H=n(e,"DIV",{class:!0});var Ht=g(H);u(ue.$$.fragment,Ht),dr=s(Ht),Be=n(Ht,"P",{"data-svelte-h":!0}),d(Be)!=="svelte-e557ju"&&(Be.innerHTML=no),Ht.forEach(r),zt=s(e),F=n(e,"H2",{class:!0});var Ft=g(F);R=n(Ft,"A",{id:!0,class:!0,href:!0});var $o=g(R);ft=n($o,"SPAN",{});var wo=g(ft);u(_e.$$.fragment,wo),wo.forEach(r),$o.forEach(r),pr=s(Ft),Re=n(Ft,"SPAN",{"data-svelte-h":!0}),d(Re)!=="svelte-17ev80o"&&(Re.textContent=ao),Ft.forEach(r),Nt=s(e),f=n(e,"DIV",{class:!0});var x=g(f);u(ve.$$.fragment,x),gr=s(x),Xe=n(x,"P",{"data-svelte-h":!0}),d(Xe)!=="svelte-16ht4m3"&&(Xe.textContent=so),fr=s(x),z=n(x,"DIV",{class:!0});var lt=g(z);u(be.$$.fragment,lt),hr=s(lt),Ae=n(lt,"P",{"data-svelte-h":!0}),d(Ae)!=="svelte-2773v6"&&(Ae.innerHTML=io),ur=s(lt),Ye=n(lt,"P",{"data-svelte-h":!0}),d(Ye)!=="svelte-1q8uymn"&&(Ye.textContent=mo),lt.forEach(r),_r=s(x),X=n(x,"DIV",{class:!0});var St=g(X);u(ye.$$.fragment,St),vr=s(St),Ge=n(St,"P",{"data-svelte-h":!0}),d(Ge)!=="svelte-1ko7ho4"&&(Ge.innerHTML=lo),St.forEach(r),br=s(x),A=n(x,"DIV",{class:!0});var Bt=g(A);u(xe.$$.fragment,Bt),yr=s(Bt),Qe=n(Bt,"P",{"data-svelte-h":!0}),d(Qe)!=="svelte-bnt2tw"&&(Qe.innerHTML=co),Bt.forEach(r),xr=s(x),N=n(x,"DIV",{class:!0});var ct=g(N);u($e.$$.fragment,ct),$r=s(ct),Oe=n(ct,"P",{"data-svelte-h":!0}),d(Oe)!=="svelte-1amjolx"&&(Oe.innerHTML=po),wr=s(ct),u(Y.$$.fragment,ct),ct.forEach(r),Ir=s(x),G=n(x,"DIV",{class:!0});var Rt=g(G);u(we.$$.fragment,Rt),Mr=s(Rt),Ke=n(Rt,"P",{"data-svelte-h":!0}),d(Ke)!=="svelte-d2g2ab"&&(Ke.innerHTML=go),Rt.forEach(r),Tr=s(x),k=n(x,"DIV",{class:!0});var dt=g(k);u(Ie.$$.fragment,dt),Cr=s(dt),et=n(dt,"P",{"data-svelte-h":!0}),d(et)!=="svelte-1qlyz3u"&&(et.textContent=fo),Pr=s(dt),u(Q.$$.fragment,dt),dt.forEach(r),jr=s(x),J=n(x,"DIV",{class:!0});var pt=g(J);u(Me.$$.fragment,pt),Ur=s(pt),tt=n(pt,"P",{"data-svelte-h":!0}),d(tt)!=="svelte-ofyqve"&&(tt.innerHTML=ho),zr=s(pt),u(O.$$.fragment,pt),pt.forEach(r),Nr=s(x),K=n(x,"DIV",{class:!0});var Xt=g(K);u(Te.$$.fragment,Xt),kr=s(Xt),rt=n(Xt,"P",{"data-svelte-h":!0}),d(rt)!=="svelte-1u8y5vo"&&(rt.innerHTML=uo),Xt.forEach(r),Jr=s(x),ee=n(x,"DIV",{class:!0});var At=g(ee);u(Ce.$$.fragment,At),Lr=s(At),ot=n(At,"P",{"data-svelte-h":!0}),d(ot)!=="svelte-1ww3wqq"&&(ot.textContent=_o),At.forEach(r),Dr=s(x),te=n(x,"DIV",{class:!0});var Yt=g(te);u(Pe.$$.fragment,Yt),Zr=s(Yt),nt=n(Yt,"P",{"data-svelte-h":!0}),d(nt)!=="svelte-1g70y32"&&(nt.textContent=vo),Yt.forEach(r),Wr=s(x),re=n(x,"DIV",{class:!0});var Gt=g(re);u(je.$$.fragment,Gt),qr=s(Gt),at=n(Gt,"P",{"data-svelte-h":!0}),d(at)!=="svelte-5ayq1f"&&(at.textContent=bo),Gt.forEach(r),x.forEach(r),kt=s(e),ht=n(e,"P",{}),g(ht).forEach(r),this.h()},h(){c(p,"name","hf:doc:metadata"),c(p,"content",JSON.stringify(Do)),c(l,"id","utilities-for-image-processors"),c(l,"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"),c(l,"href","#utilities-for-image-processors"),c(M,"class","relative group"),c(B,"id","transformers.image_transforms.center_crop"),c(B,"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"),c(B,"href","#transformers.image_transforms.center_crop"),c(L,"class","relative group"),c(D,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(P,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(j,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(U,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(W,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(E,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(V,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(H,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(R,"id","transformers.ImageProcessingMixin"),c(R,"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"),c(R,"href","#transformers.ImageProcessingMixin"),c(F,"class","relative group"),c(z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(X,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(A,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(N,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(G,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(k,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(J,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(K,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(ee,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(te,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(re,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(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(e,i){t(document.head,p),m(e,T,i),m(e,I,i),m(e,$,i),m(e,M,i),t(M,l),t(l,C),_(oe,C,null),t(M,Qt),t(M,ze),m(e,vt,i),m(e,ne,i),m(e,bt,i),m(e,ae,i),m(e,yt,i),m(e,L,i),t(L,B),t(B,gt),_(se,gt,null),t(L,Ot),t(L,Ne),m(e,xt,i),m(e,D,i),_(ie,D,null),t(D,Kt),t(D,ke),m(e,$t,i),m(e,P,i),_(me,P,null),t(P,er),t(P,Je),t(P,tr),t(P,Le),m(e,wt,i),m(e,j,i),_(le,j,null),t(j,rr),t(j,De),t(j,or),t(j,Ze),m(e,It,i),m(e,Z,i),_(ce,Z,null),t(Z,nr),t(Z,We),m(e,Mt,i),m(e,U,i),_(de,U,null),t(U,ar),t(U,qe),t(U,sr),t(U,Ee),m(e,Tt,i),m(e,W,i),_(pe,W,null),t(W,ir),t(W,Ve),m(e,Ct,i),m(e,q,i),_(ge,q,null),t(q,mr),t(q,He),m(e,Pt,i),m(e,E,i),_(fe,E,null),t(E,lr),t(E,Fe),m(e,jt,i),m(e,V,i),_(he,V,null),t(V,cr),t(V,Se),m(e,Ut,i),m(e,H,i),_(ue,H,null),t(H,dr),t(H,Be),m(e,zt,i),m(e,F,i),t(F,R),t(R,ft),_(_e,ft,null),t(F,pr),t(F,Re),m(e,Nt,i),m(e,f,i),_(ve,f,null),t(f,gr),t(f,Xe),t(f,fr),t(f,z),_(be,z,null),t(z,hr),t(z,Ae),t(z,ur),t(z,Ye),t(f,_r),t(f,X),_(ye,X,null),t(X,vr),t(X,Ge),t(f,br),t(f,A),_(xe,A,null),t(A,yr),t(A,Qe),t(f,xr),t(f,N),_($e,N,null),t(N,$r),t(N,Oe),t(N,wr),_(Y,N,null),t(f,Ir),t(f,G),_(we,G,null),t(G,Mr),t(G,Ke),t(f,Tr),t(f,k),_(Ie,k,null),t(k,Cr),t(k,et),t(k,Pr),_(Q,k,null),t(f,jr),t(f,J),_(Me,J,null),t(J,Ur),t(J,tt),t(J,zr),_(O,J,null),t(f,Nr),t(f,K),_(Te,K,null),t(K,kr),t(K,rt),t(f,Jr),t(f,ee),_(Ce,ee,null),t(ee,Lr),t(ee,ot),t(f,Dr),t(f,te),_(Pe,te,null),t(te,Zr),t(te,nt),t(f,Wr),t(f,re),_(je,re,null),t(re,qr),t(re,at),m(e,kt,i),m(e,ht,i),Jt=!0},p(e,[i]){const Ue={};i&2&&(Ue.$$scope={dirty:i,ctx:e}),Y.$set(Ue);const ut={};i&2&&(ut.$$scope={dirty:i,ctx:e}),Q.$set(ut);const _t={};i&2&&(_t.$$scope={dirty:i,ctx:e}),O.$set(_t)},i(e){Jt||(v(oe.$$.fragment,e),v(se.$$.fragment,e),v(ie.$$.fragment,e),v(me.$$.fragment,e),v(le.$$.fragment,e),v(ce.$$.fragment,e),v(de.$$.fragment,e),v(pe.$$.fragment,e),v(ge.$$.fragment,e),v(fe.$$.fragment,e),v(he.$$.fragment,e),v(ue.$$.fragment,e),v(_e.$$.fragment,e),v(ve.$$.fragment,e),v(be.$$.fragment,e),v(ye.$$.fragment,e),v(xe.$$.fragment,e),v($e.$$.fragment,e),v(Y.$$.fragment,e),v(we.$$.fragment,e),v(Ie.$$.fragment,e),v(Q.$$.fragment,e),v(Me.$$.fragment,e),v(O.$$.fragment,e),v(Te.$$.fragment,e),v(Ce.$$.fragment,e),v(Pe.$$.fragment,e),v(je.$$.fragment,e),Jt=!0)},o(e){b(oe.$$.fragment,e),b(se.$$.fragment,e),b(ie.$$.fragment,e),b(me.$$.fragment,e),b(le.$$.fragment,e),b(ce.$$.fragment,e),b(de.$$.fragment,e),b(pe.$$.fragment,e),b(ge.$$.fragment,e),b(fe.$$.fragment,e),b(he.$$.fragment,e),b(ue.$$.fragment,e),b(_e.$$.fragment,e),b(ve.$$.fragment,e),b(be.$$.fragment,e),b(ye.$$.fragment,e),b(xe.$$.fragment,e),b($e.$$.fragment,e),b(Y.$$.fragment,e),b(we.$$.fragment,e),b(Ie.$$.fragment,e),b(Q.$$.fragment,e),b(Me.$$.fragment,e),b(O.$$.fragment,e),b(Te.$$.fragment,e),b(Ce.$$.fragment,e),b(Pe.$$.fragment,e),b(je.$$.fragment,e),Jt=!1},d(e){e&&(r(T),r(I),r($),r(M),r(vt),r(ne),r(bt),r(ae),r(yt),r(L),r(xt),r(D),r($t),r(P),r(wt),r(j),r(It),r(Z),r(Mt),r(U),r(Tt),r(W),r(Ct),r(q),r(Pt),r(E),r(jt),r(V),r(Ut),r(H),r(zt),r(F),r(Nt),r(f),r(kt),r(ht)),r(p),y(oe),y(se),y(ie),y(me),y(le),y(ce),y(de),y(pe),y(ge),y(fe),y(he),y(ue),y(_e),y(ve),y(be),y(ye),y(xe),y($e),y(Y),y(we),y(Ie),y(Q),y(Me),y(O),y(Te),y(Ce),y(Pe),y(je)}}}const Do={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 Zo(S){return Co(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Bo extends Po{constructor(p){super(),jo(this,p,Zo,Lo,To,{})}}export{Bo as component};
