pip install -q transformers
Zero-shot object detection pipeline
The simplest way to try out inference with OWL-ViT is to use it in a [pipeline]. Instantiate a pipeline
for zero-shot object detection from a checkpoint on the Hugging Face Hub:
thon

from transformers import pipeline
checkpoint = "google/owlv2-base-patch16-ensemble"
detector = pipeline(model=checkpoint, task="zero-shot-object-detection")