import{s as Lt,o as Dt,n as qt}from"../chunks/scheduler.01eeda35.js";import{S as Yt,i as At,g as l,s as n,r as d,A as Kt,h as i,f as o,c as s,j as x,u,x as c,k as S,y as r,a,v as h,d as g,t as f,w as y}from"../chunks/index.6dd51b66.js";import{T as Ot}from"../chunks/Tip.de9bae2b.js";import{D as pe}from"../chunks/Docstring.76e6b3cf.js";import{C as ot}from"../chunks/CodeBlock.864da1b0.js";import{E as eo}from"../chunks/ExampleCodeBlock.6a36fb6b.js";import{H as Ge,E as to}from"../chunks/EditOnGithub.7faefd25.js";function oo(me){let p,C="Examples:",w,_,v;return _=new ot({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFN1cGVyR2x1ZUNvbmZpZyUyQyUyMFN1cGVyR2x1ZU1vZGVsJTBBJTBBJTIzJTIwSW5pdGlhbGl6aW5nJTIwYSUyMFN1cGVyR2x1ZSUyMHN1cGVyZ2x1ZSUyMHN0eWxlJTIwY29uZmlndXJhdGlvbiUwQWNvbmZpZ3VyYXRpb24lMjAlM0QlMjBTdXBlckdsdWVDb25maWcoKSUwQSUwQSUyMyUyMEluaXRpYWxpemluZyUyMGElMjBtb2RlbCUyMGZyb20lMjB0aGUlMjBzdXBlcmdsdWUlMjBzdHlsZSUyMGNvbmZpZ3VyYXRpb24lMEFtb2RlbCUyMCUzRCUyMFN1cGVyR2x1ZU1vZGVsKGNvbmZpZ3VyYXRpb24pJTBBJTBBJTIzJTIwQWNjZXNzaW5nJTIwdGhlJTIwbW9kZWwlMjBjb25maWd1cmF0aW9uJTBBY29uZmlndXJhdGlvbiUyMCUzRCUyMG1vZGVsLmNvbmZpZw==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> SuperGlueConfig, SuperGlueModel

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

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a model from the superglue style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = SuperGlueModel(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(){p=l("p"),p.textContent=C,w=n(),d(_.$$.fragment)},l(M){p=i(M,"P",{"data-svelte-h":!0}),c(p)!=="svelte-kvfsh7"&&(p.textContent=C),w=s(M),u(_.$$.fragment,M)},m(M,G){a(M,p,G),a(M,w,G),h(_,M,G),v=!0},p:qt,i(M){v||(g(_.$$.fragment,M),v=!0)},o(M){f(_.$$.fragment,M),v=!1},d(M){M&&(o(p),o(w)),y(_,M)}}}function no(me){let p,C=`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(){p=l("p"),p.innerHTML=C},l(w){p=i(w,"P",{"data-svelte-h":!0}),c(p)!=="svelte-fincs2"&&(p.innerHTML=C)},m(w,_){a(w,p,_)},p:qt,d(w){w&&o(p)}}}function so(me){let p,C,w,_,v,M,G,_t='<img alt="PyTorch" src="https://img.shields.io/badge/PyTorch-DE3412?style=flat&amp;logo=pytorch&amp;logoColor=white"/>',Ce,W,je,N,Jt='The SuperGlue model was proposed in <a href="https://arxiv.org/abs/1911.11763" rel="nofollow">SuperGlue: Learning Feature Matching with Graph Neural Networks</a> by Paul-Edouard Sarlin, Daniel DeTone, Tomasz Malisiewicz and Andrew Rabinovich.',Se,R,Ut=`This model consists of matching two sets of interest points detected in an image. Paired with the
<a href="https://huggingface.co/magic-leap-community/superpoint" rel="nofollow">SuperPoint model</a>, it can be used to match two images and
estimate the pose between them. This model is useful for tasks such as image matching, homography estimation, etc.`,xe,X,vt="The abstract from the paper is the following:",ke,V,Gt=`<em>This paper introduces SuperGlue, a neural network that matches two sets of local features by jointly finding correspondences
and rejecting non-matchable points. Assignments are estimated by solving a differentiable optimal transport problem, whose costs
are predicted by a graph neural network. We introduce a flexible context aggregation mechanism based on attention, enabling
SuperGlue to reason about the underlying 3D scene and feature assignments jointly. Compared to traditional, hand-designed heuristics,
our technique learns priors over geometric transformations and regularities of the 3D world through end-to-end training from image
pairs. SuperGlue outperforms other learned approaches and achieves state-of-the-art results on the task of pose estimation in
challenging real-world indoor and outdoor environments. The proposed method performs matching in real-time on a modern GPU and
can be readily integrated into modern SfM or SLAM systems. The code and trained weights are publicly available at this <a href="https://github.com/magicleap/SuperGluePretrainedNetwork" rel="nofollow">URL</a>.</em>`,$e,H,ze,Q,It=`Here is a quick example of using the model. Since this model is an image matching model, it requires pairs of images to be matched.
The raw outputs contain the list of keypoints detected by the keypoint detector as well as the list of matches with their corresponding
matching scores.`,Be,F,Ze,P,Ct="You can use the <code>post_process_keypoint_matching</code> method from the <code>SuperGlueImageProcessor</code> to get the keypoints and matches in a more readable format:",We,E,Ne,q,jt="From the outputs, you can visualize the matches between the two images using the following code:",Re,L,Xe,D,St='<img src="https://cdn-uploads.huggingface.co/production/uploads/632885ba1558dac67c440aa8/01ZYaLB1NL5XdA8u7yCo4.png" alt="image/png"/>',Ve,Y,xt=`This model was contributed by <a href="https://huggingface.co/stevenbucaille" rel="nofollow">stevenbucaille</a>.
The original code can be found <a href="https://github.com/magicleap/SuperGluePretrainedNetwork" rel="nofollow">here</a>.`,He,A,Qe,J,K,nt,de,kt=`This is the configuration class to store the configuration of a <code>SuperGlueModel</code>. It is used to instantiate a
SuperGlue 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 SuperGlue
<a href="https://huggingface.co/magic-leap-community/superglue_indoor" rel="nofollow">magic-leap-community/superglue_indoor</a> architecture.`,st,ue,$t=`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.`,at,k,Fe,O,Pe,b,ee,rt,he,zt="Constructs a SuperGlue image processor.",lt,$,te,it,ge,Bt=`Converts the raw output of <code>KeypointMatchingOutput</code> into lists of keypoints, scores and descriptors
with coordinates absolute to the original image sizes.`,ct,z,oe,pt,fe,Zt="Preprocess an image or batch of images.",mt,B,ne,dt,ye,Wt="Resize an image.",Ee,se,Nt="<li>preprocess</li>",qe,ae,Le,m,re,ut,Me,Rt=`SuperGlue model taking images as inputs and outputting the matching of them.
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.`,ht,we,Xt="SuperGlue feature matching middle-end",gt,Te,Vt=`Given two sets of keypoints and locations, we determine the
correspondences by:`,ft,be,Ht="<li>Keypoint Encoding (normalization + visual feature and location fusion)</li> <li>Graph Neural Network with multiple self and cross-attention layers</li> <li>Final projection layer</li> <li>Optimal Transport Layer (a differentiable Hungarian matching algorithm)</li> <li>Thresholding matrix based on mutual exclusivity and a match_threshold</li>",yt,_e,Qt="The correspondence ids use -1 to indicate non-matching points.",Mt,Je,Ft=`Paul-Edouard Sarlin, Daniel DeTone, Tomasz Malisiewicz, and Andrew
Rabinovich. SuperGlue: Learning Feature Matching with Graph Neural
Networks. In CVPR, 2020. <a href="https://arxiv.org/abs/1911.11763" rel="nofollow">https://arxiv.org/abs/1911.11763</a>`,wt,j,le,Tt,Ue,Pt='The <a href="/docs/transformers/main/en/model_doc/superglue#transformers.SuperGlueForKeypointMatching">SuperGlueForKeypointMatching</a> forward method, overrides the <code>__call__</code> special method.',bt,Z,De,ie,Et="<li>forward</li> <li>post_process_keypoint_matching</li>",Ye,ce,Ae,Ie,Ke;return v=new Ge({props:{title:"SuperGlue",local:"superglue",headingTag:"h1"}}),W=new Ge({props:{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klMEElMEFpbWFnZXMlMjAlM0QlMjAlNUJpbWFnZTElMkMlMjBpbWFnZTIlNUQlMEElMEFwcm9jZXNzb3IlMjAlM0QlMjBBdXRvSW1hZ2VQcm9jZXNzb3IuZnJvbV9wcmV0cmFpbmVkKCUyMm1hZ2ljLWxlYXAtY29tbXVuaXR5JTJGc3VwZXJnbHVlX291dGRvb3IlMjIpJTBBbW9kZWwlMjAlM0QlMjBBdXRvTW9kZWwuZnJvbV9wcmV0cmFpbmVkKCUyMm1hZ2ljLWxlYXAtY29tbXVuaXR5JTJGc3VwZXJnbHVlX291dGRvb3IlMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwcHJvY2Vzc29yKGltYWdlcyUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBd2l0aCUyMHRvcmNoLm5vX2dyYWQoKSUzQSUwQSUyMCUyMCUyMCUyMG91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyk=",highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoImageProcessor, AutoModel
<span class="hljs-keyword">import</span> torch
<span class="hljs-keyword">from</span> PIL <span class="hljs-keyword">import</span> Image
<span class="hljs-keyword">import</span> requests

url_image1 = <span class="hljs-string">&quot;https://raw.githubusercontent.com/magicleap/SuperGluePretrainedNetwork/refs/heads/master/assets/phototourism_sample_images/united_states_capitol_98169888_3347710852.jpg&quot;</span>
image1 = Image.<span class="hljs-built_in">open</span>(requests.get(url_image1, stream=<span class="hljs-literal">True</span>).raw)
url_image2 = <span class="hljs-string">&quot;https://raw.githubusercontent.com/magicleap/SuperGluePretrainedNetwork/refs/heads/master/assets/phototourism_sample_images/united_states_capitol_26757027_6717084061.jpg&quot;</span>
image_2 = Image.<span class="hljs-built_in">open</span>(requests.get(url_image2, stream=<span class="hljs-literal">True</span>).raw)

images = [image1, image2]

processor = AutoImageProcessor.from_pretrained(<span class="hljs-string">&quot;magic-leap-community/superglue_outdoor&quot;</span>)
model = AutoModel.from_pretrained(<span class="hljs-string">&quot;magic-leap-community/superglue_outdoor&quot;</span>)

inputs = processor(images, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
<span class="hljs-keyword">with</span> torch.no_grad():
    outputs = model(**inputs)`,wrap:!1}}),E=new ot({props:{code:"aW1hZ2Vfc2l6ZXMlMjAlM0QlMjAlNUIlNUIoaW1hZ2UuaGVpZ2h0JTJDJTIwaW1hZ2Uud2lkdGgpJTIwZm9yJTIwaW1hZ2UlMjBpbiUyMGltYWdlcyU1RCU1RCUwQW91dHB1dHMlMjAlM0QlMjBwcm9jZXNzb3IucG9zdF9wcm9jZXNzX2tleXBvaW50X21hdGNoaW5nKG91dHB1dHMlMkMlMjBpbWFnZV9zaXplcyUyQyUyMHRocmVzaG9sZCUzRDAuMiklMEFmb3IlMjBpJTJDJTIwb3V0cHV0JTIwaW4lMjBlbnVtZXJhdGUob3V0cHV0cyklM0ElMEElMjAlMjAlMjAlMjBwcmludCglMjJGb3IlMjB0aGUlMjBpbWFnZSUyMHBhaXIlMjIlMkMlMjBpKSUwQSUyMCUyMCUyMCUyMGZvciUyMGtleXBvaW50MCUyQyUyMGtleXBvaW50MSUyQyUyMG1hdGNoaW5nX3Njb3JlJTIwaW4lMjB6aXAoJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwb3V0cHV0JTVCJTIya2V5cG9pbnRzMCUyMiU1RCUyQyUyMG91dHB1dCU1QiUyMmtleXBvaW50czElMjIlNUQlMkMlMjBvdXRwdXQlNUIlMjJtYXRjaGluZ19zY29yZXMlMjIlNUQlMEElMjAlMjAlMjAlMjApJTNBJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwcHJpbnQoJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwZiUyMktleXBvaW50JTIwYXQlMjBjb29yZGluYXRlJTIwJTdCa2V5cG9pbnQwLm51bXB5KCklN0QlMjBpbiUyMHRoZSUyMGZpcnN0JTIwaW1hZ2UlMjBtYXRjaGVzJTIwd2l0aCUyMGtleXBvaW50JTIwYXQlMjBjb29yZGluYXRlJTIwJTdCa2V5cG9pbnQxLm51bXB5KCklN0QlMjBpbiUyMHRoZSUyMHNlY29uZCUyMGltYWdlJTIwd2l0aCUyMGElMjBzY29yZSUyMG9mJTIwJTdCbWF0Y2hpbmdfc2NvcmUlN0QuJTIyJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwKSUwQQ==",highlighted:`image_sizes = [[(image.height, image.width) <span class="hljs-keyword">for</span> image <span class="hljs-keyword">in</span> images]]
outputs = processor.post_process_keypoint_matching(outputs, image_sizes, threshold=<span class="hljs-number">0.2</span>)
<span class="hljs-keyword">for</span> i, output <span class="hljs-keyword">in</span> <span class="hljs-built_in">enumerate</span>(outputs):
    <span class="hljs-built_in">print</span>(<span class="hljs-string">&quot;For the image pair&quot;</span>, i)
    <span class="hljs-keyword">for</span> keypoint0, keypoint1, matching_score <span class="hljs-keyword">in</span> <span class="hljs-built_in">zip</span>(
            output[<span class="hljs-string">&quot;keypoints0&quot;</span>], output[<span class="hljs-string">&quot;keypoints1&quot;</span>], output[<span class="hljs-string">&quot;matching_scores&quot;</span>]
    ):
        <span class="hljs-built_in">print</span>(
            <span class="hljs-string">f&quot;Keypoint at coordinate <span class="hljs-subst">{keypoint0.numpy()}</span> in the first image matches with keypoint at coordinate <span class="hljs-subst">{keypoint1.numpy()}</span> in the second image with a score of <span class="hljs-subst">{matching_score}</span>.&quot;</span>
        )
`,wrap:!1}}),L=new ot({props:{code:"aW1wb3J0JTIwbWF0cGxvdGxpYi5weXBsb3QlMjBhcyUyMHBsdCUwQWltcG9ydCUyMG51bXB5JTIwYXMlMjBucCUwQSUwQSUyMyUyMENyZWF0ZSUyMHNpZGUlMjBieSUyMHNpZGUlMjBpbWFnZSUwQW1lcmdlZF9pbWFnZSUyMCUzRCUyMG5wLnplcm9zKChtYXgoaW1hZ2UxL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JTIyJTJDJTIwcyUzRDIpJTBBJTBBJTIzJTIwU2F2ZSUyMHRoZSUyMHBsb3QlMEFwbHQuc2F2ZWZpZyglMjJtYXRjaGVkX2ltYWdlLnBuZyUyMiUyQyUyMGRwaSUzRDMwMCUyQyUyMGJib3hfaW5jaGVzJTNEJ3RpZ2h0JyklMEFwbHQuY2xvc2UoKQ==",highlighted:`<span class="hljs-keyword">import</span> matplotlib.pyplot <span class="hljs-keyword">as</span> plt
<span class="hljs-keyword">import</span> numpy <span class="hljs-keyword">as</span> np

<span class="hljs-comment"># Create side by side image</span>
merged_image = np.zeros((<span class="hljs-built_in">max</span>(image1.height, image2.height), image1.width + image2.width, <span class="hljs-number">3</span>))
merged_image[: image1.height, : image1.width] = np.array(image1) / <span class="hljs-number">255.0</span>
merged_image[: image2.height, image1.width :] = np.array(image2) / <span class="hljs-number">255.0</span>
plt.imshow(merged_image)
plt.axis(<span class="hljs-string">&quot;off&quot;</span>)

<span class="hljs-comment"># Retrieve the keypoints and matches</span>
output = outputs[<span class="hljs-number">0</span>]
keypoints0 = output[<span class="hljs-string">&quot;keypoints0&quot;</span>]
keypoints1 = output[<span class="hljs-string">&quot;keypoints1&quot;</span>]
matching_scores = output[<span class="hljs-string">&quot;matching_scores&quot;</span>]
keypoints0_x, keypoints0_y = keypoints0[:, <span class="hljs-number">0</span>].numpy(), keypoints0[:, <span class="hljs-number">1</span>].numpy()
keypoints1_x, keypoints1_y = keypoints1[:, <span class="hljs-number">0</span>].numpy(), keypoints1[:, <span class="hljs-number">1</span>].numpy()

<span class="hljs-comment"># Plot the matches</span>
<span class="hljs-keyword">for</span> keypoint0_x, keypoint0_y, keypoint1_x, keypoint1_y, matching_score <span class="hljs-keyword">in</span> <span class="hljs-built_in">zip</span>(
        keypoints0_x, keypoints0_y, keypoints1_x, keypoints1_y, matching_scores
):
    plt.plot(
        [keypoint0_x, keypoint1_x + image1.width],
        [keypoint0_y, keypoint1_y],
        color=plt.get_cmap(<span class="hljs-string">&quot;RdYlGn&quot;</span>)(matching_score.item()),
        alpha=<span class="hljs-number">0.9</span>,
        linewidth=<span class="hljs-number">0.5</span>,
    )
    plt.scatter(keypoint0_x, keypoint0_y, c=<span class="hljs-string">&quot;black&quot;</span>, s=<span class="hljs-number">2</span>)
    plt.scatter(keypoint1_x + image1.width, keypoint1_y, c=<span class="hljs-string">&quot;black&quot;</span>, s=<span class="hljs-number">2</span>)

<span class="hljs-comment"># Save the plot</span>
plt.savefig(<span class="hljs-string">&quot;matched_image.png&quot;</span>, dpi=<span class="hljs-number">300</span>, bbox_inches=<span class="hljs-string">&#x27;tight&#x27;</span>)
plt.close()`,wrap:!1}}),A=new Ge({props:{title:"SuperGlueConfig",local:"transformers.SuperGlueConfig",headingTag:"h2"}}),K=new pe({props:{name:"class transformers.SuperGlueConfig",anchor:"transformers.SuperGlueConfig",parameters:[{name:"keypoint_detector_config",val:": SuperPointConfig = None"},{name:"hidden_size",val:": int = 256"},{name:"keypoint_encoder_sizes",val:": typing.List[int] = None"},{name:"gnn_layers_types",val:": typing.List[str] = None"},{name:"num_attention_heads",val:": int = 4"},{name:"sinkhorn_iterations",val:": int = 100"},{name:"matching_threshold",val:": float = 0.0"},{name:"initializer_range",val:": float = 0.02"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.SuperGlueConfig.keypoint_detector_config",description:`<strong>keypoint_detector_config</strong> (<code>Union[AutoConfig, dict]</code>,  <em>optional</em>, defaults to <code>SuperPointConfig</code>) &#x2014;
The config object or dictionary of the keypoint detector.`,name:"keypoint_detector_config"},{anchor:"transformers.SuperGlueConfig.hidden_size",description:`<strong>hidden_size</strong> (<code>int</code>, <em>optional</em>, defaults to 256) &#x2014;
The dimension of the descriptors.`,name:"hidden_size"},{anchor:"transformers.SuperGlueConfig.keypoint_encoder_sizes",description:`<strong>keypoint_encoder_sizes</strong> (<code>List[int]</code>, <em>optional</em>, defaults to <code>[32, 64, 128, 256]</code>) &#x2014;
The sizes of the keypoint encoder layers.`,name:"keypoint_encoder_sizes"},{anchor:"transformers.SuperGlueConfig.gnn_layers_types",description:`<strong>gnn_layers_types</strong> (<code>List[str]</code>, <em>optional</em>, defaults to <code>[&apos;self&apos;, &apos;cross&apos;, &apos;self&apos;, &apos;cross&apos;, &apos;self&apos;, &apos;cross&apos;, &apos;self&apos;, &apos;cross&apos;, &apos;self&apos;, &apos;cross&apos;, &apos;self&apos;, &apos;cross&apos;, &apos;self&apos;, &apos;cross&apos;, &apos;self&apos;, &apos;cross&apos;, &apos;self&apos;, &apos;cross&apos;]</code>) &#x2014;
The types of the GNN layers. Must be either &#x2018;self&#x2019; or &#x2018;cross&#x2019;.`,name:"gnn_layers_types"},{anchor:"transformers.SuperGlueConfig.num_attention_heads",description:`<strong>num_attention_heads</strong> (<code>int</code>, <em>optional</em>, defaults to 4) &#x2014;
The number of heads in the GNN layers.`,name:"num_attention_heads"},{anchor:"transformers.SuperGlueConfig.sinkhorn_iterations",description:`<strong>sinkhorn_iterations</strong> (<code>int</code>, <em>optional</em>, defaults to 100) &#x2014;
The number of Sinkhorn iterations.`,name:"sinkhorn_iterations"},{anchor:"transformers.SuperGlueConfig.matching_threshold",description:`<strong>matching_threshold</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The matching threshold.`,name:"matching_threshold"},{anchor:"transformers.SuperGlueConfig.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"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/superglue/configuration_superglue.py#L27"}}),k=new eo({props:{anchor:"transformers.SuperGlueConfig.example",$$slots:{default:[oo]},$$scope:{ctx:me}}}),O=new Ge({props:{title:"SuperGlueImageProcessor",local:"transformers.SuperGlueImageProcessor",headingTag:"h2"}}),ee=new pe({props:{name:"class transformers.SuperGlueImageProcessor",anchor:"transformers.SuperGlueImageProcessor",parameters:[{name:"do_resize",val:": bool = True"},{name:"size",val:": typing.Dict[str, int] = None"},{name:"resample",val:": Resampling = <Resampling.BILINEAR: 2>"},{name:"do_rescale",val:": bool = True"},{name:"rescale_factor",val:": float = 0.00392156862745098"},{name:"do_grayscale",val:": bool = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.SuperGlueImageProcessor.do_resize",description:`<strong>do_resize</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Controls whether to resize the image&#x2019;s (height, width) dimensions to the specified <code>size</code>. Can be overriden
by <code>do_resize</code> in the <code>preprocess</code> method.`,name:"do_resize"},{anchor:"transformers.SuperGlueImageProcessor.size",description:`<strong>size</strong> (<code>Dict[str, int]</code> <em>optional</em>, defaults to <code>{&quot;height&quot; -- 480, &quot;width&quot;: 640}</code>):
Resolution of the output image after <code>resize</code> is applied. Only has an effect if <code>do_resize</code> is set to
<code>True</code>. Can be overriden by <code>size</code> in the <code>preprocess</code> method.`,name:"size"},{anchor:"transformers.SuperGlueImageProcessor.resample",description:`<strong>resample</strong> (<code>PILImageResampling</code>, <em>optional</em>, defaults to <code>Resampling.BILINEAR</code>) &#x2014;
Resampling filter to use if resizing the image. Can be overriden by <code>resample</code> in the <code>preprocess</code> method.`,name:"resample"},{anchor:"transformers.SuperGlueImageProcessor.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 overriden by <code>do_rescale</code> in
the <code>preprocess</code> method.`,name:"do_rescale"},{anchor:"transformers.SuperGlueImageProcessor.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 overriden by <code>rescale_factor</code> in the <code>preprocess</code>
method.`,name:"rescale_factor"},{anchor:"transformers.SuperGlueImageProcessor.do_grayscale",description:`<strong>do_grayscale</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to convert the image to grayscale. Can be overriden by <code>do_grayscale</code> in the <code>preprocess</code> method.`,name:"do_grayscale"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/superglue/image_processing_superglue.py#L134"}}),te=new pe({props:{name:"post_process_keypoint_matching",anchor:"transformers.SuperGlueImageProcessor.post_process_keypoint_matching",parameters:[{name:"outputs",val:": KeypointMatchingOutput"},{name:"target_sizes",val:": typing.Union[transformers.utils.generic.TensorType, typing.List[typing.Tuple]]"},{name:"threshold",val:": float = 0.0"}],parametersDescription:[{anchor:"transformers.SuperGlueImageProcessor.post_process_keypoint_matching.outputs",description:`<strong>outputs</strong> (<code>KeypointMatchingOutput</code>) &#x2014;
Raw outputs of the model.`,name:"outputs"},{anchor:"transformers.SuperGlueImageProcessor.post_process_keypoint_matching.target_sizes",description:`<strong>target_sizes</strong> (<code>torch.Tensor</code> or <code>List[Tuple[Tuple[int, int]]]</code>, <em>optional</em>) &#x2014;
Tensor of shape <code>(batch_size, 2, 2)</code> or list of tuples of tuples (<code>Tuple[int, int]</code>) containing the
target size <code>(height, width)</code> of each image in the batch. This must be the original image size (before
any processing).`,name:"target_sizes"},{anchor:"transformers.SuperGlueImageProcessor.post_process_keypoint_matching.threshold",description:`<strong>threshold</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
Threshold to filter out the matches with low scores.`,name:"threshold"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/superglue/image_processing_superglue.py#L338",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A list of dictionaries, each dictionary containing the keypoints in the first and second image
of the pair, the matching scores and the matching indices.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>List[Dict]</code></p>
`}}),oe=new pe({props:{name:"preprocess",anchor:"transformers.SuperGlueImageProcessor.preprocess",parameters:[{name:"images",val:""},{name:"do_resize",val:": bool = None"},{name:"size",val:": typing.Dict[str, int] = None"},{name:"resample",val:": Resampling = None"},{name:"do_rescale",val:": bool = None"},{name:"rescale_factor",val:": float = None"},{name:"do_grayscale",val:": bool = None"},{name:"return_tensors",val:": typing.Union[str, transformers.utils.generic.TensorType, NoneType] = None"},{name:"data_format",val:": ChannelDimension = <ChannelDimension.FIRST: 'channels_first'>"},{name:"input_data_format",val:": typing.Union[str, transformers.image_utils.ChannelDimension, NoneType] = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.SuperGlueImageProcessor.preprocess.images",description:`<strong>images</strong> (<code>ImageInput</code>) &#x2014;
Image pairs to preprocess. Expects either a list of 2 images or a list of list of 2 images list 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.SuperGlueImageProcessor.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.SuperGlueImageProcessor.preprocess.size",description:`<strong>size</strong> (<code>Dict[str, int]</code>, <em>optional</em>, defaults to <code>self.size</code>) &#x2014;
Size of the output image after <code>resize</code> has been applied. If <code>size[&quot;shortest_edge&quot;]</code> &gt;= 384, the image
is resized to <code>(size[&quot;shortest_edge&quot;], size[&quot;shortest_edge&quot;])</code>. Otherwise, the smaller edge of the
image will be matched to <code>int(size[&quot;shortest_edge&quot;]/ crop_pct)</code>, after which the image is cropped to
<code>(size[&quot;shortest_edge&quot;], size[&quot;shortest_edge&quot;])</code>. Only has an effect if <code>do_resize</code> is set to <code>True</code>.`,name:"size"},{anchor:"transformers.SuperGlueImageProcessor.preprocess.resample",description:`<strong>resample</strong> (<code>PILImageResampling</code>, <em>optional</em>, defaults to <code>self.resample</code>) &#x2014;
Resampling filter to use if resizing the image. This can be one of <code>PILImageResampling</code>, filters. Only
has an effect if <code>do_resize</code> is set to <code>True</code>.`,name:"resample"},{anchor:"transformers.SuperGlueImageProcessor.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.SuperGlueImageProcessor.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.SuperGlueImageProcessor.preprocess.do_grayscale",description:`<strong>do_grayscale</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>self.do_grayscale</code>) &#x2014;
Whether to convert the image to grayscale.`,name:"do_grayscale"},{anchor:"transformers.SuperGlueImageProcessor.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.SuperGlueImageProcessor.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.SuperGlueImageProcessor.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.</li>
</ul>`,name:"input_data_format"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/superglue/image_processing_superglue.py#L220"}}),ne=new pe({props:{name:"resize",anchor:"transformers.SuperGlueImageProcessor.resize",parameters:[{name:"image",val:": ndarray"},{name:"size",val:": typing.Dict[str, int]"},{name:"data_format",val:": typing.Union[str, transformers.image_utils.ChannelDimension, NoneType] = None"},{name:"input_data_format",val:": typing.Union[str, transformers.image_utils.ChannelDimension, NoneType] = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.SuperGlueImageProcessor.resize.image",description:`<strong>image</strong> (<code>np.ndarray</code>) &#x2014;
Image to resize.`,name:"image"},{anchor:"transformers.SuperGlueImageProcessor.resize.size",description:`<strong>size</strong> (<code>Dict[str, int]</code>) &#x2014;
Dictionary of the form <code>{&quot;height&quot;: int, &quot;width&quot;: int}</code>, specifying the size of the output image.`,name:"size"},{anchor:"transformers.SuperGlueImageProcessor.resize.data_format",description:`<strong>data_format</strong> (<code>ChannelDimension</code> or <code>str</code>, <em>optional</em>) &#x2014;
The channel dimension format of the output image. If not provided, it will be 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.</li>
</ul>`,name:"data_format"},{anchor:"transformers.SuperGlueImageProcessor.resize.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.</li>
</ul>`,name:"input_data_format"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/superglue/image_processing_superglue.py#L181"}}),ae=new Ge({props:{title:"SuperGlueForKeypointMatching",local:"transformers.SuperGlueForKeypointMatching",headingTag:"h2"}}),re=new pe({props:{name:"class transformers.SuperGlueForKeypointMatching",anchor:"transformers.SuperGlueForKeypointMatching",parameters:[{name:"config",val:": SuperGlueConfig"}],parametersDescription:[{anchor:"transformers.SuperGlueForKeypointMatching.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/superglue#transformers.SuperGlueConfig">SuperGlueConfig</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/superglue/modeling_superglue.py#L598"}}),le=new pe({props:{name:"forward",anchor:"transformers.SuperGlueForKeypointMatching.forward",parameters:[{name:"pixel_values",val:": FloatTensor"},{name:"labels",val:": typing.Optional[torch.LongTensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.SuperGlueForKeypointMatching.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/superglue#transformers.SuperGlueImageProcessor">SuperGlueImageProcessor</a>. See
<a href="/docs/transformers/main/en/model_doc/vilt#transformers.ViltFeatureExtractor.__call__">SuperGlueImageProcessor.<strong>call</strong>()</a> for details.`,name:"pixel_values"},{anchor:"transformers.SuperGlueForKeypointMatching.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors. See <code>attentions</code> under returned tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.SuperGlueForKeypointMatching.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.SuperGlueForKeypointMatching.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.SuperGlueForKeypointMatching.forward.Examples",description:"<strong>Examples</strong> &#x2014;",name:"Examples"},{anchor:"transformers.SuperGlueForKeypointMatching.forward.```python",description:`<strong>\`\`\`python</strong> &#x2014;</p>
<blockquote>
<blockquote>
<blockquote>
<p>from transformers import AutoImageProcessor, AutoModel
import torch
from PIL import Image
import requests</p>
</blockquote>
</blockquote>
</blockquote>`,name:"```python"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/superglue/modeling_superglue.py#L779"}}),Z=new Ot({props:{$$slots:{default:[no]},$$scope:{ctx:me}}}),ce=new to({props:{source:"https://github.com/huggingface/transformers/blob/main/docs/source/en/model_doc/superglue.md"}}),{c(){p=l("meta"),C=n(),w=l("p"),_=n(),d(v.$$.fragment),M=n(),G=l("div"),G.innerHTML=_t,Ce=n(),d(W.$$.fragment),je=n(),N=l("p"),N.innerHTML=Jt,Se=n(),R=l("p"),R.innerHTML=Ut,xe=n(),X=l("p"),X.textContent=vt,ke=n(),V=l("p"),V.innerHTML=Gt,$e=n(),d(H.$$.fragment),ze=n(),Q=l("p"),Q.textContent=It,Be=n(),d(F.$$.fragment),Ze=n(),P=l("p"),P.innerHTML=Ct,We=n(),d(E.$$.fragment),Ne=n(),q=l("p"),q.textContent=jt,Re=n(),d(L.$$.fragment),Xe=n(),D=l("p"),D.innerHTML=St,Ve=n(),Y=l("p"),Y.innerHTML=xt,He=n(),d(A.$$.fragment),Qe=n(),J=l("div"),d(K.$$.fragment),nt=n(),de=l("p"),de.innerHTML=kt,st=n(),ue=l("p"),ue.innerHTML=$t,at=n(),d(k.$$.fragment),Fe=n(),d(O.$$.fragment),Pe=n(),b=l("div"),d(ee.$$.fragment),rt=n(),he=l("p"),he.textContent=zt,lt=n(),$=l("div"),d(te.$$.fragment),it=n(),ge=l("p"),ge.innerHTML=Bt,ct=n(),z=l("div"),d(oe.$$.fragment),pt=n(),fe=l("p"),fe.textContent=Zt,mt=n(),B=l("div"),d(ne.$$.fragment),dt=n(),ye=l("p"),ye.textContent=Wt,Ee=n(),se=l("ul"),se.innerHTML=Nt,qe=n(),d(ae.$$.fragment),Le=n(),m=l("div"),d(re.$$.fragment),ut=n(),Me=l("p"),Me.innerHTML=Rt,ht=n(),we=l("p"),we.textContent=Xt,gt=n(),Te=l("p"),Te.textContent=Vt,ft=n(),be=l("ol"),be.innerHTML=Ht,yt=n(),_e=l("p"),_e.textContent=Qt,Mt=n(),Je=l("p"),Je.innerHTML=Ft,wt=n(),j=l("div"),d(le.$$.fragment),Tt=n(),Ue=l("p"),Ue.innerHTML=Pt,bt=n(),d(Z.$$.fragment),De=n(),ie=l("ul"),ie.innerHTML=Et,Ye=n(),d(ce.$$.fragment),Ae=n(),Ie=l("p"),this.h()},l(e){const t=Kt("svelte-u9bgzb",document.head);p=i(t,"META",{name:!0,content:!0}),t.forEach(o),C=s(e),w=i(e,"P",{}),x(w).forEach(o),_=s(e),u(v.$$.fragment,e),M=s(e),G=i(e,"DIV",{class:!0,"data-svelte-h":!0}),c(G)!=="svelte-13t8s2t"&&(G.innerHTML=_t),Ce=s(e),u(W.$$.fragment,e),je=s(e),N=i(e,"P",{"data-svelte-h":!0}),c(N)!=="svelte-jnhrty"&&(N.innerHTML=Jt),Se=s(e),R=i(e,"P",{"data-svelte-h":!0}),c(R)!=="svelte-11zlwci"&&(R.innerHTML=Ut),xe=s(e),X=i(e,"P",{"data-svelte-h":!0}),c(X)!=="svelte-vfdo9a"&&(X.textContent=vt),ke=s(e),V=i(e,"P",{"data-svelte-h":!0}),c(V)!=="svelte-1hznpl7"&&(V.innerHTML=Gt),$e=s(e),u(H.$$.fragment,e),ze=s(e),Q=i(e,"P",{"data-svelte-h":!0}),c(Q)!=="svelte-88y6pj"&&(Q.textContent=It),Be=s(e),u(F.$$.fragment,e),Ze=s(e),P=i(e,"P",{"data-svelte-h":!0}),c(P)!=="svelte-o9bw9u"&&(P.innerHTML=Ct),We=s(e),u(E.$$.fragment,e),Ne=s(e),q=i(e,"P",{"data-svelte-h":!0}),c(q)!=="svelte-v9owge"&&(q.textContent=jt),Re=s(e),u(L.$$.fragment,e),Xe=s(e),D=i(e,"P",{"data-svelte-h":!0}),c(D)!=="svelte-1pvnv97"&&(D.innerHTML=St),Ve=s(e),Y=i(e,"P",{"data-svelte-h":!0}),c(Y)!=="svelte-1plbgli"&&(Y.innerHTML=xt),He=s(e),u(A.$$.fragment,e),Qe=s(e),J=i(e,"DIV",{class:!0});var I=x(J);u(K.$$.fragment,I),nt=s(I),de=i(I,"P",{"data-svelte-h":!0}),c(de)!=="svelte-mrmg6g"&&(de.innerHTML=kt),st=s(I),ue=i(I,"P",{"data-svelte-h":!0}),c(ue)!=="svelte-o55m63"&&(ue.innerHTML=$t),at=s(I),u(k.$$.fragment,I),I.forEach(o),Fe=s(e),u(O.$$.fragment,e),Pe=s(e),b=i(e,"DIV",{class:!0});var U=x(b);u(ee.$$.fragment,U),rt=s(U),he=i(U,"P",{"data-svelte-h":!0}),c(he)!=="svelte-2i9uog"&&(he.textContent=zt),lt=s(U),$=i(U,"DIV",{class:!0});var Oe=x($);u(te.$$.fragment,Oe),it=s(Oe),ge=i(Oe,"P",{"data-svelte-h":!0}),c(ge)!=="svelte-y19agd"&&(ge.innerHTML=Bt),Oe.forEach(o),ct=s(U),z=i(U,"DIV",{class:!0});var et=x(z);u(oe.$$.fragment,et),pt=s(et),fe=i(et,"P",{"data-svelte-h":!0}),c(fe)!=="svelte-1x3yxsa"&&(fe.textContent=Zt),et.forEach(o),mt=s(U),B=i(U,"DIV",{class:!0});var tt=x(B);u(ne.$$.fragment,tt),dt=s(tt),ye=i(tt,"P",{"data-svelte-h":!0}),c(ye)!=="svelte-1eb2h1k"&&(ye.textContent=Wt),tt.forEach(o),U.forEach(o),Ee=s(e),se=i(e,"UL",{"data-svelte-h":!0}),c(se)!=="svelte-j0c82d"&&(se.innerHTML=Nt),qe=s(e),u(ae.$$.fragment,e),Le=s(e),m=i(e,"DIV",{class:!0});var T=x(m);u(re.$$.fragment,T),ut=s(T),Me=i(T,"P",{"data-svelte-h":!0}),c(Me)!=="svelte-1aw6tuh"&&(Me.innerHTML=Rt),ht=s(T),we=i(T,"P",{"data-svelte-h":!0}),c(we)!=="svelte-1dk3ngg"&&(we.textContent=Xt),gt=s(T),Te=i(T,"P",{"data-svelte-h":!0}),c(Te)!=="svelte-1brn206"&&(Te.textContent=Vt),ft=s(T),be=i(T,"OL",{"data-svelte-h":!0}),c(be)!=="svelte-1pikpqu"&&(be.innerHTML=Ht),yt=s(T),_e=i(T,"P",{"data-svelte-h":!0}),c(_e)!=="svelte-z466vq"&&(_e.textContent=Qt),Mt=s(T),Je=i(T,"P",{"data-svelte-h":!0}),c(Je)!=="svelte-1wx5o62"&&(Je.innerHTML=Ft),wt=s(T),j=i(T,"DIV",{class:!0});var ve=x(j);u(le.$$.fragment,ve),Tt=s(ve),Ue=i(ve,"P",{"data-svelte-h":!0}),c(Ue)!=="svelte-18va01n"&&(Ue.innerHTML=Pt),bt=s(ve),u(Z.$$.fragment,ve),ve.forEach(o),T.forEach(o),De=s(e),ie=i(e,"UL",{"data-svelte-h":!0}),c(ie)!=="svelte-mdsibh"&&(ie.innerHTML=Et),Ye=s(e),u(ce.$$.fragment,e),Ae=s(e),Ie=i(e,"P",{}),x(Ie).forEach(o),this.h()},h(){S(p,"name","hf:doc:metadata"),S(p,"content",ao),S(G,"class","flex flex-wrap space-x-1"),S(J,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),S($,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),S(z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),S(B,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),S(b,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),S(j,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),S(m,"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){r(document.head,p),a(e,C,t),a(e,w,t),a(e,_,t),h(v,e,t),a(e,M,t),a(e,G,t),a(e,Ce,t),h(W,e,t),a(e,je,t),a(e,N,t),a(e,Se,t),a(e,R,t),a(e,xe,t),a(e,X,t),a(e,ke,t),a(e,V,t),a(e,$e,t),h(H,e,t),a(e,ze,t),a(e,Q,t),a(e,Be,t),h(F,e,t),a(e,Ze,t),a(e,P,t),a(e,We,t),h(E,e,t),a(e,Ne,t),a(e,q,t),a(e,Re,t),h(L,e,t),a(e,Xe,t),a(e,D,t),a(e,Ve,t),a(e,Y,t),a(e,He,t),h(A,e,t),a(e,Qe,t),a(e,J,t),h(K,J,null),r(J,nt),r(J,de),r(J,st),r(J,ue),r(J,at),h(k,J,null),a(e,Fe,t),h(O,e,t),a(e,Pe,t),a(e,b,t),h(ee,b,null),r(b,rt),r(b,he),r(b,lt),r(b,$),h(te,$,null),r($,it),r($,ge),r(b,ct),r(b,z),h(oe,z,null),r(z,pt),r(z,fe),r(b,mt),r(b,B),h(ne,B,null),r(B,dt),r(B,ye),a(e,Ee,t),a(e,se,t),a(e,qe,t),h(ae,e,t),a(e,Le,t),a(e,m,t),h(re,m,null),r(m,ut),r(m,Me),r(m,ht),r(m,we),r(m,gt),r(m,Te),r(m,ft),r(m,be),r(m,yt),r(m,_e),r(m,Mt),r(m,Je),r(m,wt),r(m,j),h(le,j,null),r(j,Tt),r(j,Ue),r(j,bt),h(Z,j,null),a(e,De,t),a(e,ie,t),a(e,Ye,t),h(ce,e,t),a(e,Ae,t),a(e,Ie,t),Ke=!0},p(e,[t]){const I={};t&2&&(I.$$scope={dirty:t,ctx:e}),k.$set(I);const U={};t&2&&(U.$$scope={dirty:t,ctx:e}),Z.$set(U)},i(e){Ke||(g(v.$$.fragment,e),g(W.$$.fragment,e),g(H.$$.fragment,e),g(F.$$.fragment,e),g(E.$$.fragment,e),g(L.$$.fragment,e),g(A.$$.fragment,e),g(K.$$.fragment,e),g(k.$$.fragment,e),g(O.$$.fragment,e),g(ee.$$.fragment,e),g(te.$$.fragment,e),g(oe.$$.fragment,e),g(ne.$$.fragment,e),g(ae.$$.fragment,e),g(re.$$.fragment,e),g(le.$$.fragment,e),g(Z.$$.fragment,e),g(ce.$$.fragment,e),Ke=!0)},o(e){f(v.$$.fragment,e),f(W.$$.fragment,e),f(H.$$.fragment,e),f(F.$$.fragment,e),f(E.$$.fragment,e),f(L.$$.fragment,e),f(A.$$.fragment,e),f(K.$$.fragment,e),f(k.$$.fragment,e),f(O.$$.fragment,e),f(ee.$$.fragment,e),f(te.$$.fragment,e),f(oe.$$.fragment,e),f(ne.$$.fragment,e),f(ae.$$.fragment,e),f(re.$$.fragment,e),f(le.$$.fragment,e),f(Z.$$.fragment,e),f(ce.$$.fragment,e),Ke=!1},d(e){e&&(o(C),o(w),o(_),o(M),o(G),o(Ce),o(je),o(N),o(Se),o(R),o(xe),o(X),o(ke),o(V),o($e),o(ze),o(Q),o(Be),o(Ze),o(P),o(We),o(Ne),o(q),o(Re),o(Xe),o(D),o(Ve),o(Y),o(He),o(Qe),o(J),o(Fe),o(Pe),o(b),o(Ee),o(se),o(qe),o(Le),o(m),o(De),o(ie),o(Ye),o(Ae),o(Ie)),o(p),y(v,e),y(W,e),y(H,e),y(F,e),y(E,e),y(L,e),y(A,e),y(K),y(k),y(O,e),y(ee),y(te),y(oe),y(ne),y(ae,e),y(re),y(le),y(Z),y(ce,e)}}}const ao='{"title":"SuperGlue","local":"superglue","sections":[{"title":"Overview","local":"overview","sections":[],"depth":2},{"title":"How to use","local":"how-to-use","sections":[],"depth":2},{"title":"SuperGlueConfig","local":"transformers.SuperGlueConfig","sections":[],"depth":2},{"title":"SuperGlueImageProcessor","local":"transformers.SuperGlueImageProcessor","sections":[],"depth":2},{"title":"SuperGlueForKeypointMatching","local":"transformers.SuperGlueForKeypointMatching","sections":[],"depth":2}],"depth":1}';function ro(me){return Dt(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class go extends Yt{constructor(p){super(),At(this,p,ro,so,Lt,{})}}export{go as component};
