← Examples

Find anything in a photo

Zero-shot object detection: boxes for whatever you type, no training.

OWL-ViT B/32

The code

const detector = await pipeline("zero-shot-object-detection", "google/owlvit-base-patch32");
await detector(image, ["a cat", "a remote control"], { threshold: 0.15 });

Full source: site/src/examples/detect.ts