adirik / owlvit-base-patch32

Zero-shot / open vocabulary object detection (Updated 1 year, 8 months ago)

  • Public
  • 24.2K runs
  • T4
  • GitHub
  • Paper
  • License

Input

image
file

Input image to query

string
Shift + Return to add a new line

Comma seperated names of the objects to be detected in the image

number
(minimum: 0, maximum: 1)

Confidence level for object detection

Default: 0.1

boolean

Draw and visualize bounding boxes on the image

Default: true

Output

json_data

{ "objects": [ { "bbox": [ 180, 71, 271, 178 ], "label": "human face", "confidence": 0.35713595151901245 }, { "bbox": [ 1, 1, 105, 509 ], "label": "star-spangled banner", "confidence": 0.13790424168109894 }, { "bbox": [ 350, -1, 468, 288 ], "label": "rocket", "confidence": 0.2110234647989273 }, { "bbox": [ 129, 348, 206, 427 ], "label": "nasa badge", "confidence": 0.28099769353866577 }, { "bbox": [ 277, 338, 327, 380 ], "label": "nasa badge", "confidence": 0.1195005401968956 } ] }

result_image

result_image
Generated in

Run time and cost

This model costs approximately $0.00022 to run on Replicate, or 4545 runs per $1, but this varies depending on your inputs. It is also open source and you can run it on your own computer with Docker.

This model runs on Nvidia T4 GPU hardware. Predictions typically complete within 1 seconds.

Readme

OWL-ViT

OWL-ViT uses CLIP and vision transformers backbones to enable open-vocabulary object detection. See the paper, original repository and Hugging Face implementation for details.

Using the API

You can use OWL-ViT to query images with text descriptions of any object. To use it, simply upload an image and enter comma separated text descriptions of objects you want to query the image for. You can also use the score threshold slider to set a threshold to filter out low probability predictions.

OWL-ViT is trained on text templates, hence you can get better predictions by querying the image with text templates used in training the original model: “photo of a star-spangled banner”, “image of a shoe”. Refer to the CLIP paper to see the full list of text templates used to augment the training data.

References

@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},
}