import{s as It,o as Ut,n as Je}from"../chunks/scheduler.9bc65507.js";import{S as Ct,i as xt,g as d,s as a,r as g,A as $t,h as p,f as o,c as r,j as z,u as h,x as T,k as j,y as c,a as i,v as u,d as f,t as _,w as b}from"../chunks/index.707bf1b6.js";import{T as St}from"../chunks/Tip.c2ecdbf4.js";import{D as E}from"../chunks/Docstring.17db21ae.js";import{C as Ee}from"../chunks/CodeBlock.54a9f38d.js";import{E as mt}from"../chunks/ExampleCodeBlock.4f515aa9.js";import{H as Me}from"../chunks/Heading.342b1fa6.js";function zt(J){let n,w="Example:",l,m,y;return m=new Ee({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFNlZ0dwdENvbmZpZyUyQyUyMFNlZ0dwdE1vZGVsJTBBJTBBJTIzJTIwSW5pdGlhbGl6aW5nJTIwYSUyMFNlZ0dQVCUyMHNlZ2dwdC12aXQtbGFyZ2UlMjBzdHlsZSUyMGNvbmZpZ3VyYXRpb24lMEFjb25maWd1cmF0aW9uJTIwJTNEJTIwU2VnR3B0Q29uZmlnKCklMEElMEElMjMlMjBJbml0aWFsaXppbmclMjBhJTIwbW9kZWwlMjAod2l0aCUyMHJhbmRvbSUyMHdlaWdodHMpJTIwZnJvbSUyMHRoZSUyMHNlZ2dwdC12aXQtbGFyZ2UlMjBzdHlsZSUyMGNvbmZpZ3VyYXRpb24lMEFtb2RlbCUyMCUzRCUyMFNlZ0dwdE1vZGVsKGNvbmZpZ3VyYXRpb24pJTBBJTBBJTIzJTIwQWNjZXNzaW5nJTIwdGhlJTIwbW9kZWwlMjBjb25maWd1cmF0aW9uJTBBY29uZmlndXJhdGlvbiUyMCUzRCUyMG1vZGVsLmNvbmZpZw==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> SegGptConfig, SegGptModel

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a SegGPT seggpt-vit-large style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = SegGptConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a model (with random weights) from the seggpt-vit-large style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = SegGptModel(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`,wrap:!1}}),{c(){n=d("p"),n.textContent=w,l=a(),g(m.$$.fragment)},l(s){n=p(s,"P",{"data-svelte-h":!0}),T(n)!=="svelte-11lpom8"&&(n.textContent=w),l=r(s),h(m.$$.fragment,s)},m(s,v){i(s,n,v),i(s,l,v),u(m,s,v),y=!0},p:Je,i(s){y||(f(m.$$.fragment,s),y=!0)},o(s){_(m.$$.fragment,s),y=!1},d(s){s&&(o(n),o(l)),b(m,s)}}}function jt(J){let n,w=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){n=d("p"),n.innerHTML=w},l(l){n=p(l,"P",{"data-svelte-h":!0}),T(n)!=="svelte-fincs2"&&(n.innerHTML=w)},m(l,m){i(l,n,m)},p:Je,d(l){l&&o(n)}}}function Zt(J){let n,w="Examples:",l,m,y;return m=new Ee({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFNlZ0dwdEltYWdlUHJvY2Vzc29yJTJDJTIwU2VnR3B0TW9kZWwlMEFmcm9tJTIwUElMJTIwaW1wb3J0JTIwSW1hZ2UlMEFpbXBvcnQlMjByZXF1ZXN0cyUwQSUwQWltYWdlX2lucHV0X3VybCUyMCUzRCUyMCUyMmh0dHBzJTNBJTJGJTJGcmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSUyRmJhYWl2aXNpb24lMkZQYWludGVyJTJGbWFpbiUyRlNlZ0dQVCUyRlNlZ0dQVF9pbmZlcmVuY2UlMkZleGFtcGxlcyUyRmhtYmJfMi5qcGclMjIlMEFpbWFnZV9wcm9tcHRfdXJsJTIwJTNEJTIwJTIyaHR0cHMlM0ElMkYlMkZyYXcuZ2l0aHVidXNlcmNvbnRlbnQuY29tJTJGYmFhaXZpc2lvbiUyRlBhaW50ZXIlMkZtYWluJTJGU2VnR1BUJTJGU2VnR1BUX2luZmVyZW5jZSUyRmV4YW1wbGVzJTJGaG1iYl8xLmpwZyUyMiUwQW1hc2tfcHJvbXB0X3VybCUyMCUzRCUyMCUyMmh0dHBzJTNBJTJGJTJGcmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSUyRmJhYWl2aXNpb24lMkZQYWludGVyJTJGbWFpbiUyRlNlZ0dQVCUyRlNlZ0dQVF9pbmZlcmVuY2UlMkZleGFtcGxlcyUyRmhtYmJfMV90YXJnZXQucG5nJTIyJTBBJTBBaW1hZ2VfaW5wdXQlMjAlM0QlMjBJbWFnZS5vcGVuKHJlcXVlc3RzLmdldChpbWFnZV9pbnB1dF91cmwlMkMlMjBzdHJlYW0lM0RUcnVlKS5yYXcpJTBBaW1hZ2VfcHJvbXB0JTIwJTNEJTIwSW1hZ2Uub3BlbihyZXF1ZXN0cy5nZXQoaW1hZ2VfcHJvbXB0X3VybCUyQyUyMHN0cmVhbSUzRFRydWUpLnJhdyklMEFtYXNrX3Byb21wdCUyMCUzRCUyMEltYWdlLm9wZW4ocmVxdWVzdHMuZ2V0KG1hc2tfcHJvbXB0X3VybCUyQyUyMHN0cmVhbSUzRFRydWUpLnJhdykuY29udmVydCglMjJMJTIyKSUwQSUwQWNoZWNrcG9pbnQlMjAlM0QlMjAlMjJCQUFJJTJGc2VnZ3B0LXZpdC1sYXJnZSUyMiUwQW1vZGVsJTIwJTNEJTIwU2VnR3B0TW9kZWwuZnJvbV9wcmV0cmFpbmVkKGNoZWNrcG9pbnQpJTBBaW1hZ2VfcHJvY2Vzc29yJTIwJTNEJTIwU2VnR3B0SW1hZ2VQcm9jZXNzb3IuZnJvbV9wcmV0cmFpbmVkKGNoZWNrcG9pbnQpJTBBJTBBaW5wdXRzJTIwJTNEJTIwaW1hZ2VfcHJvY2Vzc29yKGltYWdlcyUzRGltYWdlX2lucHV0JTJDJTIwcHJvbXB0X2ltYWdlcyUzRGltYWdlX3Byb21wdCUyQyUyMHByb21wdF9tYXNrcyUzRG1hc2tfcHJvbXB0JTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEElMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpJTBBbGlzdChvdXRwdXRzLmxhc3RfaGlkZGVuX3N0YXRlLnNoYXBlKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> SegGptImageProcessor, SegGptModel
<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">import</span> requests

<span class="hljs-meta">&gt;&gt;&gt; </span>image_input_url = <span class="hljs-string">&quot;https://raw.githubusercontent.com/baaivision/Painter/main/SegGPT/SegGPT_inference/examples/hmbb_2.jpg&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>image_prompt_url = <span class="hljs-string">&quot;https://raw.githubusercontent.com/baaivision/Painter/main/SegGPT/SegGPT_inference/examples/hmbb_1.jpg&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>mask_prompt_url = <span class="hljs-string">&quot;https://raw.githubusercontent.com/baaivision/Painter/main/SegGPT/SegGPT_inference/examples/hmbb_1_target.png&quot;</span>

<span class="hljs-meta">&gt;&gt;&gt; </span>image_input = Image.<span class="hljs-built_in">open</span>(requests.get(image_input_url, stream=<span class="hljs-literal">True</span>).raw)
<span class="hljs-meta">&gt;&gt;&gt; </span>image_prompt = Image.<span class="hljs-built_in">open</span>(requests.get(image_prompt_url, stream=<span class="hljs-literal">True</span>).raw)
<span class="hljs-meta">&gt;&gt;&gt; </span>mask_prompt = Image.<span class="hljs-built_in">open</span>(requests.get(mask_prompt_url, stream=<span class="hljs-literal">True</span>).raw).convert(<span class="hljs-string">&quot;L&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>checkpoint = <span class="hljs-string">&quot;BAAI/seggpt-vit-large&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = SegGptModel.from_pretrained(checkpoint)
<span class="hljs-meta">&gt;&gt;&gt; </span>image_processor = SegGptImageProcessor.from_pretrained(checkpoint)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = image_processor(images=image_input, prompt_images=image_prompt, prompt_masks=mask_prompt, 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><span class="hljs-built_in">list</span>(outputs.last_hidden_state.shape)
[<span class="hljs-number">1</span>, <span class="hljs-number">56</span>, <span class="hljs-number">28</span>, <span class="hljs-number">1024</span>]`,wrap:!1}}),{c(){n=d("p"),n.textContent=w,l=a(),g(m.$$.fragment)},l(s){n=p(s,"P",{"data-svelte-h":!0}),T(n)!=="svelte-kvfsh7"&&(n.textContent=w),l=r(s),h(m.$$.fragment,s)},m(s,v){i(s,n,v),i(s,l,v),u(m,s,v),y=!0},p:Je,i(s){y||(f(m.$$.fragment,s),y=!0)},o(s){_(m.$$.fragment,s),y=!1},d(s){s&&(o(n),o(l)),b(m,s)}}}function Wt(J){let n,w=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){n=d("p"),n.innerHTML=w},l(l){n=p(l,"P",{"data-svelte-h":!0}),T(n)!=="svelte-fincs2"&&(n.innerHTML=w)},m(l,m){i(l,n,m)},p:Je,d(l){l&&o(n)}}}function Ft(J){let n,w="Examples:",l,m,y;return m=new Ee({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFNlZ0dwdEltYWdlUHJvY2Vzc29yJTJDJTIwU2VnR3B0Rm9ySW1hZ2VTZWdtZW50YXRpb24lMEFmcm9tJTIwUElMJTIwaW1wb3J0JTIwSW1hZ2UlMEFpbXBvcnQlMjByZXF1ZXN0cyUwQSUwQWltYWdlX2lucHV0X3VybCUyMCUzRCUyMCUyMmh0dHBzJTNBJTJGJTJGcmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSUyRmJhYWl2aXNpb24lMkZQYWludGVyJTJGbWFpbiUyRlNlZ0dQVCUyRlNlZ0dQVF9pbmZlcmVuY2UlMkZleGFtcGxlcyUyRmhtYmJfMi5qcGclMjIlMEFpbWFnZV9wcm9tcHRfdXJsJTIwJTNEJTIwJTIyaHR0cHMlM0ElMkYlMkZyYXcuZ2l0aHVidXNlcmNvbnRlbnQuY29tJTJGYmFhaXZpc2lvbiUyRlBhaW50ZXIlMkZtYWluJTJGU2VnR1BUJTJGU2VnR1BUX2luZmVyZW5jZSUyRmV4YW1wbGVzJTJGaG1iYl8xLmpwZyUyMiUwQW1hc2tfcHJvbXB0X3VybCUyMCUzRCUyMCUyMmh0dHBzJTNBJTJGJTJGcmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSUyRmJhYWl2aXNpb24lMkZQYWludGVyJTJGbWFpbiUyRlNlZ0dQVCUyRlNlZ0dQVF9pbmZlcmVuY2UlMkZleGFtcGxlcyUyRmhtYmJfMV90YXJnZXQucG5nJTIyJTBBJTBBaW1hZ2VfaW5wdXQlMjAlM0QlMjBJbWFnZS5vcGVuKHJlcXVlc3RzLmdldChpbWFnZV9pbnB1dF91cmwlMkMlMjBzdHJlYW0lM0RUcnVlKS5yYXcpJTBBaW1hZ2VfcHJvbXB0JTIwJTNEJTIwSW1hZ2Uub3BlbihyZXF1ZXN0cy5nZXQoaW1hZ2VfcHJvbXB0X3VybCUyQyUyMHN0cmVhbSUzRFRydWUpLnJhdyklMEFtYXNrX3Byb21wdCUyMCUzRCUyMEltYWdlLm9wZW4ocmVxdWVzdHMuZ2V0KG1hc2tfcHJvbXB0X3VybCUyQyUyMHN0cmVhbSUzRFRydWUpLnJhdykuY29udmVydCglMjJMJTIyKSUwQSUwQWNoZWNrcG9pbnQlMjAlM0QlMjAlMjJCQUFJJTJGc2VnZ3B0LXZpdC1sYXJnZSUyMiUwQW1vZGVsJTIwJTNEJTIwU2VnR3B0Rm9ySW1hZ2VTZWdtZW50YXRpb24uZnJvbV9wcmV0cmFpbmVkKGNoZWNrcG9pbnQpJTBBaW1hZ2VfcHJvY2Vzc29yJTIwJTNEJTIwU2VnR3B0SW1hZ2VQcm9jZXNzb3IuZnJvbV9wcmV0cmFpbmVkKGNoZWNrcG9pbnQpJTBBJTBBaW5wdXRzJTIwJTNEJTIwaW1hZ2VfcHJvY2Vzc29yKGltYWdlcyUzRGltYWdlX2lucHV0JTJDJTIwcHJvbXB0X2ltYWdlcyUzRGltYWdlX3Byb21wdCUyQyUyMHByb21wdF9tYXNrcyUzRG1hc2tfcHJvbXB0JTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpJTBBcmVzdWx0JTIwJTNEJTIwaW1hZ2VfcHJvY2Vzc29yLnBvc3RfcHJvY2Vzc19zZW1hbnRpY19zZWdtZW50YXRpb24ob3V0cHV0cyUyQyUyMHRhcmdldF9zaXplcyUzRCU1QmltYWdlX2lucHV0LnNpemUlNUIlM0ElM0EtMSU1RCU1RCklNUIwJTVEJTBBcHJpbnQobGlzdChyZXN1bHQuc2hhcGUpKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> SegGptImageProcessor, SegGptForImageSegmentation
<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">import</span> requests

<span class="hljs-meta">&gt;&gt;&gt; </span>image_input_url = <span class="hljs-string">&quot;https://raw.githubusercontent.com/baaivision/Painter/main/SegGPT/SegGPT_inference/examples/hmbb_2.jpg&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>image_prompt_url = <span class="hljs-string">&quot;https://raw.githubusercontent.com/baaivision/Painter/main/SegGPT/SegGPT_inference/examples/hmbb_1.jpg&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>mask_prompt_url = <span class="hljs-string">&quot;https://raw.githubusercontent.com/baaivision/Painter/main/SegGPT/SegGPT_inference/examples/hmbb_1_target.png&quot;</span>

<span class="hljs-meta">&gt;&gt;&gt; </span>image_input = Image.<span class="hljs-built_in">open</span>(requests.get(image_input_url, stream=<span class="hljs-literal">True</span>).raw)
<span class="hljs-meta">&gt;&gt;&gt; </span>image_prompt = Image.<span class="hljs-built_in">open</span>(requests.get(image_prompt_url, stream=<span class="hljs-literal">True</span>).raw)
<span class="hljs-meta">&gt;&gt;&gt; </span>mask_prompt = Image.<span class="hljs-built_in">open</span>(requests.get(mask_prompt_url, stream=<span class="hljs-literal">True</span>).raw).convert(<span class="hljs-string">&quot;L&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>checkpoint = <span class="hljs-string">&quot;BAAI/seggpt-vit-large&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = SegGptForImageSegmentation.from_pretrained(checkpoint)
<span class="hljs-meta">&gt;&gt;&gt; </span>image_processor = SegGptImageProcessor.from_pretrained(checkpoint)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = image_processor(images=image_input, prompt_images=image_prompt, prompt_masks=mask_prompt, 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>result = image_processor.post_process_semantic_segmentation(outputs, target_sizes=[image_input.size[::-<span class="hljs-number">1</span>]])[<span class="hljs-number">0</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(<span class="hljs-built_in">list</span>(result.shape))
[<span class="hljs-number">170</span>, <span class="hljs-number">297</span>]`,wrap:!1}}),{c(){n=d("p"),n.textContent=w,l=a(),g(m.$$.fragment)},l(s){n=p(s,"P",{"data-svelte-h":!0}),T(n)!=="svelte-kvfsh7"&&(n.textContent=w),l=r(s),h(m.$$.fragment,s)},m(s,v){i(s,n,v),i(s,l,v),u(m,s,v),y=!0},p:Je,i(s){y||(f(m.$$.fragment,s),y=!0)},o(s){_(m.$$.fragment,s),y=!1},d(s){s&&(o(n),o(l)),b(m,s)}}}function Vt(J){let n,w,l,m,y,s,v,Se,H,ct='The SegGPT model was proposed in <a href="https://arxiv.org/abs/2304.03284" rel="nofollow">SegGPT: Segmenting Everything In Context</a> by Xinlong Wang, Xiaosong Zhang, Yue Cao, Wen Wang, Chunhua Shen, Tiejun Huang. SegGPT employs a decoder-only Transformer that can generate a segmentation mask given an input image, a prompt image and its corresponding prompt mask. The model achieves remarkable one-shot results with 56.1 mIoU on COCO-20 and 85.6 mIoU on FSS-1000.',Ie,Y,dt="The abstract from the paper is the following:",Ue,Q,pt="<em>We present SegGPT, a generalist model for segmenting everything in context. We unify various segmentation tasks into a generalist in-context learning framework that accommodates different kinds of segmentation data by transforming them into the same format of images. The training of SegGPT is formulated as an in-context coloring problem with random color mapping for each data sample. The objective is to accomplish diverse tasks according to the context, rather than relying on specific colors. After training, SegGPT can perform arbitrary segmentation tasks in images or videos via in-context inference, such as object instance, stuff, part, contour, and text. SegGPT is evaluated on a broad range of tasks, including few-shot semantic segmentation, video object segmentation, semantic segmentation, and panoptic segmentation. Our results show strong capabilities in segmenting in-domain and out-of</em>",Ce,L,gt="Tips:",xe,q,ht='<li>One can use <a href="/docs/transformers/main/en/model_doc/seggpt#transformers.SegGptImageProcessor">SegGptImageProcessor</a> to prepare image input, prompt and mask to the model.</li> <li>It’s highly advisable to pass <code>num_labels</code> (not considering background) during preprocessing and postprocessing with <a href="/docs/transformers/main/en/model_doc/seggpt#transformers.SegGptImageProcessor">SegGptImageProcessor</a> for your use case.</li> <li>When doing infenrece with <a href="/docs/transformers/main/en/model_doc/seggpt#transformers.SegGptForImageSegmentation">SegGptForImageSegmentation</a> if your <code>batch_size</code> is greater than 1 you can use feature ensemble across your images by passing <code>feature_ensemble=True</code> in the forward method.</li>',$e,A,ut="Here’s how to use the model for one-shot semantic segmentation:",ze,D,je,O,ft=`This model was contributed by <a href="https://huggingface.co/EduardoPacheco" rel="nofollow">EduardoPacheco</a>.
The original code can be found <a href="%5B(https://github.com/baaivision/Painter/tree/main)">here</a>.`,Ze,K,We,M,ee,He,ge,_t=`This is the configuration class to store the configuration of a <a href="/docs/transformers/main/en/model_doc/seggpt#transformers.SegGptModel">SegGptModel</a>. It is used to instantiate a SegGPT
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 SegGPT
<a href="https://huggingface.co/BAAI/seggpt-vit-large" rel="nofollow">BAAI/seggpt-vit-large</a> architecture.`,Ye,he,bt=`Configuration objects inherit from <a href="/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> and can be used to control the model outputs. Read the
documentation from <a href="/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> for more information.`,Qe,W,Fe,te,Ve,G,oe,Le,ue,yt="Constructs a SegGpt image processor.",qe,F,ne,Ae,fe,Tt="Preprocess an image or batch of images.",De,V,se,Oe,_e,wt=`Converts the output of <code>SegGptImageSegmentationOutput</code> into segmentation maps. Only supports
PyTorch.`,ke,ae,Re,U,re,Ke,be,vt=`The bare SegGpt Model transformer outputting raw hidden-states without any specific head on top.
This model is a PyTorch <a href="https://pytorch.org/docs/stable/nn.html#torch.nn.Module" rel="nofollow">torch.nn.Module</a> subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`,et,S,ie,tt,ye,Mt='The <a href="/docs/transformers/main/en/model_doc/seggpt#transformers.SegGptModel">SegGptModel</a> forward method, overrides the <code>__call__</code> special method.',ot,k,nt,R,Ne,le,Be,C,me,st,Te,Gt=`SegGpt model with a decoder on top for one-shot image segmentation.
This model is a PyTorch <a href="https://pytorch.org/docs/stable/nn.html#torch.nn.Module" rel="nofollow">torch.nn.Module</a> subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`,at,I,ce,rt,we,Jt='The <a href="/docs/transformers/main/en/model_doc/seggpt#transformers.SegGptForImageSegmentation">SegGptForImageSegmentation</a> forward method, overrides the <code>__call__</code> special method.',it,N,lt,B,Pe,Ge,Xe;return y=new Me({props:{title:"SegGPT",local:"seggpt",headingTag:"h1"}}),v=new Me({props:{title:"Overview",local:"overview",headingTag:"h2"}}),D=new Ee({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGF0YXNldHMlMjBpbXBvcnQlMjBsb2FkX2RhdGFzZXQlMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwU2VnR3B0SW1hZ2VQcm9jZXNzb3IlMkMlMjBTZWdHcHRGb3JJbWFnZVNlZ21lbnRhdGlvbiUwQSUwQW1vZGVsX2lkJTIwJTNEJTIwJTIyQkFBSSUyRnNlZ2dwdC12aXQtbGFyZ2UlMjIlMEFpbWFnZV9wcm9jZXNzb3IlMjAlM0QlMjBTZWdHcHRJbWFnZVByb2Nlc3Nvci5mcm9tX3ByZXRyYWluZWQoY2hlY2twb2ludCklMEFtb2RlbCUyMCUzRCUyMFNlZ0dwdEZvckltYWdlU2VnbWVudGF0aW9uLmZyb21fcHJldHJhaW5lZChjaGVja3BvaW50KSUwQSUwQWRhdGFzZXRfaWQlMjAlM0QlMjAlMjJFZHVhcmRvUGFjaGVjbyUyRkZvb2RTZWcxMDMlMjIlMEFkcyUyMCUzRCUyMGxvYWRfZGF0YXNldChkYXRhc2V0X2lkJTJDJTIwc3BsaXQlM0QlMjJ0cmFpbiUyMiklMEElMjMlMjBOdW1iZXIlMjBvZiUyMGxhYmVscyUyMGluJTIwRm9vZFNlZzEwMyUyMChub3QlMjBpbmNsdWRpbmclMjBiYWNrZ3JvdW5kKSUwQW51bV9sYWJlbHMlMjAlM0QlMjAxMDMlMEElMEFpbWFnZV9pbnB1dCUyMCUzRCUyMGRzJTVCNCU1RCU1QiUyMmltYWdlJTIyJTVEJTBBZ3JvdW5kX3RydXRoJTIwJTNEJTIwZHMlNUI0JTVEJTVCJTIybGFiZWwlMjIlNUQlMEFpbWFnZV9wcm9tcHQlMjAlM0QlMjBkcyU1QjI5JTVEJTVCJTIyaW1hZ2UlMjIlNUQlMEFtYXNrX3Byb21wdCUyMCUzRCUyMGRzJTVCMjklNUQlNUIlMjJsYWJlbCUyMiU1RCUwQSUwQWlucHV0cyUyMCUzRCUyMGltYWdlX3Byb2Nlc3NvciglMEElMjAlMjAlMjAlMjBpbWFnZXMlM0RpbWFnZV9pbnB1dCUyQyUyMCUwQSUyMCUyMCUyMCUyMHByb21wdF9pbWFnZXMlM0RpbWFnZV9wcm9tcHQlMkMlMEElMjAlMjAlMjAlMjBwcm9tcHRfbWFza3MlM0RtYXNrX3Byb21wdCUyQyUyMCUwQSUyMCUyMCUyMCUyMG51bV9sYWJlbHMlM0RudW1fbGFiZWxzJTJDJTBBJTIwJTIwJTIwJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiUwQSklMEElMEF3aXRoJTIwdG9yY2gubm9fZ3JhZCgpJTNBJTBBJTIwJTIwJTIwJTIwb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKSUwQSUwQXRhcmdldF9zaXplcyUyMCUzRCUyMCU1QmltYWdlX2lucHV0LnNpemUlNUIlM0ElM0EtMSU1RCU1RCUwQW1hc2slMjAlM0QlMjBpbWFnZV9wcm9jZXNzb3IucG9zdF9wcm9jZXNzX3NlbWFudGljX3NlZ21lbnRhdGlvbihvdXRwdXRzJTJDJTIwdGFyZ2V0X3NpemVzJTJDJTIwbnVtX2xhYmVscyUzRG51bV9sYWJlbHMpJTVCMCU1RA==",highlighted:`<span class="hljs-keyword">import</span> torch
<span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset
<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> SegGptImageProcessor, SegGptForImageSegmentation

model_id = <span class="hljs-string">&quot;BAAI/seggpt-vit-large&quot;</span>
image_processor = SegGptImageProcessor.from_pretrained(checkpoint)
model = SegGptForImageSegmentation.from_pretrained(checkpoint)

dataset_id = <span class="hljs-string">&quot;EduardoPacheco/FoodSeg103&quot;</span>
ds = load_dataset(dataset_id, split=<span class="hljs-string">&quot;train&quot;</span>)
<span class="hljs-comment"># Number of labels in FoodSeg103 (not including background)</span>
num_labels = <span class="hljs-number">103</span>

image_input = ds[<span class="hljs-number">4</span>][<span class="hljs-string">&quot;image&quot;</span>]
ground_truth = ds[<span class="hljs-number">4</span>][<span class="hljs-string">&quot;label&quot;</span>]
image_prompt = ds[<span class="hljs-number">29</span>][<span class="hljs-string">&quot;image&quot;</span>]
mask_prompt = ds[<span class="hljs-number">29</span>][<span class="hljs-string">&quot;label&quot;</span>]

inputs = image_processor(
    images=image_input, 
    prompt_images=image_prompt,
    prompt_masks=mask_prompt, 
    num_labels=num_labels,
    return_tensors=<span class="hljs-string">&quot;pt&quot;</span>
)

<span class="hljs-keyword">with</span> torch.no_grad():
    outputs = model(**inputs)

target_sizes = [image_input.size[::-<span class="hljs-number">1</span>]]
mask = image_processor.post_process_semantic_segmentation(outputs, target_sizes, num_labels=num_labels)[<span class="hljs-number">0</span>]`,wrap:!1}}),K=new Me({props:{title:"SegGptConfig",local:"transformers.SegGptConfig",headingTag:"h2"}}),ee=new E({props:{name:"class transformers.SegGptConfig",anchor:"transformers.SegGptConfig",parameters:[{name:"hidden_size",val:" = 1024"},{name:"num_hidden_layers",val:" = 24"},{name:"num_attention_heads",val:" = 16"},{name:"hidden_act",val:" = 'gelu'"},{name:"hidden_dropout_prob",val:" = 0.0"},{name:"initializer_range",val:" = 0.02"},{name:"layer_norm_eps",val:" = 1e-06"},{name:"image_size",val:" = [896, 448]"},{name:"patch_size",val:" = 16"},{name:"num_channels",val:" = 3"},{name:"qkv_bias",val:" = True"},{name:"mlp_dim",val:" = None"},{name:"drop_path_rate",val:" = 0.1"},{name:"pretrain_image_size",val:" = 224"},{name:"decoder_hidden_size",val:" = 64"},{name:"use_relative_position_embeddings",val:" = True"},{name:"merge_index",val:" = 2"},{name:"intermediate_hidden_state_indices",val:" = [5, 11, 17, 23]"},{name:"beta",val:" = 0.01"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.SegGptConfig.hidden_size",description:`<strong>hidden_size</strong> (<code>int</code>, <em>optional</em>, defaults to 1024) &#x2014;
Dimensionality of the encoder layers and the pooler layer.`,name:"hidden_size"},{anchor:"transformers.SegGptConfig.num_hidden_layers",description:`<strong>num_hidden_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 24) &#x2014;
Number of hidden layers in the Transformer encoder.`,name:"num_hidden_layers"},{anchor:"transformers.SegGptConfig.num_attention_heads",description:`<strong>num_attention_heads</strong> (<code>int</code>, <em>optional</em>, defaults to 16) &#x2014;
Number of attention heads for each attention layer in the Transformer encoder.`,name:"num_attention_heads"},{anchor:"transformers.SegGptConfig.hidden_act",description:`<strong>hidden_act</strong> (<code>str</code> or <code>function</code>, <em>optional</em>, defaults to <code>&quot;gelu&quot;</code>) &#x2014;
The non-linear activation function (function or string) in the encoder and pooler. If string, <code>&quot;gelu&quot;</code>,
<code>&quot;relu&quot;</code>, <code>&quot;selu&quot;</code> and <code>&quot;gelu_new&quot;</code> are supported.`,name:"hidden_act"},{anchor:"transformers.SegGptConfig.hidden_dropout_prob",description:`<strong>hidden_dropout_prob</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The dropout probability for all fully connected layers in the embeddings, encoder, and pooler.`,name:"hidden_dropout_prob"},{anchor:"transformers.SegGptConfig.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.SegGptConfig.layer_norm_eps",description:`<strong>layer_norm_eps</strong> (<code>float</code>, <em>optional</em>, defaults to 1e-06) &#x2014;
The epsilon used by the layer normalization layers.`,name:"layer_norm_eps"},{anchor:"transformers.SegGptConfig.image_size",description:`<strong>image_size</strong> (<code>List[int]</code>, <em>optional</em>, defaults to <code>[896, 448]</code>) &#x2014;
The size (resolution) of each image.`,name:"image_size"},{anchor:"transformers.SegGptConfig.patch_size",description:`<strong>patch_size</strong> (<code>int</code>, <em>optional</em>, defaults to 16) &#x2014;
The size (resolution) of each patch.`,name:"patch_size"},{anchor:"transformers.SegGptConfig.num_channels",description:`<strong>num_channels</strong> (<code>int</code>, <em>optional</em>, defaults to 3) &#x2014;
The number of input channels.`,name:"num_channels"},{anchor:"transformers.SegGptConfig.qkv_bias",description:`<strong>qkv_bias</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to add a bias to the queries, keys and values.`,name:"qkv_bias"},{anchor:"transformers.SegGptConfig.mlp_dim",description:`<strong>mlp_dim</strong> (<code>int</code>, <em>optional</em>) &#x2014;
The dimensionality of the MLP layer in the Transformer encoder. If unset, defaults to
<code>hidden_size</code> * 4.`,name:"mlp_dim"},{anchor:"transformers.SegGptConfig.drop_path_rate",description:`<strong>drop_path_rate</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The drop path rate for the dropout layers.`,name:"drop_path_rate"},{anchor:"transformers.SegGptConfig.pretrain_image_size",description:`<strong>pretrain_image_size</strong> (<code>int</code>, <em>optional</em>, defaults to 224) &#x2014;
The pretrained size of the absolute position embeddings.`,name:"pretrain_image_size"},{anchor:"transformers.SegGptConfig.decoder_hidden_size",description:`<strong>decoder_hidden_size</strong> (<code>int</code>, <em>optional</em>, defaults to 64) &#x2014;
Hidden size for decoder.`,name:"decoder_hidden_size"},{anchor:"transformers.SegGptConfig.use_relative_position_embeddings",description:`<strong>use_relative_position_embeddings</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to use relative position embeddings in the attention layers.`,name:"use_relative_position_embeddings"},{anchor:"transformers.SegGptConfig.merge_index",description:`<strong>merge_index</strong> (<code>int</code>, <em>optional</em>, defaults to 2) &#x2014;
The index of the encoder layer to merge the embeddings.`,name:"merge_index"},{anchor:"transformers.SegGptConfig.intermediate_hidden_state_indices",description:`<strong>intermediate_hidden_state_indices</strong> (<code>List[int]</code>, <em>optional</em>, defaults to <code>[5, 11, 17, 23]</code>) &#x2014;
The indices of the encoder layers which we store as features for the decoder.`,name:"intermediate_hidden_state_indices"},{anchor:"transformers.SegGptConfig.beta",description:`<strong>beta</strong> (<code>float</code>, <em>optional</em>, defaults to 0.01) &#x2014;
Regularization factor for SegGptLoss (smooth-l1 loss).`,name:"beta"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/seggpt/configuration_seggpt.py#L29"}}),W=new mt({props:{anchor:"transformers.SegGptConfig.example",$$slots:{default:[zt]},$$scope:{ctx:J}}}),te=new Me({props:{title:"SegGptImageProcessor",local:"transformers.SegGptImageProcessor",headingTag:"h2"}}),oe=new E({props:{name:"class transformers.SegGptImageProcessor",anchor:"transformers.SegGptImageProcessor",parameters:[{name:"do_resize",val:": bool = True"},{name:"size",val:": Optional = None"},{name:"resample",val:": Resampling = <Resampling.BICUBIC: 3>"},{name:"do_rescale",val:": bool = True"},{name:"rescale_factor",val:": Union = 0.00392156862745098"},{name:"do_normalize",val:": bool = True"},{name:"image_mean",val:": Union = None"},{name:"image_std",val:": Union = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.SegGptImageProcessor.do_resize",description:`<strong>do_resize</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to resize the image&#x2019;s (height, width) dimensions to the specified <code>(size[&quot;height&quot;], size[&quot;width&quot;])</code>. Can be overridden by the <code>do_resize</code> parameter in the <code>preprocess</code> method.`,name:"do_resize"},{anchor:"transformers.SegGptImageProcessor.size",description:`<strong>size</strong> (<code>dict</code>, <em>optional</em>, defaults to <code>{&quot;height&quot; -- 448, &quot;width&quot;: 448}</code>):
Size of the output image after resizing. Can be overridden by the <code>size</code> parameter in the <code>preprocess</code>
method.`,name:"size"},{anchor:"transformers.SegGptImageProcessor.resample",description:`<strong>resample</strong> (<code>PILImageResampling</code>, <em>optional</em>, defaults to <code>Resampling.BICUBIC</code>) &#x2014;
Resampling filter to use if resizing the image. Can be overridden by the <code>resample</code> parameter in the
<code>preprocess</code> method.`,name:"resample"},{anchor:"transformers.SegGptImageProcessor.do_rescale",description:`<strong>do_rescale</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to rescale the image by the specified scale <code>rescale_factor</code>. Can be overridden by the <code>do_rescale</code>
parameter in the <code>preprocess</code> method.`,name:"do_rescale"},{anchor:"transformers.SegGptImageProcessor.rescale_factor",description:`<strong>rescale_factor</strong> (<code>int</code> or <code>float</code>, <em>optional</em>, defaults to <code>1/255</code>) &#x2014;
Scale factor to use if rescaling the image. Can be overridden by the <code>rescale_factor</code> parameter in the
<code>preprocess</code> method.`,name:"rescale_factor"},{anchor:"transformers.SegGptImageProcessor.do_normalize",description:`<strong>do_normalize</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to normalize the image. Can be overridden by the <code>do_normalize</code> parameter in the <code>preprocess</code>
method.`,name:"do_normalize"},{anchor:"transformers.SegGptImageProcessor.image_mean",description:`<strong>image_mean</strong> (<code>float</code> or <code>List[float]</code>, <em>optional</em>, defaults to <code>IMAGENET_DEFAULT_MEAN</code>) &#x2014;
Mean to use if normalizing the image. This is a float or list of floats the length of the number of
channels in the image. Can be overridden by the <code>image_mean</code> parameter in the <code>preprocess</code> method.`,name:"image_mean"},{anchor:"transformers.SegGptImageProcessor.image_std",description:`<strong>image_std</strong> (<code>float</code> or <code>List[float]</code>, <em>optional</em>, defaults to <code>IMAGENET_DEFAULT_STD</code>) &#x2014;
Standard deviation to use if normalizing the image. This is a float or list of floats the length of the
number of channels in the image. Can be overridden by the <code>image_std</code> parameter in the <code>preprocess</code> method.`,name:"image_std"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/seggpt/image_processing_seggpt.py#L117"}}),ne=new E({props:{name:"preprocess",anchor:"transformers.SegGptImageProcessor.preprocess",parameters:[{name:"images",val:": Union = None"},{name:"prompt_images",val:": Union = None"},{name:"prompt_masks",val:": Union = None"},{name:"do_resize",val:": Optional = None"},{name:"size",val:": Dict = None"},{name:"resample",val:": Resampling = None"},{name:"do_rescale",val:": Optional = None"},{name:"rescale_factor",val:": Optional = None"},{name:"do_normalize",val:": Optional = None"},{name:"image_mean",val:": Union = None"},{name:"image_std",val:": Union = None"},{name:"num_labels",val:": Optional = None"},{name:"return_tensors",val:": Union = None"},{name:"data_format",val:": Union = <ChannelDimension.FIRST: 'channels_first'>"},{name:"input_data_format",val:": Union = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.SegGptImageProcessor.preprocess.images",description:`<strong>images</strong> (<code>ImageInput</code>) &#x2014;
Image to _preprocess. Expects a single or batch of images with pixel values ranging from 0 to 255. If
passing in images with pixel values between 0 and 1, set <code>do_rescale=False</code>.`,name:"images"},{anchor:"transformers.SegGptImageProcessor.preprocess.prompt_images",description:`<strong>prompt_images</strong> (<code>ImageInput</code>) &#x2014;
Prompt image to _preprocess. Expects a single or batch of images with pixel values ranging from 0 to 255. If
passing in images with pixel values between 0 and 1, set <code>do_rescale=False</code>.`,name:"prompt_images"},{anchor:"transformers.SegGptImageProcessor.preprocess.prompt_masks",description:`<strong>prompt_masks</strong> (<code>ImageInput</code>) &#x2014;
Prompt mask from prompt image to _preprocess. Expects a single or batch of masks. If the mask masks are
a single channel then it will be converted to RGB using the palette if <code>self.num_labels</code> is specified
or by just repeating the channel if not. If the mask is already in RGB format, it will be passed through.`,name:"prompt_masks"},{anchor:"transformers.SegGptImageProcessor.preprocess.do_resize",description:`<strong>do_resize</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>self.do_resize</code>) &#x2014;
Whether to resize the image.`,name:"do_resize"},{anchor:"transformers.SegGptImageProcessor.preprocess.size",description:`<strong>size</strong> (<code>Dict[str, int]</code>, <em>optional</em>, defaults to <code>self.size</code>) &#x2014;
Dictionary in the format <code>{&quot;height&quot;: h, &quot;width&quot;: w}</code> specifying the size of the output image after
resizing.`,name:"size"},{anchor:"transformers.SegGptImageProcessor.preprocess.resample",description:`<strong>resample</strong> (<code>PILImageResampling</code> filter, <em>optional</em>, defaults to <code>self.resample</code>) &#x2014;
<code>PILImageResampling</code> filter to use if resizing the image e.g. <code>PILImageResampling.BICUBIC</code>. Only has
an effect if <code>do_resize</code> is set to <code>True</code>. Doesn&#x2019;t apply to prompt mask as it is resized using nearest.`,name:"resample"},{anchor:"transformers.SegGptImageProcessor.preprocess.do_rescale",description:`<strong>do_rescale</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>self.do_rescale</code>) &#x2014;
Whether to rescale the image values between [0 - 1].`,name:"do_rescale"},{anchor:"transformers.SegGptImageProcessor.preprocess.rescale_factor",description:`<strong>rescale_factor</strong> (<code>float</code>, <em>optional</em>, defaults to <code>self.rescale_factor</code>) &#x2014;
Rescale factor to rescale the image by if <code>do_rescale</code> is set to <code>True</code>.`,name:"rescale_factor"},{anchor:"transformers.SegGptImageProcessor.preprocess.do_normalize",description:`<strong>do_normalize</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>self.do_normalize</code>) &#x2014;
Whether to normalize the image.`,name:"do_normalize"},{anchor:"transformers.SegGptImageProcessor.preprocess.image_mean",description:`<strong>image_mean</strong> (<code>float</code> or <code>List[float]</code>, <em>optional</em>, defaults to <code>self.image_mean</code>) &#x2014;
Image mean to use if <code>do_normalize</code> is set to <code>True</code>.`,name:"image_mean"},{anchor:"transformers.SegGptImageProcessor.preprocess.image_std",description:`<strong>image_std</strong> (<code>float</code> or <code>List[float]</code>, <em>optional</em>, defaults to <code>self.image_std</code>) &#x2014;
Image standard deviation to use if <code>do_normalize</code> is set to <code>True</code>.`,name:"image_std"},{anchor:"transformers.SegGptImageProcessor.preprocess.return_tensors",description:`<strong>return_tensors</strong> (<code>str</code> or <code>TensorType</code>, <em>optional</em>) &#x2014;
The type of tensors to return. Can be one of:<ul>
<li>Unset: Return a list of <code>np.ndarray</code>.</li>
<li><code>TensorType.TENSORFLOW</code> or <code>&apos;tf&apos;</code>: Return a batch of type <code>tf.Tensor</code>.</li>
<li><code>TensorType.PYTORCH</code> or <code>&apos;pt&apos;</code>: Return a batch of type <code>torch.Tensor</code>.</li>
<li><code>TensorType.NUMPY</code> or <code>&apos;np&apos;</code>: Return a batch of type <code>np.ndarray</code>.</li>
<li><code>TensorType.JAX</code> or <code>&apos;jax&apos;</code>: Return a batch of type <code>jax.numpy.ndarray</code>.</li>
</ul>`,name:"return_tensors"},{anchor:"transformers.SegGptImageProcessor.preprocess.data_format",description:`<strong>data_format</strong> (<code>ChannelDimension</code> or <code>str</code>, <em>optional</em>, defaults to <code>ChannelDimension.FIRST</code>) &#x2014;
The channel dimension format for the output image. Can be one of:<ul>
<li><code>&quot;channels_first&quot;</code> or <code>ChannelDimension.FIRST</code>: image in (num_channels, height, width) format.</li>
<li><code>&quot;channels_last&quot;</code> or <code>ChannelDimension.LAST</code>: image in (height, width, num_channels) format.</li>
<li>Unset: Use the channel dimension format of the input image.</li>
</ul>`,name:"data_format"},{anchor:"transformers.SegGptImageProcessor.preprocess.input_data_format",description:`<strong>input_data_format</strong> (<code>ChannelDimension</code> or <code>str</code>, <em>optional</em>) &#x2014;
The channel dimension format for the input image. If unset, the channel dimension format is inferred
from the input image. Can be one of:<ul>
<li><code>&quot;channels_first&quot;</code> or <code>ChannelDimension.FIRST</code>: image in (num_channels, height, width) format.</li>
<li><code>&quot;channels_last&quot;</code> or <code>ChannelDimension.LAST</code>: image in (height, width, num_channels) format.</li>
<li><code>&quot;none&quot;</code> or <code>ChannelDimension.NONE</code>: image in (height, width) format.
num_labels &#x2014; (<code>int</code>, <em>optional</em>):
Number of classes in the segmentation task (excluding the background). If specified, a palette will be
built, assuming that class_idx 0 is the background, to map the prompt mask from a single class_idx
channel to a 3 channel RGB. Not specifying this will result in the prompt mask either being passed
through as is if it is already in RGB format or being duplicated across the channel dimension.</li>
</ul>`,name:"input_data_format"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/seggpt/image_processing_seggpt.py#L413"}}),se=new E({props:{name:"post_process_semantic_segmentation",anchor:"transformers.SegGptImageProcessor.post_process_semantic_segmentation",parameters:[{name:"outputs",val:""},{name:"target_sizes",val:": Optional = None"},{name:"num_labels",val:": Optional = None"}],parametersDescription:[{anchor:"transformers.SegGptImageProcessor.post_process_semantic_segmentation.outputs",description:`<strong>outputs</strong> (<code>SegGptImageSegmentationOutput</code>) &#x2014;
Raw outputs of the model.`,name:"outputs"},{anchor:"transformers.SegGptImageProcessor.post_process_semantic_segmentation.target_sizes",description:`<strong>target_sizes</strong> (<code>List[Tuple[int, int]]</code>, <em>optional</em>) &#x2014;
List of length (batch_size), where each list item (<code>Tuple[int, int]</code>) corresponds to the requested
final size (height, width) of each prediction. If left to None, predictions will not be resized.`,name:"target_sizes"},{anchor:"transformers.SegGptImageProcessor.post_process_semantic_segmentation.num_labels",description:`<strong>num_labels</strong> (<code>int</code>, <em>optional</em>) &#x2014;
Number of classes in the segmentation task (excluding the background). If specified, a palette will be
built, assuming that class_idx 0 is the background, to map prediction masks from RGB values to class
indices. This value should be the same used when preprocessing inputs.`,name:"num_labels"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/seggpt/image_processing_seggpt.py#L553",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>List[torch.Tensor]</code> of length <code>batch_size</code>, where each item is a semantic
segmentation map of shape (height, width) corresponding to the target_sizes entry (if <code>target_sizes</code> is
specified). Each entry of each <code>torch.Tensor</code> correspond to a semantic class id.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p>semantic_segmentation</p>
`}}),ae=new Me({props:{title:"SegGptModel",local:"transformers.SegGptModel",headingTag:"h2"}}),re=new E({props:{name:"class transformers.SegGptModel",anchor:"transformers.SegGptModel",parameters:[{name:"config",val:": SegGptConfig"}],parametersDescription:[{anchor:"transformers.SegGptModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/seggpt#transformers.SegGptConfig">SegGptConfig</a>) &#x2014; 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/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/seggpt/modeling_seggpt.py#L723"}}),ie=new E({props:{name:"forward",anchor:"transformers.SegGptModel.forward",parameters:[{name:"pixel_values",val:": Tensor"},{name:"prompt_pixel_values",val:": Tensor"},{name:"prompt_masks",val:": Tensor"},{name:"bool_masked_pos",val:": Optional = None"},{name:"feature_ensemble",val:": Optional = None"},{name:"embedding_type",val:": Optional = None"},{name:"output_attentions",val:": Optional = None"},{name:"output_hidden_states",val:": Optional = None"},{name:"return_dict",val:": Optional = None"}],parametersDescription:[{anchor:"transformers.SegGptModel.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. Pixel values can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See <a href="/docs/transformers/main/en/model_doc/layoutlmv2#transformers.LayoutLMv2FeatureExtractor.__call__">SegGptImageProcessor.<strong>call</strong>()</a>
for details.`,name:"pixel_values"},{anchor:"transformers.SegGptModel.forward.prompt_pixel_values",description:`<strong>prompt_pixel_values</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_channels, height, width)</code>) &#x2014;
Prompt pixel values. Prompt pixel values can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See
<a href="/docs/transformers/main/en/model_doc/layoutlmv2#transformers.LayoutLMv2FeatureExtractor.__call__">SegGptImageProcessor.<strong>call</strong>()</a> for details.`,name:"prompt_pixel_values"},{anchor:"transformers.SegGptModel.forward.prompt_masks",description:`<strong>prompt_masks</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_channels, height, width)</code>) &#x2014;
Prompt mask. Prompt mask can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See <a href="/docs/transformers/main/en/model_doc/layoutlmv2#transformers.LayoutLMv2FeatureExtractor.__call__">SegGptImageProcessor.<strong>call</strong>()</a> for
details.`,name:"prompt_masks"},{anchor:"transformers.SegGptModel.forward.bool_masked_pos",description:`<strong>bool_masked_pos</strong> (<code>torch.BoolTensor</code> of shape <code>(batch_size, num_patches)</code>, <em>optional</em>) &#x2014;
Boolean masked positions. Indicates which patches are masked (1) and which aren&#x2019;t (0).`,name:"bool_masked_pos"},{anchor:"transformers.SegGptModel.forward.feature_ensemble",description:`<strong>feature_ensemble</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Boolean indicating whether to use feature ensemble or not. If <code>True</code>, the model will use feature ensemble
if we have at least two prompts. If <code>False</code>, the model will not use feature ensemble. This argument should
be considered when doing few-shot inference on an input image i.e. more than one prompt for the same image.`,name:"feature_ensemble"},{anchor:"transformers.SegGptModel.forward.embedding_type",description:`<strong>embedding_type</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Embedding type. Indicates whether the prompt is a semantic or instance embedding. Can be either
instance or semantic.`,name:"embedding_type"},{anchor:"transformers.SegGptModel.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. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.SegGptModel.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. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.SegGptModel.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/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/seggpt/modeling_seggpt.py#L749",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <code>transformers.models.seggpt.modeling_seggpt.SegGptEncoderOutput</code> 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/main/en/model_doc/seggpt#transformers.SegGptConfig"
>SegGptConfig</a>) and inputs.</p>
<ul>
<li><strong>last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, patch_height, patch_width, hidden_size)</code>) — Sequence of hidden-states at the output of the last layer of the model.</li>
<li><strong>hidden_states</strong> (<code>Tuple[torch.FloatTensor]</code>, <code>optional</code>, returned when <code>config.output_hidden_states=True</code>) — Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings + one for the output of each layer)
of shape <code>(batch_size, patch_height, patch_width, hidden_size)</code>.</li>
<li><strong>attentions</strong> (<code>Tuple[torch.FloatTensor]</code>, <code>optional</code>, returned when <code>config.output_attentions=True</code>) — Tuple of <em>torch.FloatTensor</em> (one for each layer) of shape
<code>(batch_size, num_heads, seq_len, seq_len)</code>.</li>
<li><strong>intermediate_hidden_states</strong> (<code>Tuple[torch.FloatTensor]</code>, <code>optional</code>, returned when <code>config.intermediate_hidden_state_indices</code> is set) — Tuple of <code>torch.FloatTensor</code> of shape <code>(batch_size, patch_height, patch_width, hidden_size)</code>.
Each element in the Tuple corresponds to the output of the layer specified in <code>config.intermediate_hidden_state_indices</code>.
Additionaly, each feature passes through a LayerNorm.</li>
</ul>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>transformers.models.seggpt.modeling_seggpt.SegGptEncoderOutput</code> or <code>tuple(torch.FloatTensor)</code></p>
`}}),k=new St({props:{$$slots:{default:[jt]},$$scope:{ctx:J}}}),R=new mt({props:{anchor:"transformers.SegGptModel.forward.example",$$slots:{default:[Zt]},$$scope:{ctx:J}}}),le=new Me({props:{title:"SegGptForImageSegmentation",local:"transformers.SegGptForImageSegmentation",headingTag:"h2"}}),me=new E({props:{name:"class transformers.SegGptForImageSegmentation",anchor:"transformers.SegGptForImageSegmentation",parameters:[{name:"config",val:": SegGptConfig"}],parametersDescription:[{anchor:"transformers.SegGptForImageSegmentation.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/seggpt#transformers.SegGptConfig">SegGptConfig</a>) &#x2014; 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/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/seggpt/modeling_seggpt.py#L901"}}),ce=new E({props:{name:"forward",anchor:"transformers.SegGptForImageSegmentation.forward",parameters:[{name:"pixel_values",val:": Tensor"},{name:"prompt_pixel_values",val:": Tensor"},{name:"prompt_masks",val:": Tensor"},{name:"bool_masked_pos",val:": Optional = None"},{name:"feature_ensemble",val:": Optional = None"},{name:"embedding_type",val:": Optional = None"},{name:"labels",val:": Optional = None"},{name:"output_attentions",val:": Optional = None"},{name:"output_hidden_states",val:": Optional = None"},{name:"return_dict",val:": Optional = None"}],parametersDescription:[{anchor:"transformers.SegGptForImageSegmentation.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. Pixel values can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See <a href="/docs/transformers/main/en/model_doc/layoutlmv2#transformers.LayoutLMv2FeatureExtractor.__call__">SegGptImageProcessor.<strong>call</strong>()</a>
for details.`,name:"pixel_values"},{anchor:"transformers.SegGptForImageSegmentation.forward.prompt_pixel_values",description:`<strong>prompt_pixel_values</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_channels, height, width)</code>) &#x2014;
Prompt pixel values. Prompt pixel values can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See
<a href="/docs/transformers/main/en/model_doc/layoutlmv2#transformers.LayoutLMv2FeatureExtractor.__call__">SegGptImageProcessor.<strong>call</strong>()</a> for details.`,name:"prompt_pixel_values"},{anchor:"transformers.SegGptForImageSegmentation.forward.prompt_masks",description:`<strong>prompt_masks</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_channels, height, width)</code>) &#x2014;
Prompt mask. Prompt mask can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See <a href="/docs/transformers/main/en/model_doc/layoutlmv2#transformers.LayoutLMv2FeatureExtractor.__call__">SegGptImageProcessor.<strong>call</strong>()</a> for
details.`,name:"prompt_masks"},{anchor:"transformers.SegGptForImageSegmentation.forward.bool_masked_pos",description:`<strong>bool_masked_pos</strong> (<code>torch.BoolTensor</code> of shape <code>(batch_size, num_patches)</code>, <em>optional</em>) &#x2014;
Boolean masked positions. Indicates which patches are masked (1) and which aren&#x2019;t (0).`,name:"bool_masked_pos"},{anchor:"transformers.SegGptForImageSegmentation.forward.feature_ensemble",description:`<strong>feature_ensemble</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Boolean indicating whether to use feature ensemble or not. If <code>True</code>, the model will use feature ensemble
if we have at least two prompts. If <code>False</code>, the model will not use feature ensemble. This argument should
be considered when doing few-shot inference on an input image i.e. more than one prompt for the same image.`,name:"feature_ensemble"},{anchor:"transformers.SegGptForImageSegmentation.forward.embedding_type",description:`<strong>embedding_type</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Embedding type. Indicates whether the prompt is a semantic or instance embedding. Can be either
instance or semantic.`,name:"embedding_type"},{anchor:"transformers.SegGptForImageSegmentation.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. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.SegGptForImageSegmentation.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. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.SegGptForImageSegmentation.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/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.SegGptForImageSegmentation.forward.labels",description:`<strong>labels</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_channels, height, width)</code>, <code>optional</code>) &#x2014;
Ground truth mask for input images.`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/seggpt/modeling_seggpt.py#L916",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <code>transformers.models.seggpt.modeling_seggpt.SegGptImageSegmentationOutput</code> 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/main/en/model_doc/seggpt#transformers.SegGptConfig"
>SegGptConfig</a>) and inputs.</p>
<ul>
<li><strong>loss</strong> (<code>torch.FloatTensor</code>, <code>optional</code>, returned when <code>labels</code> is provided) — The loss value.</li>
<li><strong>pred_masks</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_channels, height, width)</code>) — The predicted masks.</li>
<li><strong>hidden_states</strong> (<code>Tuple[torch.FloatTensor]</code>, <code>optional</code>, returned when <code>config.output_hidden_states=True</code>) — Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings + one for the output of each layer)
of shape <code>(batch_size, patch_height, patch_width, hidden_size)</code>.</li>
<li><strong>attentions</strong> (<code>Tuple[torch.FloatTensor]</code>, <code>optional</code>, returned when <code>config.output_attentions=True</code>) — Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape
<code>(batch_size, num_heads, seq_len, seq_len)</code>.</li>
</ul>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>transformers.models.seggpt.modeling_seggpt.SegGptImageSegmentationOutput</code> or <code>tuple(torch.FloatTensor)</code></p>
`}}),N=new St({props:{$$slots:{default:[Wt]},$$scope:{ctx:J}}}),B=new mt({props:{anchor:"transformers.SegGptForImageSegmentation.forward.example",$$slots:{default:[Ft]},$$scope:{ctx:J}}}),{c(){n=d("meta"),w=a(),l=d("p"),m=a(),g(y.$$.fragment),s=a(),g(v.$$.fragment),Se=a(),H=d("p"),H.innerHTML=ct,Ie=a(),Y=d("p"),Y.textContent=dt,Ue=a(),Q=d("p"),Q.innerHTML=pt,Ce=a(),L=d("p"),L.textContent=gt,xe=a(),q=d("ul"),q.innerHTML=ht,$e=a(),A=d("p"),A.textContent=ut,ze=a(),g(D.$$.fragment),je=a(),O=d("p"),O.innerHTML=ft,Ze=a(),g(K.$$.fragment),We=a(),M=d("div"),g(ee.$$.fragment),He=a(),ge=d("p"),ge.innerHTML=_t,Ye=a(),he=d("p"),he.innerHTML=bt,Qe=a(),g(W.$$.fragment),Fe=a(),g(te.$$.fragment),Ve=a(),G=d("div"),g(oe.$$.fragment),Le=a(),ue=d("p"),ue.textContent=yt,qe=a(),F=d("div"),g(ne.$$.fragment),Ae=a(),fe=d("p"),fe.textContent=Tt,De=a(),V=d("div"),g(se.$$.fragment),Oe=a(),_e=d("p"),_e.innerHTML=wt,ke=a(),g(ae.$$.fragment),Re=a(),U=d("div"),g(re.$$.fragment),Ke=a(),be=d("p"),be.innerHTML=vt,et=a(),S=d("div"),g(ie.$$.fragment),tt=a(),ye=d("p"),ye.innerHTML=Mt,ot=a(),g(k.$$.fragment),nt=a(),g(R.$$.fragment),Ne=a(),g(le.$$.fragment),Be=a(),C=d("div"),g(me.$$.fragment),st=a(),Te=d("p"),Te.innerHTML=Gt,at=a(),I=d("div"),g(ce.$$.fragment),rt=a(),we=d("p"),we.innerHTML=Jt,it=a(),g(N.$$.fragment),lt=a(),g(B.$$.fragment),Pe=a(),Ge=d("p"),this.h()},l(e){const t=$t("svelte-u9bgzb",document.head);n=p(t,"META",{name:!0,content:!0}),t.forEach(o),w=r(e),l=p(e,"P",{}),z(l).forEach(o),m=r(e),h(y.$$.fragment,e),s=r(e),h(v.$$.fragment,e),Se=r(e),H=p(e,"P",{"data-svelte-h":!0}),T(H)!=="svelte-182h8ge"&&(H.innerHTML=ct),Ie=r(e),Y=p(e,"P",{"data-svelte-h":!0}),T(Y)!=="svelte-vfdo9a"&&(Y.textContent=dt),Ue=r(e),Q=p(e,"P",{"data-svelte-h":!0}),T(Q)!=="svelte-1wjy0wn"&&(Q.innerHTML=pt),Ce=r(e),L=p(e,"P",{"data-svelte-h":!0}),T(L)!=="svelte-axv494"&&(L.textContent=gt),xe=r(e),q=p(e,"UL",{"data-svelte-h":!0}),T(q)!=="svelte-13gsqc5"&&(q.innerHTML=ht),$e=r(e),A=p(e,"P",{"data-svelte-h":!0}),T(A)!=="svelte-7cf6zy"&&(A.textContent=ut),ze=r(e),h(D.$$.fragment,e),je=r(e),O=p(e,"P",{"data-svelte-h":!0}),T(O)!=="svelte-ymhs7r"&&(O.innerHTML=ft),Ze=r(e),h(K.$$.fragment,e),We=r(e),M=p(e,"DIV",{class:!0});var x=z(M);h(ee.$$.fragment,x),He=r(x),ge=p(x,"P",{"data-svelte-h":!0}),T(ge)!=="svelte-1by7zj7"&&(ge.innerHTML=_t),Ye=r(x),he=p(x,"P",{"data-svelte-h":!0}),T(he)!=="svelte-o55m63"&&(he.innerHTML=bt),Qe=r(x),h(W.$$.fragment,x),x.forEach(o),Fe=r(e),h(te.$$.fragment,e),Ve=r(e),G=p(e,"DIV",{class:!0});var $=z(G);h(oe.$$.fragment,$),Le=r($),ue=p($,"P",{"data-svelte-h":!0}),T(ue)!=="svelte-1agvcs2"&&(ue.textContent=yt),qe=r($),F=p($,"DIV",{class:!0});var de=z(F);h(ne.$$.fragment,de),Ae=r(de),fe=p(de,"P",{"data-svelte-h":!0}),T(fe)!=="svelte-1x3yxsa"&&(fe.textContent=Tt),de.forEach(o),De=r($),V=p($,"DIV",{class:!0});var pe=z(V);h(se.$$.fragment,pe),Oe=r(pe),_e=p(pe,"P",{"data-svelte-h":!0}),T(_e)!=="svelte-1wij86i"&&(_e.innerHTML=wt),pe.forEach(o),$.forEach(o),ke=r(e),h(ae.$$.fragment,e),Re=r(e),U=p(e,"DIV",{class:!0});var Z=z(U);h(re.$$.fragment,Z),Ke=r(Z),be=p(Z,"P",{"data-svelte-h":!0}),T(be)!=="svelte-1fytdmv"&&(be.innerHTML=vt),et=r(Z),S=p(Z,"DIV",{class:!0});var P=z(S);h(ie.$$.fragment,P),tt=r(P),ye=p(P,"P",{"data-svelte-h":!0}),T(ye)!=="svelte-1eqofs9"&&(ye.innerHTML=Mt),ot=r(P),h(k.$$.fragment,P),nt=r(P),h(R.$$.fragment,P),P.forEach(o),Z.forEach(o),Ne=r(e),h(le.$$.fragment,e),Be=r(e),C=p(e,"DIV",{class:!0});var ve=z(C);h(me.$$.fragment,ve),st=r(ve),Te=p(ve,"P",{"data-svelte-h":!0}),T(Te)!=="svelte-1u1qbk5"&&(Te.innerHTML=Gt),at=r(ve),I=p(ve,"DIV",{class:!0});var X=z(I);h(ce.$$.fragment,X),rt=r(X),we=p(X,"P",{"data-svelte-h":!0}),T(we)!=="svelte-1ennpmp"&&(we.innerHTML=Jt),it=r(X),h(N.$$.fragment,X),lt=r(X),h(B.$$.fragment,X),X.forEach(o),ve.forEach(o),Pe=r(e),Ge=p(e,"P",{}),z(Ge).forEach(o),this.h()},h(){j(n,"name","hf:doc:metadata"),j(n,"content",kt),j(M,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(F,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(V,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(G,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(S,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(U,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(I,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(C,"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,t){c(document.head,n),i(e,w,t),i(e,l,t),i(e,m,t),u(y,e,t),i(e,s,t),u(v,e,t),i(e,Se,t),i(e,H,t),i(e,Ie,t),i(e,Y,t),i(e,Ue,t),i(e,Q,t),i(e,Ce,t),i(e,L,t),i(e,xe,t),i(e,q,t),i(e,$e,t),i(e,A,t),i(e,ze,t),u(D,e,t),i(e,je,t),i(e,O,t),i(e,Ze,t),u(K,e,t),i(e,We,t),i(e,M,t),u(ee,M,null),c(M,He),c(M,ge),c(M,Ye),c(M,he),c(M,Qe),u(W,M,null),i(e,Fe,t),u(te,e,t),i(e,Ve,t),i(e,G,t),u(oe,G,null),c(G,Le),c(G,ue),c(G,qe),c(G,F),u(ne,F,null),c(F,Ae),c(F,fe),c(G,De),c(G,V),u(se,V,null),c(V,Oe),c(V,_e),i(e,ke,t),u(ae,e,t),i(e,Re,t),i(e,U,t),u(re,U,null),c(U,Ke),c(U,be),c(U,et),c(U,S),u(ie,S,null),c(S,tt),c(S,ye),c(S,ot),u(k,S,null),c(S,nt),u(R,S,null),i(e,Ne,t),u(le,e,t),i(e,Be,t),i(e,C,t),u(me,C,null),c(C,st),c(C,Te),c(C,at),c(C,I),u(ce,I,null),c(I,rt),c(I,we),c(I,it),u(N,I,null),c(I,lt),u(B,I,null),i(e,Pe,t),i(e,Ge,t),Xe=!0},p(e,[t]){const x={};t&2&&(x.$$scope={dirty:t,ctx:e}),W.$set(x);const $={};t&2&&($.$$scope={dirty:t,ctx:e}),k.$set($);const de={};t&2&&(de.$$scope={dirty:t,ctx:e}),R.$set(de);const pe={};t&2&&(pe.$$scope={dirty:t,ctx:e}),N.$set(pe);const Z={};t&2&&(Z.$$scope={dirty:t,ctx:e}),B.$set(Z)},i(e){Xe||(f(y.$$.fragment,e),f(v.$$.fragment,e),f(D.$$.fragment,e),f(K.$$.fragment,e),f(ee.$$.fragment,e),f(W.$$.fragment,e),f(te.$$.fragment,e),f(oe.$$.fragment,e),f(ne.$$.fragment,e),f(se.$$.fragment,e),f(ae.$$.fragment,e),f(re.$$.fragment,e),f(ie.$$.fragment,e),f(k.$$.fragment,e),f(R.$$.fragment,e),f(le.$$.fragment,e),f(me.$$.fragment,e),f(ce.$$.fragment,e),f(N.$$.fragment,e),f(B.$$.fragment,e),Xe=!0)},o(e){_(y.$$.fragment,e),_(v.$$.fragment,e),_(D.$$.fragment,e),_(K.$$.fragment,e),_(ee.$$.fragment,e),_(W.$$.fragment,e),_(te.$$.fragment,e),_(oe.$$.fragment,e),_(ne.$$.fragment,e),_(se.$$.fragment,e),_(ae.$$.fragment,e),_(re.$$.fragment,e),_(ie.$$.fragment,e),_(k.$$.fragment,e),_(R.$$.fragment,e),_(le.$$.fragment,e),_(me.$$.fragment,e),_(ce.$$.fragment,e),_(N.$$.fragment,e),_(B.$$.fragment,e),Xe=!1},d(e){e&&(o(w),o(l),o(m),o(s),o(Se),o(H),o(Ie),o(Y),o(Ue),o(Q),o(Ce),o(L),o(xe),o(q),o($e),o(A),o(ze),o(je),o(O),o(Ze),o(We),o(M),o(Fe),o(Ve),o(G),o(ke),o(Re),o(U),o(Ne),o(Be),o(C),o(Pe),o(Ge)),o(n),b(y,e),b(v,e),b(D,e),b(K,e),b(ee),b(W),b(te,e),b(oe),b(ne),b(se),b(ae,e),b(re),b(ie),b(k),b(R),b(le,e),b(me),b(ce),b(N),b(B)}}}const kt='{"title":"SegGPT","local":"seggpt","sections":[{"title":"Overview","local":"overview","sections":[],"depth":2},{"title":"SegGptConfig","local":"transformers.SegGptConfig","sections":[],"depth":2},{"title":"SegGptImageProcessor","local":"transformers.SegGptImageProcessor","sections":[],"depth":2},{"title":"SegGptModel","local":"transformers.SegGptModel","sections":[],"depth":2},{"title":"SegGptForImageSegmentation","local":"transformers.SegGptForImageSegmentation","sections":[],"depth":2}],"depth":1}';function Rt(J){return Ut(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Qt extends Ct{constructor(n){super(),xt(this,n,Rt,Vt,It,{})}}export{Qt as component};
