!--Copyright 2023 The HuggingFace Team. All rights reserved.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
specific language governing permissions and limitations under the License.

⚠️ Note that this file is in Markdown but contain specific syntax for our doc-builder (similar to MDX) that may not be
rendered properly in your Markdown viewer.

-->

# Zero-shot object detection

[[open-in-colab]]

Traditionally, models used for [object detection](object_detection) require labeled image datasets for training,
and are limited to detecting the set of classes from the training data.

Zero-shot object detection is supported by the [OWL-ViT](../model_doc/owlvit) model which uses a different approach. OWL-ViT
is an open-vocabulary object detector. It means that it can detect objects in images based on free-text queries without
the need to fine-tune the model on labeled datasets.

OWL-ViT leverages multi-modal representations to perform open-vocabulary detection. It combines [CLIP](../model_doc/clip) with
lightweight object classification and localization heads. Open-vocabulary detection is achieved by embedding free-text queries with the text encoder of CLIP and using them as input to the object classification and localization heads.
associate images and their corresponding textual descriptions, and ViT processes image patches as inputs. The authors
of OWL-ViT first trained CLIP from scratch and then fine-tuned OWL-ViT end to end on standard object detection datasets using
a bipartite matching loss.
The context provides a clear and specific answer to the question. It explicitly states that the OWL-ViT model supports zero-shot object detection. The explanation includes details about how OWL-ViT functions as an open-vocabulary object detector, which further clarifies its capability in zero-shot detection. Therefore, the context unambiguously answers the question.


The question about which model supports zero-shot object detection is quite useful for machine learning developers, especially those working with the Hugging Face ecosystem. Zero-shot object detection is a challenging task in NLP and computer vision, and knowing which models can handle this task can significantly aid developers in selecting the right tools for their applications. This question encourages exploration of advanced models and techniques, which is valuable for developers looking to implement cutting-edge solutions.


The question "What model supports zero-shot object detection?" is context-independent because it is clear and specific. It asks about models that have the capability of zero-shot object detection, which is a well-defined concept in machine learning. An operator with access to relevant documentation or knowledge in the field can understand and answer this question without needing additional context.

