Skip to content
ModelsThatRun

OWLv2

Google's open-vocabulary detector: boxes for whatever text queries name. Base and large ensemble checkpoints, Apache-2.0, through transformers.

Size

Commercial use OK for size base: code Apache-2.0, weights Apache-2.0. Measured on our RTX 4090: 110 ms median, 1.3 GiB VRAM peak. We scored it 46.0 box AP on COCO val2017. safetensors weights, 591 MB.

License

Commercial use OK

Code
Apache-2.0checked 21 Nov 2026
Weights
Apache-2.0all sizes, checked 21 Nov 2026

On our RTX 4090, measured

110ms median

p90 114 ms, fp32, batch 1, 960x960

VRAM peak
1.3 GiB
Status
Runs as is
Environment, 22 Nov 2026

NVIDIA GeForce RTX 4090, driver 580.173.02, CUDA 13.0, torch 2.14.1+cu130, Python 3.12.9, transformers==5.20.2. Baseline 1032 MiB. 10 warm-up + 100 timed. Scope: predict(): pre-processing, forward pass and post-processing; input file decoded beforehand.

Accuracy

46.0box APmeasured

COCO val2017, box AP, 5,000 images, fp32, pycocotools==2.0.11 · 21 Nov 2026

Weights

safetensors

Size
591 MB
sha256
e1e130b9e404cf91a75ad45644c1da9d7fa5284085eecc864266a6923efb99e7
Download base weights

Same photos and one score threshold for every model of this task. Failures are marked.

Use it when

You need boxes for objects named in free text, under Apache-2.0: base scored 46.0 box AP on COCO given the 80 class names, the same as large in about a third of the time.

Avoid it when

You show boxes at a fixed 0.5 score, as our gallery does: its scores sit low, so it drew few boxes there and missed people, cars or cups in 32 of our 40 outputs. Its model card's example uses 0.1.

Sizes

SizeLatencyVRAMAccuracyWeightsRunsLicense
base110 ms960x9601.3 GiB46.0 box AP, measured591 MBAs isCommercial OK
large302 ms1008x10082.7 GiB46.0 box AP, measured1.63 GBAs isCommercial OK

Estimated on other GPUs

Estimate, not measured. Worked out from our RTX 4090 run and NVIDIA's spec sheets. Each kind of GPU work is scaled by that GPU's peak for it: tensor cores at the precision the kernels used, CUDA cores, or memory bandwidth. The CPU's part of each call is kept at what it took on our Intel Core i7-10700K. How we estimate

Where a call's time goes on our RTX 4090: CPU and kernel launches 51%, CUDA cores, FP32 43%, memory-bound 4%, host–device copies 1%.

GeForce (13)
GPUFitsLatency
GeForce RTX 5090Blackwell, 32 GB GDDR7Yes≈ 98–99 ms
GeForce RTX 5080Blackwell, 16 GB GDDR7Yes≈ 130 ms
GeForce RTX 5070 TiBlackwell, 16 GB GDDR7Yes≈ 150 ms
GeForce RTX 5070Blackwell, 12 GB GDDR7Yes≈ 190 ms
GeForce RTX 5060 Ti 16GBBlackwell, 16 GB GDDR7Yes≈ 230 ms
GeForce RTX 5060Blackwell, 8 GB GDDR7Yes≈ 270 ms
GeForce RTX 4080Ada Lovelace, 16 GB GDDR6XYes≈ 140–150 ms
GeForce RTX 4070 TiAda Lovelace, 12 GB GDDR6XYes≈ 160–170 ms
GeForce RTX 4070Ada Lovelace, 12 GB GDDR6XYes≈ 200 ms
GeForce RTX 3090Ampere, 24 GB GDDR6XYes≈ 170 ms
GeForce RTX 3080Ampere, 10 GB GDDR6XYes≈ 190–200 ms
GeForce RTX 3070 TiAmpere, 8 GB GDDR6XYes≈ 240–250 ms
GeForce RTX 3070Ampere, 8 GB GDDR6Yes≈ 260 ms
Workstation (4)
GPUFitsLatency
RTX PRO 6000 Blackwell Workstation EditionBlackwell, 96 GB GDDR7Yes≈ 92–93 ms
RTX PRO 6000 Blackwell Max-Q Workstation EditionBlackwell, 96 GB GDDR7Yes≈ 96–97 ms
RTX 6000 Ada GenerationAda Lovelace, 48 GB GDDR6Yes≈ 110 ms
RTX A6000Ampere, 48 GB GDDR6Yes≈ 160–170 ms
Data center (6)
GPUFitsLatency
B200 (HGX, one GPU)Blackwell, 180 GB HBM3EYes≈ 110 ms
H200 SXMHopper, 141 GB HBM3eYes≈ 120 ms
H100 SXMHopper, 80 GB HBM3Yes≈ 120 ms
A100 SXM 80GBAmpere, 80 GB HBM2eYes≈ 260 ms
L40SAda Lovelace, 48 GB GDDR6Yes≈ 110 ms
L4Ada Lovelace, 24 GB GDDR6Yes≈ 200 ms

CPU only

Measured by us with no GPU on an Intel(R) Core(TM) i7-10700K CPU @ 3.80GHz, 8 cores, 94.2 GiB of memory: the same official code with the GPU hidden, in fp32 on 8 threads. Before it was timed, its output on the timing input was checked against the GPU's. These numbers say what to expect without a GPU. They aren't compared with any GPU's, here or in the charts. How we measure on a CPU

SizeRuntimeLatency on the CPURAM peak
basePyTorch2.14.1 · fp32 · 8 threads2719 ms960x9601.6 GiB
largePyTorch2.14.1 · fp32 · 8 threads13612 ms1008x10083.0 GiB

From the authors

In their words, with their numbers. Ours are in the cards at the top of this page.

Paper

Scaling Open-Vocabulary Object Detection

Matthias Minderer, Alexey Gritsenko, Neil Houlsby

arXiv 2306.09683, 16 Jun 2023

Abstract

Open-vocabulary object detection has benefited greatly from pretrained vision-language models, but is still limited by the amount of available detection training data. While detection training data can be expanded by using Web image-text pairs as weak supervision, this has not been done at scales comparable to image-level pretraining. Here, we scale up detection data with self-training, which uses an existing detector to generate pseudo-box annotations on image-text pairs. Major challenges in scaling self-training are the choice of label space, pseudo-annotation filtering, and training efficiency. We present the OWLv2 model and OWL-ST self-training recipe, which address these challenges. OWLv2 surpasses the performance of previous state-of-the-art open-vocabulary detectors already at comparable training scales (~10M examples). However, with OWL-ST, we can scale to over 1B examples, yielding further large improvement: With an L/14 architecture, OWL-ST improves AP on LVIS rare classes, for which the model has seen no human box annotations, from 31.2% to 44.6% (43% relative improvement). OWL-ST unlocks Web-scale training for open-world localization, similar to what has been seen for image classification and language modelling.

README

Copied from the authors' repository at commit 77d1942 on 23 Nov 2026. Numbers and license claims in it are theirs, not measured or checked by us. We removed badges, replaced images with links and adjusted headings.

Figure OWL-ViT text inference demo Figure OWL-ViT model schematic

OWL-ViT is an open-vocabulary object detector. Given an image and a free-text query, it finds objects matching that query in the image. It can also do one-shot object detection, i.e. detect objects based on a single example image. OWL-ViT reaches state-of-the-art performance on both tasks, e.g. 44.6% zero-shot LVIS APr with a OWLv2 ViT-L/14 backbone.

[OWL-ViT v1 Paper] [OWL-ViT v2 Paper] [Minimal Colab] [Playground Colab]

Update (2024-02-13): Added support for changing image size at inference. Also added information about speed benchmarking to the README and the Minimal Colab.
Update (2023-09-25): Added image-conditioned detection example to the Minimal Colab
Update (2023-09-22): Added code and checkpoints for OWL-ViT v2.
Update (2023-03-21): Added a new checkpoint with a segmentation mask head. See the Minimal Colab for a usage example.
Update (2022-10-14): Added training and evaluation code.
Update (2022-07-06): Extended TensorFlow-conversion Colab with examples for conversion to TFLite.
Update (2022-06-22): Added Playground Colab for interactive exploration of the model, including image-conditioned detection.
Update (2022-05-31): Added Colab showing how to export models to TensorFlow.

Contents

Below, we provide pretrained checkpoints, example Colabs, training code and evaluation code.

To get started, check out the Minimal Colab, which shows all steps necessary for running inference, including installing Scenic, instantiating a model, loading a checkpoint, preprocessing input images, getting predictions, and visualizing them.

Table of contents:

Model versions

OWL-ViT v1

The original OWL-ViT model was introduced in May 2022 and is described in Simple Open-Vocabulary Object Detection with Vision Transformers.

OWL-ViT v2

In June 2023, we introduced an improved architecture and training recipe that uses self-training on Web image-text data as described in Scaling Open-Vocabulary Object Detection. OWL-ViT v2 checkpoints are drop-in replacements for v1. The core inference architecture of v2 is identical to v1, except that v2 adds an objectness prediction head which predicts the (query-agnostic) likelihood that a predicted box contains an object (as opposed to background). The objectness score can be used to rank or filter predictions independently of text queries.

OWL-ViT v2 performs significantly better than OWL-ViT v1:

Figure OWLv2 comparison plot

Pretrained checkpoints

OWL-ViT models and their pre-trained checkpoints are specified in configuration files. Checkpoint files are compatible with Flax. We provide the following variants, both as JAX/Flax checkpoints and as tf.SavedModels:

ModelLVIS APLVIS APrConfigSizeJAX Checkpointtf.SavedModel
OWLv1 CLIP ViT-B/3219.316.9clip_b32583 MiBdownloaddownolad
OWLv1 CLIP ViT-B/1620.817.1clip_b16581 MiBdownloaddownolad
OWLv1 CLIP ViT-L/1434.631.2clip_l141652 MiBdownloaddownolad
OWLv1 CLIP ViT-L/14 (+masks)34.631.2clip_l14_with_masks1844 MiBdownload
OWLv2 CLIP B/16 ST26.529.5owl_v2_clip_b16590 MiBdownloaddownload
OWLv2 CLIP B/16 ST+FT41.436.2owl_v2_clip_b16590 MiBdownloaddownload
OWLv2 CLIP B/16 ST/FT ens43.940.5owl_v2_clip_b16590 MiBdownloaddownload
OWLv2 CLIP L/14 ST32.834.6owl_v2_clip_l141666 MiBdownloaddownload
OWLv2 CLIP L/14 ST+FT48.844.0owl_v2_clip_l141666 MiBdownloaddownload
OWLv2 CLIP L/14 ST/FT ens44.642.6owl_v2_clip_l141666 MiBdownloaddownload

The LVIS metrics were obtained with the evaluator script and may differ slightly from the paper values.

Colabs

Minimal example

The Minimal Colab shows all steps necessary for running inference, including installing Scenic, instantiating a model, loading a checkpoint, preprocessing input images, getting predictions, and visualizing them.

Inference Playground

The Playground Colab allows interactive exploration of the model. It supports both text-conditioned (open-vocabulary) and image-conditioned (one-shot) prediction:

Figure OWL-ViT text inference demo Figure OWL-ViT image inference demo
Conversion to TensorFlow

OWL-ViT models can be converted to TensorFlow using the tf.saved_model API. The Export Colab shows how to do this. For the public checkpoints, we provide tf.SavedModels above (see Pretrained checkpoints).

Installation

The code has been tested on Debian 4.19 and Python 3.7. For information on how to install JAX with GPU support, see here.

git clone https://github.com/google-research/scenic.git
cd ~/scenic
python -m pip install -vq .
python -m pip install -r scenic/projects/owl_vit/requirements.txt

# For GPU support:
pip install --upgrade "jax[cuda]" -f https://storage.googleapis.com/jax-releases/jax_cuda_releases.html

Training

Detection training

To train an OWL-ViT model with a CLIP-initialized backbone on detection, use:

python -m scenic.projects.owl_vit.main \
  --alsologtostderr=true \
  --workdir=/tmp/training \
  --config=scenic/projects/owl_vit/configs/clip_b32.py

Local TFDS data dirs can be specified like this:

python -m scenic.projects.owl_vit.main \
  --alsologtostderr=true \
  --workdir=/tmp/training \
  --config=scenic/projects/owl_vit/configs/clip_b32.py \
  --config.dataset_configs.train.decoder_kwarg_list='({"tfds_data_dir": "//your/data/dir"},)' \
  --config.dataset_configs.eval.decoder_kwarg_list='({"tfds_data_dir": "//your/data/dir"},)'
Fine-tuning

To fine-tune a previously trained OWL-ViT model on your dataset of interest, use:

python -m scenic.projects.owl_vit.main \
  --alsologtostderr=true \
  --workdir=/tmp/training \
  --config=scenic/projects/owl_vit/configs/clip_b32_finetune.py

NOTE: This config is just a starting point. Hyperparameters (especially learning rate and number of training steps, but also preprocessing, mosaics, and others) need to be tuned for each target dataset.

Adjust config.dataset_configs.train.tfds_names and related settings to your dataset of interest. You may have to write decoding ops similar to DecodeLvis for your dataset. DecodeCocoExample may be a good starting point. Make sure to handle negative examples correctly, e.g. by adding all classes that have no boxes in an image to the MODALITIES.negative_text_labels key of the feature dict for that image. (for non-federated datasets such as COCO).

Evaluation

Since LVIS evaluation is slow, it is not included in the training loop. Model checkpoints can be evaluated as needed using a separate command.

For example, to evaluate the public B/32 checkpoint on LVIS, run:

python -m scenic.projects.owl_vit.evaluator \
  --alsologtostderr=true \
  --platform=gpu \
  --config=scenic/projects/owl_vit/configs/clip_b32.py \
  --checkpoint_path=gs://scenic-bucket/owl_vit/checkpoints/clip_vit_b32_b0203fc \
  --annotations_path=${HOME}/annotations/lvis_v1_val.json \
  --tfds_data_dir=//your/data/dir \
  --output_dir=/tmp/evaluator

Inference speed

OWL-ViT is highly efficient and can be used for real-time detection (depending on image resolution and accelerator hardware).

Inference speed is dominated by the image and text encoders. The detection heads only add a small overhead. If text embeddings can be pre-computed, inference speed is therefore nearly equivalent to standard Vision Transformers.

To trade off accuracy and speed, the image size can be changed at inference time to match your latency requirements. The only resolution-specific parameters in the model are the position embeddings. To support variable inference resolution, we simply truncate the position embedding grid at the bottom/right (only resolutions equal to or less than the training resolution are supported). Detection accuracy is robust to image size because OWL-ViT v2 is trained with heavy size augmentation.

The plot below shows inference speed vs. accuracy for OWLv2 CLIP models fine-tuned on Objects365 and Visual Genome. For comparability to the literature, these checkpoints were not fine-tuned on LVIS. Also, these checkpoints were trained without random prompting and evaluated without prompt ensembling (the models are queried only with the class name, without 'a photo of a {}'). Model checkpoints used for this plot: OWLv2-ST+FT(O365+VG) CLIP B/16 and OWLv2-ST+FT(O365+VG) CLIP L/14. Speed benchmarking code is provided in the Minimal Colab. For these tests, text embeddings are pre-computed.

Figure OWLv2 inference speed

License

Both the code and the model checkpoints are licensed under the Apache 2.0 license.

References

If you use OWL-ViT, please cite the papers as appropriate:

OWL-ViT v1
@article{minderer2022simple,
  title={Simple Open-Vocabulary Object Detection with Vision Transformers},
  author={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, Neil Houlsby},
  journal={ECCV},
  year={2022},
}
OWL-ViT v2
@article{minderer2023scaling,
  title={Scaling Open-Vocabulary Object Detection},
  author={Matthias Minderer, Alexey Gritsenko, Neil Houlsby},
  journal={NeurIPS},
  year={2023},
}

Alternatives

Changes

First published . Every model's changes

    • Added, with sizes base and large

Badge for a README

It says the model ran on our RTX 4090 and links to this page. It carries no number, so it never goes out of date.

ModelsThatRun: ran on RTX 4090
[![ModelsThatRun: ran on RTX 4090](https://modelsthatrun.dev/models/owlv2/badge.svg)](https://modelsthatrun.dev/models/owlv2/)

Something wrong on this page, such as a license or a number? Email us.

⇆
InputOutput