import{S as cs,i as ls,s as ds,e as o,k as l,w as b,t as n,M as ms,c as t,d as s,m as d,a,x as M,h as i,b as c,G as e,g as h,y as w,q as $,o as I,B as x,v as ps,L as hs}from"../../chunks/vendor-hf-doc-builder.js";import{D as te}from"../../chunks/Docstring-hf-doc-builder.js";import{C as gs}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as Ye}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as fs}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function us(Ee){let g,F,_,f,T;return f=new gs({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(){g=o("p"),F=n("Examples:"),_=l(),b(f.$$.fragment)},l(m){g=t(m,"P",{});var P=a(g);F=i(P,"Examples:"),P.forEach(s),_=d(m),M(f.$$.fragment,m)},m(m,P){h(m,g,P),e(g,F),h(m,_,P),w(f,m,P),T=!0},p:hs,i(m){T||($(f.$$.fragment,m),T=!0)},o(m){I(f.$$.fragment,m),T=!1},d(m){m&&s(g),m&&s(_),x(f,m)}}}function _s(Ee){let g,F,_,f,T,m,P,pe,Re,je,ae,Le,Ue,k,W,he,R,De,ge,Ge,ke,v,L,Qe,fe,He,qe,E,D,Oe,G,Ke,ne,er,rr,sr,z,or,C,Q,tr,B,ar,ue,nr,ir,ie,cr,lr,Be,Z,X,_e,H,dr,ve,mr,Ze,u,q,pr,J,hr,ce,gr,fr,ye,ur,_r,vr,be,yr,br,V,O,Mr,Me,wr,$r,A,K,Ir,y,xr,we,Tr,Pr,$e,Er,jr,Ie,Ur,kr,xe,Br,Zr,Je,N,S,Te,ee,Jr,Pe,Nr,Ne,re,se,Fe;return m=new Ye({}),R=new Ye({}),L=new te({props:{name:"class transformers.ImageProcessingMixin",anchor:"transformers.ImageProcessingMixin",parameters:[{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/image_processing_utils.py#L59"}}),D=new te({props:{name:"from_pretrained",anchor:"transformers.ImageProcessingMixin.from_pretrained",parameters:[{name:"pretrained_model_name_or_path",val:": typing.Union[str, os.PathLike]"},{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.30.0/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.use_auth_token",description:`<strong>use_auth_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:"use_auth_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.30.0/src/transformers/image_processing_utils.py#L83",returnDescription:`
<p>A image processor of type <a
  href="/docs/transformers/v4.30.0/en/internal/image_processing_utils#transformers.ImageProcessingMixin"
>ImageProcessingMixin</a>.</p>
`}}),z=new fs({props:{anchor:"transformers.ImageProcessingMixin.from_pretrained.example",$$slots:{default:[us]},$$scope:{ctx:Ee}}}),Q=new te({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).
kwargs &#x2014;
Additional key word arguments passed along to the <a href="/docs/transformers/v4.30.0/en/internal/image_processing_utils#transformers.ImageProcessingMixin.push_to_hub">push_to_hub()</a> method.`,name:"push_to_hub"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/image_processing_utils.py#L169"}}),H=new Ye({}),q=new te({props:{name:"class transformers.BatchFeature",anchor:"transformers.BatchFeature",parameters:[{name:"data",val:": typing.Union[typing.Dict[str, typing.Any], NoneType] = None"},{name:"tensor_type",val:": typing.Union[NoneType, str, transformers.utils.generic.TensorType] = None"}],parametersDescription:[{anchor:"transformers.BatchFeature.data",description:`<strong>data</strong> (<code>dict</code>) &#x2014;
Dictionary of lists/arrays/tensors returned by the <strong>call</strong>/pad methods (&#x2018;input_values&#x2019;, &#x2018;attention_mask&#x2019;,
etc.).`,name:"data"},{anchor:"transformers.BatchFeature.tensor_type",description:`<strong>tensor_type</strong> (<code>Union[None, str, TensorType]</code>, <em>optional</em>) &#x2014;
You can give a tensor_type here to convert the lists of integers in PyTorch/TensorFlow/Numpy Tensors at
initialization.`,name:"tensor_type"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/feature_extraction_utils.py#L60"}}),O=new te({props:{name:"convert_to_tensors",anchor:"transformers.BatchFeature.convert_to_tensors",parameters:[{name:"tensor_type",val:": typing.Union[str, transformers.utils.generic.TensorType, NoneType] = None"}],parametersDescription:[{anchor:"transformers.BatchFeature.convert_to_tensors.tensor_type",description:`<strong>tensor_type</strong> (<code>str</code> or <a href="/docs/transformers/v4.30.0/en/internal/file_utils#transformers.TensorType">TensorType</a>, <em>optional</em>) &#x2014;
The type of tensors to use. If <code>str</code>, should be one of the values of the enum <a href="/docs/transformers/v4.30.0/en/internal/file_utils#transformers.TensorType">TensorType</a>. If
<code>None</code>, no modification is done.`,name:"tensor_type"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/feature_extraction_utils.py#L114"}}),K=new te({props:{name:"to",anchor:"transformers.BatchFeature.to",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.BatchFeature.to.args",description:`<strong>args</strong> (<code>Tuple</code>) &#x2014;
Will be passed to the <code>to(...)</code> function of the tensors.`,name:"args"},{anchor:"transformers.BatchFeature.to.kwargs",description:`<strong>kwargs</strong> (<code>Dict</code>, <em>optional</em>) &#x2014;
Will be passed to the <code>to(...)</code> function of the tensors.`,name:"kwargs"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/feature_extraction_utils.py#L187",returnDescription:`
<p>The same instance after modification.</p>
`,returnType:`
<p><a
  href="/docs/transformers/v4.30.0/en/main_classes/image_processor#transformers.BatchFeature"
>BatchFeature</a></p>
`}}),ee=new Ye({}),se=new te({props:{name:"class transformers.image_processing_utils.BaseImageProcessor",anchor:"transformers.image_processing_utils.BaseImageProcessor",parameters:[{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/image_processing_utils.py#L458"}}),{c(){g=o("meta"),F=l(),_=o("h1"),f=o("a"),T=o("span"),b(m.$$.fragment),P=l(),pe=o("span"),Re=n("Image Processor"),je=l(),ae=o("p"),Le=n("An image processor is in charge of preparing input features for vision models and post processing their outputs. This includes transformations such as resizing, normalization, and conversion to PyTorch, TensorFlow, Flax and Numpy tensors. It may also include model specific post-processing such as converting logits to segmentation masks."),Ue=l(),k=o("h2"),W=o("a"),he=o("span"),b(R.$$.fragment),De=l(),ge=o("span"),Ge=n("ImageProcessingMixin"),ke=l(),v=o("div"),b(L.$$.fragment),Qe=l(),fe=o("p"),He=n(`This is an image processor mixin used to provide saving/loading functionality for sequential and image feature
extractors.`),qe=l(),E=o("div"),b(D.$$.fragment),Oe=l(),G=o("p"),Ke=n("Instantiate a type of "),ne=o("a"),er=n("ImageProcessingMixin"),rr=n(" from an image processor."),sr=l(),b(z.$$.fragment),or=l(),C=o("div"),b(Q.$$.fragment),tr=l(),B=o("p"),ar=n("Save an image processor object to the directory "),ue=o("code"),nr=n("save_directory"),ir=n(`, so that it can be re-loaded using the
`),ie=o("a"),cr=n("from_pretrained()"),lr=n(" class method."),Be=l(),Z=o("h2"),X=o("a"),_e=o("span"),b(H.$$.fragment),dr=l(),ve=o("span"),mr=n("BatchFeature"),Ze=l(),u=o("div"),b(q.$$.fragment),pr=l(),J=o("p"),hr=n("Holds the output of the "),ce=o("a"),gr=n("pad()"),fr=n(" and feature extractor specific "),ye=o("code"),ur=n("__call__"),_r=n(" methods."),vr=l(),be=o("p"),yr=n("This class is derived from a python dictionary and can be used as a dictionary."),br=l(),V=o("div"),b(O.$$.fragment),Mr=l(),Me=o("p"),wr=n("Convert the inner content to tensors."),$r=l(),A=o("div"),b(K.$$.fragment),Ir=l(),y=o("p"),xr=n("Send all values to device by calling "),we=o("code"),Tr=n("v.to(*args, **kwargs)"),Pr=n(` (PyTorch only). This should support casting in
different `),$e=o("code"),Er=n("dtypes"),jr=n(" and sending the "),Ie=o("code"),Ur=n("BatchFeature"),kr=n(" to a different "),xe=o("code"),Br=n("device"),Zr=n("."),Je=l(),N=o("h2"),S=o("a"),Te=o("span"),b(ee.$$.fragment),Jr=l(),Pe=o("span"),Nr=n("BaseImageProcessor"),Ne=l(),re=o("div"),b(se.$$.fragment),this.h()},l(r){const p=ms('[data-svelte="svelte-1phssyn"]',document.head);g=t(p,"META",{name:!0,content:!0}),p.forEach(s),F=d(r),_=t(r,"H1",{class:!0});var oe=a(_);f=t(oe,"A",{id:!0,class:!0,href:!0});var Fr=a(f);T=t(Fr,"SPAN",{});var Wr=a(T);M(m.$$.fragment,Wr),Wr.forEach(s),Fr.forEach(s),P=d(oe),pe=t(oe,"SPAN",{});var zr=a(pe);Re=i(zr,"Image Processor"),zr.forEach(s),oe.forEach(s),je=d(r),ae=t(r,"P",{});var Cr=a(ae);Le=i(Cr,"An image processor is in charge of preparing input features for vision models and post processing their outputs. This includes transformations such as resizing, normalization, and conversion to PyTorch, TensorFlow, Flax and Numpy tensors. It may also include model specific post-processing such as converting logits to segmentation masks."),Cr.forEach(s),Ue=d(r),k=t(r,"H2",{class:!0});var We=a(k);W=t(We,"A",{id:!0,class:!0,href:!0});var Xr=a(W);he=t(Xr,"SPAN",{});var Vr=a(he);M(R.$$.fragment,Vr),Vr.forEach(s),Xr.forEach(s),De=d(We),ge=t(We,"SPAN",{});var Ar=a(ge);Ge=i(Ar,"ImageProcessingMixin"),Ar.forEach(s),We.forEach(s),ke=d(r),v=t(r,"DIV",{class:!0});var Y=a(v);M(L.$$.fragment,Y),Qe=d(Y),fe=t(Y,"P",{});var Sr=a(fe);He=i(Sr,`This is an image processor mixin used to provide saving/loading functionality for sequential and image feature
extractors.`),Sr.forEach(s),qe=d(Y),E=t(Y,"DIV",{class:!0});var le=a(E);M(D.$$.fragment,le),Oe=d(le),G=t(le,"P",{});var ze=a(G);Ke=i(ze,"Instantiate a type of "),ne=t(ze,"A",{href:!0});var Yr=a(ne);er=i(Yr,"ImageProcessingMixin"),Yr.forEach(s),rr=i(ze," from an image processor."),ze.forEach(s),sr=d(le),M(z.$$.fragment,le),le.forEach(s),or=d(Y),C=t(Y,"DIV",{class:!0});var Ce=a(C);M(Q.$$.fragment,Ce),tr=d(Ce),B=t(Ce,"P",{});var de=a(B);ar=i(de,"Save an image processor object to the directory "),ue=t(de,"CODE",{});var Rr=a(ue);nr=i(Rr,"save_directory"),Rr.forEach(s),ir=i(de,`, so that it can be re-loaded using the
`),ie=t(de,"A",{href:!0});var Lr=a(ie);cr=i(Lr,"from_pretrained()"),Lr.forEach(s),lr=i(de," class method."),de.forEach(s),Ce.forEach(s),Y.forEach(s),Be=d(r),Z=t(r,"H2",{class:!0});var Xe=a(Z);X=t(Xe,"A",{id:!0,class:!0,href:!0});var Dr=a(X);_e=t(Dr,"SPAN",{});var Gr=a(_e);M(H.$$.fragment,Gr),Gr.forEach(s),Dr.forEach(s),dr=d(Xe),ve=t(Xe,"SPAN",{});var Qr=a(ve);mr=i(Qr,"BatchFeature"),Qr.forEach(s),Xe.forEach(s),Ze=d(r),u=t(r,"DIV",{class:!0});var j=a(u);M(q.$$.fragment,j),pr=d(j),J=t(j,"P",{});var me=a(J);hr=i(me,"Holds the output of the "),ce=t(me,"A",{href:!0});var Hr=a(ce);gr=i(Hr,"pad()"),Hr.forEach(s),fr=i(me," and feature extractor specific "),ye=t(me,"CODE",{});var qr=a(ye);ur=i(qr,"__call__"),qr.forEach(s),_r=i(me," methods."),me.forEach(s),vr=d(j),be=t(j,"P",{});var Or=a(be);yr=i(Or,"This class is derived from a python dictionary and can be used as a dictionary."),Or.forEach(s),br=d(j),V=t(j,"DIV",{class:!0});var Ve=a(V);M(O.$$.fragment,Ve),Mr=d(Ve),Me=t(Ve,"P",{});var Kr=a(Me);wr=i(Kr,"Convert the inner content to tensors."),Kr.forEach(s),Ve.forEach(s),$r=d(j),A=t(j,"DIV",{class:!0});var Ae=a(A);M(K.$$.fragment,Ae),Ir=d(Ae),y=t(Ae,"P",{});var U=a(y);xr=i(U,"Send all values to device by calling "),we=t(U,"CODE",{});var es=a(we);Tr=i(es,"v.to(*args, **kwargs)"),es.forEach(s),Pr=i(U,` (PyTorch only). This should support casting in
different `),$e=t(U,"CODE",{});var rs=a($e);Er=i(rs,"dtypes"),rs.forEach(s),jr=i(U," and sending the "),Ie=t(U,"CODE",{});var ss=a(Ie);Ur=i(ss,"BatchFeature"),ss.forEach(s),kr=i(U," to a different "),xe=t(U,"CODE",{});var os=a(xe);Br=i(os,"device"),os.forEach(s),Zr=i(U,"."),U.forEach(s),Ae.forEach(s),j.forEach(s),Je=d(r),N=t(r,"H2",{class:!0});var Se=a(N);S=t(Se,"A",{id:!0,class:!0,href:!0});var ts=a(S);Te=t(ts,"SPAN",{});var as=a(Te);M(ee.$$.fragment,as),as.forEach(s),ts.forEach(s),Jr=d(Se),Pe=t(Se,"SPAN",{});var ns=a(Pe);Nr=i(ns,"BaseImageProcessor"),ns.forEach(s),Se.forEach(s),Ne=d(r),re=t(r,"DIV",{class:!0});var is=a(re);M(se.$$.fragment,is),is.forEach(s),this.h()},h(){c(g,"name","hf:doc:metadata"),c(g,"content",JSON.stringify(vs)),c(f,"id","image-processor"),c(f,"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(f,"href","#image-processor"),c(_,"class","relative group"),c(W,"id","transformers.ImageProcessingMixin"),c(W,"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(W,"href","#transformers.ImageProcessingMixin"),c(k,"class","relative group"),c(ne,"href","/docs/transformers/v4.30.0/en/internal/image_processing_utils#transformers.ImageProcessingMixin"),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(ie,"href","/docs/transformers/v4.30.0/en/internal/image_processing_utils#transformers.ImageProcessingMixin.from_pretrained"),c(C,"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(X,"id","transformers.BatchFeature"),c(X,"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(X,"href","#transformers.BatchFeature"),c(Z,"class","relative group"),c(ce,"href","/docs/transformers/v4.30.0/en/main_classes/feature_extractor#transformers.SequenceFeatureExtractor.pad"),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(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(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(S,"id","transformers.image_processing_utils.BaseImageProcessor"),c(S,"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(S,"href","#transformers.image_processing_utils.BaseImageProcessor"),c(N,"class","relative group"),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")},m(r,p){e(document.head,g),h(r,F,p),h(r,_,p),e(_,f),e(f,T),w(m,T,null),e(_,P),e(_,pe),e(pe,Re),h(r,je,p),h(r,ae,p),e(ae,Le),h(r,Ue,p),h(r,k,p),e(k,W),e(W,he),w(R,he,null),e(k,De),e(k,ge),e(ge,Ge),h(r,ke,p),h(r,v,p),w(L,v,null),e(v,Qe),e(v,fe),e(fe,He),e(v,qe),e(v,E),w(D,E,null),e(E,Oe),e(E,G),e(G,Ke),e(G,ne),e(ne,er),e(G,rr),e(E,sr),w(z,E,null),e(v,or),e(v,C),w(Q,C,null),e(C,tr),e(C,B),e(B,ar),e(B,ue),e(ue,nr),e(B,ir),e(B,ie),e(ie,cr),e(B,lr),h(r,Be,p),h(r,Z,p),e(Z,X),e(X,_e),w(H,_e,null),e(Z,dr),e(Z,ve),e(ve,mr),h(r,Ze,p),h(r,u,p),w(q,u,null),e(u,pr),e(u,J),e(J,hr),e(J,ce),e(ce,gr),e(J,fr),e(J,ye),e(ye,ur),e(J,_r),e(u,vr),e(u,be),e(be,yr),e(u,br),e(u,V),w(O,V,null),e(V,Mr),e(V,Me),e(Me,wr),e(u,$r),e(u,A),w(K,A,null),e(A,Ir),e(A,y),e(y,xr),e(y,we),e(we,Tr),e(y,Pr),e(y,$e),e($e,Er),e(y,jr),e(y,Ie),e(Ie,Ur),e(y,kr),e(y,xe),e(xe,Br),e(y,Zr),h(r,Je,p),h(r,N,p),e(N,S),e(S,Te),w(ee,Te,null),e(N,Jr),e(N,Pe),e(Pe,Nr),h(r,Ne,p),h(r,re,p),w(se,re,null),Fe=!0},p(r,[p]){const oe={};p&2&&(oe.$$scope={dirty:p,ctx:r}),z.$set(oe)},i(r){Fe||($(m.$$.fragment,r),$(R.$$.fragment,r),$(L.$$.fragment,r),$(D.$$.fragment,r),$(z.$$.fragment,r),$(Q.$$.fragment,r),$(H.$$.fragment,r),$(q.$$.fragment,r),$(O.$$.fragment,r),$(K.$$.fragment,r),$(ee.$$.fragment,r),$(se.$$.fragment,r),Fe=!0)},o(r){I(m.$$.fragment,r),I(R.$$.fragment,r),I(L.$$.fragment,r),I(D.$$.fragment,r),I(z.$$.fragment,r),I(Q.$$.fragment,r),I(H.$$.fragment,r),I(q.$$.fragment,r),I(O.$$.fragment,r),I(K.$$.fragment,r),I(ee.$$.fragment,r),I(se.$$.fragment,r),Fe=!1},d(r){s(g),r&&s(F),r&&s(_),x(m),r&&s(je),r&&s(ae),r&&s(Ue),r&&s(k),x(R),r&&s(ke),r&&s(v),x(L),x(D),x(z),x(Q),r&&s(Be),r&&s(Z),x(H),r&&s(Ze),r&&s(u),x(q),x(O),x(K),r&&s(Je),r&&s(N),x(ee),r&&s(Ne),r&&s(re),x(se)}}}const vs={local:"image-processor",sections:[{local:"transformers.ImageProcessingMixin",title:"ImageProcessingMixin"},{local:"transformers.BatchFeature",title:"BatchFeature"},{local:"transformers.image_processing_utils.BaseImageProcessor",title:"BaseImageProcessor"}],title:"Image Processor"};function ys(Ee){return ps(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class xs extends cs{constructor(g){super();ls(this,g,ys,_s,ds,{})}}export{xs as default,vs as metadata};
