import{S as ha,i as ua,s as ga,e as n,k as f,w as y,t as s,M as ba,c as a,d as o,m as d,a as r,x as _,h as i,b as l,N as va,G as t,g as p,y as w,q as U,o as M,B as N,v as ya,L as da}from"../../chunks/vendor-hf-doc-builder.js";import{T as _a}from"../../chunks/Tip-hf-doc-builder.js";import{D as Bt}from"../../chunks/Docstring-hf-doc-builder.js";import{C as Qt}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as Oe}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as fa}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function wa(z){let h,$,g,u,v;return u=new Qt({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFVwZXJOZXRDb25maWclMkMlMjBVcGVyTmV0Rm9yU2VtYW50aWNTZWdtZW50YXRpb24lMEElMEElMjMlMjBJbml0aWFsaXppbmclMjBhJTIwY29uZmlndXJhdGlvbiUwQWNvbmZpZ3VyYXRpb24lMjAlM0QlMjBVcGVyTmV0Q29uZmlnKCklMEElMEElMjMlMjBJbml0aWFsaXppbmclMjBhJTIwbW9kZWwlMjAod2l0aCUyMHJhbmRvbSUyMHdlaWdodHMpJTIwZnJvbSUyMHRoZSUyMGNvbmZpZ3VyYXRpb24lMEFtb2RlbCUyMCUzRCUyMFVwZXJOZXRGb3JTZW1hbnRpY1NlZ21lbnRhdGlvbihjb25maWd1cmF0aW9uKSUwQSUwQSUyMyUyMEFjY2Vzc2luZyUyMHRoZSUyMG1vZGVsJTIwY29uZmlndXJhdGlvbiUwQWNvbmZpZ3VyYXRpb24lMjAlM0QlMjBtb2RlbC5jb25maWc=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> UperNetConfig, UperNetForSemanticSegmentation

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = UperNetConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a model (with random weights) from the configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = UperNetForSemanticSegmentation(configuration)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Accessing the model configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = model.config`}}),{c(){h=n("p"),$=s("Examples:"),g=f(),y(u.$$.fragment)},l(m){h=a(m,"P",{});var b=r(h);$=i(b,"Examples:"),b.forEach(o),g=d(m),_(u.$$.fragment,m)},m(m,b){p(m,h,b),t(h,$),p(m,g,b),w(u,m,b),v=!0},p:da,i(m){v||(U(u.$$.fragment,m),v=!0)},o(m){M(u.$$.fragment,m),v=!1},d(m){m&&o(h),m&&o(g),N(u,m)}}}function Ua(z){let h,$,g,u,v;return{c(){h=n("p"),$=s("Although the recipe for forward pass needs to be defined within this function, one should call the "),g=n("code"),u=s("Module"),v=s(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(m){h=a(m,"P",{});var b=r(h);$=i(b,"Although the recipe for forward pass needs to be defined within this function, one should call the "),g=a(b,"CODE",{});var X=r(g);u=i(X,"Module"),X.forEach(o),v=i(b,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),b.forEach(o)},m(m,b){p(m,h,b),t(h,$),t(h,g),t(g,u),t(h,v)},d(m){m&&o(h)}}}function Ma(z){let h,$,g,u,v;return u=new Qt({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9JbWFnZVByb2Nlc3NvciUyQyUyMFVwZXJOZXRGb3JTZW1hbnRpY1NlZ21lbnRhdGlvbiUwQWZyb20lMjBQSUwlMjBpbXBvcnQlMjBJbWFnZSUwQWZyb20lMjBodWdnaW5nZmFjZV9odWIlMjBpbXBvcnQlMjBoZl9odWJfZG93bmxvYWQlMEElMEFpbWFnZV9wcm9jZXNzb3IlMjAlM0QlMjBBdXRvSW1hZ2VQcm9jZXNzb3IuZnJvbV9wcmV0cmFpbmVkKCUyMm9wZW5tbWxhYiUyRnVwZXJuZXQtY29udm5leHQtdGlueSUyMiklMEFtb2RlbCUyMCUzRCUyMFVwZXJOZXRGb3JTZW1hbnRpY1NlZ21lbnRhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIyb3Blbm1tbGFiJTJGdXBlcm5ldC1jb252bmV4dC10aW55JTIyKSUwQSUwQWZpbGVwYXRoJTIwJTNEJTIwaGZfaHViX2Rvd25sb2FkKCUwQSUyMCUyMCUyMCUyMHJlcG9faWQlM0QlMjJoZi1pbnRlcm5hbC10ZXN0aW5nJTJGZml4dHVyZXNfYWRlMjBrJTIyJTJDJTIwZmlsZW5hbWUlM0QlMjJBREVfdmFsXzAwMDAwMDAxLmpwZyUyMiUyQyUyMHJlcG9fdHlwZSUzRCUyMmRhdGFzZXQlMjIlMEEpJTBBaW1hZ2UlMjAlM0QlMjBJbWFnZS5vcGVuKGZpbGVwYXRoKS5jb252ZXJ0KCUyMlJHQiUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjBpbWFnZV9wcm9jZXNzb3IoaW1hZ2VzJTNEaW1hZ2UlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyklMEElMEFsb2dpdHMlMjAlM0QlMjBvdXRwdXRzLmxvZ2l0cyUyMCUyMCUyMyUyMHNoYXBlJTIwKGJhdGNoX3NpemUlMkMlMjBudW1fbGFiZWxzJTJDJTIwaGVpZ2h0JTJDJTIwd2lkdGgpJTBBbGlzdChsb2dpdHMuc2hhcGUp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoImageProcessor, UperNetForSemanticSegmentation
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> PIL <span class="hljs-keyword">import</span> Image
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> huggingface_hub <span class="hljs-keyword">import</span> hf_hub_download

<span class="hljs-meta">&gt;&gt;&gt; </span>image_processor = AutoImageProcessor.from_pretrained(<span class="hljs-string">&quot;openmmlab/upernet-convnext-tiny&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = UperNetForSemanticSegmentation.from_pretrained(<span class="hljs-string">&quot;openmmlab/upernet-convnext-tiny&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>filepath = hf_hub_download(
<span class="hljs-meta">... </span>    repo_id=<span class="hljs-string">&quot;hf-internal-testing/fixtures_ade20k&quot;</span>, filename=<span class="hljs-string">&quot;ADE_val_00000001.jpg&quot;</span>, repo_type=<span class="hljs-string">&quot;dataset&quot;</span>
<span class="hljs-meta">... </span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>image = Image.<span class="hljs-built_in">open</span>(filepath).convert(<span class="hljs-string">&quot;RGB&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = image_processor(images=image, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)

<span class="hljs-meta">&gt;&gt;&gt; </span>logits = outputs.logits  <span class="hljs-comment"># shape (batch_size, num_labels, height, width)</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">list</span>(logits.shape)
[<span class="hljs-number">1</span>, <span class="hljs-number">150</span>, <span class="hljs-number">512</span>, <span class="hljs-number">512</span>]`}}),{c(){h=n("p"),$=s("Examples:"),g=f(),y(u.$$.fragment)},l(m){h=a(m,"P",{});var b=r(h);$=i(b,"Examples:"),b.forEach(o),g=d(m),_(u.$$.fragment,m)},m(m,b){p(m,h,b),t(h,$),p(m,g,b),w(u,m,b),v=!0},p:da,i(m){v||(U(u.$$.fragment,m),v=!0)},o(m){M(u.$$.fragment,m),v=!1},d(m){m&&o(h),m&&o(g),N(u,m)}}}function Na(z){let h,$,g,u,v,m,b,X,Yt,ht,J,B,Le,re,qt,Ke,Ht,ut,k,Dt,se,Ot,Lt,Se,Kt,eo,ke,to,oo,gt,je,no,bt,Ee,et,ao,vt,Q,wn,yt,Y,ro,Ze,so,io,_t,Z,lo,ie,co,po,le,mo,fo,wt,F,q,tt,ce,ho,ot,uo,Ut,Te,go,Mt,T,pe,bo,me,vo,yo,_o,x,xe,wo,Uo,fe,Mo,No,de,$o,So,ko,Ce,jo,Je,Eo,Nt,Fe,Zo,$t,P,H,nt,he,To,at,xo,St,Pe,Co,kt,ue,jt,D,Jo,We,Fo,Po,Et,ge,Zt,Re,Wo,Tt,W,O,rt,be,Ro,st,Ao,xt,S,ve,Vo,R,Io,Ae,Go,zo,ye,Xo,Bo,Qo,A,Yo,Ve,qo,Ho,Ie,Do,Oo,Lo,L,Ko,K,_e,en,V,tn,Ge,on,nn,it,an,rn,Ct,I,ee,lt,we,sn,ct,ln,Jt,E,Ue,cn,pt,pn,mn,j,Me,fn,G,dn,ze,hn,un,mt,gn,bn,vn,te,yn,oe,Ft;return m=new Oe({}),re=new Oe({}),ce=new Oe({}),he=new Oe({}),ue=new Qt({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFN3aW5Db25maWclMkMlMjBVcGVyTmV0Q29uZmlnJTJDJTIwVXBlck5ldEZvclNlbWFudGljU2VnbWVudGF0aW9uJTBBJTBBYmFja2JvbmVfY29uZmlnJTIwJTNEJTIwU3dpbkNvbmZpZyhvdXRfZmVhdHVyZXMlM0QlNUIlMjJzdGFnZTElMjIlMkMlMjAlMjJzdGFnZTIlMjIlMkMlMjAlMjJzdGFnZTMlMjIlMkMlMjAlMjJzdGFnZTQlMjIlNUQpJTBBJTBBY29uZmlnJTIwJTNEJTIwVXBlck5ldENvbmZpZyhiYWNrYm9uZV9jb25maWclM0RiYWNrYm9uZV9jb25maWcpJTBBbW9kZWwlMjAlM0QlMjBVcGVyTmV0Rm9yU2VtYW50aWNTZWdtZW50YXRpb24oY29uZmlnKQ==",highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> SwinConfig, UperNetConfig, UperNetForSemanticSegmentation

backbone_config = SwinConfig(out_features=[<span class="hljs-string">&quot;stage1&quot;</span>, <span class="hljs-string">&quot;stage2&quot;</span>, <span class="hljs-string">&quot;stage3&quot;</span>, <span class="hljs-string">&quot;stage4&quot;</span>])

config = UperNetConfig(backbone_config=backbone_config)
model = UperNetForSemanticSegmentation(config)`}}),ge=new Qt({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMENvbnZOZXh0Q29uZmlnJTJDJTIwVXBlck5ldENvbmZpZyUyQyUyMFVwZXJOZXRGb3JTZW1hbnRpY1NlZ21lbnRhdGlvbiUwQSUwQWJhY2tib25lX2NvbmZpZyUyMCUzRCUyMENvbnZOZXh0Q29uZmlnKG91dF9mZWF0dXJlcyUzRCU1QiUyMnN0YWdlMSUyMiUyQyUyMCUyMnN0YWdlMiUyMiUyQyUyMCUyMnN0YWdlMyUyMiUyQyUyMCUyMnN0YWdlNCUyMiU1RCklMEElMEFjb25maWclMjAlM0QlMjBVcGVyTmV0Q29uZmlnKGJhY2tib25lX2NvbmZpZyUzRGJhY2tib25lX2NvbmZpZyklMEFtb2RlbCUyMCUzRCUyMFVwZXJOZXRGb3JTZW1hbnRpY1NlZ21lbnRhdGlvbihjb25maWcp",highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> ConvNextConfig, UperNetConfig, UperNetForSemanticSegmentation

backbone_config = ConvNextConfig(out_features=[<span class="hljs-string">&quot;stage1&quot;</span>, <span class="hljs-string">&quot;stage2&quot;</span>, <span class="hljs-string">&quot;stage3&quot;</span>, <span class="hljs-string">&quot;stage4&quot;</span>])

config = UperNetConfig(backbone_config=backbone_config)
model = UperNetForSemanticSegmentation(config)`}}),be=new Oe({}),ve=new Bt({props:{name:"class transformers.UperNetConfig",anchor:"transformers.UperNetConfig",parameters:[{name:"backbone_config",val:" = None"},{name:"hidden_size",val:" = 512"},{name:"initializer_range",val:" = 0.02"},{name:"pool_scales",val:" = [1, 2, 3, 6]"},{name:"use_auxiliary_head",val:" = True"},{name:"auxiliary_loss_weight",val:" = 0.4"},{name:"auxiliary_in_channels",val:" = 384"},{name:"auxiliary_channels",val:" = 256"},{name:"auxiliary_num_convs",val:" = 1"},{name:"auxiliary_concat_input",val:" = False"},{name:"loss_ignore_index",val:" = 255"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.UperNetConfig.backbone_config",description:`<strong>backbone_config</strong> (<code>PretrainedConfig</code> or <code>dict</code>, <em>optional</em>, defaults to <code>ResNetConfig()</code>) &#x2014;
The configuration of the backbone model.`,name:"backbone_config"},{anchor:"transformers.UperNetConfig.hidden_size",description:`<strong>hidden_size</strong> (<code>int</code>, <em>optional</em>, defaults to 512) &#x2014;
The number of hidden units in the convolutional layers.`,name:"hidden_size"},{anchor:"transformers.UperNetConfig.initializer_range",description:`<strong>initializer_range</strong> (<code>float</code>, <em>optional</em>, defaults to 0.02) &#x2014;
The standard deviation of the truncated_normal_initializer for initializing all weight matrices.`,name:"initializer_range"},{anchor:"transformers.UperNetConfig.pool_scales",description:`<strong>pool_scales</strong> (<code>Tuple[int]</code>, <em>optional</em>, defaults to <code>[1, 2, 3, 6]</code>) &#x2014;
Pooling scales used in Pooling Pyramid Module applied on the last feature map.`,name:"pool_scales"},{anchor:"transformers.UperNetConfig.use_auxiliary_head",description:`<strong>use_auxiliary_head</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to use an auxiliary head during training.`,name:"use_auxiliary_head"},{anchor:"transformers.UperNetConfig.auxiliary_loss_weight",description:`<strong>auxiliary_loss_weight</strong> (<code>float</code>, <em>optional</em>, defaults to 0.4) &#x2014;
Weight of the cross-entropy loss of the auxiliary head.`,name:"auxiliary_loss_weight"},{anchor:"transformers.UperNetConfig.auxiliary_channels",description:`<strong>auxiliary_channels</strong> (<code>int</code>, <em>optional</em>, defaults to 256) &#x2014;
Number of channels to use in the auxiliary head.`,name:"auxiliary_channels"},{anchor:"transformers.UperNetConfig.auxiliary_num_convs",description:`<strong>auxiliary_num_convs</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
Number of convolutional layers to use in the auxiliary head.`,name:"auxiliary_num_convs"},{anchor:"transformers.UperNetConfig.auxiliary_concat_input",description:`<strong>auxiliary_concat_input</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to concatenate the output of the auxiliary head with the input before the classification layer.`,name:"auxiliary_concat_input"},{anchor:"transformers.UperNetConfig.loss_ignore_index",description:`<strong>loss_ignore_index</strong> (<code>int</code>, <em>optional</em>, defaults to 255) &#x2014;
The index that is ignored by the loss function.`,name:"loss_ignore_index"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/upernet/configuration_upernet.py#L27"}}),L=new fa({props:{anchor:"transformers.UperNetConfig.example",$$slots:{default:[wa]},$$scope:{ctx:z}}}),_e=new Bt({props:{name:"to_dict",anchor:"transformers.UperNetConfig.to_dict",parameters:[],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/upernet/configuration_upernet.py#L112"}}),we=new Oe({}),Ue=new Bt({props:{name:"class transformers.UperNetForSemanticSegmentation",anchor:"transformers.UperNetForSemanticSegmentation",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.UperNetForSemanticSegmentation.This",description:"<strong>This</strong> model is a PyTorch [torch.nn.Module](https &#x2014;//pytorch.org/docs/stable/nn.html#torch.nn.Module) sub-class. Use",name:"This"},{anchor:"transformers.UperNetForSemanticSegmentation.it",description:`<strong>it</strong> as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and &#x2014;
behavior. &#x2014;
config (<a href="/docs/transformers/v4.30.0/en/model_doc/upernet#transformers.UperNetConfig">UperNetConfig</a>): Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"it"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/upernet/modeling_upernet.py#L351"}}),Me=new Bt({props:{name:"forward",anchor:"transformers.UperNetForSemanticSegmentation.forward",parameters:[{name:"pixel_values",val:": typing.Optional[torch.Tensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"labels",val:": typing.Optional[torch.Tensor] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.UperNetForSemanticSegmentation.forward.pixel_values",description:`<strong>pixel_values</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_channels, height, width)</code>) &#x2014;
Pixel values. Padding will be ignored by default should you provide it. Pixel values can be obtained using
<a href="/docs/transformers/v4.30.0/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See <a href="/docs/transformers/v4.30.0/en/model_doc/segformer#transformers.SegformerFeatureExtractor.__call__">SegformerImageProcessor.<strong>call</strong>()</a> for details.`,name:"pixel_values"},{anchor:"transformers.UperNetForSemanticSegmentation.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers in case the backbone has them. See
<code>attentions</code> under returned tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.UperNetForSemanticSegmentation.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers of the backbone. See <code>hidden_states</code> under
returned tensors for more detail.`,name:"output_hidden_states"},{anchor:"transformers.UperNetForSemanticSegmentation.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.UperNetForSemanticSegmentation.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, height, width)</code>, <em>optional</em>) &#x2014;
Ground truth semantic segmentation maps for computing the loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>. If <code>config.num_labels &gt; 1</code>, a classification loss is computed (Cross-Entropy).`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/upernet/modeling_upernet.py#L364",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_outputs.SemanticSegmenterOutput"
>transformers.modeling_outputs.SemanticSegmenterOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.30.0/en/model_doc/upernet#transformers.UperNetConfig"
>UperNetConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Classification (or regression if config.num_labels==1) loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, config.num_labels, logits_height, logits_width)</code>) \u2014 Classification scores for each pixel.</p>
<Tip warning={true}>
<p>The logits returned do not necessarily have the same size as the <code>pixel_values</code> passed as inputs. This is
to avoid doing two interpolations and lose some quality when a user needs to resize the logits to the
original image size as post-processing. You should always check your logits shape and resize as needed.</p>
</Tip>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, patch_size, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, patch_size, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_outputs.SemanticSegmenterOutput"
>transformers.modeling_outputs.SemanticSegmenterOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),te=new _a({props:{$$slots:{default:[Ua]},$$scope:{ctx:z}}}),oe=new fa({props:{anchor:"transformers.UperNetForSemanticSegmentation.forward.example",$$slots:{default:[Ma]},$$scope:{ctx:z}}}),{c(){h=n("meta"),$=f(),g=n("h1"),u=n("a"),v=n("span"),y(m.$$.fragment),b=f(),X=n("span"),Yt=s("UPerNet"),ht=f(),J=n("h2"),B=n("a"),Le=n("span"),y(re.$$.fragment),qt=f(),Ke=n("span"),Ht=s("Overview"),ut=f(),k=n("p"),Dt=s("The UPerNet model was proposed in "),se=n("a"),Ot=s("Unified Perceptual Parsing for Scene Understanding"),Lt=s(`
by Tete Xiao, Yingcheng Liu, Bolei Zhou, Yuning Jiang, Jian Sun. UPerNet is a general framework to effectively segment
a wide range of concepts from images, leveraging any vision backbone like `),Se=n("a"),Kt=s("ConvNeXt"),eo=s(" or "),ke=n("a"),to=s("Swin"),oo=s("."),gt=f(),je=n("p"),no=s("The abstract from the paper is the following:"),bt=f(),Ee=n("p"),et=n("em"),ao=s("Humans recognize the visual world at multiple levels: we effortlessly categorize scenes and detect objects inside, while also identifying the textures and surfaces of the objects along with their different compositional parts. In this paper, we study a new task called Unified Perceptual Parsing, which requires the machine vision systems to recognize as many visual concepts as possible from a given image. A multi-task framework called UPerNet and a training strategy are developed to learn from heterogeneous image annotations. We benchmark our framework on Unified Perceptual Parsing and show that it is able to effectively segment a wide range of concepts from images. The trained networks are further applied to discover visual knowledge in natural scenes."),vt=f(),Q=n("img"),yt=f(),Y=n("small"),ro=s("UPerNet framework. Taken from the "),Ze=n("a"),so=s("original paper"),io=s("."),_t=f(),Z=n("p"),lo=s("This model was contributed by "),ie=n("a"),co=s("nielsr"),po=s(". The original code is based on OpenMMLab\u2019s mmsegmentation "),le=n("a"),mo=s("here"),fo=s("."),wt=f(),F=n("h2"),q=n("a"),tt=n("span"),y(ce.$$.fragment),ho=f(),ot=n("span"),uo=s("Resources"),Ut=f(),Te=n("p"),go=s("A list of official Hugging Face and community (indicated by \u{1F30E}) resources to help you get started with UPerNet."),Mt=f(),T=n("ul"),pe=n("li"),bo=s("Demo notebooks for UPerNet can be found "),me=n("a"),vo=s("here"),yo=s("."),_o=f(),x=n("li"),xe=n("a"),wo=s("UperNetForSemanticSegmentation"),Uo=s(" is supported by this "),fe=n("a"),Mo=s("example script"),No=s(" and "),de=n("a"),$o=s("notebook"),So=s("."),ko=f(),Ce=n("li"),jo=s("See also: "),Je=n("a"),Eo=s("Semantic segmentation task guide"),Nt=f(),Fe=n("p"),Zo=s("If you\u2019re interested in submitting a resource to be included here, please feel free to open a Pull Request and we\u2019ll review it! The resource should ideally demonstrate something new instead of duplicating an existing resource."),$t=f(),P=n("h2"),H=n("a"),nt=n("span"),y(he.$$.fragment),To=f(),at=n("span"),xo=s("Usage"),St=f(),Pe=n("p"),Co=s("UPerNet is a general framework for semantic segmentation. It can be used with any vision backbone, like so:"),kt=f(),y(ue.$$.fragment),jt=f(),D=n("p"),Jo=s("To use another vision backbone, like "),We=n("a"),Fo=s("ConvNeXt"),Po=s(", simply instantiate the model with the appropriate backbone:"),Et=f(),y(ge.$$.fragment),Zt=f(),Re=n("p"),Wo=s("Note that this will randomly initialize all the weights of the model."),Tt=f(),W=n("h2"),O=n("a"),rt=n("span"),y(be.$$.fragment),Ro=f(),st=n("span"),Ao=s("UperNetConfig"),xt=f(),S=n("div"),y(ve.$$.fragment),Vo=f(),R=n("p"),Io=s("This is the configuration class to store the configuration of an "),Ae=n("a"),Go=s("UperNetForSemanticSegmentation"),zo=s(`. It is used to
instantiate an UperNet model according to the specified arguments, defining the model architecture. Instantiating a
configuration with the defaults will yield a similar configuration to that of the UperNet
`),ye=n("a"),Xo=s("openmmlab/upernet-convnext-tiny"),Bo=s(" architecture."),Qo=f(),A=n("p"),Yo=s("Configuration objects inherit from "),Ve=n("a"),qo=s("PretrainedConfig"),Ho=s(` and can be used to control the model outputs. Read the
documentation from `),Ie=n("a"),Do=s("PretrainedConfig"),Oo=s(" for more information."),Lo=f(),y(L.$$.fragment),Ko=f(),K=n("div"),y(_e.$$.fragment),en=f(),V=n("p"),tn=s("Serializes this instance to a Python dictionary. Override the default "),Ge=n("a"),on=s("to_dict()"),nn=s(`. Returns:
`),it=n("code"),an=s("Dict[str, any]"),rn=s(": Dictionary of all the attributes that make up this configuration instance,"),Ct=f(),I=n("h2"),ee=n("a"),lt=n("span"),y(we.$$.fragment),sn=f(),ct=n("span"),ln=s("UperNetForSemanticSegmentation"),Jt=f(),E=n("div"),y(Ue.$$.fragment),cn=f(),pt=n("p"),pn=s("UperNet framework leveraging any vision backbone e.g. for ADE20k, CityScapes."),mn=f(),j=n("div"),y(Me.$$.fragment),fn=f(),G=n("p"),dn=s("The "),ze=n("a"),hn=s("UperNetForSemanticSegmentation"),un=s(" forward method, overrides the "),mt=n("code"),gn=s("__call__"),bn=s(" special method."),vn=f(),y(te.$$.fragment),yn=f(),y(oe.$$.fragment),this.h()},l(e){const c=ba('[data-svelte="svelte-1phssyn"]',document.head);h=a(c,"META",{name:!0,content:!0}),c.forEach(o),$=d(e),g=a(e,"H1",{class:!0});var Ne=r(g);u=a(Ne,"A",{id:!0,class:!0,href:!0});var ft=r(u);v=a(ft,"SPAN",{});var dt=r(v);_(m.$$.fragment,dt),dt.forEach(o),ft.forEach(o),b=d(Ne),X=a(Ne,"SPAN",{});var Un=r(X);Yt=i(Un,"UPerNet"),Un.forEach(o),Ne.forEach(o),ht=d(e),J=a(e,"H2",{class:!0});var Pt=r(J);B=a(Pt,"A",{id:!0,class:!0,href:!0});var Mn=r(B);Le=a(Mn,"SPAN",{});var Nn=r(Le);_(re.$$.fragment,Nn),Nn.forEach(o),Mn.forEach(o),qt=d(Pt),Ke=a(Pt,"SPAN",{});var $n=r(Ke);Ht=i($n,"Overview"),$n.forEach(o),Pt.forEach(o),ut=d(e),k=a(e,"P",{});var ne=r(k);Dt=i(ne,"The UPerNet model was proposed in "),se=a(ne,"A",{href:!0,rel:!0});var Sn=r(se);Ot=i(Sn,"Unified Perceptual Parsing for Scene Understanding"),Sn.forEach(o),Lt=i(ne,`
by Tete Xiao, Yingcheng Liu, Bolei Zhou, Yuning Jiang, Jian Sun. UPerNet is a general framework to effectively segment
a wide range of concepts from images, leveraging any vision backbone like `),Se=a(ne,"A",{href:!0});var kn=r(Se);Kt=i(kn,"ConvNeXt"),kn.forEach(o),eo=i(ne," or "),ke=a(ne,"A",{href:!0});var jn=r(ke);to=i(jn,"Swin"),jn.forEach(o),oo=i(ne,"."),ne.forEach(o),gt=d(e),je=a(e,"P",{});var En=r(je);no=i(En,"The abstract from the paper is the following:"),En.forEach(o),bt=d(e),Ee=a(e,"P",{});var Zn=r(Ee);et=a(Zn,"EM",{});var Tn=r(et);ao=i(Tn,"Humans recognize the visual world at multiple levels: we effortlessly categorize scenes and detect objects inside, while also identifying the textures and surfaces of the objects along with their different compositional parts. In this paper, we study a new task called Unified Perceptual Parsing, which requires the machine vision systems to recognize as many visual concepts as possible from a given image. A multi-task framework called UPerNet and a training strategy are developed to learn from heterogeneous image annotations. We benchmark our framework on Unified Perceptual Parsing and show that it is able to effectively segment a wide range of concepts from images. The trained networks are further applied to discover visual knowledge in natural scenes."),Tn.forEach(o),Zn.forEach(o),vt=d(e),Q=a(e,"IMG",{src:!0,alt:!0,width:!0}),yt=d(e),Y=a(e,"SMALL",{});var Wt=r(Y);ro=i(Wt,"UPerNet framework. Taken from the "),Ze=a(Wt,"A",{href:!0});var xn=r(Ze);so=i(xn,"original paper"),xn.forEach(o),io=i(Wt,"."),Wt.forEach(o),_t=d(e),Z=a(e,"P",{});var Xe=r(Z);lo=i(Xe,"This model was contributed by "),ie=a(Xe,"A",{href:!0,rel:!0});var Cn=r(ie);co=i(Cn,"nielsr"),Cn.forEach(o),po=i(Xe,". The original code is based on OpenMMLab\u2019s mmsegmentation "),le=a(Xe,"A",{href:!0,rel:!0});var Jn=r(le);mo=i(Jn,"here"),Jn.forEach(o),fo=i(Xe,"."),Xe.forEach(o),wt=d(e),F=a(e,"H2",{class:!0});var Rt=r(F);q=a(Rt,"A",{id:!0,class:!0,href:!0});var Fn=r(q);tt=a(Fn,"SPAN",{});var Pn=r(tt);_(ce.$$.fragment,Pn),Pn.forEach(o),Fn.forEach(o),ho=d(Rt),ot=a(Rt,"SPAN",{});var Wn=r(ot);uo=i(Wn,"Resources"),Wn.forEach(o),Rt.forEach(o),Ut=d(e),Te=a(e,"P",{});var Rn=r(Te);go=i(Rn,"A list of official Hugging Face and community (indicated by \u{1F30E}) resources to help you get started with UPerNet."),Rn.forEach(o),Mt=d(e),T=a(e,"UL",{});var Be=r(T);pe=a(Be,"LI",{});var At=r(pe);bo=i(At,"Demo notebooks for UPerNet can be found "),me=a(At,"A",{href:!0,rel:!0});var An=r(me);vo=i(An,"here"),An.forEach(o),yo=i(At,"."),At.forEach(o),_o=d(Be),x=a(Be,"LI",{});var $e=r(x);xe=a($e,"A",{href:!0});var Vn=r(xe);wo=i(Vn,"UperNetForSemanticSegmentation"),Vn.forEach(o),Uo=i($e," is supported by this "),fe=a($e,"A",{href:!0,rel:!0});var In=r(fe);Mo=i(In,"example script"),In.forEach(o),No=i($e," and "),de=a($e,"A",{href:!0,rel:!0});var Gn=r(de);$o=i(Gn,"notebook"),Gn.forEach(o),So=i($e,"."),$e.forEach(o),ko=d(Be),Ce=a(Be,"LI",{});var _n=r(Ce);jo=i(_n,"See also: "),Je=a(_n,"A",{href:!0});var zn=r(Je);Eo=i(zn,"Semantic segmentation task guide"),zn.forEach(o),_n.forEach(o),Be.forEach(o),Nt=d(e),Fe=a(e,"P",{});var Xn=r(Fe);Zo=i(Xn,"If you\u2019re interested in submitting a resource to be included here, please feel free to open a Pull Request and we\u2019ll review it! The resource should ideally demonstrate something new instead of duplicating an existing resource."),Xn.forEach(o),$t=d(e),P=a(e,"H2",{class:!0});var Vt=r(P);H=a(Vt,"A",{id:!0,class:!0,href:!0});var Bn=r(H);nt=a(Bn,"SPAN",{});var Qn=r(nt);_(he.$$.fragment,Qn),Qn.forEach(o),Bn.forEach(o),To=d(Vt),at=a(Vt,"SPAN",{});var Yn=r(at);xo=i(Yn,"Usage"),Yn.forEach(o),Vt.forEach(o),St=d(e),Pe=a(e,"P",{});var qn=r(Pe);Co=i(qn,"UPerNet is a general framework for semantic segmentation. It can be used with any vision backbone, like so:"),qn.forEach(o),kt=d(e),_(ue.$$.fragment,e),jt=d(e),D=a(e,"P",{});var It=r(D);Jo=i(It,"To use another vision backbone, like "),We=a(It,"A",{href:!0});var Hn=r(We);Fo=i(Hn,"ConvNeXt"),Hn.forEach(o),Po=i(It,", simply instantiate the model with the appropriate backbone:"),It.forEach(o),Et=d(e),_(ge.$$.fragment,e),Zt=d(e),Re=a(e,"P",{});var Dn=r(Re);Wo=i(Dn,"Note that this will randomly initialize all the weights of the model."),Dn.forEach(o),Tt=d(e),W=a(e,"H2",{class:!0});var Gt=r(W);O=a(Gt,"A",{id:!0,class:!0,href:!0});var On=r(O);rt=a(On,"SPAN",{});var Ln=r(rt);_(be.$$.fragment,Ln),Ln.forEach(o),On.forEach(o),Ro=d(Gt),st=a(Gt,"SPAN",{});var Kn=r(st);Ao=i(Kn,"UperNetConfig"),Kn.forEach(o),Gt.forEach(o),xt=d(e),S=a(e,"DIV",{class:!0});var C=r(S);_(ve.$$.fragment,C),Vo=d(C),R=a(C,"P",{});var Qe=r(R);Io=i(Qe,"This is the configuration class to store the configuration of an "),Ae=a(Qe,"A",{href:!0});var ea=r(Ae);Go=i(ea,"UperNetForSemanticSegmentation"),ea.forEach(o),zo=i(Qe,`. It is used to
instantiate an UperNet model according to the specified arguments, defining the model architecture. Instantiating a
configuration with the defaults will yield a similar configuration to that of the UperNet
`),ye=a(Qe,"A",{href:!0,rel:!0});var ta=r(ye);Xo=i(ta,"openmmlab/upernet-convnext-tiny"),ta.forEach(o),Bo=i(Qe," architecture."),Qe.forEach(o),Qo=d(C),A=a(C,"P",{});var Ye=r(A);Yo=i(Ye,"Configuration objects inherit from "),Ve=a(Ye,"A",{href:!0});var oa=r(Ve);qo=i(oa,"PretrainedConfig"),oa.forEach(o),Ho=i(Ye,` and can be used to control the model outputs. Read the
documentation from `),Ie=a(Ye,"A",{href:!0});var na=r(Ie);Do=i(na,"PretrainedConfig"),na.forEach(o),Oo=i(Ye," for more information."),Ye.forEach(o),Lo=d(C),_(L.$$.fragment,C),Ko=d(C),K=a(C,"DIV",{class:!0});var zt=r(K);_(_e.$$.fragment,zt),en=d(zt),V=a(zt,"P",{});var qe=r(V);tn=i(qe,"Serializes this instance to a Python dictionary. Override the default "),Ge=a(qe,"A",{href:!0});var aa=r(Ge);on=i(aa,"to_dict()"),aa.forEach(o),nn=i(qe,`. Returns:
`),it=a(qe,"CODE",{});var ra=r(it);an=i(ra,"Dict[str, any]"),ra.forEach(o),rn=i(qe,": Dictionary of all the attributes that make up this configuration instance,"),qe.forEach(o),zt.forEach(o),C.forEach(o),Ct=d(e),I=a(e,"H2",{class:!0});var Xt=r(I);ee=a(Xt,"A",{id:!0,class:!0,href:!0});var sa=r(ee);lt=a(sa,"SPAN",{});var ia=r(lt);_(we.$$.fragment,ia),ia.forEach(o),sa.forEach(o),sn=d(Xt),ct=a(Xt,"SPAN",{});var la=r(ct);ln=i(la,"UperNetForSemanticSegmentation"),la.forEach(o),Xt.forEach(o),Jt=d(e),E=a(e,"DIV",{class:!0});var He=r(E);_(Ue.$$.fragment,He),cn=d(He),pt=a(He,"P",{});var ca=r(pt);pn=i(ca,"UperNet framework leveraging any vision backbone e.g. for ADE20k, CityScapes."),ca.forEach(o),mn=d(He),j=a(He,"DIV",{class:!0});var ae=r(j);_(Me.$$.fragment,ae),fn=d(ae),G=a(ae,"P",{});var De=r(G);dn=i(De,"The "),ze=a(De,"A",{href:!0});var pa=r(ze);hn=i(pa,"UperNetForSemanticSegmentation"),pa.forEach(o),un=i(De," forward method, overrides the "),mt=a(De,"CODE",{});var ma=r(mt);gn=i(ma,"__call__"),ma.forEach(o),bn=i(De," special method."),De.forEach(o),vn=d(ae),_(te.$$.fragment,ae),yn=d(ae),_(oe.$$.fragment,ae),ae.forEach(o),He.forEach(o),this.h()},h(){l(h,"name","hf:doc:metadata"),l(h,"content",JSON.stringify($a)),l(u,"id","upernet"),l(u,"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"),l(u,"href","#upernet"),l(g,"class","relative group"),l(B,"id","overview"),l(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"),l(B,"href","#overview"),l(J,"class","relative group"),l(se,"href","https://arxiv.org/abs/1807.10221"),l(se,"rel","nofollow"),l(Se,"href","convnext"),l(ke,"href","swin"),va(Q.src,wn="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/model_doc/upernet_architecture.jpg")||l(Q,"src",wn),l(Q,"alt","drawing"),l(Q,"width","600"),l(Ze,"href","https://arxiv.org/abs/1807.10221"),l(ie,"href","https://huggingface.co/nielsr"),l(ie,"rel","nofollow"),l(le,"href","https://github.com/open-mmlab/mmsegmentation/blob/master/mmseg/models/decode_heads/uper_head.py"),l(le,"rel","nofollow"),l(q,"id","resources"),l(q,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),l(q,"href","#resources"),l(F,"class","relative group"),l(me,"href","https://github.com/NielsRogge/Transformers-Tutorials/tree/master/UPerNet"),l(me,"rel","nofollow"),l(xe,"href","/docs/transformers/v4.30.0/en/model_doc/upernet#transformers.UperNetForSemanticSegmentation"),l(fe,"href","https://github.com/huggingface/transformers/tree/main/examples/pytorch/semantic-segmentation"),l(fe,"rel","nofollow"),l(de,"href","https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/semantic_segmentation.ipynb"),l(de,"rel","nofollow"),l(Je,"href","../tasks/semantic_segmentation"),l(H,"id","usage"),l(H,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),l(H,"href","#usage"),l(P,"class","relative group"),l(We,"href","convnext"),l(O,"id","transformers.UperNetConfig"),l(O,"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"),l(O,"href","#transformers.UperNetConfig"),l(W,"class","relative group"),l(Ae,"href","/docs/transformers/v4.30.0/en/model_doc/upernet#transformers.UperNetForSemanticSegmentation"),l(ye,"href","https://huggingface.co/openmmlab/upernet-convnext-tiny"),l(ye,"rel","nofollow"),l(Ve,"href","/docs/transformers/v4.30.0/en/main_classes/configuration#transformers.PretrainedConfig"),l(Ie,"href","/docs/transformers/v4.30.0/en/main_classes/configuration#transformers.PretrainedConfig"),l(Ge,"href","/docs/transformers/v4.30.0/en/main_classes/configuration#transformers.PretrainedConfig.to_dict"),l(K,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(S,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(ee,"id","transformers.UperNetForSemanticSegmentation"),l(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"),l(ee,"href","#transformers.UperNetForSemanticSegmentation"),l(I,"class","relative group"),l(ze,"href","/docs/transformers/v4.30.0/en/model_doc/upernet#transformers.UperNetForSemanticSegmentation"),l(j,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(E,"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,c){t(document.head,h),p(e,$,c),p(e,g,c),t(g,u),t(u,v),w(m,v,null),t(g,b),t(g,X),t(X,Yt),p(e,ht,c),p(e,J,c),t(J,B),t(B,Le),w(re,Le,null),t(J,qt),t(J,Ke),t(Ke,Ht),p(e,ut,c),p(e,k,c),t(k,Dt),t(k,se),t(se,Ot),t(k,Lt),t(k,Se),t(Se,Kt),t(k,eo),t(k,ke),t(ke,to),t(k,oo),p(e,gt,c),p(e,je,c),t(je,no),p(e,bt,c),p(e,Ee,c),t(Ee,et),t(et,ao),p(e,vt,c),p(e,Q,c),p(e,yt,c),p(e,Y,c),t(Y,ro),t(Y,Ze),t(Ze,so),t(Y,io),p(e,_t,c),p(e,Z,c),t(Z,lo),t(Z,ie),t(ie,co),t(Z,po),t(Z,le),t(le,mo),t(Z,fo),p(e,wt,c),p(e,F,c),t(F,q),t(q,tt),w(ce,tt,null),t(F,ho),t(F,ot),t(ot,uo),p(e,Ut,c),p(e,Te,c),t(Te,go),p(e,Mt,c),p(e,T,c),t(T,pe),t(pe,bo),t(pe,me),t(me,vo),t(pe,yo),t(T,_o),t(T,x),t(x,xe),t(xe,wo),t(x,Uo),t(x,fe),t(fe,Mo),t(x,No),t(x,de),t(de,$o),t(x,So),t(T,ko),t(T,Ce),t(Ce,jo),t(Ce,Je),t(Je,Eo),p(e,Nt,c),p(e,Fe,c),t(Fe,Zo),p(e,$t,c),p(e,P,c),t(P,H),t(H,nt),w(he,nt,null),t(P,To),t(P,at),t(at,xo),p(e,St,c),p(e,Pe,c),t(Pe,Co),p(e,kt,c),w(ue,e,c),p(e,jt,c),p(e,D,c),t(D,Jo),t(D,We),t(We,Fo),t(D,Po),p(e,Et,c),w(ge,e,c),p(e,Zt,c),p(e,Re,c),t(Re,Wo),p(e,Tt,c),p(e,W,c),t(W,O),t(O,rt),w(be,rt,null),t(W,Ro),t(W,st),t(st,Ao),p(e,xt,c),p(e,S,c),w(ve,S,null),t(S,Vo),t(S,R),t(R,Io),t(R,Ae),t(Ae,Go),t(R,zo),t(R,ye),t(ye,Xo),t(R,Bo),t(S,Qo),t(S,A),t(A,Yo),t(A,Ve),t(Ve,qo),t(A,Ho),t(A,Ie),t(Ie,Do),t(A,Oo),t(S,Lo),w(L,S,null),t(S,Ko),t(S,K),w(_e,K,null),t(K,en),t(K,V),t(V,tn),t(V,Ge),t(Ge,on),t(V,nn),t(V,it),t(it,an),t(V,rn),p(e,Ct,c),p(e,I,c),t(I,ee),t(ee,lt),w(we,lt,null),t(I,sn),t(I,ct),t(ct,ln),p(e,Jt,c),p(e,E,c),w(Ue,E,null),t(E,cn),t(E,pt),t(pt,pn),t(E,mn),t(E,j),w(Me,j,null),t(j,fn),t(j,G),t(G,dn),t(G,ze),t(ze,hn),t(G,un),t(G,mt),t(mt,gn),t(G,bn),t(j,vn),w(te,j,null),t(j,yn),w(oe,j,null),Ft=!0},p(e,[c]){const Ne={};c&2&&(Ne.$$scope={dirty:c,ctx:e}),L.$set(Ne);const ft={};c&2&&(ft.$$scope={dirty:c,ctx:e}),te.$set(ft);const dt={};c&2&&(dt.$$scope={dirty:c,ctx:e}),oe.$set(dt)},i(e){Ft||(U(m.$$.fragment,e),U(re.$$.fragment,e),U(ce.$$.fragment,e),U(he.$$.fragment,e),U(ue.$$.fragment,e),U(ge.$$.fragment,e),U(be.$$.fragment,e),U(ve.$$.fragment,e),U(L.$$.fragment,e),U(_e.$$.fragment,e),U(we.$$.fragment,e),U(Ue.$$.fragment,e),U(Me.$$.fragment,e),U(te.$$.fragment,e),U(oe.$$.fragment,e),Ft=!0)},o(e){M(m.$$.fragment,e),M(re.$$.fragment,e),M(ce.$$.fragment,e),M(he.$$.fragment,e),M(ue.$$.fragment,e),M(ge.$$.fragment,e),M(be.$$.fragment,e),M(ve.$$.fragment,e),M(L.$$.fragment,e),M(_e.$$.fragment,e),M(we.$$.fragment,e),M(Ue.$$.fragment,e),M(Me.$$.fragment,e),M(te.$$.fragment,e),M(oe.$$.fragment,e),Ft=!1},d(e){o(h),e&&o($),e&&o(g),N(m),e&&o(ht),e&&o(J),N(re),e&&o(ut),e&&o(k),e&&o(gt),e&&o(je),e&&o(bt),e&&o(Ee),e&&o(vt),e&&o(Q),e&&o(yt),e&&o(Y),e&&o(_t),e&&o(Z),e&&o(wt),e&&o(F),N(ce),e&&o(Ut),e&&o(Te),e&&o(Mt),e&&o(T),e&&o(Nt),e&&o(Fe),e&&o($t),e&&o(P),N(he),e&&o(St),e&&o(Pe),e&&o(kt),N(ue,e),e&&o(jt),e&&o(D),e&&o(Et),N(ge,e),e&&o(Zt),e&&o(Re),e&&o(Tt),e&&o(W),N(be),e&&o(xt),e&&o(S),N(ve),N(L),N(_e),e&&o(Ct),e&&o(I),N(we),e&&o(Jt),e&&o(E),N(Ue),N(Me),N(te),N(oe)}}}const $a={local:"upernet",sections:[{local:"overview",title:"Overview"},{local:"resources",title:"Resources"},{local:"usage",title:"Usage"},{local:"transformers.UperNetConfig",title:"UperNetConfig"},{local:"transformers.UperNetForSemanticSegmentation",title:"UperNetForSemanticSegmentation"}],title:"UPerNet"};function Sa(z){return ya(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Ca extends ha{constructor(h){super();ua(this,h,Sa,Na,ga,{})}}export{Ca as default,$a as metadata};
