• Stars
    star
    335
  • Rank 125,904 (Top 3 %)
  • Language
    Jupyter Notebook
  • License
    MIT License
  • Created almost 3 years ago
  • Updated about 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Crop using CLIP

Crop-CLIP

You can sponsor me to support my open source work ๐Ÿ’– sponsor

Search subjects/objects in an image using simple text description and get cropped results.

Image:

Video:

Highlights

Video Results:(Baby Driver Bank Robbery scene)

- Search the scene and zoom-in to the subject.

Search Query on YouTube Video.

"Man in suit"

baby

"Cute boy"

baby

"Search Query - Crop!"

"Whats the time"

Time

"Hoodie guy"

Hoodie

"Mini Cooper"

minicooper

"Whiskey Bottle"

Whiskey

How?

  • This is done by combining Object detection yolov5 and OpenAI's CLIP model.
  • Detects and crops objects (yolov5s)
  • Encode cropped images using CLIP
  • Encode search query using CLIP
  • Find the best match

Why?

  • #vacation โ˜บ๏ธ

Can also be used to create datasets with some changes in code. In the below example images of Jack daniels bottle has been croped and saved.

Search Query on batch - "Jack Daniels"

dataset

Simple App

๐Ÿ‘‰ Hugging Face Spaces ๐Ÿ‘ˆ

app

Limitations

  • Depends heavily on object detection(yolov5).
  • YOLOv5 ๐Ÿš€ is a family of object detection architectures and models pretrained on the COCO dataset, So detection depends on COCO classes.

Acknowledgements