import{S as Ln,i as Kn,s as ea,e as n,k as f,w as _,t as s,M as ta,c as a,d as o,m as h,a as r,x as w,h as i,b as l,N as oa,G as t,g as p,y as U,q as M,o as N,B as $,v as na,L as Dn}from"../../chunks/vendor-hf-doc-builder.js";import{T as aa}from"../../chunks/Tip-hf-doc-builder.js";import{D as rn}from"../../chunks/Docstring-hf-doc-builder.js";import{C as Rt}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as Qe}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as On}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function ra(G){let d,y,g,u,v;return u=new Rt({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(){d=n("p"),y=s("Examples:"),g=f(),_(u.$$.fragment)},l(m){d=a(m,"P",{});var b=r(d);y=i(b,"Examples:"),b.forEach(o),g=h(m),w(u.$$.fragment,m)},m(m,b){p(m,d,b),t(d,y),p(m,g,b),U(u,m,b),v=!0},p:Dn,i(m){v||(M(u.$$.fragment,m),v=!0)},o(m){N(u.$$.fragment,m),v=!1},d(m){m&&o(d),m&&o(g),$(u,m)}}}function sa(G){let d,y,g,u,v;return{c(){d=n("p"),y=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){d=a(m,"P",{});var b=r(d);y=i(b,"Although the recipe for forward pass needs to be defined within this function, one should call the "),g=a(b,"CODE",{});var I=r(g);u=i(I,"Module"),I.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,d,b),t(d,y),t(d,g),t(g,u),t(d,v)},d(m){m&&o(d)}}}function ia(G){let d,y,g,u,v;return u=new Rt({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(){d=n("p"),y=s("Examples:"),g=f(),_(u.$$.fragment)},l(m){d=a(m,"P",{});var b=r(d);y=i(b,"Examples:"),b.forEach(o),g=h(m),w(u.$$.fragment,m)},m(m,b){p(m,d,b),t(d,y),p(m,g,b),U(u,m,b),v=!0},p:Dn,i(m){v||(M(u.$$.fragment,m),v=!0)},o(m){N(u.$$.fragment,m),v=!1},d(m){m&&o(d),m&&o(g),$(u,m)}}}function la(G){let d,y,g,u,v,m,b,I,At,lt,C,X,Ye,ne,Vt,qe,Gt,ct,k,It,ae,Xt,zt,Me,Bt,Qt,Ne,Yt,qt,pt,$e,Ht,mt,Se,He,Ot,ft,z,sn,ht,B,Dt,ke,Lt,Kt,dt,E,eo,re,to,oo,se,no,ao,ut,J,Q,Oe,ie,ro,De,so,gt,je,io,bt,T,le,lo,ce,co,po,mo,x,Ze,fo,ho,pe,uo,go,me,bo,vo,yo,Ee,_o,Te,wo,vt,xe,Uo,yt,F,Y,Le,fe,Mo,Ke,No,_t,Ce,$o,wt,he,Ut,q,So,Je,ko,jo,Mt,de,Nt,Fe,Zo,$t,W,H,et,ue,Eo,tt,To,St,S,ge,xo,P,Co,We,Jo,Fo,be,Wo,Po,Ro,R,Ao,Pe,Vo,Go,Re,Io,Xo,zo,O,kt,A,D,ot,ve,Bo,nt,Qo,jt,Z,ye,Yo,at,qo,Ho,j,_e,Oo,V,Do,Ae,Lo,Ko,rt,en,tn,on,L,nn,K,Zt;return m=new Qe({}),ne=new Qe({}),ie=new Qe({}),fe=new Qe({}),he=new Rt({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)`}}),de=new Rt({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)`}}),ue=new Qe({}),ge=new rn({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.32.0/src/transformers/models/upernet/configuration_upernet.py#L26"}}),O=new On({props:{anchor:"transformers.UperNetConfig.example",$$slots:{default:[ra]},$$scope:{ctx:G}}}),ve=new Qe({}),ye=new rn({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.32.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.32.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.32.0/src/transformers/models/upernet/modeling_upernet.py#L353"}}),_e=new rn({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.32.0/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See <a href="/docs/transformers/v4.32.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.32.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.32.0/src/transformers/models/upernet/modeling_upernet.py#L366",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.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.32.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.32.0/en/main_classes/output#transformers.modeling_outputs.SemanticSegmenterOutput"
>transformers.modeling_outputs.SemanticSegmenterOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),L=new aa({props:{$$slots:{default:[sa]},$$scope:{ctx:G}}}),K=new On({props:{anchor:"transformers.UperNetForSemanticSegmentation.forward.example",$$slots:{default:[ia]},$$scope:{ctx:G}}}),{c(){d=n("meta"),y=f(),g=n("h1"),u=n("a"),v=n("span"),_(m.$$.fragment),b=f(),I=n("span"),At=s("UPerNet"),lt=f(),C=n("h2"),X=n("a"),Ye=n("span"),_(ne.$$.fragment),Vt=f(),qe=n("span"),Gt=s("Overview"),ct=f(),k=n("p"),It=s("The UPerNet model was proposed in "),ae=n("a"),Xt=s("Unified Perceptual Parsing for Scene Understanding"),zt=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 `),Me=n("a"),Bt=s("ConvNeXt"),Qt=s(" or "),Ne=n("a"),Yt=s("Swin"),qt=s("."),pt=f(),$e=n("p"),Ht=s("The abstract from the paper is the following:"),mt=f(),Se=n("p"),He=n("em"),Ot=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."),ft=f(),z=n("img"),ht=f(),B=n("small"),Dt=s("UPerNet framework. Taken from the "),ke=n("a"),Lt=s("original paper"),Kt=s("."),dt=f(),E=n("p"),eo=s("This model was contributed by "),re=n("a"),to=s("nielsr"),oo=s(". The original code is based on OpenMMLab\u2019s mmsegmentation "),se=n("a"),no=s("here"),ao=s("."),ut=f(),J=n("h2"),Q=n("a"),Oe=n("span"),_(ie.$$.fragment),ro=f(),De=n("span"),so=s("Resources"),gt=f(),je=n("p"),io=s("A list of official Hugging Face and community (indicated by \u{1F30E}) resources to help you get started with UPerNet."),bt=f(),T=n("ul"),le=n("li"),lo=s("Demo notebooks for UPerNet can be found "),ce=n("a"),co=s("here"),po=s("."),mo=f(),x=n("li"),Ze=n("a"),fo=s("UperNetForSemanticSegmentation"),ho=s(" is supported by this "),pe=n("a"),uo=s("example script"),go=s(" and "),me=n("a"),bo=s("notebook"),vo=s("."),yo=f(),Ee=n("li"),_o=s("See also: "),Te=n("a"),wo=s("Semantic segmentation task guide"),vt=f(),xe=n("p"),Uo=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."),yt=f(),F=n("h2"),Y=n("a"),Le=n("span"),_(fe.$$.fragment),Mo=f(),Ke=n("span"),No=s("Usage"),_t=f(),Ce=n("p"),$o=s("UPerNet is a general framework for semantic segmentation. It can be used with any vision backbone, like so:"),wt=f(),_(he.$$.fragment),Ut=f(),q=n("p"),So=s("To use another vision backbone, like "),Je=n("a"),ko=s("ConvNeXt"),jo=s(", simply instantiate the model with the appropriate backbone:"),Mt=f(),_(de.$$.fragment),Nt=f(),Fe=n("p"),Zo=s("Note that this will randomly initialize all the weights of the model."),$t=f(),W=n("h2"),H=n("a"),et=n("span"),_(ue.$$.fragment),Eo=f(),tt=n("span"),To=s("UperNetConfig"),St=f(),S=n("div"),_(ge.$$.fragment),xo=f(),P=n("p"),Co=s("This is the configuration class to store the configuration of an "),We=n("a"),Jo=s("UperNetForSemanticSegmentation"),Fo=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
`),be=n("a"),Wo=s("openmmlab/upernet-convnext-tiny"),Po=s(" architecture."),Ro=f(),R=n("p"),Ao=s("Configuration objects inherit from "),Pe=n("a"),Vo=s("PretrainedConfig"),Go=s(` and can be used to control the model outputs. Read the
documentation from `),Re=n("a"),Io=s("PretrainedConfig"),Xo=s(" for more information."),zo=f(),_(O.$$.fragment),kt=f(),A=n("h2"),D=n("a"),ot=n("span"),_(ve.$$.fragment),Bo=f(),nt=n("span"),Qo=s("UperNetForSemanticSegmentation"),jt=f(),Z=n("div"),_(ye.$$.fragment),Yo=f(),at=n("p"),qo=s("UperNet framework leveraging any vision backbone e.g. for ADE20k, CityScapes."),Ho=f(),j=n("div"),_(_e.$$.fragment),Oo=f(),V=n("p"),Do=s("The "),Ae=n("a"),Lo=s("UperNetForSemanticSegmentation"),Ko=s(" forward method, overrides the "),rt=n("code"),en=s("__call__"),tn=s(" special method."),on=f(),_(L.$$.fragment),nn=f(),_(K.$$.fragment),this.h()},l(e){const c=ta('[data-svelte="svelte-1phssyn"]',document.head);d=a(c,"META",{name:!0,content:!0}),c.forEach(o),y=h(e),g=a(e,"H1",{class:!0});var we=r(g);u=a(we,"A",{id:!0,class:!0,href:!0});var st=r(u);v=a(st,"SPAN",{});var it=r(v);w(m.$$.fragment,it),it.forEach(o),st.forEach(o),b=h(we),I=a(we,"SPAN",{});var ln=r(I);At=i(ln,"UPerNet"),ln.forEach(o),we.forEach(o),lt=h(e),C=a(e,"H2",{class:!0});var Et=r(C);X=a(Et,"A",{id:!0,class:!0,href:!0});var cn=r(X);Ye=a(cn,"SPAN",{});var pn=r(Ye);w(ne.$$.fragment,pn),pn.forEach(o),cn.forEach(o),Vt=h(Et),qe=a(Et,"SPAN",{});var mn=r(qe);Gt=i(mn,"Overview"),mn.forEach(o),Et.forEach(o),ct=h(e),k=a(e,"P",{});var ee=r(k);It=i(ee,"The UPerNet model was proposed in "),ae=a(ee,"A",{href:!0,rel:!0});var fn=r(ae);Xt=i(fn,"Unified Perceptual Parsing for Scene Understanding"),fn.forEach(o),zt=i(ee,`
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 `),Me=a(ee,"A",{href:!0});var hn=r(Me);Bt=i(hn,"ConvNeXt"),hn.forEach(o),Qt=i(ee," or "),Ne=a(ee,"A",{href:!0});var dn=r(Ne);Yt=i(dn,"Swin"),dn.forEach(o),qt=i(ee,"."),ee.forEach(o),pt=h(e),$e=a(e,"P",{});var un=r($e);Ht=i(un,"The abstract from the paper is the following:"),un.forEach(o),mt=h(e),Se=a(e,"P",{});var gn=r(Se);He=a(gn,"EM",{});var bn=r(He);Ot=i(bn,"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."),bn.forEach(o),gn.forEach(o),ft=h(e),z=a(e,"IMG",{src:!0,alt:!0,width:!0}),ht=h(e),B=a(e,"SMALL",{});var Tt=r(B);Dt=i(Tt,"UPerNet framework. Taken from the "),ke=a(Tt,"A",{href:!0});var vn=r(ke);Lt=i(vn,"original paper"),vn.forEach(o),Kt=i(Tt,"."),Tt.forEach(o),dt=h(e),E=a(e,"P",{});var Ve=r(E);eo=i(Ve,"This model was contributed by "),re=a(Ve,"A",{href:!0,rel:!0});var yn=r(re);to=i(yn,"nielsr"),yn.forEach(o),oo=i(Ve,". The original code is based on OpenMMLab\u2019s mmsegmentation "),se=a(Ve,"A",{href:!0,rel:!0});var _n=r(se);no=i(_n,"here"),_n.forEach(o),ao=i(Ve,"."),Ve.forEach(o),ut=h(e),J=a(e,"H2",{class:!0});var xt=r(J);Q=a(xt,"A",{id:!0,class:!0,href:!0});var wn=r(Q);Oe=a(wn,"SPAN",{});var Un=r(Oe);w(ie.$$.fragment,Un),Un.forEach(o),wn.forEach(o),ro=h(xt),De=a(xt,"SPAN",{});var Mn=r(De);so=i(Mn,"Resources"),Mn.forEach(o),xt.forEach(o),gt=h(e),je=a(e,"P",{});var Nn=r(je);io=i(Nn,"A list of official Hugging Face and community (indicated by \u{1F30E}) resources to help you get started with UPerNet."),Nn.forEach(o),bt=h(e),T=a(e,"UL",{});var Ge=r(T);le=a(Ge,"LI",{});var Ct=r(le);lo=i(Ct,"Demo notebooks for UPerNet can be found "),ce=a(Ct,"A",{href:!0,rel:!0});var $n=r(ce);co=i($n,"here"),$n.forEach(o),po=i(Ct,"."),Ct.forEach(o),mo=h(Ge),x=a(Ge,"LI",{});var Ue=r(x);Ze=a(Ue,"A",{href:!0});var Sn=r(Ze);fo=i(Sn,"UperNetForSemanticSegmentation"),Sn.forEach(o),ho=i(Ue," is supported by this "),pe=a(Ue,"A",{href:!0,rel:!0});var kn=r(pe);uo=i(kn,"example script"),kn.forEach(o),go=i(Ue," and "),me=a(Ue,"A",{href:!0,rel:!0});var jn=r(me);bo=i(jn,"notebook"),jn.forEach(o),vo=i(Ue,"."),Ue.forEach(o),yo=h(Ge),Ee=a(Ge,"LI",{});var an=r(Ee);_o=i(an,"See also: "),Te=a(an,"A",{href:!0});var Zn=r(Te);wo=i(Zn,"Semantic segmentation task guide"),Zn.forEach(o),an.forEach(o),Ge.forEach(o),vt=h(e),xe=a(e,"P",{});var En=r(xe);Uo=i(En,"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."),En.forEach(o),yt=h(e),F=a(e,"H2",{class:!0});var Jt=r(F);Y=a(Jt,"A",{id:!0,class:!0,href:!0});var Tn=r(Y);Le=a(Tn,"SPAN",{});var xn=r(Le);w(fe.$$.fragment,xn),xn.forEach(o),Tn.forEach(o),Mo=h(Jt),Ke=a(Jt,"SPAN",{});var Cn=r(Ke);No=i(Cn,"Usage"),Cn.forEach(o),Jt.forEach(o),_t=h(e),Ce=a(e,"P",{});var Jn=r(Ce);$o=i(Jn,"UPerNet is a general framework for semantic segmentation. It can be used with any vision backbone, like so:"),Jn.forEach(o),wt=h(e),w(he.$$.fragment,e),Ut=h(e),q=a(e,"P",{});var Ft=r(q);So=i(Ft,"To use another vision backbone, like "),Je=a(Ft,"A",{href:!0});var Fn=r(Je);ko=i(Fn,"ConvNeXt"),Fn.forEach(o),jo=i(Ft,", simply instantiate the model with the appropriate backbone:"),Ft.forEach(o),Mt=h(e),w(de.$$.fragment,e),Nt=h(e),Fe=a(e,"P",{});var Wn=r(Fe);Zo=i(Wn,"Note that this will randomly initialize all the weights of the model."),Wn.forEach(o),$t=h(e),W=a(e,"H2",{class:!0});var Wt=r(W);H=a(Wt,"A",{id:!0,class:!0,href:!0});var Pn=r(H);et=a(Pn,"SPAN",{});var Rn=r(et);w(ue.$$.fragment,Rn),Rn.forEach(o),Pn.forEach(o),Eo=h(Wt),tt=a(Wt,"SPAN",{});var An=r(tt);To=i(An,"UperNetConfig"),An.forEach(o),Wt.forEach(o),St=h(e),S=a(e,"DIV",{class:!0});var te=r(S);w(ge.$$.fragment,te),xo=h(te),P=a(te,"P",{});var Ie=r(P);Co=i(Ie,"This is the configuration class to store the configuration of an "),We=a(Ie,"A",{href:!0});var Vn=r(We);Jo=i(Vn,"UperNetForSemanticSegmentation"),Vn.forEach(o),Fo=i(Ie,`. 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
`),be=a(Ie,"A",{href:!0,rel:!0});var Gn=r(be);Wo=i(Gn,"openmmlab/upernet-convnext-tiny"),Gn.forEach(o),Po=i(Ie," architecture."),Ie.forEach(o),Ro=h(te),R=a(te,"P",{});var Xe=r(R);Ao=i(Xe,"Configuration objects inherit from "),Pe=a(Xe,"A",{href:!0});var In=r(Pe);Vo=i(In,"PretrainedConfig"),In.forEach(o),Go=i(Xe,` and can be used to control the model outputs. Read the
documentation from `),Re=a(Xe,"A",{href:!0});var Xn=r(Re);Io=i(Xn,"PretrainedConfig"),Xn.forEach(o),Xo=i(Xe," for more information."),Xe.forEach(o),zo=h(te),w(O.$$.fragment,te),te.forEach(o),kt=h(e),A=a(e,"H2",{class:!0});var Pt=r(A);D=a(Pt,"A",{id:!0,class:!0,href:!0});var zn=r(D);ot=a(zn,"SPAN",{});var Bn=r(ot);w(ve.$$.fragment,Bn),Bn.forEach(o),zn.forEach(o),Bo=h(Pt),nt=a(Pt,"SPAN",{});var Qn=r(nt);Qo=i(Qn,"UperNetForSemanticSegmentation"),Qn.forEach(o),Pt.forEach(o),jt=h(e),Z=a(e,"DIV",{class:!0});var ze=r(Z);w(ye.$$.fragment,ze),Yo=h(ze),at=a(ze,"P",{});var Yn=r(at);qo=i(Yn,"UperNet framework leveraging any vision backbone e.g. for ADE20k, CityScapes."),Yn.forEach(o),Ho=h(ze),j=a(ze,"DIV",{class:!0});var oe=r(j);w(_e.$$.fragment,oe),Oo=h(oe),V=a(oe,"P",{});var Be=r(V);Do=i(Be,"The "),Ae=a(Be,"A",{href:!0});var qn=r(Ae);Lo=i(qn,"UperNetForSemanticSegmentation"),qn.forEach(o),Ko=i(Be," forward method, overrides the "),rt=a(Be,"CODE",{});var Hn=r(rt);en=i(Hn,"__call__"),Hn.forEach(o),tn=i(Be," special method."),Be.forEach(o),on=h(oe),w(L.$$.fragment,oe),nn=h(oe),w(K.$$.fragment,oe),oe.forEach(o),ze.forEach(o),this.h()},h(){l(d,"name","hf:doc:metadata"),l(d,"content",JSON.stringify(ca)),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(X,"id","overview"),l(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"),l(X,"href","#overview"),l(C,"class","relative group"),l(ae,"href","https://arxiv.org/abs/1807.10221"),l(ae,"rel","nofollow"),l(Me,"href","convnext"),l(Ne,"href","swin"),oa(z.src,sn="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/model_doc/upernet_architecture.jpg")||l(z,"src",sn),l(z,"alt","drawing"),l(z,"width","600"),l(ke,"href","https://arxiv.org/abs/1807.10221"),l(re,"href","https://huggingface.co/nielsr"),l(re,"rel","nofollow"),l(se,"href","https://github.com/open-mmlab/mmsegmentation/blob/master/mmseg/models/decode_heads/uper_head.py"),l(se,"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(J,"class","relative group"),l(ce,"href","https://github.com/NielsRogge/Transformers-Tutorials/tree/master/UPerNet"),l(ce,"rel","nofollow"),l(Ze,"href","/docs/transformers/v4.32.0/en/model_doc/upernet#transformers.UperNetForSemanticSegmentation"),l(pe,"href","https://github.com/huggingface/transformers/tree/main/examples/pytorch/semantic-segmentation"),l(pe,"rel","nofollow"),l(me,"href","https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/semantic_segmentation.ipynb"),l(me,"rel","nofollow"),l(Te,"href","../tasks/semantic_segmentation"),l(Y,"id","usage"),l(Y,"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(Y,"href","#usage"),l(F,"class","relative group"),l(Je,"href","convnext"),l(H,"id","transformers.UperNetConfig"),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","#transformers.UperNetConfig"),l(W,"class","relative group"),l(We,"href","/docs/transformers/v4.32.0/en/model_doc/upernet#transformers.UperNetForSemanticSegmentation"),l(be,"href","https://huggingface.co/openmmlab/upernet-convnext-tiny"),l(be,"rel","nofollow"),l(Pe,"href","/docs/transformers/v4.32.0/en/main_classes/configuration#transformers.PretrainedConfig"),l(Re,"href","/docs/transformers/v4.32.0/en/main_classes/configuration#transformers.PretrainedConfig"),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(D,"id","transformers.UperNetForSemanticSegmentation"),l(D,"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(D,"href","#transformers.UperNetForSemanticSegmentation"),l(A,"class","relative group"),l(Ae,"href","/docs/transformers/v4.32.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(Z,"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,d),p(e,y,c),p(e,g,c),t(g,u),t(u,v),U(m,v,null),t(g,b),t(g,I),t(I,At),p(e,lt,c),p(e,C,c),t(C,X),t(X,Ye),U(ne,Ye,null),t(C,Vt),t(C,qe),t(qe,Gt),p(e,ct,c),p(e,k,c),t(k,It),t(k,ae),t(ae,Xt),t(k,zt),t(k,Me),t(Me,Bt),t(k,Qt),t(k,Ne),t(Ne,Yt),t(k,qt),p(e,pt,c),p(e,$e,c),t($e,Ht),p(e,mt,c),p(e,Se,c),t(Se,He),t(He,Ot),p(e,ft,c),p(e,z,c),p(e,ht,c),p(e,B,c),t(B,Dt),t(B,ke),t(ke,Lt),t(B,Kt),p(e,dt,c),p(e,E,c),t(E,eo),t(E,re),t(re,to),t(E,oo),t(E,se),t(se,no),t(E,ao),p(e,ut,c),p(e,J,c),t(J,Q),t(Q,Oe),U(ie,Oe,null),t(J,ro),t(J,De),t(De,so),p(e,gt,c),p(e,je,c),t(je,io),p(e,bt,c),p(e,T,c),t(T,le),t(le,lo),t(le,ce),t(ce,co),t(le,po),t(T,mo),t(T,x),t(x,Ze),t(Ze,fo),t(x,ho),t(x,pe),t(pe,uo),t(x,go),t(x,me),t(me,bo),t(x,vo),t(T,yo),t(T,Ee),t(Ee,_o),t(Ee,Te),t(Te,wo),p(e,vt,c),p(e,xe,c),t(xe,Uo),p(e,yt,c),p(e,F,c),t(F,Y),t(Y,Le),U(fe,Le,null),t(F,Mo),t(F,Ke),t(Ke,No),p(e,_t,c),p(e,Ce,c),t(Ce,$o),p(e,wt,c),U(he,e,c),p(e,Ut,c),p(e,q,c),t(q,So),t(q,Je),t(Je,ko),t(q,jo),p(e,Mt,c),U(de,e,c),p(e,Nt,c),p(e,Fe,c),t(Fe,Zo),p(e,$t,c),p(e,W,c),t(W,H),t(H,et),U(ue,et,null),t(W,Eo),t(W,tt),t(tt,To),p(e,St,c),p(e,S,c),U(ge,S,null),t(S,xo),t(S,P),t(P,Co),t(P,We),t(We,Jo),t(P,Fo),t(P,be),t(be,Wo),t(P,Po),t(S,Ro),t(S,R),t(R,Ao),t(R,Pe),t(Pe,Vo),t(R,Go),t(R,Re),t(Re,Io),t(R,Xo),t(S,zo),U(O,S,null),p(e,kt,c),p(e,A,c),t(A,D),t(D,ot),U(ve,ot,null),t(A,Bo),t(A,nt),t(nt,Qo),p(e,jt,c),p(e,Z,c),U(ye,Z,null),t(Z,Yo),t(Z,at),t(at,qo),t(Z,Ho),t(Z,j),U(_e,j,null),t(j,Oo),t(j,V),t(V,Do),t(V,Ae),t(Ae,Lo),t(V,Ko),t(V,rt),t(rt,en),t(V,tn),t(j,on),U(L,j,null),t(j,nn),U(K,j,null),Zt=!0},p(e,[c]){const we={};c&2&&(we.$$scope={dirty:c,ctx:e}),O.$set(we);const st={};c&2&&(st.$$scope={dirty:c,ctx:e}),L.$set(st);const it={};c&2&&(it.$$scope={dirty:c,ctx:e}),K.$set(it)},i(e){Zt||(M(m.$$.fragment,e),M(ne.$$.fragment,e),M(ie.$$.fragment,e),M(fe.$$.fragment,e),M(he.$$.fragment,e),M(de.$$.fragment,e),M(ue.$$.fragment,e),M(ge.$$.fragment,e),M(O.$$.fragment,e),M(ve.$$.fragment,e),M(ye.$$.fragment,e),M(_e.$$.fragment,e),M(L.$$.fragment,e),M(K.$$.fragment,e),Zt=!0)},o(e){N(m.$$.fragment,e),N(ne.$$.fragment,e),N(ie.$$.fragment,e),N(fe.$$.fragment,e),N(he.$$.fragment,e),N(de.$$.fragment,e),N(ue.$$.fragment,e),N(ge.$$.fragment,e),N(O.$$.fragment,e),N(ve.$$.fragment,e),N(ye.$$.fragment,e),N(_e.$$.fragment,e),N(L.$$.fragment,e),N(K.$$.fragment,e),Zt=!1},d(e){o(d),e&&o(y),e&&o(g),$(m),e&&o(lt),e&&o(C),$(ne),e&&o(ct),e&&o(k),e&&o(pt),e&&o($e),e&&o(mt),e&&o(Se),e&&o(ft),e&&o(z),e&&o(ht),e&&o(B),e&&o(dt),e&&o(E),e&&o(ut),e&&o(J),$(ie),e&&o(gt),e&&o(je),e&&o(bt),e&&o(T),e&&o(vt),e&&o(xe),e&&o(yt),e&&o(F),$(fe),e&&o(_t),e&&o(Ce),e&&o(wt),$(he,e),e&&o(Ut),e&&o(q),e&&o(Mt),$(de,e),e&&o(Nt),e&&o(Fe),e&&o($t),e&&o(W),$(ue),e&&o(St),e&&o(S),$(ge),$(O),e&&o(kt),e&&o(A),$(ve),e&&o(jt),e&&o(Z),$(ye),$(_e),$(L),$(K)}}}const ca={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 pa(G){return na(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class ba extends Ln{constructor(d){super();Kn(this,d,pa,la,ea,{})}}export{ba as default,ca as metadata};
