import{S as Np,i as Wp,s as Sp,e as s,k as m,w as b,t as i,M as Rp,c as r,d as o,m as h,a,x as T,h as l,b as d,G as e,g as _,y as O,q as $,o as x,B as V,v as Bp,L as ze}from"../../chunks/vendor-hf-doc-builder.js";import{T as Fo}from"../../chunks/Tip-hf-doc-builder.js";import{D as j}from"../../chunks/Docstring-hf-doc-builder.js";import{C as ee}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as A}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as je}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function Up(y){let c,v,g,f,w;return f=new ee({props:{code:`from transformers import OwlViTTextConfig, OwlViTTextModel

# Initializing a OwlViTTextModel with google/owlvit-base-patch32 style configuration
configuration = OwlViTTextConfig()

# Initializing a OwlViTTextConfig from the google/owlvit-base-patch32 style configuration
model = OwlViTTextModel(configuration)

# Accessing the model configuration
configuration = model.config`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> OwlViTTextConfig, OwlViTTextModel

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a OwlViTTextModel with google/owlvit-base-patch32 style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = OwlViTTextConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a OwlViTTextConfig from the google/owlvit-base-patch32 style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = OwlViTTextModel(configuration)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Accessing the model configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = model.config`}}),{c(){c=s("p"),v=i("Example:"),g=m(),b(f.$$.fragment)},l(n){c=r(n,"P",{});var p=a(c);v=l(p,"Example:"),p.forEach(o),g=h(n),T(f.$$.fragment,n)},m(n,p){_(n,c,p),e(c,v),_(n,g,p),O(f,n,p),w=!0},p:ze,i(n){w||($(f.$$.fragment,n),w=!0)},o(n){x(f.$$.fragment,n),w=!1},d(n){n&&o(c),n&&o(g),V(f,n)}}}function Hp(y){let c,v,g,f,w;return f=new ee({props:{code:`from transformers import OwlViTVisionConfig, OwlViTVisionModel

# Initializing a OwlViTVisionModel with google/owlvit-base-patch32 style configuration
configuration = OwlViTVisionConfig()

# Initializing a OwlViTVisionModel model from the google/owlvit-base-patch32 style configuration
model = OwlViTVisionModel(configuration)

# Accessing the model configuration
configuration = model.config`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> OwlViTVisionConfig, OwlViTVisionModel

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a OwlViTVisionModel with google/owlvit-base-patch32 style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = OwlViTVisionConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a OwlViTVisionModel model from the google/owlvit-base-patch32 style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = OwlViTVisionModel(configuration)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Accessing the model configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = model.config`}}),{c(){c=s("p"),v=i("Example:"),g=m(),b(f.$$.fragment)},l(n){c=r(n,"P",{});var p=a(c);v=l(p,"Example:"),p.forEach(o),g=h(n),T(f.$$.fragment,n)},m(n,p){_(n,c,p),e(c,v),_(n,g,p),O(f,n,p),w=!0},p:ze,i(n){w||($(f.$$.fragment,n),w=!0)},o(n){x(f.$$.fragment,n),w=!1},d(n){n&&o(c),n&&o(g),V(f,n)}}}function Gp(y){let c,v,g,f,w;return{c(){c=s("p"),v=i("Although the recipe for forward pass needs to be defined within this function, one should call the "),g=s("code"),f=i("Module"),w=i(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(n){c=r(n,"P",{});var p=a(c);v=l(p,"Although the recipe for forward pass needs to be defined within this function, one should call the "),g=r(p,"CODE",{});var z=a(g);f=l(z,"Module"),z.forEach(o),w=l(p,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),p.forEach(o)},m(n,p){_(n,c,p),e(c,v),e(c,g),e(g,f),e(c,w)},d(n){n&&o(c)}}}function Xp(y){let c,v,g,f,w;return f=new ee({props:{code:`from PIL import Image
import requests
from transformers import OwlViTProcessor, OwlViTModel

model = OwlViTModel.from_pretrained("google/owlvit-base-patch32")
processor = OwlViTProcessor.from_pretrained("google/owlvit-base-patch32")
url = "http://images.cocodataset.org/val2017/000000039769.jpg"
image = Image.open(requests.get(url, stream=True).raw)
inputs = processor(text=[["a photo of a cat", "a photo of a dog"]], images=image, return_tensors="pt")
outputs = model(**inputs)
logits_per_image = outputs.logits_per_image  # this is the image-text similarity score
probs = logits_per_image.softmax(dim=1)  # we can take the softmax to get the label probabilities`,highlighted:`<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><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> OwlViTProcessor, OwlViTModel

<span class="hljs-meta">&gt;&gt;&gt; </span>model = OwlViTModel.from_pretrained(<span class="hljs-string">&quot;google/owlvit-base-patch32&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>processor = OwlViTProcessor.from_pretrained(<span class="hljs-string">&quot;google/owlvit-base-patch32&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>url = <span class="hljs-string">&quot;http://images.cocodataset.org/val2017/000000039769.jpg&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>image = Image.<span class="hljs-built_in">open</span>(requests.get(url, stream=<span class="hljs-literal">True</span>).raw)
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = processor(text=[[<span class="hljs-string">&quot;a photo of a cat&quot;</span>, <span class="hljs-string">&quot;a photo of a dog&quot;</span>]], images=image, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>logits_per_image = outputs.logits_per_image  <span class="hljs-comment"># this is the image-text similarity score</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>probs = logits_per_image.softmax(dim=<span class="hljs-number">1</span>)  <span class="hljs-comment"># we can take the softmax to get the label probabilities</span>`}}),{c(){c=s("p"),v=i("Examples:"),g=m(),b(f.$$.fragment)},l(n){c=r(n,"P",{});var p=a(c);v=l(p,"Examples:"),p.forEach(o),g=h(n),T(f.$$.fragment,n)},m(n,p){_(n,c,p),e(c,v),_(n,g,p),O(f,n,p),w=!0},p:ze,i(n){w||($(f.$$.fragment,n),w=!0)},o(n){x(f.$$.fragment,n),w=!1},d(n){n&&o(c),n&&o(g),V(f,n)}}}function Zp(y){let c,v,g,f,w;return{c(){c=s("p"),v=i("Although the recipe for forward pass needs to be defined within this function, one should call the "),g=s("code"),f=i("Module"),w=i(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(n){c=r(n,"P",{});var p=a(c);v=l(p,"Although the recipe for forward pass needs to be defined within this function, one should call the "),g=r(p,"CODE",{});var z=a(g);f=l(z,"Module"),z.forEach(o),w=l(p,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),p.forEach(o)},m(n,p){_(n,c,p),e(c,v),e(c,g),e(g,f),e(c,w)},d(n){n&&o(c)}}}function Yp(y){let c,v,g,f,w;return f=new ee({props:{code:`from transformers import OwlViTProcessor, OwlViTModel

model = OwlViTModel.from_pretrained("google/owlvit-base-patch32")
processor = OwlViTProcessor.from_pretrained("google/owlvit-base-patch32")
inputs = processor(
    text=[["a photo of a cat", "a photo of a dog"], ["photo of a astranaut"]], return_tensors="pt"
)
text_features = model.get_text_features(**inputs)`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> OwlViTProcessor, OwlViTModel

<span class="hljs-meta">&gt;&gt;&gt; </span>model = OwlViTModel.from_pretrained(<span class="hljs-string">&quot;google/owlvit-base-patch32&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>processor = OwlViTProcessor.from_pretrained(<span class="hljs-string">&quot;google/owlvit-base-patch32&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = processor(
<span class="hljs-meta">... </span>    text=[[<span class="hljs-string">&quot;a photo of a cat&quot;</span>, <span class="hljs-string">&quot;a photo of a dog&quot;</span>], [<span class="hljs-string">&quot;photo of a astranaut&quot;</span>]], return_tensors=<span class="hljs-string">&quot;pt&quot;</span>
<span class="hljs-meta">... </span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>text_features = model.get_text_features(**inputs)`}}),{c(){c=s("p"),v=i("Examples:"),g=m(),b(f.$$.fragment)},l(n){c=r(n,"P",{});var p=a(c);v=l(p,"Examples:"),p.forEach(o),g=h(n),T(f.$$.fragment,n)},m(n,p){_(n,c,p),e(c,v),_(n,g,p),O(f,n,p),w=!0},p:ze,i(n){w||($(f.$$.fragment,n),w=!0)},o(n){x(f.$$.fragment,n),w=!1},d(n){n&&o(c),n&&o(g),V(f,n)}}}function Jp(y){let c,v,g,f,w;return{c(){c=s("p"),v=i("Although the recipe for forward pass needs to be defined within this function, one should call the "),g=s("code"),f=i("Module"),w=i(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(n){c=r(n,"P",{});var p=a(c);v=l(p,"Although the recipe for forward pass needs to be defined within this function, one should call the "),g=r(p,"CODE",{});var z=a(g);f=l(z,"Module"),z.forEach(o),w=l(p,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),p.forEach(o)},m(n,p){_(n,c,p),e(c,v),e(c,g),e(g,f),e(c,w)},d(n){n&&o(c)}}}function Kp(y){let c,v,g,f,w;return f=new ee({props:{code:`from PIL import Image
import requests
from transformers import OwlViTProcessor, OwlViTModel

model = OwlViTModel.from_pretrained("google/owlvit-base-patch32")
processor = OwlViTProcessor.from_pretrained("google/owlvit-base-patch32")
url = "http://images.cocodataset.org/val2017/000000039769.jpg"
image = Image.open(requests.get(url, stream=True).raw)
inputs = processor(images=image, return_tensors="pt")
image_features = model.get_image_features(**inputs)`,highlighted:`<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><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> OwlViTProcessor, OwlViTModel

<span class="hljs-meta">&gt;&gt;&gt; </span>model = OwlViTModel.from_pretrained(<span class="hljs-string">&quot;google/owlvit-base-patch32&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>processor = OwlViTProcessor.from_pretrained(<span class="hljs-string">&quot;google/owlvit-base-patch32&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>url = <span class="hljs-string">&quot;http://images.cocodataset.org/val2017/000000039769.jpg&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>image = Image.<span class="hljs-built_in">open</span>(requests.get(url, stream=<span class="hljs-literal">True</span>).raw)
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = processor(images=image, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>image_features = model.get_image_features(**inputs)`}}),{c(){c=s("p"),v=i("Examples:"),g=m(),b(f.$$.fragment)},l(n){c=r(n,"P",{});var p=a(c);v=l(p,"Examples:"),p.forEach(o),g=h(n),T(f.$$.fragment,n)},m(n,p){_(n,c,p),e(c,v),_(n,g,p),O(f,n,p),w=!0},p:ze,i(n){w||($(f.$$.fragment,n),w=!0)},o(n){x(f.$$.fragment,n),w=!1},d(n){n&&o(c),n&&o(g),V(f,n)}}}function Qp(y){let c,v,g,f,w;return{c(){c=s("p"),v=i("Although the recipe for forward pass needs to be defined within this function, one should call the "),g=s("code"),f=i("Module"),w=i(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(n){c=r(n,"P",{});var p=a(c);v=l(p,"Although the recipe for forward pass needs to be defined within this function, one should call the "),g=r(p,"CODE",{});var z=a(g);f=l(z,"Module"),z.forEach(o),w=l(p,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),p.forEach(o)},m(n,p){_(n,c,p),e(c,v),e(c,g),e(g,f),e(c,w)},d(n){n&&o(c)}}}function em(y){let c,v,g,f,w;return f=new ee({props:{code:`from transformers import OwlViTProcessor, OwlViTTextModel

model = OwlViTTextModel.from_pretrained("google/owlvit-base-patch32")
processor = OwlViTProcessor.from_pretrained("google/owlvit-base-patch32")
inputs = processor(
    text=[["a photo of a cat", "a photo of a dog"], ["photo of a astranaut"]], return_tensors="pt"
)
outputs = model(**inputs)
last_hidden_state = outputs.last_hidden_state
pooled_output = outputs.pooler_output  # pooled (EOS token) states`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> OwlViTProcessor, OwlViTTextModel

<span class="hljs-meta">&gt;&gt;&gt; </span>model = OwlViTTextModel.from_pretrained(<span class="hljs-string">&quot;google/owlvit-base-patch32&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>processor = OwlViTProcessor.from_pretrained(<span class="hljs-string">&quot;google/owlvit-base-patch32&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = processor(
<span class="hljs-meta">... </span>    text=[[<span class="hljs-string">&quot;a photo of a cat&quot;</span>, <span class="hljs-string">&quot;a photo of a dog&quot;</span>], [<span class="hljs-string">&quot;photo of a astranaut&quot;</span>]], return_tensors=<span class="hljs-string">&quot;pt&quot;</span>
<span class="hljs-meta">... </span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>last_hidden_state = outputs.last_hidden_state
<span class="hljs-meta">&gt;&gt;&gt; </span>pooled_output = outputs.pooler_output  <span class="hljs-comment"># pooled (EOS token) states</span>`}}),{c(){c=s("p"),v=i("Examples:"),g=m(),b(f.$$.fragment)},l(n){c=r(n,"P",{});var p=a(c);v=l(p,"Examples:"),p.forEach(o),g=h(n),T(f.$$.fragment,n)},m(n,p){_(n,c,p),e(c,v),_(n,g,p),O(f,n,p),w=!0},p:ze,i(n){w||($(f.$$.fragment,n),w=!0)},o(n){x(f.$$.fragment,n),w=!1},d(n){n&&o(c),n&&o(g),V(f,n)}}}function tm(y){let c,v,g,f,w;return{c(){c=s("p"),v=i("Although the recipe for forward pass needs to be defined within this function, one should call the "),g=s("code"),f=i("Module"),w=i(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(n){c=r(n,"P",{});var p=a(c);v=l(p,"Although the recipe for forward pass needs to be defined within this function, one should call the "),g=r(p,"CODE",{});var z=a(g);f=l(z,"Module"),z.forEach(o),w=l(p,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),p.forEach(o)},m(n,p){_(n,c,p),e(c,v),e(c,g),e(g,f),e(c,w)},d(n){n&&o(c)}}}function om(y){let c,v,g,f,w;return f=new ee({props:{code:`from PIL import Image
import requests
from transformers import OwlViTProcessor, OwlViTVisionModel

model = OwlViTVisionModel.from_pretrained("google/owlvit-base-patch32")
processor = OwlViTProcessor.from_pretrained("google/owlvit-base-patch32")
url = "http://images.cocodataset.org/val2017/000000039769.jpg"
image = Image.open(requests.get(url, stream=True).raw)

inputs = processor(images=image, return_tensors="pt")

outputs = model(**inputs)
last_hidden_state = outputs.last_hidden_state
pooled_output = outputs.pooler_output  # pooled CLS states`,highlighted:`<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><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> OwlViTProcessor, OwlViTVisionModel

<span class="hljs-meta">&gt;&gt;&gt; </span>model = OwlViTVisionModel.from_pretrained(<span class="hljs-string">&quot;google/owlvit-base-patch32&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>processor = OwlViTProcessor.from_pretrained(<span class="hljs-string">&quot;google/owlvit-base-patch32&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>url = <span class="hljs-string">&quot;http://images.cocodataset.org/val2017/000000039769.jpg&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>image = Image.<span class="hljs-built_in">open</span>(requests.get(url, stream=<span class="hljs-literal">True</span>).raw)

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

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>last_hidden_state = outputs.last_hidden_state
<span class="hljs-meta">&gt;&gt;&gt; </span>pooled_output = outputs.pooler_output  <span class="hljs-comment"># pooled CLS states</span>`}}),{c(){c=s("p"),v=i("Examples:"),g=m(),b(f.$$.fragment)},l(n){c=r(n,"P",{});var p=a(c);v=l(p,"Examples:"),p.forEach(o),g=h(n),T(f.$$.fragment,n)},m(n,p){_(n,c,p),e(c,v),_(n,g,p),O(f,n,p),w=!0},p:ze,i(n){w||($(f.$$.fragment,n),w=!0)},o(n){x(f.$$.fragment,n),w=!1},d(n){n&&o(c),n&&o(g),V(f,n)}}}function sm(y){let c,v,g,f,w;return{c(){c=s("p"),v=i("Although the recipe for forward pass needs to be defined within this function, one should call the "),g=s("code"),f=i("Module"),w=i(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(n){c=r(n,"P",{});var p=a(c);v=l(p,"Although the recipe for forward pass needs to be defined within this function, one should call the "),g=r(p,"CODE",{});var z=a(g);f=l(z,"Module"),z.forEach(o),w=l(p,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),p.forEach(o)},m(n,p){_(n,c,p),e(c,v),e(c,g),e(g,f),e(c,w)},d(n){n&&o(c)}}}function rm(y){let c,v,g,f,w;return f=new ee({props:{code:`import requests
from PIL import Image
import torch
from transformers import OwlViTProcessor, OwlViTForObjectDetection

processor = OwlViTProcessor.from_pretrained("google/owlvit-base-patch32")
model = OwlViTForObjectDetection.from_pretrained("google/owlvit-base-patch32")

url = "http://images.cocodataset.org/val2017/000000039769.jpg"
image = Image.open(requests.get(url, stream=True).raw)
texts = [["a photo of a cat", "a photo of a dog"]]
inputs = processor(text=texts, images=image, return_tensors="pt")
outputs = model(**inputs)

# Target image sizes (height, width) to rescale box predictions [batch_size, 2]
target_sizes = torch.Tensor([image.size[::-1]])
# Convert outputs (bounding boxes and class logits) to COCO API
results = processor.post_process(outputs=outputs, target_sizes=target_sizes)

i = 0  # Retrieve predictions for the first image for the corresponding text queries
text = texts[i]
boxes, scores, labels = results[i]["boxes"], results[i]["scores"], results[i]["labels"]

score_threshold = 0.1
for box, score, label in zip(boxes, scores, labels):
    box = [round(i, 2) for i in box.tolist()]
    if score >= score_threshold:
        print(f"Detected {text[label]} with confidence {round(score.item(), 3)} at location {box}")`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> requests
<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> torch
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> OwlViTProcessor, OwlViTForObjectDetection

<span class="hljs-meta">&gt;&gt;&gt; </span>processor = OwlViTProcessor.from_pretrained(<span class="hljs-string">&quot;google/owlvit-base-patch32&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = OwlViTForObjectDetection.from_pretrained(<span class="hljs-string">&quot;google/owlvit-base-patch32&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>url = <span class="hljs-string">&quot;http://images.cocodataset.org/val2017/000000039769.jpg&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>image = Image.<span class="hljs-built_in">open</span>(requests.get(url, stream=<span class="hljs-literal">True</span>).raw)
<span class="hljs-meta">&gt;&gt;&gt; </span>texts = [[<span class="hljs-string">&quot;a photo of a cat&quot;</span>, <span class="hljs-string">&quot;a photo of a dog&quot;</span>]]
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = processor(text=texts, images=image, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Target image sizes (height, width) to rescale box predictions [batch_size, 2]</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>target_sizes = torch.Tensor([image.size[::-<span class="hljs-number">1</span>]])
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Convert outputs (bounding boxes and class logits) to COCO API</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>results = processor.post_process(outputs=outputs, target_sizes=target_sizes)

<span class="hljs-meta">&gt;&gt;&gt; </span>i = <span class="hljs-number">0</span>  <span class="hljs-comment"># Retrieve predictions for the first image for the corresponding text queries</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>text = texts[i]
<span class="hljs-meta">&gt;&gt;&gt; </span>boxes, scores, labels = results[i][<span class="hljs-string">&quot;boxes&quot;</span>], results[i][<span class="hljs-string">&quot;scores&quot;</span>], results[i][<span class="hljs-string">&quot;labels&quot;</span>]

<span class="hljs-meta">&gt;&gt;&gt; </span>score_threshold = <span class="hljs-number">0.1</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">for</span> box, score, label <span class="hljs-keyword">in</span> <span class="hljs-built_in">zip</span>(boxes, scores, labels):
<span class="hljs-meta">... </span>    box = [<span class="hljs-built_in">round</span>(i, <span class="hljs-number">2</span>) <span class="hljs-keyword">for</span> i <span class="hljs-keyword">in</span> box.tolist()]
<span class="hljs-meta">... </span>    <span class="hljs-keyword">if</span> score &gt;= score_threshold:
<span class="hljs-meta">... </span>        <span class="hljs-built_in">print</span>(<span class="hljs-string">f&quot;Detected <span class="hljs-subst">{text[label]}</span> with confidence <span class="hljs-subst">{<span class="hljs-built_in">round</span>(score.item(), <span class="hljs-number">3</span>)}</span> at location <span class="hljs-subst">{box}</span>&quot;</span>)
Detected a photo of a cat <span class="hljs-keyword">with</span> confidence <span class="hljs-number">0.707</span> at location [<span class="hljs-number">324.97</span>, <span class="hljs-number">20.44</span>, <span class="hljs-number">640.58</span>, <span class="hljs-number">373.29</span>]
Detected a photo of a cat <span class="hljs-keyword">with</span> confidence <span class="hljs-number">0.717</span> at location [<span class="hljs-number">1.46</span>, <span class="hljs-number">55.26</span>, <span class="hljs-number">315.55</span>, <span class="hljs-number">472.17</span>]`}}),{c(){c=s("p"),v=i("Examples:"),g=m(),b(f.$$.fragment)},l(n){c=r(n,"P",{});var p=a(c);v=l(p,"Examples:"),p.forEach(o),g=h(n),T(f.$$.fragment,n)},m(n,p){_(n,c,p),e(c,v),_(n,g,p),O(f,n,p),w=!0},p:ze,i(n){w||($(f.$$.fragment,n),w=!0)},o(n){x(f.$$.fragment,n),w=!1},d(n){n&&o(c),n&&o(g),V(f,n)}}}function nm(y){let c,v,g,f,w;return{c(){c=s("p"),v=i("Although the recipe for forward pass needs to be defined within this function, one should call the "),g=s("code"),f=i("Module"),w=i(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(n){c=r(n,"P",{});var p=a(c);v=l(p,"Although the recipe for forward pass needs to be defined within this function, one should call the "),g=r(p,"CODE",{});var z=a(g);f=l(z,"Module"),z.forEach(o),w=l(p,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),p.forEach(o)},m(n,p){_(n,c,p),e(c,v),e(c,g),e(g,f),e(c,w)},d(n){n&&o(c)}}}function am(y){let c,v,g,f,w;return f=new ee({props:{code:`import requests
from PIL import Image
import torch
from transformers import OwlViTProcessor, OwlViTForObjectDetection

processor = OwlViTProcessor.from_pretrained("google/owlvit-base-patch16")
model = OwlViTForObjectDetection.from_pretrained("google/owlvit-base-patch16")
url = "http://images.cocodataset.org/val2017/000000039769.jpg"
image = Image.open(requests.get(url, stream=True).raw)
query_url = "http://images.cocodataset.org/val2017/000000001675.jpg"
query_image = Image.open(requests.get(query_url, stream=True).raw)
inputs = processor(images=image, query_images=query_image, return_tensors="pt")
with torch.no_grad():
    outputs = model.image_guided_detection(**inputs)
# Target image sizes (height, width) to rescale box predictions [batch_size, 2]
target_sizes = torch.Tensor([image.size[::-1]])
# Convert outputs (bounding boxes and class logits) to COCO API
results = processor.post_process_image_guided_detection(
    outputs=outputs, threshold=0.6, nms_threshold=0.3, target_sizes=target_sizes
)
i = 0  # Retrieve predictions for the first image
boxes, scores = results[i]["boxes"], results[i]["scores"]
for box, score in zip(boxes, scores):
    box = [round(i, 2) for i in box.tolist()]
    print(f"Detected similar object with confidence {round(score.item(), 3)} at location {box}")`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> requests
<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> torch
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> OwlViTProcessor, OwlViTForObjectDetection

<span class="hljs-meta">&gt;&gt;&gt; </span>processor = OwlViTProcessor.from_pretrained(<span class="hljs-string">&quot;google/owlvit-base-patch16&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = OwlViTForObjectDetection.from_pretrained(<span class="hljs-string">&quot;google/owlvit-base-patch16&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>url = <span class="hljs-string">&quot;http://images.cocodataset.org/val2017/000000039769.jpg&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>image = Image.<span class="hljs-built_in">open</span>(requests.get(url, stream=<span class="hljs-literal">True</span>).raw)
<span class="hljs-meta">&gt;&gt;&gt; </span>query_url = <span class="hljs-string">&quot;http://images.cocodataset.org/val2017/000000001675.jpg&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>query_image = Image.<span class="hljs-built_in">open</span>(requests.get(query_url, stream=<span class="hljs-literal">True</span>).raw)
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = processor(images=image, query_images=query_image, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">with</span> torch.no_grad():
<span class="hljs-meta">... </span>    outputs = model.image_guided_detection(**inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Target image sizes (height, width) to rescale box predictions [batch_size, 2]</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>target_sizes = torch.Tensor([image.size[::-<span class="hljs-number">1</span>]])
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Convert outputs (bounding boxes and class logits) to COCO API</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>results = processor.post_process_image_guided_detection(
<span class="hljs-meta">... </span>    outputs=outputs, threshold=<span class="hljs-number">0.6</span>, nms_threshold=<span class="hljs-number">0.3</span>, target_sizes=target_sizes
<span class="hljs-meta">... </span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>i = <span class="hljs-number">0</span>  <span class="hljs-comment"># Retrieve predictions for the first image</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>boxes, scores = results[i][<span class="hljs-string">&quot;boxes&quot;</span>], results[i][<span class="hljs-string">&quot;scores&quot;</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">for</span> box, score <span class="hljs-keyword">in</span> <span class="hljs-built_in">zip</span>(boxes, scores):
<span class="hljs-meta">... </span>    box = [<span class="hljs-built_in">round</span>(i, <span class="hljs-number">2</span>) <span class="hljs-keyword">for</span> i <span class="hljs-keyword">in</span> box.tolist()]
<span class="hljs-meta">... </span>    <span class="hljs-built_in">print</span>(<span class="hljs-string">f&quot;Detected similar object with confidence <span class="hljs-subst">{<span class="hljs-built_in">round</span>(score.item(), <span class="hljs-number">3</span>)}</span> at location <span class="hljs-subst">{box}</span>&quot;</span>)
Detected similar <span class="hljs-built_in">object</span> <span class="hljs-keyword">with</span> confidence <span class="hljs-number">0.782</span> at location [-<span class="hljs-number">0.06</span>, -<span class="hljs-number">1.52</span>, <span class="hljs-number">637.96</span>, <span class="hljs-number">271.16</span>]
Detected similar <span class="hljs-built_in">object</span> <span class="hljs-keyword">with</span> confidence <span class="hljs-number">1.0</span> at location [<span class="hljs-number">39.64</span>, <span class="hljs-number">71.61</span>, <span class="hljs-number">176.21</span>, <span class="hljs-number">117.15</span>]`}}),{c(){c=s("p"),v=i("Examples:"),g=m(),b(f.$$.fragment)},l(n){c=r(n,"P",{});var p=a(c);v=l(p,"Examples:"),p.forEach(o),g=h(n),T(f.$$.fragment,n)},m(n,p){_(n,c,p),e(c,v),_(n,g,p),O(f,n,p),w=!0},p:ze,i(n){w||($(f.$$.fragment,n),w=!0)},o(n){x(f.$$.fragment,n),w=!1},d(n){n&&o(c),n&&o(g),V(f,n)}}}function im(y){let c,v,g,f,w,n,p,z,Gn,Mr,te,Pe,As,jt,Xn,Ns,Zn,Dr,ke,Yn,zt,Jn,Kn,Fr,Lo,Qn,Lr,Ao,Ws,ea,Ar,oe,Ie,Ss,Pt,ta,Rs,oa,Nr,Ee,sa,No,ra,na,Wr,P,Wo,aa,ia,So,la,ca,Ro,da,pa,Bo,ma,ha,Uo,fa,ga,Ho,ua,_a,Go,wa,va,Sr,kt,Rr,K,ba,It,Ta,Oa,Et,$a,xa,Br,se,Ce,Bs,Ct,Va,Us,ya,Ur,M,qt,ja,Q,Xo,za,Pa,Zo,ka,Ia,Mt,Ea,Ca,qa,re,Ma,Yo,Da,Fa,Jo,La,Aa,Na,qe,Dt,Wa,Ft,Sa,Ko,Ra,Ba,Hr,ne,Me,Hs,Lt,Ua,Gs,Ha,Gr,D,At,Ga,ae,Xa,Qo,Za,Ya,Nt,Ja,Ka,Qa,ie,ei,es,ti,oi,ts,si,ri,ni,De,Xr,le,Fe,Xs,Wt,ai,Zs,ii,Zr,F,St,li,ce,ci,os,di,pi,Rt,mi,hi,fi,de,gi,ss,ui,_i,rs,wi,vi,bi,Le,Yr,pe,Ae,Ys,Bt,Ti,Js,Oi,Jr,k,Ut,$i,Ks,xi,Vi,Ht,yi,ns,ji,zi,Pi,Ne,Gt,ki,Qs,Ii,Ei,We,Xt,Ci,Zt,qi,as,Mi,Di,Fi,Se,Yt,Li,Jt,Ai,is,Ni,Wi,Kr,me,Re,er,Kt,Si,tr,Ri,Qr,I,Qt,Bi,or,Ui,Hi,eo,Gi,ls,Xi,Zi,Yi,Be,to,Ji,sr,Ki,Qi,Ue,oo,el,so,tl,cs,ol,sl,rl,He,ro,nl,no,al,ds,il,ll,en,he,Ge,rr,ao,cl,nr,dl,tn,E,io,pl,C,ml,ps,hl,fl,ms,gl,ul,hs,_l,wl,ar,vl,bl,fs,Tl,Ol,$l,Xe,lo,xl,co,Vl,gs,yl,jl,zl,Ze,po,Pl,mo,kl,us,Il,El,Cl,Ye,ho,ql,fo,Ml,_s,Dl,Fl,Ll,Je,go,Al,uo,Nl,ir,Wl,Sl,on,fe,Ke,lr,_o,Rl,cr,Bl,sn,L,wo,Ul,N,vo,Hl,ge,Gl,ws,Xl,Zl,dr,Yl,Jl,Kl,Qe,Ql,et,ec,W,bo,tc,ue,oc,vs,sc,rc,pr,nc,ac,ic,tt,lc,ot,cc,S,To,dc,_e,pc,bs,mc,hc,mr,fc,gc,uc,st,_c,rt,rn,we,nt,hr,Oo,wc,fr,vc,nn,ve,$o,bc,R,xo,Tc,be,Oc,Ts,$c,xc,gr,Vc,yc,jc,at,zc,it,an,Te,lt,ur,Vo,Pc,_r,kc,ln,Oe,yo,Ic,B,jo,Ec,$e,Cc,Os,qc,Mc,wr,Dc,Fc,Lc,ct,Ac,dt,cn,xe,pt,vr,zo,Nc,br,Wc,dn,J,Po,Sc,U,ko,Rc,Ve,Bc,$s,Uc,Hc,Tr,Gc,Xc,Zc,mt,Yc,ht,Jc,H,Io,Kc,ye,Qc,xs,ed,td,Or,od,sd,rd,ft,nd,gt,pn;return n=new A({}),jt=new A({}),Pt=new A({}),kt=new ee({props:{code:`import requests
from PIL import Image
import torch

from transformers import OwlViTProcessor, OwlViTForObjectDetection

processor = OwlViTProcessor.from_pretrained("google/owlvit-base-patch32")
model = OwlViTForObjectDetection.from_pretrained("google/owlvit-base-patch32")

url = "http://images.cocodataset.org/val2017/000000039769.jpg"
image = Image.open(requests.get(url, stream=True).raw)
texts = [["a photo of a cat", "a photo of a dog"]]
inputs = processor(text=texts, images=image, return_tensors="pt")
outputs = model(**inputs)

# Target image sizes (height, width) to rescale box predictions [batch_size, 2]
target_sizes = torch.Tensor([image.size[::-1]])
# Convert outputs (bounding boxes and class logits) to COCO API
results = processor.post_process(outputs=outputs, target_sizes=target_sizes)

i = 0  # Retrieve predictions for the first image for the corresponding text queries
text = texts[i]
boxes, scores, labels = results[i]["boxes"], results[i]["scores"], results[i]["labels"]

score_threshold = 0.1
for box, score, label in zip(boxes, scores, labels):
    box = [round(i, 2) for i in box.tolist()]
    if score >= score_threshold:
        print(f"Detected {text[label]} with confidence {round(score.item(), 3)} at location {box}")`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> requests
<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> torch

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> OwlViTProcessor, OwlViTForObjectDetection

<span class="hljs-meta">&gt;&gt;&gt; </span>processor = OwlViTProcessor.from_pretrained(<span class="hljs-string">&quot;google/owlvit-base-patch32&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = OwlViTForObjectDetection.from_pretrained(<span class="hljs-string">&quot;google/owlvit-base-patch32&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>url = <span class="hljs-string">&quot;http://images.cocodataset.org/val2017/000000039769.jpg&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>image = Image.<span class="hljs-built_in">open</span>(requests.get(url, stream=<span class="hljs-literal">True</span>).raw)
<span class="hljs-meta">&gt;&gt;&gt; </span>texts = [[<span class="hljs-string">&quot;a photo of a cat&quot;</span>, <span class="hljs-string">&quot;a photo of a dog&quot;</span>]]
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = processor(text=texts, images=image, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Target image sizes (height, width) to rescale box predictions [batch_size, 2]</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>target_sizes = torch.Tensor([image.size[::-<span class="hljs-number">1</span>]])
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Convert outputs (bounding boxes and class logits) to COCO API</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>results = processor.post_process(outputs=outputs, target_sizes=target_sizes)

<span class="hljs-meta">&gt;&gt;&gt; </span>i = <span class="hljs-number">0</span>  <span class="hljs-comment"># Retrieve predictions for the first image for the corresponding text queries</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>text = texts[i]
<span class="hljs-meta">&gt;&gt;&gt; </span>boxes, scores, labels = results[i][<span class="hljs-string">&quot;boxes&quot;</span>], results[i][<span class="hljs-string">&quot;scores&quot;</span>], results[i][<span class="hljs-string">&quot;labels&quot;</span>]

<span class="hljs-meta">&gt;&gt;&gt; </span>score_threshold = <span class="hljs-number">0.1</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">for</span> box, score, label <span class="hljs-keyword">in</span> <span class="hljs-built_in">zip</span>(boxes, scores, labels):
<span class="hljs-meta">... </span>    box = [<span class="hljs-built_in">round</span>(i, <span class="hljs-number">2</span>) <span class="hljs-keyword">for</span> i <span class="hljs-keyword">in</span> box.tolist()]
<span class="hljs-meta">... </span>    <span class="hljs-keyword">if</span> score &gt;= score_threshold:
<span class="hljs-meta">... </span>        <span class="hljs-built_in">print</span>(<span class="hljs-string">f&quot;Detected <span class="hljs-subst">{text[label]}</span> with confidence <span class="hljs-subst">{<span class="hljs-built_in">round</span>(score.item(), <span class="hljs-number">3</span>)}</span> at location <span class="hljs-subst">{box}</span>&quot;</span>)
Detected a photo of a cat <span class="hljs-keyword">with</span> confidence <span class="hljs-number">0.707</span> at location [<span class="hljs-number">324.97</span>, <span class="hljs-number">20.44</span>, <span class="hljs-number">640.58</span>, <span class="hljs-number">373.29</span>]
Detected a photo of a cat <span class="hljs-keyword">with</span> confidence <span class="hljs-number">0.717</span> at location [<span class="hljs-number">1.46</span>, <span class="hljs-number">55.26</span>, <span class="hljs-number">315.55</span>, <span class="hljs-number">472.17</span>]`}}),Ct=new A({}),qt=new j({props:{name:"class transformers.OwlViTConfig",anchor:"transformers.OwlViTConfig",parameters:[{name:"text_config",val:" = None"},{name:"vision_config",val:" = None"},{name:"projection_dim",val:" = 512"},{name:"logit_scale_init_value",val:" = 2.6592"},{name:"return_dict",val:" = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.OwlViTConfig.text_config",description:`<strong>text_config</strong> (<code>dict</code>, <em>optional</em>) &#x2014;
Dictionary of configuration options used to initialize <a href="/docs/transformers/v4.25.1/en/model_doc/owlvit#transformers.OwlViTTextConfig">OwlViTTextConfig</a>.`,name:"text_config"},{anchor:"transformers.OwlViTConfig.vision_config",description:`<strong>vision_config</strong> (<code>dict</code>, <em>optional</em>) &#x2014;
Dictionary of configuration options used to initialize <a href="/docs/transformers/v4.25.1/en/model_doc/owlvit#transformers.OwlViTVisionConfig">OwlViTVisionConfig</a>.`,name:"vision_config"},{anchor:"transformers.OwlViTConfig.projection_dim",description:`<strong>projection_dim</strong> (<code>int</code>, <em>optional</em>, defaults to 512) &#x2014;
Dimensionality of text and vision projection layers.`,name:"projection_dim"},{anchor:"transformers.OwlViTConfig.logit_scale_init_value",description:`<strong>logit_scale_init_value</strong> (<code>float</code>, <em>optional</em>, defaults to 2.6592) &#x2014;
The inital value of the <em>logit_scale</em> parameter. Default is used as per the original OWL-ViT
implementation.`,name:"logit_scale_init_value"},{anchor:"transformers.OwlViTConfig.kwargs",description:`<strong>kwargs</strong> (<em>optional</em>) &#x2014;
Dictionary of keyword arguments.`,name:"kwargs"}],source:"https://github.com/huggingface/transformers/blob/v4.25.1/src/transformers/models/owlvit/configuration_owlvit.py#L256"}}),Dt=new j({props:{name:"from_text_vision_configs",anchor:"transformers.OwlViTConfig.from_text_vision_configs",parameters:[{name:"text_config",val:": typing.Dict"},{name:"vision_config",val:": typing.Dict"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.25.1/src/transformers/models/owlvit/configuration_owlvit.py#L322",returnDescription:`
<p>An instance of a configuration object</p>
`,returnType:`
<p><a
  href="/docs/transformers/v4.25.1/en/model_doc/owlvit#transformers.OwlViTConfig"
>OwlViTConfig</a></p>
`}}),Lt=new A({}),At=new j({props:{name:"class transformers.OwlViTTextConfig",anchor:"transformers.OwlViTTextConfig",parameters:[{name:"vocab_size",val:" = 49408"},{name:"hidden_size",val:" = 512"},{name:"intermediate_size",val:" = 2048"},{name:"num_hidden_layers",val:" = 12"},{name:"num_attention_heads",val:" = 8"},{name:"max_position_embeddings",val:" = 16"},{name:"hidden_act",val:" = 'quick_gelu'"},{name:"layer_norm_eps",val:" = 1e-05"},{name:"dropout",val:" = 0.0"},{name:"attention_dropout",val:" = 0.0"},{name:"initializer_range",val:" = 0.02"},{name:"initializer_factor",val:" = 1.0"},{name:"pad_token_id",val:" = 0"},{name:"bos_token_id",val:" = 49406"},{name:"eos_token_id",val:" = 49407"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.OwlViTTextConfig.vocab_size",description:`<strong>vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 49408) &#x2014;
Vocabulary size of the OWL-ViT text model. Defines the number of different tokens that can be represented
by the <code>inputs_ids</code> passed when calling <a href="/docs/transformers/v4.25.1/en/model_doc/owlvit#transformers.OwlViTTextModel">OwlViTTextModel</a>.`,name:"vocab_size"},{anchor:"transformers.OwlViTTextConfig.hidden_size",description:`<strong>hidden_size</strong> (<code>int</code>, <em>optional</em>, defaults to 512) &#x2014;
Dimensionality of the encoder layers and the pooler layer.`,name:"hidden_size"},{anchor:"transformers.OwlViTTextConfig.intermediate_size",description:`<strong>intermediate_size</strong> (<code>int</code>, <em>optional</em>, defaults to 2048) &#x2014;
Dimensionality of the &#x201C;intermediate&#x201D; (i.e., feed-forward) layer in the Transformer encoder.`,name:"intermediate_size"},{anchor:"transformers.OwlViTTextConfig.num_hidden_layers",description:`<strong>num_hidden_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 12) &#x2014;
Number of hidden layers in the Transformer encoder.`,name:"num_hidden_layers"},{anchor:"transformers.OwlViTTextConfig.num_attention_heads",description:`<strong>num_attention_heads</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
Number of attention heads for each attention layer in the Transformer encoder.`,name:"num_attention_heads"},{anchor:"transformers.OwlViTTextConfig.max_position_embeddings",description:`<strong>max_position_embeddings</strong> (<code>int</code>, <em>optional</em>, defaults to 16) &#x2014;
The maximum sequence length that this model might ever be used with. Typically set this to something large
just in case (e.g., 512 or 1024 or 2048).`,name:"max_position_embeddings"},{anchor:"transformers.OwlViTTextConfig.hidden_act",description:`<strong>hidden_act</strong> (<code>str</code> or <code>function</code>, <em>optional</em>, defaults to <code>&quot;quick_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> \`<code>&quot;quick_gelu&quot;</code> are supported. layer_norm_eps (<code>float</code>, <em>optional</em>,
defaults to 1e-5): The epsilon used by the layer normalization layers.`,name:"hidden_act"},{anchor:"transformers.OwlViTTextConfig.attention_dropout",description:`<strong>attention_dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The dropout ratio for the attention probabilities.`,name:"attention_dropout"},{anchor:"transformers.OwlViTTextConfig.dropout",description:`<strong>dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The dropout probabilitiy for all fully connected layers in the embeddings, encoder, and pooler.`,name:"dropout"},{anchor:"transformers.OwlViTTextConfig.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.OwlViTTextConfig.initializer_factor",description:`<strong>initializer_factor</strong> (<code>float</code>, <em>optional</em>, defaults to 1) &#x2014;
A factor for initializing all weight matrices (should be kept to 1, used internally for initialization
testing).`,name:"initializer_factor"}],source:"https://github.com/huggingface/transformers/blob/v4.25.1/src/transformers/models/owlvit/configuration_owlvit.py#L41"}}),De=new je({props:{anchor:"transformers.OwlViTTextConfig.example",$$slots:{default:[Up]},$$scope:{ctx:y}}}),Wt=new A({}),St=new j({props:{name:"class transformers.OwlViTVisionConfig",anchor:"transformers.OwlViTVisionConfig",parameters:[{name:"hidden_size",val:" = 768"},{name:"intermediate_size",val:" = 3072"},{name:"num_hidden_layers",val:" = 12"},{name:"num_attention_heads",val:" = 12"},{name:"num_channels",val:" = 3"},{name:"image_size",val:" = 768"},{name:"patch_size",val:" = 32"},{name:"hidden_act",val:" = 'quick_gelu'"},{name:"layer_norm_eps",val:" = 1e-05"},{name:"dropout",val:" = 0.0"},{name:"attention_dropout",val:" = 0.0"},{name:"initializer_range",val:" = 0.02"},{name:"initializer_factor",val:" = 1.0"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.OwlViTVisionConfig.hidden_size",description:`<strong>hidden_size</strong> (<code>int</code>, <em>optional</em>, defaults to 768) &#x2014;
Dimensionality of the encoder layers and the pooler layer.`,name:"hidden_size"},{anchor:"transformers.OwlViTVisionConfig.intermediate_size",description:`<strong>intermediate_size</strong> (<code>int</code>, <em>optional</em>, defaults to 3072) &#x2014;
Dimensionality of the &#x201C;intermediate&#x201D; (i.e., feed-forward) layer in the Transformer encoder.`,name:"intermediate_size"},{anchor:"transformers.OwlViTVisionConfig.num_hidden_layers",description:`<strong>num_hidden_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 12) &#x2014;
Number of hidden layers in the Transformer encoder.`,name:"num_hidden_layers"},{anchor:"transformers.OwlViTVisionConfig.num_attention_heads",description:`<strong>num_attention_heads</strong> (<code>int</code>, <em>optional</em>, defaults to 12) &#x2014;
Number of attention heads for each attention layer in the Transformer encoder.`,name:"num_attention_heads"},{anchor:"transformers.OwlViTVisionConfig.num_channels",description:`<strong>num_channels</strong> (<code>int</code>, <em>optional</em>, defaults to 3) &#x2014;
Number of channels in the input images.`,name:"num_channels"},{anchor:"transformers.OwlViTVisionConfig.image_size",description:`<strong>image_size</strong> (<code>int</code>, <em>optional</em>, defaults to 768) &#x2014;
The size (resolution) of each image.`,name:"image_size"},{anchor:"transformers.OwlViTVisionConfig.patch_size",description:`<strong>patch_size</strong> (<code>int</code>, <em>optional</em>, defaults to 32) &#x2014;
The size (resolution) of each patch.`,name:"patch_size"},{anchor:"transformers.OwlViTVisionConfig.hidden_act",description:`<strong>hidden_act</strong> (<code>str</code> or <code>function</code>, <em>optional</em>, defaults to <code>&quot;quick_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> \`<code>&quot;quick_gelu&quot;</code> are supported. layer_norm_eps (<code>float</code>, <em>optional</em>,
defaults to 1e-5): The epsilon used by the layer normalization layers.`,name:"hidden_act"},{anchor:"transformers.OwlViTVisionConfig.dropout",description:`<strong>dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The dropout probabilitiy for all fully connected layers in the embeddings, encoder, and pooler.`,name:"dropout"},{anchor:"transformers.OwlViTVisionConfig.attention_dropout",description:`<strong>attention_dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The dropout ratio for the attention probabilities.`,name:"attention_dropout"},{anchor:"transformers.OwlViTVisionConfig.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.OwlViTVisionConfig.initializer_factor",description:`<strong>initializer_factor</strong> (\`float&#x201C;, <em>optional</em>, defaults to 1) &#x2014;
A factor for initializing all weight matrices (should be kept to 1, used internally for initialization
testing).`,name:"initializer_factor"}],source:"https://github.com/huggingface/transformers/blob/v4.25.1/src/transformers/models/owlvit/configuration_owlvit.py#L149"}}),Le=new je({props:{anchor:"transformers.OwlViTVisionConfig.example",$$slots:{default:[Hp]},$$scope:{ctx:y}}}),Bt=new A({}),Ut=new j({props:{name:"class transformers.OwlViTImageProcessor",anchor:"transformers.OwlViTImageProcessor",parameters:[{name:"do_resize",val:" = True"},{name:"size",val:" = None"},{name:"resample",val:" = <Resampling.BICUBIC: 3>"},{name:"do_center_crop",val:" = False"},{name:"crop_size",val:" = None"},{name:"do_rescale",val:" = True"},{name:"rescale_factor",val:" = 0.00392156862745098"},{name:"do_normalize",val:" = True"},{name:"image_mean",val:" = None"},{name:"image_std",val:" = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.OwlViTImageProcessor.do_resize",description:`<strong>do_resize</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to resize the shorter edge of the input to a certain <code>size</code>.`,name:"do_resize"},{anchor:"transformers.OwlViTImageProcessor.size",description:`<strong>size</strong> (<code>Dict[str, int]</code>, <em>optional</em>, defaults to {&#x201C;height&#x201D; &#x2014; 768, &#x201C;width&#x201D;: 768}):
The size to use for resizing the image. Only has an effect if <code>do_resize</code> is set to <code>True</code>. If <code>size</code> is a
sequence like (h, w), output size will be matched to this. If <code>size</code> is an int, then image will be resized
to (size, size).`,name:"size"},{anchor:"transformers.OwlViTImageProcessor.resample",description:`<strong>resample</strong> (<code>int</code>, <em>optional</em>, defaults to <code>PIL.Image.Resampling.BICUBIC</code>) &#x2014;
An optional resampling filter. This can be one of <code>PIL.Image.Resampling.NEAREST</code>,
<code>PIL.Image.Resampling.BOX</code>, <code>PIL.Image.Resampling.BILINEAR</code>, <code>PIL.Image.Resampling.HAMMING</code>,
<code>PIL.Image.Resampling.BICUBIC</code> or <code>PIL.Image.Resampling.LANCZOS</code>. Only has an effect if <code>do_resize</code> is set
to <code>True</code>.`,name:"resample"},{anchor:"transformers.OwlViTImageProcessor.do_center_crop",description:`<strong>do_center_crop</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to crop the input at the center. If the input size is smaller than <code>crop_size</code> along any edge, the
image is padded with 0&#x2019;s and then center cropped.`,name:"do_center_crop"},{anchor:"transformers.OwlViTImageProcessor.crop_size",description:`<strong>crop_size</strong> (<code>int</code>, <em>optional</em>, defaults to {&#x201C;height&#x201D; &#x2014; 768, &#x201C;width&#x201D;: 768}):
The size to use for center cropping the image. Only has an effect if <code>do_center_crop</code> is set to <code>True</code>.`,name:"crop_size"},{anchor:"transformers.OwlViTImageProcessor.do_rescale",description:`<strong>do_rescale</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to rescale the input by a certain factor.`,name:"do_rescale"},{anchor:"transformers.OwlViTImageProcessor.rescale_factor",description:`<strong>rescale_factor</strong> (<code>float</code>, <em>optional</em>, defaults to <code>1/255</code>) &#x2014;
The factor to use for rescaling the image. Only has an effect if <code>do_rescale</code> is set to <code>True</code>.`,name:"rescale_factor"},{anchor:"transformers.OwlViTImageProcessor.do_normalize",description:`<strong>do_normalize</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to normalize the input with <code>image_mean</code> and <code>image_std</code>. Desired output size when applying
center-cropping. Only has an effect if <code>do_center_crop</code> is set to <code>True</code>.`,name:"do_normalize"},{anchor:"transformers.OwlViTImageProcessor.image_mean",description:`<strong>image_mean</strong> (<code>List[int]</code>, <em>optional</em>, defaults to <code>[0.48145466, 0.4578275, 0.40821073]</code>) &#x2014;
The sequence of means for each channel, to be used when normalizing images.`,name:"image_mean"},{anchor:"transformers.OwlViTImageProcessor.image_std",description:`<strong>image_std</strong> (<code>List[int]</code>, <em>optional</em>, defaults to <code>[0.26862954, 0.26130258, 0.27577711]</code>) &#x2014;
The sequence of standard deviations for each channel, to be used when normalizing images.`,name:"image_std"}],source:"https://github.com/huggingface/transformers/blob/v4.25.1/src/transformers/models/owlvit/image_processing_owlvit.py#L82"}}),Gt=new j({props:{name:"preprocess",anchor:"transformers.OwlViTImageProcessor.preprocess",parameters:[{name:"images",val:": typing.Union[ForwardRef('PIL.Image.Image'), numpy.ndarray, ForwardRef('torch.Tensor'), typing.List[ForwardRef('PIL.Image.Image')], typing.List[numpy.ndarray], typing.List[ForwardRef('torch.Tensor')]]"},{name:"do_resize",val:": typing.Optional[bool] = None"},{name:"size",val:": typing.Union[typing.Dict[str, int], NoneType] = None"},{name:"resample",val:": Resampling = None"},{name:"do_center_crop",val:": typing.Optional[bool] = None"},{name:"crop_size",val:": typing.Union[typing.Dict[str, int], NoneType] = None"},{name:"do_rescale",val:": typing.Optional[bool] = None"},{name:"rescale_factor",val:": typing.Optional[float] = None"},{name:"do_normalize",val:": typing.Optional[bool] = None"},{name:"image_mean",val:": typing.Union[float, typing.List[float], NoneType] = None"},{name:"image_std",val:": typing.Union[float, typing.List[float], NoneType] = None"},{name:"return_tensors",val:": typing.Union[str, transformers.utils.generic.TensorType, NoneType] = None"},{name:"data_format",val:": typing.Union[str, transformers.image_utils.ChannelDimension] = <ChannelDimension.FIRST: 'channels_first'>"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.OwlViTImageProcessor.preprocess.images",description:`<strong>images</strong> (<code>ImageInput</code>) &#x2014;
The image or batch of images to be prepared.`,name:"images"},{anchor:"transformers.OwlViTImageProcessor.preprocess.do_resize",description:`<strong>do_resize</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>self.do_resize</code>) &#x2014;
Whether or not to resize the input. If <code>True</code>, will resize the input to the size specified by <code>size</code>.`,name:"do_resize"},{anchor:"transformers.OwlViTImageProcessor.preprocess.size",description:`<strong>size</strong> (<code>Dict[str, int]</code>, <em>optional</em>, defaults to <code>self.size</code>) &#x2014;
The size to resize the input to. Only has an effect if <code>do_resize</code> is set to <code>True</code>.`,name:"size"},{anchor:"transformers.OwlViTImageProcessor.preprocess.resample",description:`<strong>resample</strong> (<code>PILImageResampling</code>, <em>optional</em>, defaults to <code>self.resample</code>) &#x2014;
The resampling filter to use when resizing the input. Only has an effect if <code>do_resize</code> is set to
<code>True</code>.`,name:"resample"},{anchor:"transformers.OwlViTImageProcessor.preprocess.do_center_crop",description:`<strong>do_center_crop</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>self.do_center_crop</code>) &#x2014;
Whether or not to center crop the input. If <code>True</code>, will center crop the input to the size specified by
<code>crop_size</code>.`,name:"do_center_crop"},{anchor:"transformers.OwlViTImageProcessor.preprocess.crop_size",description:`<strong>crop_size</strong> (<code>Dict[str, int]</code>, <em>optional</em>, defaults to <code>self.crop_size</code>) &#x2014;
The size to center crop the input to. Only has an effect if <code>do_center_crop</code> is set to <code>True</code>.`,name:"crop_size"},{anchor:"transformers.OwlViTImageProcessor.preprocess.do_rescale",description:`<strong>do_rescale</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>self.do_rescale</code>) &#x2014;
Whether or not to rescale the input. If <code>True</code>, will rescale the input by dividing it by
<code>rescale_factor</code>.`,name:"do_rescale"},{anchor:"transformers.OwlViTImageProcessor.preprocess.rescale_factor",description:`<strong>rescale_factor</strong> (<code>float</code>, <em>optional</em>, defaults to <code>self.rescale_factor</code>) &#x2014;
The factor to rescale the input by. Only has an effect if <code>do_rescale</code> is set to <code>True</code>.`,name:"rescale_factor"},{anchor:"transformers.OwlViTImageProcessor.preprocess.do_normalize",description:`<strong>do_normalize</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>self.do_normalize</code>) &#x2014;
Whether or not to normalize the input. If <code>True</code>, will normalize the input by subtracting <code>image_mean</code>
and dividing by <code>image_std</code>.`,name:"do_normalize"},{anchor:"transformers.OwlViTImageProcessor.preprocess.image_mean",description:`<strong>image_mean</strong> (<code>Union[float, List[float]]</code>, <em>optional</em>, defaults to <code>self.image_mean</code>) &#x2014;
The mean to subtract from the input when normalizing. Only has an effect if <code>do_normalize</code> is set to
<code>True</code>.`,name:"image_mean"},{anchor:"transformers.OwlViTImageProcessor.preprocess.image_std",description:`<strong>image_std</strong> (<code>Union[float, List[float]]</code>, <em>optional</em>, defaults to <code>self.image_std</code>) &#x2014;
The standard deviation to divide the input by when normalizing. Only has an effect if <code>do_normalize</code> is
set to <code>True</code>.`,name:"image_std"},{anchor:"transformers.OwlViTImageProcessor.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.OwlViTImageProcessor.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>ChannelDimension.FIRST</code>: image in (num_channels, height, width) format.</li>
<li><code>ChannelDimension.LAST</code>: image in (height, width, num_channels) format.</li>
<li>Unset: defaults to the channel dimension format of the input image.</li>
</ul>`,name:"data_format"}],source:"https://github.com/huggingface/transformers/blob/v4.25.1/src/transformers/models/owlvit/image_processing_owlvit.py#L218"}}),Xt=new j({props:{name:"post_process",anchor:"transformers.OwlViTImageProcessor.post_process",parameters:[{name:"outputs",val:""},{name:"target_sizes",val:""}],parametersDescription:[{anchor:"transformers.OwlViTImageProcessor.post_process.outputs",description:`<strong>outputs</strong> (<code>OwlViTObjectDetectionOutput</code>) &#x2014;
Raw outputs of the model.`,name:"outputs"},{anchor:"transformers.OwlViTImageProcessor.post_process.target_sizes",description:`<strong>target_sizes</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, 2)</code>) &#x2014;
Tensor containing the size (h, w) of each image of the batch. For evaluation, this must be the original
image size (before any data augmentation). For visualization, this should be the image size after data
augment, but before padding.`,name:"target_sizes"}],source:"https://github.com/huggingface/transformers/blob/v4.25.1/src/transformers/models/owlvit/image_processing_owlvit.py#L331",returnDescription:`
<p>A list of dictionaries, each dictionary containing the scores, labels and boxes for an image
in the batch as predicted by the model.</p>
`,returnType:`
<p><code>List[Dict]</code></p>
`}}),Yt=new j({props:{name:"post_process_image_guided_detection",anchor:"transformers.OwlViTImageProcessor.post_process_image_guided_detection",parameters:[{name:"outputs",val:""},{name:"threshold",val:" = 0.6"},{name:"nms_threshold",val:" = 0.3"},{name:"target_sizes",val:" = None"}],parametersDescription:[{anchor:"transformers.OwlViTImageProcessor.post_process_image_guided_detection.outputs",description:`<strong>outputs</strong> (<code>OwlViTImageGuidedObjectDetectionOutput</code>) &#x2014;
Raw outputs of the model.`,name:"outputs"},{anchor:"transformers.OwlViTImageProcessor.post_process_image_guided_detection.threshold",description:`<strong>threshold</strong> (<code>float</code>, <em>optional</em>, defaults to 0.6) &#x2014;
Minimum confidence threshold to use to filter out predicted boxes.`,name:"threshold"},{anchor:"transformers.OwlViTImageProcessor.post_process_image_guided_detection.nms_threshold",description:`<strong>nms_threshold</strong> (<code>float</code>, <em>optional</em>, defaults to 0.3) &#x2014;
IoU threshold for non-maximum suppression of overlapping boxes.`,name:"nms_threshold"},{anchor:"transformers.OwlViTImageProcessor.post_process_image_guided_detection.target_sizes",description:`<strong>target_sizes</strong> (<code>torch.Tensor</code>, <em>optional</em>) &#x2014;
Tensor of shape (batch_size, 2) where each entry is the (height, width) of the corresponding image in
the batch. If set, predicted normalized bounding boxes are rescaled to the target sizes. If left to
None, predictions will not be unnormalized.`,name:"target_sizes"}],source:"https://github.com/huggingface/transformers/blob/v4.25.1/src/transformers/models/owlvit/image_processing_owlvit.py#L371",returnDescription:`
<p>A list of dictionaries, each dictionary containing the scores, labels and boxes for an image
in the batch as predicted by the model. All labels are set to None as
<code>OwlViTForObjectDetection.image_guided_detection</code> perform one-shot object detection.</p>
`,returnType:`
<p><code>List[Dict]</code></p>
`}}),Kt=new A({}),Qt=new j({props:{name:"class transformers.OwlViTImageProcessor",anchor:"transformers.OwlViTImageProcessor",parameters:[{name:"do_resize",val:" = True"},{name:"size",val:" = None"},{name:"resample",val:" = <Resampling.BICUBIC: 3>"},{name:"do_center_crop",val:" = False"},{name:"crop_size",val:" = None"},{name:"do_rescale",val:" = True"},{name:"rescale_factor",val:" = 0.00392156862745098"},{name:"do_normalize",val:" = True"},{name:"image_mean",val:" = None"},{name:"image_std",val:" = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.OwlViTImageProcessor.do_resize",description:`<strong>do_resize</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to resize the shorter edge of the input to a certain <code>size</code>.`,name:"do_resize"},{anchor:"transformers.OwlViTImageProcessor.size",description:`<strong>size</strong> (<code>Dict[str, int]</code>, <em>optional</em>, defaults to {&#x201C;height&#x201D; &#x2014; 768, &#x201C;width&#x201D;: 768}):
The size to use for resizing the image. Only has an effect if <code>do_resize</code> is set to <code>True</code>. If <code>size</code> is a
sequence like (h, w), output size will be matched to this. If <code>size</code> is an int, then image will be resized
to (size, size).`,name:"size"},{anchor:"transformers.OwlViTImageProcessor.resample",description:`<strong>resample</strong> (<code>int</code>, <em>optional</em>, defaults to <code>PIL.Image.Resampling.BICUBIC</code>) &#x2014;
An optional resampling filter. This can be one of <code>PIL.Image.Resampling.NEAREST</code>,
<code>PIL.Image.Resampling.BOX</code>, <code>PIL.Image.Resampling.BILINEAR</code>, <code>PIL.Image.Resampling.HAMMING</code>,
<code>PIL.Image.Resampling.BICUBIC</code> or <code>PIL.Image.Resampling.LANCZOS</code>. Only has an effect if <code>do_resize</code> is set
to <code>True</code>.`,name:"resample"},{anchor:"transformers.OwlViTImageProcessor.do_center_crop",description:`<strong>do_center_crop</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to crop the input at the center. If the input size is smaller than <code>crop_size</code> along any edge, the
image is padded with 0&#x2019;s and then center cropped.`,name:"do_center_crop"},{anchor:"transformers.OwlViTImageProcessor.crop_size",description:`<strong>crop_size</strong> (<code>int</code>, <em>optional</em>, defaults to {&#x201C;height&#x201D; &#x2014; 768, &#x201C;width&#x201D;: 768}):
The size to use for center cropping the image. Only has an effect if <code>do_center_crop</code> is set to <code>True</code>.`,name:"crop_size"},{anchor:"transformers.OwlViTImageProcessor.do_rescale",description:`<strong>do_rescale</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to rescale the input by a certain factor.`,name:"do_rescale"},{anchor:"transformers.OwlViTImageProcessor.rescale_factor",description:`<strong>rescale_factor</strong> (<code>float</code>, <em>optional</em>, defaults to <code>1/255</code>) &#x2014;
The factor to use for rescaling the image. Only has an effect if <code>do_rescale</code> is set to <code>True</code>.`,name:"rescale_factor"},{anchor:"transformers.OwlViTImageProcessor.do_normalize",description:`<strong>do_normalize</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to normalize the input with <code>image_mean</code> and <code>image_std</code>. Desired output size when applying
center-cropping. Only has an effect if <code>do_center_crop</code> is set to <code>True</code>.`,name:"do_normalize"},{anchor:"transformers.OwlViTImageProcessor.image_mean",description:`<strong>image_mean</strong> (<code>List[int]</code>, <em>optional</em>, defaults to <code>[0.48145466, 0.4578275, 0.40821073]</code>) &#x2014;
The sequence of means for each channel, to be used when normalizing images.`,name:"image_mean"},{anchor:"transformers.OwlViTImageProcessor.image_std",description:`<strong>image_std</strong> (<code>List[int]</code>, <em>optional</em>, defaults to <code>[0.26862954, 0.26130258, 0.27577711]</code>) &#x2014;
The sequence of standard deviations for each channel, to be used when normalizing images.`,name:"image_std"}],source:"https://github.com/huggingface/transformers/blob/v4.25.1/src/transformers/models/owlvit/image_processing_owlvit.py#L82"}}),to=new j({props:{name:"__call__",anchor:"transformers.OwlViTImageProcessor.__call__",parameters:[{name:"images",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.25.1/src/transformers/image_processing_utils.py#L435"}}),oo=new j({props:{name:"post_process",anchor:"transformers.OwlViTImageProcessor.post_process",parameters:[{name:"outputs",val:""},{name:"target_sizes",val:""}],parametersDescription:[{anchor:"transformers.OwlViTImageProcessor.post_process.outputs",description:`<strong>outputs</strong> (<code>OwlViTObjectDetectionOutput</code>) &#x2014;
Raw outputs of the model.`,name:"outputs"},{anchor:"transformers.OwlViTImageProcessor.post_process.target_sizes",description:`<strong>target_sizes</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, 2)</code>) &#x2014;
Tensor containing the size (h, w) of each image of the batch. For evaluation, this must be the original
image size (before any data augmentation). For visualization, this should be the image size after data
augment, but before padding.`,name:"target_sizes"}],source:"https://github.com/huggingface/transformers/blob/v4.25.1/src/transformers/models/owlvit/image_processing_owlvit.py#L331",returnDescription:`
<p>A list of dictionaries, each dictionary containing the scores, labels and boxes for an image
in the batch as predicted by the model.</p>
`,returnType:`
<p><code>List[Dict]</code></p>
`}}),ro=new j({props:{name:"post_process_image_guided_detection",anchor:"transformers.OwlViTImageProcessor.post_process_image_guided_detection",parameters:[{name:"outputs",val:""},{name:"threshold",val:" = 0.6"},{name:"nms_threshold",val:" = 0.3"},{name:"target_sizes",val:" = None"}],parametersDescription:[{anchor:"transformers.OwlViTImageProcessor.post_process_image_guided_detection.outputs",description:`<strong>outputs</strong> (<code>OwlViTImageGuidedObjectDetectionOutput</code>) &#x2014;
Raw outputs of the model.`,name:"outputs"},{anchor:"transformers.OwlViTImageProcessor.post_process_image_guided_detection.threshold",description:`<strong>threshold</strong> (<code>float</code>, <em>optional</em>, defaults to 0.6) &#x2014;
Minimum confidence threshold to use to filter out predicted boxes.`,name:"threshold"},{anchor:"transformers.OwlViTImageProcessor.post_process_image_guided_detection.nms_threshold",description:`<strong>nms_threshold</strong> (<code>float</code>, <em>optional</em>, defaults to 0.3) &#x2014;
IoU threshold for non-maximum suppression of overlapping boxes.`,name:"nms_threshold"},{anchor:"transformers.OwlViTImageProcessor.post_process_image_guided_detection.target_sizes",description:`<strong>target_sizes</strong> (<code>torch.Tensor</code>, <em>optional</em>) &#x2014;
Tensor of shape (batch_size, 2) where each entry is the (height, width) of the corresponding image in
the batch. If set, predicted normalized bounding boxes are rescaled to the target sizes. If left to
None, predictions will not be unnormalized.`,name:"target_sizes"}],source:"https://github.com/huggingface/transformers/blob/v4.25.1/src/transformers/models/owlvit/image_processing_owlvit.py#L371",returnDescription:`
<p>A list of dictionaries, each dictionary containing the scores, labels and boxes for an image
in the batch as predicted by the model. All labels are set to None as
<code>OwlViTForObjectDetection.image_guided_detection</code> perform one-shot object detection.</p>
`,returnType:`
<p><code>List[Dict]</code></p>
`}}),ao=new A({}),io=new j({props:{name:"class transformers.OwlViTProcessor",anchor:"transformers.OwlViTProcessor",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.OwlViTProcessor.feature_extractor",description:`<strong>feature_extractor</strong> (<a href="/docs/transformers/v4.25.1/en/model_doc/owlvit#transformers.OwlViTImageProcessor">OwlViTFeatureExtractor</a>) &#x2014;
The image processor is a required input.`,name:"feature_extractor"},{anchor:"transformers.OwlViTProcessor.tokenizer",description:`<strong>tokenizer</strong> ([<code>CLIPTokenizer</code>, <code>CLIPTokenizerFast</code>]) &#x2014;
The tokenizer is a required input.`,name:"tokenizer"}],source:"https://github.com/huggingface/transformers/blob/v4.25.1/src/transformers/models/owlvit/processing_owlvit.py#L29"}}),lo=new j({props:{name:"batch_decode",anchor:"transformers.OwlViTProcessor.batch_decode",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.25.1/src/transformers/models/owlvit/processing_owlvit.py#L173"}}),po=new j({props:{name:"decode",anchor:"transformers.OwlViTProcessor.decode",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.25.1/src/transformers/models/owlvit/processing_owlvit.py#L180"}}),ho=new j({props:{name:"post_process",anchor:"transformers.OwlViTProcessor.post_process",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.25.1/src/transformers/models/owlvit/processing_owlvit.py#L159"}}),go=new j({props:{name:"post_process_image_guided_detection",anchor:"transformers.OwlViTProcessor.post_process_image_guided_detection",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.25.1/src/transformers/models/owlvit/processing_owlvit.py#L166"}}),_o=new A({}),wo=new j({props:{name:"class transformers.OwlViTModel",anchor:"transformers.OwlViTModel",parameters:[{name:"config",val:": OwlViTConfig"}],parametersDescription:[{anchor:"transformers.OwlViTModel.This",description:`<strong>This</strong> model is a PyTorch [torch.nn.Module](https &#x2014;
//pytorch.org/docs/stable/nn.html#torch.nn.Module) subclass. Use it`,name:"This"},{anchor:"transformers.OwlViTModel.as",description:`<strong>as</strong> a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and &#x2014;
behavior. &#x2014;
config (<a href="/docs/transformers/v4.25.1/en/model_doc/owlvit#transformers.OwlViTConfig">OwlViTConfig</a>): Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.25.1/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"as"}],source:"https://github.com/huggingface/transformers/blob/v4.25.1/src/transformers/models/owlvit/modeling_owlvit.py#L1028"}}),vo=new j({props:{name:"forward",anchor:"transformers.OwlViTModel.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"pixel_values",val:": typing.Optional[torch.FloatTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"return_loss",val:": typing.Optional[bool] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_base_image_embeds",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.OwlViTModel.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary. Indices can be obtained using <a href="/docs/transformers/v4.25.1/en/model_doc/clip#transformers.CLIPTokenizer">CLIPTokenizer</a>. See
<a href="/docs/transformers/v4.25.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and <a href="/docs/transformers/v4.25.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details. <a href="../glossary#input-ids">What are input
IDs?</a>`,name:"input_ids"},{anchor:"transformers.OwlViTModel.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.
<a href="../glossary#attention-mask">What are attention masks?</a></li>
</ul>`,name:"attention_mask"},{anchor:"transformers.OwlViTModel.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.`,name:"pixel_values"},{anchor:"transformers.OwlViTModel.forward.return_loss",description:`<strong>return_loss</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the contrastive loss.`,name:"return_loss"},{anchor:"transformers.OwlViTModel.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.OwlViTModel.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.OwlViTModel.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.25.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.25.1/src/transformers/models/owlvit/modeling_owlvit.py#L1143",returnDescription:`
<p>A <code>transformers.models.owlvit.modeling_owlvit.OwlViTOutput</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 (<code>&lt;class 'transformers.models.owlvit.configuration_owlvit.OwlViTConfig'&gt;</code>) and inputs.</p>
<ul>
<li><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>return_loss</code> is <code>True</code>) \u2014 Contrastive loss for image-text similarity.</li>
<li><strong>logits_per_image</strong> (<code>torch.FloatTensor</code> of shape <code>(image_batch_size, text_batch_size)</code>) \u2014 The scaled dot product scores between <code>image_embeds</code> and <code>text_embeds</code>. This represents the image-text
similarity scores.</li>
<li><strong>logits_per_text</strong> (<code>torch.FloatTensor</code> of shape <code>(text_batch_size, image_batch_size)</code>) \u2014 The scaled dot product scores between <code>text_embeds</code> and <code>image_embeds</code>. This represents the text-image
similarity scores.</li>
<li><strong>text_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size * num_max_text_queries, output_dim</code>) \u2014 The text embeddings obtained by applying the projection layer to the pooled output of <a
  href="/docs/transformers/v4.25.1/en/model_doc/owlvit#transformers.OwlViTTextModel"
>OwlViTTextModel</a>.</li>
<li><strong>image_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, output_dim</code>) \u2014 The image embeddings obtained by applying the projection layer to the pooled output of
<a
  href="/docs/transformers/v4.25.1/en/model_doc/owlvit#transformers.OwlViTVisionModel"
>OwlViTVisionModel</a>.</li>
<li><strong>text_model_output</strong> (Tuple<code>BaseModelOutputWithPooling</code>) \u2014 The output of the <a
  href="/docs/transformers/v4.25.1/en/model_doc/owlvit#transformers.OwlViTTextModel"
>OwlViTTextModel</a>.</li>
<li><strong>vision_model_output</strong> (<code>BaseModelOutputWithPooling</code>) \u2014 The output of the <a
  href="/docs/transformers/v4.25.1/en/model_doc/owlvit#transformers.OwlViTVisionModel"
>OwlViTVisionModel</a>.</li>
</ul>
`,returnType:`
<p><code>transformers.models.owlvit.modeling_owlvit.OwlViTOutput</code> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Qe=new Fo({props:{$$slots:{default:[Gp]},$$scope:{ctx:y}}}),et=new je({props:{anchor:"transformers.OwlViTModel.forward.example",$$slots:{default:[Xp]},$$scope:{ctx:y}}}),bo=new j({props:{name:"get_text_features",anchor:"transformers.OwlViTModel.get_text_features",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = 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.OwlViTModel.get_text_features.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size * num_max_text_queries, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary. Indices can be obtained using <a href="/docs/transformers/v4.25.1/en/model_doc/clip#transformers.CLIPTokenizer">CLIPTokenizer</a>. See
<a href="/docs/transformers/v4.25.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and <a href="/docs/transformers/v4.25.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details. <a href="../glossary#input-ids">What are input
IDs?</a>`,name:"input_ids"},{anchor:"transformers.OwlViTModel.get_text_features.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, num_max_text_queries, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.
<a href="../glossary#attention-mask">What are attention masks?</a></li>
</ul>`,name:"attention_mask"},{anchor:"transformers.OwlViTModel.get_text_features.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.OwlViTModel.get_text_features.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.OwlViTModel.get_text_features.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.25.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.25.1/src/transformers/models/owlvit/modeling_owlvit.py#L1063",returnDescription:`
<p>The text embeddings obtained by
applying the projection layer to the pooled output of <a
  href="/docs/transformers/v4.25.1/en/model_doc/owlvit#transformers.OwlViTTextModel"
>OwlViTTextModel</a>.</p>
`,returnType:`
<p>text_features (<code>torch.FloatTensor</code> of shape <code>(batch_size, output_dim</code>)</p>
`}}),tt=new Fo({props:{$$slots:{default:[Zp]},$$scope:{ctx:y}}}),ot=new je({props:{anchor:"transformers.OwlViTModel.get_text_features.example",$$slots:{default:[Yp]},$$scope:{ctx:y}}}),To=new j({props:{name:"get_image_features",anchor:"transformers.OwlViTModel.get_image_features",parameters:[{name:"pixel_values",val:": typing.Optional[torch.FloatTensor] = 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.OwlViTModel.get_image_features.pixel_values",description:`<strong>pixel_values</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_channels, height, width)</code>) &#x2014;
Pixel values.`,name:"pixel_values"},{anchor:"transformers.OwlViTModel.get_image_features.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.OwlViTModel.get_image_features.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.OwlViTModel.get_image_features.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.25.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.25.1/src/transformers/models/owlvit/modeling_owlvit.py#L1098",returnDescription:`
<p>The image embeddings obtained by
applying the projection layer to the pooled output of <a
  href="/docs/transformers/v4.25.1/en/model_doc/owlvit#transformers.OwlViTVisionModel"
>OwlViTVisionModel</a>.</p>
`,returnType:`
<p>image_features (<code>torch.FloatTensor</code> of shape <code>(batch_size, output_dim</code>)</p>
`}}),st=new Fo({props:{$$slots:{default:[Jp]},$$scope:{ctx:y}}}),rt=new je({props:{anchor:"transformers.OwlViTModel.get_image_features.example",$$slots:{default:[Kp]},$$scope:{ctx:y}}}),Oo=new A({}),$o=new j({props:{name:"class transformers.OwlViTTextModel",anchor:"transformers.OwlViTTextModel",parameters:[{name:"config",val:": OwlViTTextConfig"}],source:"https://github.com/huggingface/transformers/blob/v4.25.1/src/transformers/models/owlvit/modeling_owlvit.py#L867"}}),xo=new j({props:{name:"forward",anchor:"transformers.OwlViTTextModel.forward",parameters:[{name:"input_ids",val:": Tensor"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = 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.OwlViTTextModel.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size * num_max_text_queries, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary. Indices can be obtained using <a href="/docs/transformers/v4.25.1/en/model_doc/clip#transformers.CLIPTokenizer">CLIPTokenizer</a>. See
<a href="/docs/transformers/v4.25.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and <a href="/docs/transformers/v4.25.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details. <a href="../glossary#input-ids">What are input
IDs?</a>`,name:"input_ids"},{anchor:"transformers.OwlViTTextModel.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, num_max_text_queries, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.
<a href="../glossary#attention-mask">What are attention masks?</a></li>
</ul>`,name:"attention_mask"},{anchor:"transformers.OwlViTTextModel.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.OwlViTTextModel.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.OwlViTTextModel.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.25.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.25.1/src/transformers/models/owlvit/modeling_owlvit.py#L882",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.25.1/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPooling"
>transformers.modeling_outputs.BaseModelOutputWithPooling</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<code>&lt;class 'transformers.models.owlvit.configuration_owlvit.OwlViTTextConfig'&gt;</code>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) \u2014 Sequence of hidden-states at the output of the last layer of the model.</p>
</li>
<li>
<p><strong>pooler_output</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, hidden_size)</code>) \u2014 Last layer hidden-state of the first token of the sequence (classification token) after further processing
through the layers used for the auxiliary pretraining task. E.g. for BERT-family of models, this returns
the classification token after processing through a linear layer and a tanh activation function. The linear
layer weights are trained from the next sentence prediction (classification) objective during pretraining.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.25.1/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPooling"
>transformers.modeling_outputs.BaseModelOutputWithPooling</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),at=new Fo({props:{$$slots:{default:[Qp]},$$scope:{ctx:y}}}),it=new je({props:{anchor:"transformers.OwlViTTextModel.forward.example",$$slots:{default:[em]},$$scope:{ctx:y}}}),Vo=new A({}),yo=new j({props:{name:"class transformers.OwlViTVisionModel",anchor:"transformers.OwlViTVisionModel",parameters:[{name:"config",val:": OwlViTVisionConfig"}],source:"https://github.com/huggingface/transformers/blob/v4.25.1/src/transformers/models/owlvit/modeling_owlvit.py#L977"}}),jo=new j({props:{name:"forward",anchor:"transformers.OwlViTVisionModel.forward",parameters:[{name:"pixel_values",val:": typing.Optional[torch.FloatTensor] = 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.OwlViTVisionModel.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.`,name:"pixel_values"},{anchor:"transformers.OwlViTVisionModel.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.OwlViTVisionModel.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.OwlViTVisionModel.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.25.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.25.1/src/transformers/models/owlvit/modeling_owlvit.py#L990",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.25.1/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPooling"
>transformers.modeling_outputs.BaseModelOutputWithPooling</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<code>&lt;class 'transformers.models.owlvit.configuration_owlvit.OwlViTVisionConfig'&gt;</code>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) \u2014 Sequence of hidden-states at the output of the last layer of the model.</p>
</li>
<li>
<p><strong>pooler_output</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, hidden_size)</code>) \u2014 Last layer hidden-state of the first token of the sequence (classification token) after further processing
through the layers used for the auxiliary pretraining task. E.g. for BERT-family of models, this returns
the classification token after processing through a linear layer and a tanh activation function. The linear
layer weights are trained from the next sentence prediction (classification) objective during pretraining.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.25.1/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPooling"
>transformers.modeling_outputs.BaseModelOutputWithPooling</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ct=new Fo({props:{$$slots:{default:[tm]},$$scope:{ctx:y}}}),dt=new je({props:{anchor:"transformers.OwlViTVisionModel.forward.example",$$slots:{default:[om]},$$scope:{ctx:y}}}),zo=new A({}),Po=new j({props:{name:"class transformers.OwlViTForObjectDetection",anchor:"transformers.OwlViTForObjectDetection",parameters:[{name:"config",val:": OwlViTConfig"}],source:"https://github.com/huggingface/transformers/blob/v4.25.1/src/transformers/models/owlvit/modeling_owlvit.py#L1311"}}),ko=new j({props:{name:"forward",anchor:"transformers.OwlViTForObjectDetection.forward",parameters:[{name:"input_ids",val:": Tensor"},{name:"pixel_values",val:": FloatTensor"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = 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.OwlViTForObjectDetection.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.`,name:"pixel_values"},{anchor:"transformers.OwlViTForObjectDetection.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size * num_max_text_queries, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of input sequence tokens in the vocabulary. Indices can be obtained using <a href="/docs/transformers/v4.25.1/en/model_doc/clip#transformers.CLIPTokenizer">CLIPTokenizer</a>. See
<a href="/docs/transformers/v4.25.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and <a href="/docs/transformers/v4.25.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details. <a href="../glossary#input-ids">What are input
IDs?</a>.`,name:"input_ids"},{anchor:"transformers.OwlViTForObjectDetection.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, num_max_text_queries, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.
<a href="../glossary#attention-mask">What are attention masks?</a></li>
</ul>`,name:"attention_mask"},{anchor:"transformers.OwlViTForObjectDetection.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the last hidden state. See <code>text_model_last_hidden_state</code> and
<code>vision_model_last_hidden_state</code> under returned tensors for more detail.`,name:"output_hidden_states"},{anchor:"transformers.OwlViTForObjectDetection.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.25.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.25.1/src/transformers/models/owlvit/modeling_owlvit.py#L1615",returnDescription:`
<p>A <code>transformers.models.owlvit.modeling_owlvit.OwlViTObjectDetectionOutput</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 (<code>&lt;class 'transformers.models.owlvit.configuration_owlvit.OwlViTConfig'&gt;</code>) and inputs.</p>
<ul>
<li><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> are provided)) \u2014 Total loss as a linear combination of a negative log-likehood (cross-entropy) for class prediction and a
bounding box loss. The latter is defined as a linear combination of the L1 loss and the generalized
scale-invariant IoU loss.</li>
<li><strong>loss_dict</strong> (<code>Dict</code>, <em>optional</em>) \u2014 A dictionary containing the individual losses. Useful for logging.</li>
<li><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_patches, num_queries)</code>) \u2014 Classification logits (including no-object) for all queries.</li>
<li><strong>pred_boxes</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_patches, 4)</code>) \u2014 Normalized boxes coordinates for all queries, represented as (center_x, center_y, width, height). These
values are normalized in [0, 1], relative to the size of each individual image in the batch (disregarding
possible padding). You can use <a
  href="/docs/transformers/v4.25.1/en/model_doc/owlvit#transformers.OwlViTImageProcessor.post_process"
>post_process()</a> to retrieve the unnormalized
bounding boxes.</li>
<li><strong>text_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_max_text_queries, output_dim</code>) \u2014 The text embeddings obtained by applying the projection layer to the pooled output of <a
  href="/docs/transformers/v4.25.1/en/model_doc/owlvit#transformers.OwlViTTextModel"
>OwlViTTextModel</a>.</li>
<li><strong>image_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, patch_size, patch_size, output_dim</code>) \u2014 Pooled output of <a
  href="/docs/transformers/v4.25.1/en/model_doc/owlvit#transformers.OwlViTVisionModel"
>OwlViTVisionModel</a>. OWL-ViT represents images as a set of image patches and computes
image embeddings for each patch.</li>
<li><strong>class_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_patches, hidden_size)</code>) \u2014 Class embeddings of all image patches. OWL-ViT represents images as a set of image patches where the total
number of patches is (image_size / patch_size)**2.</li>
<li><strong>text_model_output</strong> (Tuple<code>BaseModelOutputWithPooling</code>) \u2014 The output of the <a
  href="/docs/transformers/v4.25.1/en/model_doc/owlvit#transformers.OwlViTTextModel"
>OwlViTTextModel</a>.</li>
<li><strong>vision_model_output</strong> (<code>BaseModelOutputWithPooling</code>) \u2014 The output of the <a
  href="/docs/transformers/v4.25.1/en/model_doc/owlvit#transformers.OwlViTVisionModel"
>OwlViTVisionModel</a>.</li>
</ul>
`,returnType:`
<p><code>transformers.models.owlvit.modeling_owlvit.OwlViTObjectDetectionOutput</code> or <code>tuple(torch.FloatTensor)</code></p>
`}}),mt=new Fo({props:{$$slots:{default:[sm]},$$scope:{ctx:y}}}),ht=new je({props:{anchor:"transformers.OwlViTForObjectDetection.forward.example",$$slots:{default:[rm]},$$scope:{ctx:y}}}),Io=new j({props:{name:"image_guided_detection",anchor:"transformers.OwlViTForObjectDetection.image_guided_detection",parameters:[{name:"pixel_values",val:": FloatTensor"},{name:"query_pixel_values",val:": typing.Optional[torch.FloatTensor] = 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.OwlViTForObjectDetection.image_guided_detection.pixel_values",description:`<strong>pixel_values</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_channels, height, width)</code>) &#x2014;
Pixel values.`,name:"pixel_values"},{anchor:"transformers.OwlViTForObjectDetection.image_guided_detection.query_pixel_values",description:`<strong>query_pixel_values</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_channels, height, width)</code>) &#x2014;
Pixel values of query image(s) to be detected. Pass in one query image per target image.`,name:"query_pixel_values"},{anchor:"transformers.OwlViTForObjectDetection.image_guided_detection.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.OwlViTForObjectDetection.image_guided_detection.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.OwlViTForObjectDetection.image_guided_detection.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.25.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.25.1/src/transformers/models/owlvit/modeling_owlvit.py#L1520",returnDescription:`
<p>A <code>transformers.models.owlvit.modeling_owlvit.OwlViTImageGuidedObjectDetectionOutput</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 (<code>&lt;class 'transformers.models.owlvit.configuration_owlvit.OwlViTConfig'&gt;</code>) and inputs.</p>
<ul>
<li><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_patches, num_queries)</code>) \u2014 Classification logits (including no-object) for all queries.</li>
<li><strong>target_pred_boxes</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_patches, 4)</code>) \u2014 Normalized boxes coordinates for all queries, represented as (center_x, center_y, width, height). These
values are normalized in [0, 1], relative to the size of each individual target image in the batch
(disregarding possible padding). You can use <a
  href="/docs/transformers/v4.25.1/en/model_doc/owlvit#transformers.OwlViTImageProcessor.post_process"
>post_process()</a> to retrieve the
unnormalized bounding boxes.</li>
<li><strong>query_pred_boxes</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_patches, 4)</code>) \u2014 Normalized boxes coordinates for all queries, represented as (center_x, center_y, width, height). These
values are normalized in [0, 1], relative to the size of each individual query image in the batch
(disregarding possible padding). You can use <a
  href="/docs/transformers/v4.25.1/en/model_doc/owlvit#transformers.OwlViTImageProcessor.post_process"
>post_process()</a> to retrieve the
unnormalized bounding boxes.</li>
<li><strong>image_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, patch_size, patch_size, output_dim</code>) \u2014 Pooled output of <a
  href="/docs/transformers/v4.25.1/en/model_doc/owlvit#transformers.OwlViTVisionModel"
>OwlViTVisionModel</a>. OWL-ViT represents images as a set of image patches and computes
image embeddings for each patch.</li>
<li><strong>query_image_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, patch_size, patch_size, output_dim</code>) \u2014 Pooled output of <a
  href="/docs/transformers/v4.25.1/en/model_doc/owlvit#transformers.OwlViTVisionModel"
>OwlViTVisionModel</a>. OWL-ViT represents images as a set of image patches and computes
image embeddings for each patch.</li>
<li><strong>class_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_patches, hidden_size)</code>) \u2014 Class embeddings of all image patches. OWL-ViT represents images as a set of image patches where the total
number of patches is (image_size / patch_size)**2.</li>
<li><strong>text_model_output</strong> (Tuple<code>BaseModelOutputWithPooling</code>) \u2014 The output of the <a
  href="/docs/transformers/v4.25.1/en/model_doc/owlvit#transformers.OwlViTTextModel"
>OwlViTTextModel</a>.</li>
<li><strong>vision_model_output</strong> (<code>BaseModelOutputWithPooling</code>) \u2014 The output of the <a
  href="/docs/transformers/v4.25.1/en/model_doc/owlvit#transformers.OwlViTVisionModel"
>OwlViTVisionModel</a>.</li>
</ul>
`,returnType:`
<p><code>transformers.models.owlvit.modeling_owlvit.OwlViTImageGuidedObjectDetectionOutput</code> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ft=new Fo({props:{$$slots:{default:[nm]},$$scope:{ctx:y}}}),gt=new je({props:{anchor:"transformers.OwlViTForObjectDetection.image_guided_detection.example",$$slots:{default:[am]},$$scope:{ctx:y}}}),{c(){c=s("meta"),v=m(),g=s("h1"),f=s("a"),w=s("span"),b(n.$$.fragment),p=m(),z=s("span"),Gn=i("OWL-ViT"),Mr=m(),te=s("h2"),Pe=s("a"),As=s("span"),b(jt.$$.fragment),Xn=m(),Ns=s("span"),Zn=i("Overview"),Dr=m(),ke=s("p"),Yn=i("The OWL-ViT (short for Vision Transformer for Open-World Localization) was proposed in "),zt=s("a"),Jn=i("Simple Open-Vocabulary Object Detection with Vision Transformers"),Kn=i(" by Matthias Minderer, Alexey Gritsenko, Austin Stone, Maxim Neumann, Dirk Weissenborn, Alexey Dosovitskiy, Aravindh Mahendran, Anurag Arnab, Mostafa Dehghani, Zhuoran Shen, Xiao Wang, Xiaohua Zhai, Thomas Kipf, and Neil Houlsby. OWL-ViT is an open-vocabulary object detection network trained on a variety of (image, text) pairs. It can be used to query an image with one or multiple text queries to search for and detect target objects described in text."),Fr=m(),Lo=s("p"),Qn=i("The abstract from the paper is the following:"),Lr=m(),Ao=s("p"),Ws=s("em"),ea=i("Combining simple architectures with large-scale pre-training has led to massive improvements in image classification. For object detection, pre-training and scaling approaches are less well established, especially in the long-tailed and open-vocabulary setting, where training data is relatively scarce. In this paper, we propose a strong recipe for transferring image-text models to open-vocabulary object detection. We use a standard Vision Transformer architecture with minimal modifications, contrastive image-text pre-training, and end-to-end detection fine-tuning. Our analysis of the scaling properties of this setup shows that increasing image-level pre-training and model size yield consistent improvements on the downstream detection task. We provide the adaptation strategies and regularizations needed to attain very strong performance on zero-shot text-conditioned and one-shot image-conditioned object detection. Code and models are available on GitHub."),Ar=m(),oe=s("h2"),Ie=s("a"),Ss=s("span"),b(Pt.$$.fragment),ta=m(),Rs=s("span"),oa=i("Usage"),Nr=m(),Ee=s("p"),sa=i("OWL-ViT is a zero-shot text-conditioned object detection model. OWL-ViT uses "),No=s("a"),ra=i("CLIP"),na=i(" as its multi-modal backbone, with a ViT-like Transformer to get visual features and a causal language model to get the text features. To use CLIP for detection, OWL-ViT removes the final token pooling layer of the vision model and attaches a lightweight classification and box head to each transformer output token. Open-vocabulary classification is enabled by replacing the fixed classification layer weights with the class-name embeddings obtained from the text model. The authors first train CLIP from scratch and fine-tune it end-to-end with the classification and box heads on standard detection datasets using a bipartite matching loss. One or multiple text queries per image can be used to perform zero-shot text-conditioned object detection."),Wr=m(),P=s("p"),Wo=s("a"),aa=i("OwlViTFeatureExtractor"),ia=i(" can be used to resize (or rescale) and normalize images for the model and "),So=s("a"),la=i("CLIPTokenizer"),ca=i(" is used to encode the text. "),Ro=s("a"),da=i("OwlViTProcessor"),pa=i(" wraps "),Bo=s("a"),ma=i("OwlViTFeatureExtractor"),ha=i(" and "),Uo=s("a"),fa=i("CLIPTokenizer"),ga=i(" into a single instance to both encode the text and prepare the images. The following example shows how to perform object detection using "),Ho=s("a"),ua=i("OwlViTProcessor"),_a=i(" and "),Go=s("a"),wa=i("OwlViTForObjectDetection"),va=i("."),Sr=m(),b(kt.$$.fragment),Rr=m(),K=s("p"),ba=i("This model was contributed by "),It=s("a"),Ta=i("adirik"),Oa=i(". The original code can be found "),Et=s("a"),$a=i("here"),xa=i("."),Br=m(),se=s("h2"),Ce=s("a"),Bs=s("span"),b(Ct.$$.fragment),Va=m(),Us=s("span"),ya=i("OwlViTConfig"),Ur=m(),M=s("div"),b(qt.$$.fragment),ja=m(),Q=s("p"),Xo=s("a"),za=i("OwlViTConfig"),Pa=i(" is the configuration class to store the configuration of an "),Zo=s("a"),ka=i("OwlViTModel"),Ia=i(`. It is used to
instantiate an OWL-ViT model according to the specified arguments, defining the text model and vision model
configs. Instantiating a configuration with the defaults will yield a similar configuration to that of the OWL-ViT
`),Mt=s("a"),Ea=i("google/owlvit-base-patch32"),Ca=i(" architecture."),qa=m(),re=s("p"),Ma=i("Configuration objects inherit from "),Yo=s("a"),Da=i("PretrainedConfig"),Fa=i(` and can be used to control the model outputs. Read the
documentation from `),Jo=s("a"),La=i("PretrainedConfig"),Aa=i(" for more information."),Na=m(),qe=s("div"),b(Dt.$$.fragment),Wa=m(),Ft=s("p"),Sa=i("Instantiate a "),Ko=s("a"),Ra=i("OwlViTConfig"),Ba=i(` (or a derived class) from owlvit text model configuration and owlvit vision
model configuration.`),Hr=m(),ne=s("h2"),Me=s("a"),Hs=s("span"),b(Lt.$$.fragment),Ua=m(),Gs=s("span"),Ha=i("OwlViTTextConfig"),Gr=m(),D=s("div"),b(At.$$.fragment),Ga=m(),ae=s("p"),Xa=i("This is the configuration class to store the configuration of an "),Qo=s("a"),Za=i("OwlViTTextModel"),Ya=i(`. It is used to instantiate an
OwlViT text encoder according to the specified arguments, defining the model architecture. Instantiating a
configuration with the defaults will yield a similar configuration to that of the OwlViT
`),Nt=s("a"),Ja=i("google/owlvit-base-patch32"),Ka=i(" architecture."),Qa=m(),ie=s("p"),ei=i("Configuration objects inherit from "),es=s("a"),ti=i("PretrainedConfig"),oi=i(` and can be used to control the model outputs. Read the
documentation from `),ts=s("a"),si=i("PretrainedConfig"),ri=i(" for more information."),ni=m(),b(De.$$.fragment),Xr=m(),le=s("h2"),Fe=s("a"),Xs=s("span"),b(Wt.$$.fragment),ai=m(),Zs=s("span"),ii=i("OwlViTVisionConfig"),Zr=m(),F=s("div"),b(St.$$.fragment),li=m(),ce=s("p"),ci=i("This is the configuration class to store the configuration of an "),os=s("a"),di=i("OwlViTVisionModel"),pi=i(`. It is used to instantiate
an OWL-ViT image encoder according to the specified arguments, defining the model architecture. Instantiating a
configuration with the defaults will yield a similar configuration to that of the OWL-ViT
`),Rt=s("a"),mi=i("google/owlvit-base-patch32"),hi=i(" architecture."),fi=m(),de=s("p"),gi=i("Configuration objects inherit from "),ss=s("a"),ui=i("PretrainedConfig"),_i=i(` and can be used to control the model outputs. Read the
documentation from `),rs=s("a"),wi=i("PretrainedConfig"),vi=i(" for more information."),bi=m(),b(Le.$$.fragment),Yr=m(),pe=s("h2"),Ae=s("a"),Ys=s("span"),b(Bt.$$.fragment),Ti=m(),Js=s("span"),Oi=i("OwlViTImageProcessor"),Jr=m(),k=s("div"),b(Ut.$$.fragment),$i=m(),Ks=s("p"),xi=i("Constructs an OWL-ViT feature extractor."),Vi=m(),Ht=s("p"),yi=i("This feature extractor inherits from "),ns=s("a"),ji=i("FeatureExtractionMixin"),zi=i(` which contains most of the main methods. Users
should refer to this superclass for more information regarding those methods.`),Pi=m(),Ne=s("div"),b(Gt.$$.fragment),ki=m(),Qs=s("p"),Ii=i("Prepares an image or batch of images for the model."),Ei=m(),We=s("div"),b(Xt.$$.fragment),Ci=m(),Zt=s("p"),qi=i("Converts the output of "),as=s("a"),Mi=i("OwlViTForObjectDetection"),Di=i(" into the format expected by the COCO api."),Fi=m(),Se=s("div"),b(Yt.$$.fragment),Li=m(),Jt=s("p"),Ai=i("Converts the output of "),is=s("a"),Ni=i("OwlViTForObjectDetection.image_guided_detection()"),Wi=i(` into the format expected by the COCO
api.`),Kr=m(),me=s("h2"),Re=s("a"),er=s("span"),b(Kt.$$.fragment),Si=m(),tr=s("span"),Ri=i("OwlViTFeatureExtractor"),Qr=m(),I=s("div"),b(Qt.$$.fragment),Bi=m(),or=s("p"),Ui=i("Constructs an OWL-ViT feature extractor."),Hi=m(),eo=s("p"),Gi=i("This feature extractor inherits from "),ls=s("a"),Xi=i("FeatureExtractionMixin"),Zi=i(` which contains most of the main methods. Users
should refer to this superclass for more information regarding those methods.`),Yi=m(),Be=s("div"),b(to.$$.fragment),Ji=m(),sr=s("p"),Ki=i("Preprocess an image or a batch of images."),Qi=m(),Ue=s("div"),b(oo.$$.fragment),el=m(),so=s("p"),tl=i("Converts the output of "),cs=s("a"),ol=i("OwlViTForObjectDetection"),sl=i(" into the format expected by the COCO api."),rl=m(),He=s("div"),b(ro.$$.fragment),nl=m(),no=s("p"),al=i("Converts the output of "),ds=s("a"),il=i("OwlViTForObjectDetection.image_guided_detection()"),ll=i(` into the format expected by the COCO
api.`),en=m(),he=s("h2"),Ge=s("a"),rr=s("span"),b(ao.$$.fragment),cl=m(),nr=s("span"),dl=i("OwlViTProcessor"),tn=m(),E=s("div"),b(io.$$.fragment),pl=m(),C=s("p"),ml=i("Constructs an OWL-ViT processor which wraps "),ps=s("a"),hl=i("OwlViTFeatureExtractor"),fl=i(" and "),ms=s("a"),gl=i("CLIPTokenizer"),ul=i("/"),hs=s("a"),_l=i("CLIPTokenizerFast"),wl=i(`
into a single processor that interits both the feature extractor and tokenizer functionalities. See the
`),ar=s("code"),vl=i("__call__()"),bl=i(" and "),fs=s("a"),Tl=i("decode()"),Ol=i(" for more information."),$l=m(),Xe=s("div"),b(lo.$$.fragment),xl=m(),co=s("p"),Vl=i("This method forwards all its arguments to CLIPTokenizerFast\u2019s "),gs=s("a"),yl=i("batch_decode()"),jl=i(`. Please
refer to the docstring of this method for more information.`),zl=m(),Ze=s("div"),b(po.$$.fragment),Pl=m(),mo=s("p"),kl=i("This method forwards all its arguments to CLIPTokenizerFast\u2019s "),us=s("a"),Il=i("decode()"),El=i(`. Please refer to
the docstring of this method for more information.`),Cl=m(),Ye=s("div"),b(ho.$$.fragment),ql=m(),fo=s("p"),Ml=i("This method forwards all its arguments to "),_s=s("a"),Dl=i("OwlViTFeatureExtractor.post_process()"),Fl=i(`. Please refer to the
docstring of this method for more information.`),Ll=m(),Je=s("div"),b(go.$$.fragment),Al=m(),uo=s("p"),Nl=i("This method forwards all its arguments to "),ir=s("code"),Wl=i("OwlViTFeatureExtractor.post_process_one_shot_object_detection"),Sl=i(`.
Please refer to the docstring of this method for more information.`),on=m(),fe=s("h2"),Ke=s("a"),lr=s("span"),b(_o.$$.fragment),Rl=m(),cr=s("span"),Bl=i("OwlViTModel"),sn=m(),L=s("div"),b(wo.$$.fragment),Ul=m(),N=s("div"),b(vo.$$.fragment),Hl=m(),ge=s("p"),Gl=i("The "),ws=s("a"),Xl=i("OwlViTModel"),Zl=i(" forward method, overrides the "),dr=s("code"),Yl=i("__call__"),Jl=i(" special method."),Kl=m(),b(Qe.$$.fragment),Ql=m(),b(et.$$.fragment),ec=m(),W=s("div"),b(bo.$$.fragment),tc=m(),ue=s("p"),oc=i("The "),vs=s("a"),sc=i("OwlViTModel"),rc=i(" forward method, overrides the "),pr=s("code"),nc=i("__call__"),ac=i(" special method."),ic=m(),b(tt.$$.fragment),lc=m(),b(ot.$$.fragment),cc=m(),S=s("div"),b(To.$$.fragment),dc=m(),_e=s("p"),pc=i("The "),bs=s("a"),mc=i("OwlViTModel"),hc=i(" forward method, overrides the "),mr=s("code"),fc=i("__call__"),gc=i(" special method."),uc=m(),b(st.$$.fragment),_c=m(),b(rt.$$.fragment),rn=m(),we=s("h2"),nt=s("a"),hr=s("span"),b(Oo.$$.fragment),wc=m(),fr=s("span"),vc=i("OwlViTTextModel"),nn=m(),ve=s("div"),b($o.$$.fragment),bc=m(),R=s("div"),b(xo.$$.fragment),Tc=m(),be=s("p"),Oc=i("The "),Ts=s("a"),$c=i("OwlViTTextModel"),xc=i(" forward method, overrides the "),gr=s("code"),Vc=i("__call__"),yc=i(" special method."),jc=m(),b(at.$$.fragment),zc=m(),b(it.$$.fragment),an=m(),Te=s("h2"),lt=s("a"),ur=s("span"),b(Vo.$$.fragment),Pc=m(),_r=s("span"),kc=i("OwlViTVisionModel"),ln=m(),Oe=s("div"),b(yo.$$.fragment),Ic=m(),B=s("div"),b(jo.$$.fragment),Ec=m(),$e=s("p"),Cc=i("The "),Os=s("a"),qc=i("OwlViTVisionModel"),Mc=i(" forward method, overrides the "),wr=s("code"),Dc=i("__call__"),Fc=i(" special method."),Lc=m(),b(ct.$$.fragment),Ac=m(),b(dt.$$.fragment),cn=m(),xe=s("h2"),pt=s("a"),vr=s("span"),b(zo.$$.fragment),Nc=m(),br=s("span"),Wc=i("OwlViTForObjectDetection"),dn=m(),J=s("div"),b(Po.$$.fragment),Sc=m(),U=s("div"),b(ko.$$.fragment),Rc=m(),Ve=s("p"),Bc=i("The "),$s=s("a"),Uc=i("OwlViTForObjectDetection"),Hc=i(" forward method, overrides the "),Tr=s("code"),Gc=i("__call__"),Xc=i(" special method."),Zc=m(),b(mt.$$.fragment),Yc=m(),b(ht.$$.fragment),Jc=m(),H=s("div"),b(Io.$$.fragment),Kc=m(),ye=s("p"),Qc=i("The "),xs=s("a"),ed=i("OwlViTForObjectDetection"),td=i(" forward method, overrides the "),Or=s("code"),od=i("__call__"),sd=i(" special method."),rd=m(),b(ft.$$.fragment),nd=m(),b(gt.$$.fragment),this.h()},l(t){const u=Rp('[data-svelte="svelte-1phssyn"]',document.head);c=r(u,"META",{name:!0,content:!0}),u.forEach(o),v=h(t),g=r(t,"H1",{class:!0});var Eo=a(g);f=r(Eo,"A",{id:!0,class:!0,href:!0});var $r=a(f);w=r($r,"SPAN",{});var xr=a(w);T(n.$$.fragment,xr),xr.forEach(o),$r.forEach(o),p=h(Eo),z=r(Eo,"SPAN",{});var Vr=a(z);Gn=l(Vr,"OWL-ViT"),Vr.forEach(o),Eo.forEach(o),Mr=h(t),te=r(t,"H2",{class:!0});var Co=a(te);Pe=r(Co,"A",{id:!0,class:!0,href:!0});var yr=a(Pe);As=r(yr,"SPAN",{});var jr=a(As);T(jt.$$.fragment,jr),jr.forEach(o),yr.forEach(o),Xn=h(Co),Ns=r(Co,"SPAN",{});var zr=a(Ns);Zn=l(zr,"Overview"),zr.forEach(o),Co.forEach(o),Dr=h(t),ke=r(t,"P",{});var qo=a(ke);Yn=l(qo,"The OWL-ViT (short for Vision Transformer for Open-World Localization) was proposed in "),zt=r(qo,"A",{href:!0,rel:!0});var Pr=a(zt);Jn=l(Pr,"Simple Open-Vocabulary Object Detection with Vision Transformers"),Pr.forEach(o),Kn=l(qo," by Matthias Minderer, Alexey Gritsenko, Austin Stone, Maxim Neumann, Dirk Weissenborn, Alexey Dosovitskiy, Aravindh Mahendran, Anurag Arnab, Mostafa Dehghani, Zhuoran Shen, Xiao Wang, Xiaohua Zhai, Thomas Kipf, and Neil Houlsby. OWL-ViT is an open-vocabulary object detection network trained on a variety of (image, text) pairs. It can be used to query an image with one or multiple text queries to search for and detect target objects described in text."),qo.forEach(o),Fr=h(t),Lo=r(t,"P",{});var kr=a(Lo);Qn=l(kr,"The abstract from the paper is the following:"),kr.forEach(o),Lr=h(t),Ao=r(t,"P",{});var Ir=a(Ao);Ws=r(Ir,"EM",{});var Er=a(Ws);ea=l(Er,"Combining simple architectures with large-scale pre-training has led to massive improvements in image classification. For object detection, pre-training and scaling approaches are less well established, especially in the long-tailed and open-vocabulary setting, where training data is relatively scarce. In this paper, we propose a strong recipe for transferring image-text models to open-vocabulary object detection. We use a standard Vision Transformer architecture with minimal modifications, contrastive image-text pre-training, and end-to-end detection fine-tuning. Our analysis of the scaling properties of this setup shows that increasing image-level pre-training and model size yield consistent improvements on the downstream detection task. We provide the adaptation strategies and regularizations needed to attain very strong performance on zero-shot text-conditioned and one-shot image-conditioned object detection. Code and models are available on GitHub."),Er.forEach(o),Ir.forEach(o),Ar=h(t),oe=r(t,"H2",{class:!0});var Mo=a(oe);Ie=r(Mo,"A",{id:!0,class:!0,href:!0});var Cr=a(Ie);Ss=r(Cr,"SPAN",{});var qr=a(Ss);T(Pt.$$.fragment,qr),qr.forEach(o),Cr.forEach(o),ta=h(Mo),Rs=r(Mo,"SPAN",{});var ad=a(Rs);oa=l(ad,"Usage"),ad.forEach(o),Mo.forEach(o),Nr=h(t),Ee=r(t,"P",{});var mn=a(Ee);sa=l(mn,"OWL-ViT is a zero-shot text-conditioned object detection model. OWL-ViT uses "),No=r(mn,"A",{href:!0});var id=a(No);ra=l(id,"CLIP"),id.forEach(o),na=l(mn," as its multi-modal backbone, with a ViT-like Transformer to get visual features and a causal language model to get the text features. To use CLIP for detection, OWL-ViT removes the final token pooling layer of the vision model and attaches a lightweight classification and box head to each transformer output token. Open-vocabulary classification is enabled by replacing the fixed classification layer weights with the class-name embeddings obtained from the text model. The authors first train CLIP from scratch and fine-tune it end-to-end with the classification and box heads on standard detection datasets using a bipartite matching loss. One or multiple text queries per image can be used to perform zero-shot text-conditioned object detection."),mn.forEach(o),Wr=h(t),P=r(t,"P",{});var q=a(P);Wo=r(q,"A",{href:!0});var ld=a(Wo);aa=l(ld,"OwlViTFeatureExtractor"),ld.forEach(o),ia=l(q," can be used to resize (or rescale) and normalize images for the model and "),So=r(q,"A",{href:!0});var cd=a(So);la=l(cd,"CLIPTokenizer"),cd.forEach(o),ca=l(q," is used to encode the text. "),Ro=r(q,"A",{href:!0});var dd=a(Ro);da=l(dd,"OwlViTProcessor"),dd.forEach(o),pa=l(q," wraps "),Bo=r(q,"A",{href:!0});var pd=a(Bo);ma=l(pd,"OwlViTFeatureExtractor"),pd.forEach(o),ha=l(q," and "),Uo=r(q,"A",{href:!0});var md=a(Uo);fa=l(md,"CLIPTokenizer"),md.forEach(o),ga=l(q," into a single instance to both encode the text and prepare the images. The following example shows how to perform object detection using "),Ho=r(q,"A",{href:!0});var hd=a(Ho);ua=l(hd,"OwlViTProcessor"),hd.forEach(o),_a=l(q," and "),Go=r(q,"A",{href:!0});var fd=a(Go);wa=l(fd,"OwlViTForObjectDetection"),fd.forEach(o),va=l(q,"."),q.forEach(o),Sr=h(t),T(kt.$$.fragment,t),Rr=h(t),K=r(t,"P",{});var Vs=a(K);ba=l(Vs,"This model was contributed by "),It=r(Vs,"A",{href:!0,rel:!0});var gd=a(It);Ta=l(gd,"adirik"),gd.forEach(o),Oa=l(Vs,". The original code can be found "),Et=r(Vs,"A",{href:!0,rel:!0});var ud=a(Et);$a=l(ud,"here"),ud.forEach(o),xa=l(Vs,"."),Vs.forEach(o),Br=h(t),se=r(t,"H2",{class:!0});var hn=a(se);Ce=r(hn,"A",{id:!0,class:!0,href:!0});var _d=a(Ce);Bs=r(_d,"SPAN",{});var wd=a(Bs);T(Ct.$$.fragment,wd),wd.forEach(o),_d.forEach(o),Va=h(hn),Us=r(hn,"SPAN",{});var vd=a(Us);ya=l(vd,"OwlViTConfig"),vd.forEach(o),hn.forEach(o),Ur=h(t),M=r(t,"DIV",{class:!0});var ut=a(M);T(qt.$$.fragment,ut),ja=h(ut),Q=r(ut,"P",{});var Do=a(Q);Xo=r(Do,"A",{href:!0});var bd=a(Xo);za=l(bd,"OwlViTConfig"),bd.forEach(o),Pa=l(Do," is the configuration class to store the configuration of an "),Zo=r(Do,"A",{href:!0});var Td=a(Zo);ka=l(Td,"OwlViTModel"),Td.forEach(o),Ia=l(Do,`. It is used to
instantiate an OWL-ViT model according to the specified arguments, defining the text model and vision model
configs. Instantiating a configuration with the defaults will yield a similar configuration to that of the OWL-ViT
`),Mt=r(Do,"A",{href:!0,rel:!0});var Od=a(Mt);Ea=l(Od,"google/owlvit-base-patch32"),Od.forEach(o),Ca=l(Do," architecture."),Do.forEach(o),qa=h(ut),re=r(ut,"P",{});var ys=a(re);Ma=l(ys,"Configuration objects inherit from "),Yo=r(ys,"A",{href:!0});var $d=a(Yo);Da=l($d,"PretrainedConfig"),$d.forEach(o),Fa=l(ys,` and can be used to control the model outputs. Read the
documentation from `),Jo=r(ys,"A",{href:!0});var xd=a(Jo);La=l(xd,"PretrainedConfig"),xd.forEach(o),Aa=l(ys," for more information."),ys.forEach(o),Na=h(ut),qe=r(ut,"DIV",{class:!0});var fn=a(qe);T(Dt.$$.fragment,fn),Wa=h(fn),Ft=r(fn,"P",{});var gn=a(Ft);Sa=l(gn,"Instantiate a "),Ko=r(gn,"A",{href:!0});var Vd=a(Ko);Ra=l(Vd,"OwlViTConfig"),Vd.forEach(o),Ba=l(gn,` (or a derived class) from owlvit text model configuration and owlvit vision
model configuration.`),gn.forEach(o),fn.forEach(o),ut.forEach(o),Hr=h(t),ne=r(t,"H2",{class:!0});var un=a(ne);Me=r(un,"A",{id:!0,class:!0,href:!0});var yd=a(Me);Hs=r(yd,"SPAN",{});var jd=a(Hs);T(Lt.$$.fragment,jd),jd.forEach(o),yd.forEach(o),Ua=h(un),Gs=r(un,"SPAN",{});var zd=a(Gs);Ha=l(zd,"OwlViTTextConfig"),zd.forEach(o),un.forEach(o),Gr=h(t),D=r(t,"DIV",{class:!0});var _t=a(D);T(At.$$.fragment,_t),Ga=h(_t),ae=r(_t,"P",{});var js=a(ae);Xa=l(js,"This is the configuration class to store the configuration of an "),Qo=r(js,"A",{href:!0});var Pd=a(Qo);Za=l(Pd,"OwlViTTextModel"),Pd.forEach(o),Ya=l(js,`. It is used to instantiate an
OwlViT text encoder according to the specified arguments, defining the model architecture. Instantiating a
configuration with the defaults will yield a similar configuration to that of the OwlViT
`),Nt=r(js,"A",{href:!0,rel:!0});var kd=a(Nt);Ja=l(kd,"google/owlvit-base-patch32"),kd.forEach(o),Ka=l(js," architecture."),js.forEach(o),Qa=h(_t),ie=r(_t,"P",{});var zs=a(ie);ei=l(zs,"Configuration objects inherit from "),es=r(zs,"A",{href:!0});var Id=a(es);ti=l(Id,"PretrainedConfig"),Id.forEach(o),oi=l(zs,` and can be used to control the model outputs. Read the
documentation from `),ts=r(zs,"A",{href:!0});var Ed=a(ts);si=l(Ed,"PretrainedConfig"),Ed.forEach(o),ri=l(zs," for more information."),zs.forEach(o),ni=h(_t),T(De.$$.fragment,_t),_t.forEach(o),Xr=h(t),le=r(t,"H2",{class:!0});var _n=a(le);Fe=r(_n,"A",{id:!0,class:!0,href:!0});var Cd=a(Fe);Xs=r(Cd,"SPAN",{});var qd=a(Xs);T(Wt.$$.fragment,qd),qd.forEach(o),Cd.forEach(o),ai=h(_n),Zs=r(_n,"SPAN",{});var Md=a(Zs);ii=l(Md,"OwlViTVisionConfig"),Md.forEach(o),_n.forEach(o),Zr=h(t),F=r(t,"DIV",{class:!0});var wt=a(F);T(St.$$.fragment,wt),li=h(wt),ce=r(wt,"P",{});var Ps=a(ce);ci=l(Ps,"This is the configuration class to store the configuration of an "),os=r(Ps,"A",{href:!0});var Dd=a(os);di=l(Dd,"OwlViTVisionModel"),Dd.forEach(o),pi=l(Ps,`. It is used to instantiate
an OWL-ViT image encoder according to the specified arguments, defining the model architecture. Instantiating a
configuration with the defaults will yield a similar configuration to that of the OWL-ViT
`),Rt=r(Ps,"A",{href:!0,rel:!0});var Fd=a(Rt);mi=l(Fd,"google/owlvit-base-patch32"),Fd.forEach(o),hi=l(Ps," architecture."),Ps.forEach(o),fi=h(wt),de=r(wt,"P",{});var ks=a(de);gi=l(ks,"Configuration objects inherit from "),ss=r(ks,"A",{href:!0});var Ld=a(ss);ui=l(Ld,"PretrainedConfig"),Ld.forEach(o),_i=l(ks,` and can be used to control the model outputs. Read the
documentation from `),rs=r(ks,"A",{href:!0});var Ad=a(rs);wi=l(Ad,"PretrainedConfig"),Ad.forEach(o),vi=l(ks," for more information."),ks.forEach(o),bi=h(wt),T(Le.$$.fragment,wt),wt.forEach(o),Yr=h(t),pe=r(t,"H2",{class:!0});var wn=a(pe);Ae=r(wn,"A",{id:!0,class:!0,href:!0});var Nd=a(Ae);Ys=r(Nd,"SPAN",{});var Wd=a(Ys);T(Bt.$$.fragment,Wd),Wd.forEach(o),Nd.forEach(o),Ti=h(wn),Js=r(wn,"SPAN",{});var Sd=a(Js);Oi=l(Sd,"OwlViTImageProcessor"),Sd.forEach(o),wn.forEach(o),Jr=h(t),k=r(t,"DIV",{class:!0});var G=a(k);T(Ut.$$.fragment,G),$i=h(G),Ks=r(G,"P",{});var Rd=a(Ks);xi=l(Rd,"Constructs an OWL-ViT feature extractor."),Rd.forEach(o),Vi=h(G),Ht=r(G,"P",{});var vn=a(Ht);yi=l(vn,"This feature extractor inherits from "),ns=r(vn,"A",{href:!0});var Bd=a(ns);ji=l(Bd,"FeatureExtractionMixin"),Bd.forEach(o),zi=l(vn,` which contains most of the main methods. Users
should refer to this superclass for more information regarding those methods.`),vn.forEach(o),Pi=h(G),Ne=r(G,"DIV",{class:!0});var bn=a(Ne);T(Gt.$$.fragment,bn),ki=h(bn),Qs=r(bn,"P",{});var Ud=a(Qs);Ii=l(Ud,"Prepares an image or batch of images for the model."),Ud.forEach(o),bn.forEach(o),Ei=h(G),We=r(G,"DIV",{class:!0});var Tn=a(We);T(Xt.$$.fragment,Tn),Ci=h(Tn),Zt=r(Tn,"P",{});var On=a(Zt);qi=l(On,"Converts the output of "),as=r(On,"A",{href:!0});var Hd=a(as);Mi=l(Hd,"OwlViTForObjectDetection"),Hd.forEach(o),Di=l(On," into the format expected by the COCO api."),On.forEach(o),Tn.forEach(o),Fi=h(G),Se=r(G,"DIV",{class:!0});var $n=a(Se);T(Yt.$$.fragment,$n),Li=h($n),Jt=r($n,"P",{});var xn=a(Jt);Ai=l(xn,"Converts the output of "),is=r(xn,"A",{href:!0});var Gd=a(is);Ni=l(Gd,"OwlViTForObjectDetection.image_guided_detection()"),Gd.forEach(o),Wi=l(xn,` into the format expected by the COCO
api.`),xn.forEach(o),$n.forEach(o),G.forEach(o),Kr=h(t),me=r(t,"H2",{class:!0});var Vn=a(me);Re=r(Vn,"A",{id:!0,class:!0,href:!0});var Xd=a(Re);er=r(Xd,"SPAN",{});var Zd=a(er);T(Kt.$$.fragment,Zd),Zd.forEach(o),Xd.forEach(o),Si=h(Vn),tr=r(Vn,"SPAN",{});var Yd=a(tr);Ri=l(Yd,"OwlViTFeatureExtractor"),Yd.forEach(o),Vn.forEach(o),Qr=h(t),I=r(t,"DIV",{class:!0});var X=a(I);T(Qt.$$.fragment,X),Bi=h(X),or=r(X,"P",{});var Jd=a(or);Ui=l(Jd,"Constructs an OWL-ViT feature extractor."),Jd.forEach(o),Hi=h(X),eo=r(X,"P",{});var yn=a(eo);Gi=l(yn,"This feature extractor inherits from "),ls=r(yn,"A",{href:!0});var Kd=a(ls);Xi=l(Kd,"FeatureExtractionMixin"),Kd.forEach(o),Zi=l(yn,` which contains most of the main methods. Users
should refer to this superclass for more information regarding those methods.`),yn.forEach(o),Yi=h(X),Be=r(X,"DIV",{class:!0});var jn=a(Be);T(to.$$.fragment,jn),Ji=h(jn),sr=r(jn,"P",{});var Qd=a(sr);Ki=l(Qd,"Preprocess an image or a batch of images."),Qd.forEach(o),jn.forEach(o),Qi=h(X),Ue=r(X,"DIV",{class:!0});var zn=a(Ue);T(oo.$$.fragment,zn),el=h(zn),so=r(zn,"P",{});var Pn=a(so);tl=l(Pn,"Converts the output of "),cs=r(Pn,"A",{href:!0});var ep=a(cs);ol=l(ep,"OwlViTForObjectDetection"),ep.forEach(o),sl=l(Pn," into the format expected by the COCO api."),Pn.forEach(o),zn.forEach(o),rl=h(X),He=r(X,"DIV",{class:!0});var kn=a(He);T(ro.$$.fragment,kn),nl=h(kn),no=r(kn,"P",{});var In=a(no);al=l(In,"Converts the output of "),ds=r(In,"A",{href:!0});var tp=a(ds);il=l(tp,"OwlViTForObjectDetection.image_guided_detection()"),tp.forEach(o),ll=l(In,` into the format expected by the COCO
api.`),In.forEach(o),kn.forEach(o),X.forEach(o),en=h(t),he=r(t,"H2",{class:!0});var En=a(he);Ge=r(En,"A",{id:!0,class:!0,href:!0});var op=a(Ge);rr=r(op,"SPAN",{});var sp=a(rr);T(ao.$$.fragment,sp),sp.forEach(o),op.forEach(o),cl=h(En),nr=r(En,"SPAN",{});var rp=a(nr);dl=l(rp,"OwlViTProcessor"),rp.forEach(o),En.forEach(o),tn=h(t),E=r(t,"DIV",{class:!0});var Z=a(E);T(io.$$.fragment,Z),pl=h(Z),C=r(Z,"P",{});var Y=a(C);ml=l(Y,"Constructs an OWL-ViT processor which wraps "),ps=r(Y,"A",{href:!0});var np=a(ps);hl=l(np,"OwlViTFeatureExtractor"),np.forEach(o),fl=l(Y," and "),ms=r(Y,"A",{href:!0});var ap=a(ms);gl=l(ap,"CLIPTokenizer"),ap.forEach(o),ul=l(Y,"/"),hs=r(Y,"A",{href:!0});var ip=a(hs);_l=l(ip,"CLIPTokenizerFast"),ip.forEach(o),wl=l(Y,`
into a single processor that interits both the feature extractor and tokenizer functionalities. See the
`),ar=r(Y,"CODE",{});var lp=a(ar);vl=l(lp,"__call__()"),lp.forEach(o),bl=l(Y," and "),fs=r(Y,"A",{href:!0});var cp=a(fs);Tl=l(cp,"decode()"),cp.forEach(o),Ol=l(Y," for more information."),Y.forEach(o),$l=h(Z),Xe=r(Z,"DIV",{class:!0});var Cn=a(Xe);T(lo.$$.fragment,Cn),xl=h(Cn),co=r(Cn,"P",{});var qn=a(co);Vl=l(qn,"This method forwards all its arguments to CLIPTokenizerFast\u2019s "),gs=r(qn,"A",{href:!0});var dp=a(gs);yl=l(dp,"batch_decode()"),dp.forEach(o),jl=l(qn,`. Please
refer to the docstring of this method for more information.`),qn.forEach(o),Cn.forEach(o),zl=h(Z),Ze=r(Z,"DIV",{class:!0});var Mn=a(Ze);T(po.$$.fragment,Mn),Pl=h(Mn),mo=r(Mn,"P",{});var Dn=a(mo);kl=l(Dn,"This method forwards all its arguments to CLIPTokenizerFast\u2019s "),us=r(Dn,"A",{href:!0});var pp=a(us);Il=l(pp,"decode()"),pp.forEach(o),El=l(Dn,`. Please refer to
the docstring of this method for more information.`),Dn.forEach(o),Mn.forEach(o),Cl=h(Z),Ye=r(Z,"DIV",{class:!0});var Fn=a(Ye);T(ho.$$.fragment,Fn),ql=h(Fn),fo=r(Fn,"P",{});var Ln=a(fo);Ml=l(Ln,"This method forwards all its arguments to "),_s=r(Ln,"A",{href:!0});var mp=a(_s);Dl=l(mp,"OwlViTFeatureExtractor.post_process()"),mp.forEach(o),Fl=l(Ln,`. Please refer to the
docstring of this method for more information.`),Ln.forEach(o),Fn.forEach(o),Ll=h(Z),Je=r(Z,"DIV",{class:!0});var An=a(Je);T(go.$$.fragment,An),Al=h(An),uo=r(An,"P",{});var Nn=a(uo);Nl=l(Nn,"This method forwards all its arguments to "),ir=r(Nn,"CODE",{});var hp=a(ir);Wl=l(hp,"OwlViTFeatureExtractor.post_process_one_shot_object_detection"),hp.forEach(o),Sl=l(Nn,`.
Please refer to the docstring of this method for more information.`),Nn.forEach(o),An.forEach(o),Z.forEach(o),on=h(t),fe=r(t,"H2",{class:!0});var Wn=a(fe);Ke=r(Wn,"A",{id:!0,class:!0,href:!0});var fp=a(Ke);lr=r(fp,"SPAN",{});var gp=a(lr);T(_o.$$.fragment,gp),gp.forEach(o),fp.forEach(o),Rl=h(Wn),cr=r(Wn,"SPAN",{});var up=a(cr);Bl=l(up,"OwlViTModel"),up.forEach(o),Wn.forEach(o),sn=h(t),L=r(t,"DIV",{class:!0});var vt=a(L);T(wo.$$.fragment,vt),Ul=h(vt),N=r(vt,"DIV",{class:!0});var bt=a(N);T(vo.$$.fragment,bt),Hl=h(bt),ge=r(bt,"P",{});var Is=a(ge);Gl=l(Is,"The "),ws=r(Is,"A",{href:!0});var _p=a(ws);Xl=l(_p,"OwlViTModel"),_p.forEach(o),Zl=l(Is," forward method, overrides the "),dr=r(Is,"CODE",{});var wp=a(dr);Yl=l(wp,"__call__"),wp.forEach(o),Jl=l(Is," special method."),Is.forEach(o),Kl=h(bt),T(Qe.$$.fragment,bt),Ql=h(bt),T(et.$$.fragment,bt),bt.forEach(o),ec=h(vt),W=r(vt,"DIV",{class:!0});var Tt=a(W);T(bo.$$.fragment,Tt),tc=h(Tt),ue=r(Tt,"P",{});var Es=a(ue);oc=l(Es,"The "),vs=r(Es,"A",{href:!0});var vp=a(vs);sc=l(vp,"OwlViTModel"),vp.forEach(o),rc=l(Es," forward method, overrides the "),pr=r(Es,"CODE",{});var bp=a(pr);nc=l(bp,"__call__"),bp.forEach(o),ac=l(Es," special method."),Es.forEach(o),ic=h(Tt),T(tt.$$.fragment,Tt),lc=h(Tt),T(ot.$$.fragment,Tt),Tt.forEach(o),cc=h(vt),S=r(vt,"DIV",{class:!0});var Ot=a(S);T(To.$$.fragment,Ot),dc=h(Ot),_e=r(Ot,"P",{});var Cs=a(_e);pc=l(Cs,"The "),bs=r(Cs,"A",{href:!0});var Tp=a(bs);mc=l(Tp,"OwlViTModel"),Tp.forEach(o),hc=l(Cs," forward method, overrides the "),mr=r(Cs,"CODE",{});var Op=a(mr);fc=l(Op,"__call__"),Op.forEach(o),gc=l(Cs," special method."),Cs.forEach(o),uc=h(Ot),T(st.$$.fragment,Ot),_c=h(Ot),T(rt.$$.fragment,Ot),Ot.forEach(o),vt.forEach(o),rn=h(t),we=r(t,"H2",{class:!0});var Sn=a(we);nt=r(Sn,"A",{id:!0,class:!0,href:!0});var $p=a(nt);hr=r($p,"SPAN",{});var xp=a(hr);T(Oo.$$.fragment,xp),xp.forEach(o),$p.forEach(o),wc=h(Sn),fr=r(Sn,"SPAN",{});var Vp=a(fr);vc=l(Vp,"OwlViTTextModel"),Vp.forEach(o),Sn.forEach(o),nn=h(t),ve=r(t,"DIV",{class:!0});var Rn=a(ve);T($o.$$.fragment,Rn),bc=h(Rn),R=r(Rn,"DIV",{class:!0});var $t=a(R);T(xo.$$.fragment,$t),Tc=h($t),be=r($t,"P",{});var qs=a(be);Oc=l(qs,"The "),Ts=r(qs,"A",{href:!0});var yp=a(Ts);$c=l(yp,"OwlViTTextModel"),yp.forEach(o),xc=l(qs," forward method, overrides the "),gr=r(qs,"CODE",{});var jp=a(gr);Vc=l(jp,"__call__"),jp.forEach(o),yc=l(qs," special method."),qs.forEach(o),jc=h($t),T(at.$$.fragment,$t),zc=h($t),T(it.$$.fragment,$t),$t.forEach(o),Rn.forEach(o),an=h(t),Te=r(t,"H2",{class:!0});var Bn=a(Te);lt=r(Bn,"A",{id:!0,class:!0,href:!0});var zp=a(lt);ur=r(zp,"SPAN",{});var Pp=a(ur);T(Vo.$$.fragment,Pp),Pp.forEach(o),zp.forEach(o),Pc=h(Bn),_r=r(Bn,"SPAN",{});var kp=a(_r);kc=l(kp,"OwlViTVisionModel"),kp.forEach(o),Bn.forEach(o),ln=h(t),Oe=r(t,"DIV",{class:!0});var Un=a(Oe);T(yo.$$.fragment,Un),Ic=h(Un),B=r(Un,"DIV",{class:!0});var xt=a(B);T(jo.$$.fragment,xt),Ec=h(xt),$e=r(xt,"P",{});var Ms=a($e);Cc=l(Ms,"The "),Os=r(Ms,"A",{href:!0});var Ip=a(Os);qc=l(Ip,"OwlViTVisionModel"),Ip.forEach(o),Mc=l(Ms," forward method, overrides the "),wr=r(Ms,"CODE",{});var Ep=a(wr);Dc=l(Ep,"__call__"),Ep.forEach(o),Fc=l(Ms," special method."),Ms.forEach(o),Lc=h(xt),T(ct.$$.fragment,xt),Ac=h(xt),T(dt.$$.fragment,xt),xt.forEach(o),Un.forEach(o),cn=h(t),xe=r(t,"H2",{class:!0});var Hn=a(xe);pt=r(Hn,"A",{id:!0,class:!0,href:!0});var Cp=a(pt);vr=r(Cp,"SPAN",{});var qp=a(vr);T(zo.$$.fragment,qp),qp.forEach(o),Cp.forEach(o),Nc=h(Hn),br=r(Hn,"SPAN",{});var Mp=a(br);Wc=l(Mp,"OwlViTForObjectDetection"),Mp.forEach(o),Hn.forEach(o),dn=h(t),J=r(t,"DIV",{class:!0});var Ds=a(J);T(Po.$$.fragment,Ds),Sc=h(Ds),U=r(Ds,"DIV",{class:!0});var Vt=a(U);T(ko.$$.fragment,Vt),Rc=h(Vt),Ve=r(Vt,"P",{});var Fs=a(Ve);Bc=l(Fs,"The "),$s=r(Fs,"A",{href:!0});var Dp=a($s);Uc=l(Dp,"OwlViTForObjectDetection"),Dp.forEach(o),Hc=l(Fs," forward method, overrides the "),Tr=r(Fs,"CODE",{});var Fp=a(Tr);Gc=l(Fp,"__call__"),Fp.forEach(o),Xc=l(Fs," special method."),Fs.forEach(o),Zc=h(Vt),T(mt.$$.fragment,Vt),Yc=h(Vt),T(ht.$$.fragment,Vt),Vt.forEach(o),Jc=h(Ds),H=r(Ds,"DIV",{class:!0});var yt=a(H);T(Io.$$.fragment,yt),Kc=h(yt),ye=r(yt,"P",{});var Ls=a(ye);Qc=l(Ls,"The "),xs=r(Ls,"A",{href:!0});var Lp=a(xs);ed=l(Lp,"OwlViTForObjectDetection"),Lp.forEach(o),td=l(Ls," forward method, overrides the "),Or=r(Ls,"CODE",{});var Ap=a(Or);od=l(Ap,"__call__"),Ap.forEach(o),sd=l(Ls," special method."),Ls.forEach(o),rd=h(yt),T(ft.$$.fragment,yt),nd=h(yt),T(gt.$$.fragment,yt),yt.forEach(o),Ds.forEach(o),this.h()},h(){d(c,"name","hf:doc:metadata"),d(c,"content",JSON.stringify(lm)),d(f,"id","owlvit"),d(f,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(f,"href","#owlvit"),d(g,"class","relative group"),d(Pe,"id","overview"),d(Pe,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(Pe,"href","#overview"),d(te,"class","relative group"),d(zt,"href","https://arxiv.org/abs/2205.06230"),d(zt,"rel","nofollow"),d(Ie,"id","usage"),d(Ie,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(Ie,"href","#usage"),d(oe,"class","relative group"),d(No,"href","clip"),d(Wo,"href","/docs/transformers/v4.25.1/en/model_doc/owlvit#transformers.OwlViTImageProcessor"),d(So,"href","/docs/transformers/v4.25.1/en/model_doc/clip#transformers.CLIPTokenizer"),d(Ro,"href","/docs/transformers/v4.25.1/en/model_doc/owlvit#transformers.OwlViTProcessor"),d(Bo,"href","/docs/transformers/v4.25.1/en/model_doc/owlvit#transformers.OwlViTImageProcessor"),d(Uo,"href","/docs/transformers/v4.25.1/en/model_doc/clip#transformers.CLIPTokenizer"),d(Ho,"href","/docs/transformers/v4.25.1/en/model_doc/owlvit#transformers.OwlViTProcessor"),d(Go,"href","/docs/transformers/v4.25.1/en/model_doc/owlvit#transformers.OwlViTForObjectDetection"),d(It,"href","https://huggingface.co/adirik"),d(It,"rel","nofollow"),d(Et,"href","https://github.com/google-research/scenic/tree/main/scenic/projects/owl_vit"),d(Et,"rel","nofollow"),d(Ce,"id","transformers.OwlViTConfig"),d(Ce,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(Ce,"href","#transformers.OwlViTConfig"),d(se,"class","relative group"),d(Xo,"href","/docs/transformers/v4.25.1/en/model_doc/owlvit#transformers.OwlViTConfig"),d(Zo,"href","/docs/transformers/v4.25.1/en/model_doc/owlvit#transformers.OwlViTModel"),d(Mt,"href","https://huggingface.co/google/owlvit-base-patch32"),d(Mt,"rel","nofollow"),d(Yo,"href","/docs/transformers/v4.25.1/en/main_classes/configuration#transformers.PretrainedConfig"),d(Jo,"href","/docs/transformers/v4.25.1/en/main_classes/configuration#transformers.PretrainedConfig"),d(Ko,"href","/docs/transformers/v4.25.1/en/model_doc/owlvit#transformers.OwlViTConfig"),d(qe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(M,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Me,"id","transformers.OwlViTTextConfig"),d(Me,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(Me,"href","#transformers.OwlViTTextConfig"),d(ne,"class","relative group"),d(Qo,"href","/docs/transformers/v4.25.1/en/model_doc/owlvit#transformers.OwlViTTextModel"),d(Nt,"href","https://huggingface.co/google/owlvit-base-patch32"),d(Nt,"rel","nofollow"),d(es,"href","/docs/transformers/v4.25.1/en/main_classes/configuration#transformers.PretrainedConfig"),d(ts,"href","/docs/transformers/v4.25.1/en/main_classes/configuration#transformers.PretrainedConfig"),d(D,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Fe,"id","transformers.OwlViTVisionConfig"),d(Fe,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(Fe,"href","#transformers.OwlViTVisionConfig"),d(le,"class","relative group"),d(os,"href","/docs/transformers/v4.25.1/en/model_doc/owlvit#transformers.OwlViTVisionModel"),d(Rt,"href","https://huggingface.co/google/owlvit-base-patch32"),d(Rt,"rel","nofollow"),d(ss,"href","/docs/transformers/v4.25.1/en/main_classes/configuration#transformers.PretrainedConfig"),d(rs,"href","/docs/transformers/v4.25.1/en/main_classes/configuration#transformers.PretrainedConfig"),d(F,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Ae,"id","transformers.OwlViTImageProcessor"),d(Ae,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(Ae,"href","#transformers.OwlViTImageProcessor"),d(pe,"class","relative group"),d(ns,"href","/docs/transformers/v4.25.1/en/main_classes/feature_extractor#transformers.FeatureExtractionMixin"),d(Ne,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(as,"href","/docs/transformers/v4.25.1/en/model_doc/owlvit#transformers.OwlViTForObjectDetection"),d(We,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(is,"href","/docs/transformers/v4.25.1/en/model_doc/owlvit#transformers.OwlViTForObjectDetection.image_guided_detection"),d(Se,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(k,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Re,"id","transformers.OwlViTImageProcessor"),d(Re,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(Re,"href","#transformers.OwlViTImageProcessor"),d(me,"class","relative group"),d(ls,"href","/docs/transformers/v4.25.1/en/main_classes/feature_extractor#transformers.FeatureExtractionMixin"),d(Be,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(cs,"href","/docs/transformers/v4.25.1/en/model_doc/owlvit#transformers.OwlViTForObjectDetection"),d(Ue,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(ds,"href","/docs/transformers/v4.25.1/en/model_doc/owlvit#transformers.OwlViTForObjectDetection.image_guided_detection"),d(He,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(I,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Ge,"id","transformers.OwlViTProcessor"),d(Ge,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(Ge,"href","#transformers.OwlViTProcessor"),d(he,"class","relative group"),d(ps,"href","/docs/transformers/v4.25.1/en/model_doc/owlvit#transformers.OwlViTImageProcessor"),d(ms,"href","/docs/transformers/v4.25.1/en/model_doc/clip#transformers.CLIPTokenizer"),d(hs,"href","/docs/transformers/v4.25.1/en/model_doc/clip#transformers.CLIPTokenizerFast"),d(fs,"href","/docs/transformers/v4.25.1/en/model_doc/owlvit#transformers.OwlViTProcessor.decode"),d(gs,"href","/docs/transformers/v4.25.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.batch_decode"),d(Xe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(us,"href","/docs/transformers/v4.25.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.decode"),d(Ze,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(_s,"href","/docs/transformers/v4.25.1/en/model_doc/owlvit#transformers.OwlViTImageProcessor.post_process"),d(Ye,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Je,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(E,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Ke,"id","transformers.OwlViTModel"),d(Ke,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(Ke,"href","#transformers.OwlViTModel"),d(fe,"class","relative group"),d(ws,"href","/docs/transformers/v4.25.1/en/model_doc/owlvit#transformers.OwlViTModel"),d(N,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(vs,"href","/docs/transformers/v4.25.1/en/model_doc/owlvit#transformers.OwlViTModel"),d(W,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(bs,"href","/docs/transformers/v4.25.1/en/model_doc/owlvit#transformers.OwlViTModel"),d(S,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(L,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(nt,"id","transformers.OwlViTTextModel"),d(nt,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(nt,"href","#transformers.OwlViTTextModel"),d(we,"class","relative group"),d(Ts,"href","/docs/transformers/v4.25.1/en/model_doc/owlvit#transformers.OwlViTTextModel"),d(R,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(ve,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(lt,"id","transformers.OwlViTVisionModel"),d(lt,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(lt,"href","#transformers.OwlViTVisionModel"),d(Te,"class","relative group"),d(Os,"href","/docs/transformers/v4.25.1/en/model_doc/owlvit#transformers.OwlViTVisionModel"),d(B,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Oe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(pt,"id","transformers.OwlViTForObjectDetection"),d(pt,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(pt,"href","#transformers.OwlViTForObjectDetection"),d(xe,"class","relative group"),d($s,"href","/docs/transformers/v4.25.1/en/model_doc/owlvit#transformers.OwlViTForObjectDetection"),d(U,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(xs,"href","/docs/transformers/v4.25.1/en/model_doc/owlvit#transformers.OwlViTForObjectDetection"),d(H,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(J,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(t,u){e(document.head,c),_(t,v,u),_(t,g,u),e(g,f),e(f,w),O(n,w,null),e(g,p),e(g,z),e(z,Gn),_(t,Mr,u),_(t,te,u),e(te,Pe),e(Pe,As),O(jt,As,null),e(te,Xn),e(te,Ns),e(Ns,Zn),_(t,Dr,u),_(t,ke,u),e(ke,Yn),e(ke,zt),e(zt,Jn),e(ke,Kn),_(t,Fr,u),_(t,Lo,u),e(Lo,Qn),_(t,Lr,u),_(t,Ao,u),e(Ao,Ws),e(Ws,ea),_(t,Ar,u),_(t,oe,u),e(oe,Ie),e(Ie,Ss),O(Pt,Ss,null),e(oe,ta),e(oe,Rs),e(Rs,oa),_(t,Nr,u),_(t,Ee,u),e(Ee,sa),e(Ee,No),e(No,ra),e(Ee,na),_(t,Wr,u),_(t,P,u),e(P,Wo),e(Wo,aa),e(P,ia),e(P,So),e(So,la),e(P,ca),e(P,Ro),e(Ro,da),e(P,pa),e(P,Bo),e(Bo,ma),e(P,ha),e(P,Uo),e(Uo,fa),e(P,ga),e(P,Ho),e(Ho,ua),e(P,_a),e(P,Go),e(Go,wa),e(P,va),_(t,Sr,u),O(kt,t,u),_(t,Rr,u),_(t,K,u),e(K,ba),e(K,It),e(It,Ta),e(K,Oa),e(K,Et),e(Et,$a),e(K,xa),_(t,Br,u),_(t,se,u),e(se,Ce),e(Ce,Bs),O(Ct,Bs,null),e(se,Va),e(se,Us),e(Us,ya),_(t,Ur,u),_(t,M,u),O(qt,M,null),e(M,ja),e(M,Q),e(Q,Xo),e(Xo,za),e(Q,Pa),e(Q,Zo),e(Zo,ka),e(Q,Ia),e(Q,Mt),e(Mt,Ea),e(Q,Ca),e(M,qa),e(M,re),e(re,Ma),e(re,Yo),e(Yo,Da),e(re,Fa),e(re,Jo),e(Jo,La),e(re,Aa),e(M,Na),e(M,qe),O(Dt,qe,null),e(qe,Wa),e(qe,Ft),e(Ft,Sa),e(Ft,Ko),e(Ko,Ra),e(Ft,Ba),_(t,Hr,u),_(t,ne,u),e(ne,Me),e(Me,Hs),O(Lt,Hs,null),e(ne,Ua),e(ne,Gs),e(Gs,Ha),_(t,Gr,u),_(t,D,u),O(At,D,null),e(D,Ga),e(D,ae),e(ae,Xa),e(ae,Qo),e(Qo,Za),e(ae,Ya),e(ae,Nt),e(Nt,Ja),e(ae,Ka),e(D,Qa),e(D,ie),e(ie,ei),e(ie,es),e(es,ti),e(ie,oi),e(ie,ts),e(ts,si),e(ie,ri),e(D,ni),O(De,D,null),_(t,Xr,u),_(t,le,u),e(le,Fe),e(Fe,Xs),O(Wt,Xs,null),e(le,ai),e(le,Zs),e(Zs,ii),_(t,Zr,u),_(t,F,u),O(St,F,null),e(F,li),e(F,ce),e(ce,ci),e(ce,os),e(os,di),e(ce,pi),e(ce,Rt),e(Rt,mi),e(ce,hi),e(F,fi),e(F,de),e(de,gi),e(de,ss),e(ss,ui),e(de,_i),e(de,rs),e(rs,wi),e(de,vi),e(F,bi),O(Le,F,null),_(t,Yr,u),_(t,pe,u),e(pe,Ae),e(Ae,Ys),O(Bt,Ys,null),e(pe,Ti),e(pe,Js),e(Js,Oi),_(t,Jr,u),_(t,k,u),O(Ut,k,null),e(k,$i),e(k,Ks),e(Ks,xi),e(k,Vi),e(k,Ht),e(Ht,yi),e(Ht,ns),e(ns,ji),e(Ht,zi),e(k,Pi),e(k,Ne),O(Gt,Ne,null),e(Ne,ki),e(Ne,Qs),e(Qs,Ii),e(k,Ei),e(k,We),O(Xt,We,null),e(We,Ci),e(We,Zt),e(Zt,qi),e(Zt,as),e(as,Mi),e(Zt,Di),e(k,Fi),e(k,Se),O(Yt,Se,null),e(Se,Li),e(Se,Jt),e(Jt,Ai),e(Jt,is),e(is,Ni),e(Jt,Wi),_(t,Kr,u),_(t,me,u),e(me,Re),e(Re,er),O(Kt,er,null),e(me,Si),e(me,tr),e(tr,Ri),_(t,Qr,u),_(t,I,u),O(Qt,I,null),e(I,Bi),e(I,or),e(or,Ui),e(I,Hi),e(I,eo),e(eo,Gi),e(eo,ls),e(ls,Xi),e(eo,Zi),e(I,Yi),e(I,Be),O(to,Be,null),e(Be,Ji),e(Be,sr),e(sr,Ki),e(I,Qi),e(I,Ue),O(oo,Ue,null),e(Ue,el),e(Ue,so),e(so,tl),e(so,cs),e(cs,ol),e(so,sl),e(I,rl),e(I,He),O(ro,He,null),e(He,nl),e(He,no),e(no,al),e(no,ds),e(ds,il),e(no,ll),_(t,en,u),_(t,he,u),e(he,Ge),e(Ge,rr),O(ao,rr,null),e(he,cl),e(he,nr),e(nr,dl),_(t,tn,u),_(t,E,u),O(io,E,null),e(E,pl),e(E,C),e(C,ml),e(C,ps),e(ps,hl),e(C,fl),e(C,ms),e(ms,gl),e(C,ul),e(C,hs),e(hs,_l),e(C,wl),e(C,ar),e(ar,vl),e(C,bl),e(C,fs),e(fs,Tl),e(C,Ol),e(E,$l),e(E,Xe),O(lo,Xe,null),e(Xe,xl),e(Xe,co),e(co,Vl),e(co,gs),e(gs,yl),e(co,jl),e(E,zl),e(E,Ze),O(po,Ze,null),e(Ze,Pl),e(Ze,mo),e(mo,kl),e(mo,us),e(us,Il),e(mo,El),e(E,Cl),e(E,Ye),O(ho,Ye,null),e(Ye,ql),e(Ye,fo),e(fo,Ml),e(fo,_s),e(_s,Dl),e(fo,Fl),e(E,Ll),e(E,Je),O(go,Je,null),e(Je,Al),e(Je,uo),e(uo,Nl),e(uo,ir),e(ir,Wl),e(uo,Sl),_(t,on,u),_(t,fe,u),e(fe,Ke),e(Ke,lr),O(_o,lr,null),e(fe,Rl),e(fe,cr),e(cr,Bl),_(t,sn,u),_(t,L,u),O(wo,L,null),e(L,Ul),e(L,N),O(vo,N,null),e(N,Hl),e(N,ge),e(ge,Gl),e(ge,ws),e(ws,Xl),e(ge,Zl),e(ge,dr),e(dr,Yl),e(ge,Jl),e(N,Kl),O(Qe,N,null),e(N,Ql),O(et,N,null),e(L,ec),e(L,W),O(bo,W,null),e(W,tc),e(W,ue),e(ue,oc),e(ue,vs),e(vs,sc),e(ue,rc),e(ue,pr),e(pr,nc),e(ue,ac),e(W,ic),O(tt,W,null),e(W,lc),O(ot,W,null),e(L,cc),e(L,S),O(To,S,null),e(S,dc),e(S,_e),e(_e,pc),e(_e,bs),e(bs,mc),e(_e,hc),e(_e,mr),e(mr,fc),e(_e,gc),e(S,uc),O(st,S,null),e(S,_c),O(rt,S,null),_(t,rn,u),_(t,we,u),e(we,nt),e(nt,hr),O(Oo,hr,null),e(we,wc),e(we,fr),e(fr,vc),_(t,nn,u),_(t,ve,u),O($o,ve,null),e(ve,bc),e(ve,R),O(xo,R,null),e(R,Tc),e(R,be),e(be,Oc),e(be,Ts),e(Ts,$c),e(be,xc),e(be,gr),e(gr,Vc),e(be,yc),e(R,jc),O(at,R,null),e(R,zc),O(it,R,null),_(t,an,u),_(t,Te,u),e(Te,lt),e(lt,ur),O(Vo,ur,null),e(Te,Pc),e(Te,_r),e(_r,kc),_(t,ln,u),_(t,Oe,u),O(yo,Oe,null),e(Oe,Ic),e(Oe,B),O(jo,B,null),e(B,Ec),e(B,$e),e($e,Cc),e($e,Os),e(Os,qc),e($e,Mc),e($e,wr),e(wr,Dc),e($e,Fc),e(B,Lc),O(ct,B,null),e(B,Ac),O(dt,B,null),_(t,cn,u),_(t,xe,u),e(xe,pt),e(pt,vr),O(zo,vr,null),e(xe,Nc),e(xe,br),e(br,Wc),_(t,dn,u),_(t,J,u),O(Po,J,null),e(J,Sc),e(J,U),O(ko,U,null),e(U,Rc),e(U,Ve),e(Ve,Bc),e(Ve,$s),e($s,Uc),e(Ve,Hc),e(Ve,Tr),e(Tr,Gc),e(Ve,Xc),e(U,Zc),O(mt,U,null),e(U,Yc),O(ht,U,null),e(J,Jc),e(J,H),O(Io,H,null),e(H,Kc),e(H,ye),e(ye,Qc),e(ye,xs),e(xs,ed),e(ye,td),e(ye,Or),e(Or,od),e(ye,sd),e(H,rd),O(ft,H,null),e(H,nd),O(gt,H,null),pn=!0},p(t,[u]){const Eo={};u&2&&(Eo.$$scope={dirty:u,ctx:t}),De.$set(Eo);const $r={};u&2&&($r.$$scope={dirty:u,ctx:t}),Le.$set($r);const xr={};u&2&&(xr.$$scope={dirty:u,ctx:t}),Qe.$set(xr);const Vr={};u&2&&(Vr.$$scope={dirty:u,ctx:t}),et.$set(Vr);const Co={};u&2&&(Co.$$scope={dirty:u,ctx:t}),tt.$set(Co);const yr={};u&2&&(yr.$$scope={dirty:u,ctx:t}),ot.$set(yr);const jr={};u&2&&(jr.$$scope={dirty:u,ctx:t}),st.$set(jr);const zr={};u&2&&(zr.$$scope={dirty:u,ctx:t}),rt.$set(zr);const qo={};u&2&&(qo.$$scope={dirty:u,ctx:t}),at.$set(qo);const Pr={};u&2&&(Pr.$$scope={dirty:u,ctx:t}),it.$set(Pr);const kr={};u&2&&(kr.$$scope={dirty:u,ctx:t}),ct.$set(kr);const Ir={};u&2&&(Ir.$$scope={dirty:u,ctx:t}),dt.$set(Ir);const Er={};u&2&&(Er.$$scope={dirty:u,ctx:t}),mt.$set(Er);const Mo={};u&2&&(Mo.$$scope={dirty:u,ctx:t}),ht.$set(Mo);const Cr={};u&2&&(Cr.$$scope={dirty:u,ctx:t}),ft.$set(Cr);const qr={};u&2&&(qr.$$scope={dirty:u,ctx:t}),gt.$set(qr)},i(t){pn||($(n.$$.fragment,t),$(jt.$$.fragment,t),$(Pt.$$.fragment,t),$(kt.$$.fragment,t),$(Ct.$$.fragment,t),$(qt.$$.fragment,t),$(Dt.$$.fragment,t),$(Lt.$$.fragment,t),$(At.$$.fragment,t),$(De.$$.fragment,t),$(Wt.$$.fragment,t),$(St.$$.fragment,t),$(Le.$$.fragment,t),$(Bt.$$.fragment,t),$(Ut.$$.fragment,t),$(Gt.$$.fragment,t),$(Xt.$$.fragment,t),$(Yt.$$.fragment,t),$(Kt.$$.fragment,t),$(Qt.$$.fragment,t),$(to.$$.fragment,t),$(oo.$$.fragment,t),$(ro.$$.fragment,t),$(ao.$$.fragment,t),$(io.$$.fragment,t),$(lo.$$.fragment,t),$(po.$$.fragment,t),$(ho.$$.fragment,t),$(go.$$.fragment,t),$(_o.$$.fragment,t),$(wo.$$.fragment,t),$(vo.$$.fragment,t),$(Qe.$$.fragment,t),$(et.$$.fragment,t),$(bo.$$.fragment,t),$(tt.$$.fragment,t),$(ot.$$.fragment,t),$(To.$$.fragment,t),$(st.$$.fragment,t),$(rt.$$.fragment,t),$(Oo.$$.fragment,t),$($o.$$.fragment,t),$(xo.$$.fragment,t),$(at.$$.fragment,t),$(it.$$.fragment,t),$(Vo.$$.fragment,t),$(yo.$$.fragment,t),$(jo.$$.fragment,t),$(ct.$$.fragment,t),$(dt.$$.fragment,t),$(zo.$$.fragment,t),$(Po.$$.fragment,t),$(ko.$$.fragment,t),$(mt.$$.fragment,t),$(ht.$$.fragment,t),$(Io.$$.fragment,t),$(ft.$$.fragment,t),$(gt.$$.fragment,t),pn=!0)},o(t){x(n.$$.fragment,t),x(jt.$$.fragment,t),x(Pt.$$.fragment,t),x(kt.$$.fragment,t),x(Ct.$$.fragment,t),x(qt.$$.fragment,t),x(Dt.$$.fragment,t),x(Lt.$$.fragment,t),x(At.$$.fragment,t),x(De.$$.fragment,t),x(Wt.$$.fragment,t),x(St.$$.fragment,t),x(Le.$$.fragment,t),x(Bt.$$.fragment,t),x(Ut.$$.fragment,t),x(Gt.$$.fragment,t),x(Xt.$$.fragment,t),x(Yt.$$.fragment,t),x(Kt.$$.fragment,t),x(Qt.$$.fragment,t),x(to.$$.fragment,t),x(oo.$$.fragment,t),x(ro.$$.fragment,t),x(ao.$$.fragment,t),x(io.$$.fragment,t),x(lo.$$.fragment,t),x(po.$$.fragment,t),x(ho.$$.fragment,t),x(go.$$.fragment,t),x(_o.$$.fragment,t),x(wo.$$.fragment,t),x(vo.$$.fragment,t),x(Qe.$$.fragment,t),x(et.$$.fragment,t),x(bo.$$.fragment,t),x(tt.$$.fragment,t),x(ot.$$.fragment,t),x(To.$$.fragment,t),x(st.$$.fragment,t),x(rt.$$.fragment,t),x(Oo.$$.fragment,t),x($o.$$.fragment,t),x(xo.$$.fragment,t),x(at.$$.fragment,t),x(it.$$.fragment,t),x(Vo.$$.fragment,t),x(yo.$$.fragment,t),x(jo.$$.fragment,t),x(ct.$$.fragment,t),x(dt.$$.fragment,t),x(zo.$$.fragment,t),x(Po.$$.fragment,t),x(ko.$$.fragment,t),x(mt.$$.fragment,t),x(ht.$$.fragment,t),x(Io.$$.fragment,t),x(ft.$$.fragment,t),x(gt.$$.fragment,t),pn=!1},d(t){o(c),t&&o(v),t&&o(g),V(n),t&&o(Mr),t&&o(te),V(jt),t&&o(Dr),t&&o(ke),t&&o(Fr),t&&o(Lo),t&&o(Lr),t&&o(Ao),t&&o(Ar),t&&o(oe),V(Pt),t&&o(Nr),t&&o(Ee),t&&o(Wr),t&&o(P),t&&o(Sr),V(kt,t),t&&o(Rr),t&&o(K),t&&o(Br),t&&o(se),V(Ct),t&&o(Ur),t&&o(M),V(qt),V(Dt),t&&o(Hr),t&&o(ne),V(Lt),t&&o(Gr),t&&o(D),V(At),V(De),t&&o(Xr),t&&o(le),V(Wt),t&&o(Zr),t&&o(F),V(St),V(Le),t&&o(Yr),t&&o(pe),V(Bt),t&&o(Jr),t&&o(k),V(Ut),V(Gt),V(Xt),V(Yt),t&&o(Kr),t&&o(me),V(Kt),t&&o(Qr),t&&o(I),V(Qt),V(to),V(oo),V(ro),t&&o(en),t&&o(he),V(ao),t&&o(tn),t&&o(E),V(io),V(lo),V(po),V(ho),V(go),t&&o(on),t&&o(fe),V(_o),t&&o(sn),t&&o(L),V(wo),V(vo),V(Qe),V(et),V(bo),V(tt),V(ot),V(To),V(st),V(rt),t&&o(rn),t&&o(we),V(Oo),t&&o(nn),t&&o(ve),V($o),V(xo),V(at),V(it),t&&o(an),t&&o(Te),V(Vo),t&&o(ln),t&&o(Oe),V(yo),V(jo),V(ct),V(dt),t&&o(cn),t&&o(xe),V(zo),t&&o(dn),t&&o(J),V(Po),V(ko),V(mt),V(ht),V(Io),V(ft),V(gt)}}}const lm={local:"owlvit",sections:[{local:"overview",title:"Overview"},{local:"usage",title:"Usage"},{local:"transformers.OwlViTConfig",title:"OwlViTConfig"},{local:"transformers.OwlViTTextConfig",title:"OwlViTTextConfig"},{local:"transformers.OwlViTVisionConfig",title:"OwlViTVisionConfig"},{local:"transformers.OwlViTImageProcessor",title:"OwlViTImageProcessor"},{local:"transformers.OwlViTImageProcessor",title:"OwlViTFeatureExtractor"},{local:"transformers.OwlViTProcessor",title:"OwlViTProcessor"},{local:"transformers.OwlViTModel",title:"OwlViTModel"},{local:"transformers.OwlViTTextModel",title:"OwlViTTextModel"},{local:"transformers.OwlViTVisionModel",title:"OwlViTVisionModel"},{local:"transformers.OwlViTForObjectDetection",title:"OwlViTForObjectDetection"}],title:"OWL-ViT"};function cm(y){return Bp(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class um extends Np{constructor(c){super();Wp(this,c,cm,im,Sp,{})}}export{um as default,lm as metadata};
