# Use OpenAI's CLIP for image search

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fuse-openais-clip-for-image-search%2F11577%3E%5C
**Category:** 🤗 Course Projects\
**Created:** [November 10, 2021, 4:51pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fuse-openais-clip-for-image-search%2F11577 "2021-11-10T16:51:02Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![lewtun](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/lewtun/32/30995_2.png) [@lewtun](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Flewtun)%5C
**Post date:** [November 10, 2021, 4:51pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fuse-openais-clip-for-image-search%2F11577%2F1 "2021-11-10T16:51:02Z")

</div>

> 👋 Please read the topic category [description](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fabout-the-course-projects-category%2F11510) to understand what this is all about

### Description

One of the most exciting developments in 2021 was the release of OpenAI’s CLIP model, which was trained on a variety of (text, image) pairs. One of the cool things you can do with this model is use it for text-to-image and image-to-image search (similar to what is possible when you search for images on your phone).

The goal of this project is to experiment with CLIP and learn about multimodal models. Several ideas can be explored, including:

- Create a **text-to-image search engine** that allows users to search for images based on natural language queries. Although CLIP was only trained for English text, you can use techniques like [Multilingual Knowledge Distillation](https://arxiv.org/abs/2004.09813) to extend the embeddings to new languages
- Create an **image-to-image search engine** that returns similar images, given a “query” image.

### Model(s)

The [CLIP models](https://huggingface.co/openai) can be found on the Hub

### Datasets

A common dataset that’s used for image demos is the Unsplash Dataset. You can get access to it [here](https://unsplash.com/data)

### Challenges

This project goes beyond that concepts introduced in Part II of the 🤗 Course, so some familiarity with computer vision would be useful. Having said that, the 🤗 Transformers API is similar for image tasks, so if you know how the `pipeline()` function works, then you’ll have no trouble adapting to this new domain.

### Desired project outcomes

- Create a Streamlit or Gradio app on [🤗 Spaces](https://huggingface.co/spaces) that allows a user to find images that resemble a natural language query or input image.
- Don’t forget to push all your models and datasets to the Hub so others can build on them!

### Additional resources

- [https://www.sbert.net/examples/applications/image-search/README.html](https://www.sbert.net/examples/applications/image-search/README.html)

### Discord channel

To chat and organise with other people interested in this project, head over to our [Discord](http://xwo7x.mjt.lu/lnk/CAAAAkdkZwAAAAAAAAAAALG-MTEAAYCr4H8AAAAAAAyFyQBhjpnimM4rcE5DT5ibCUtRT96tWwAMh8Y/15/U6BYNMNDksyyGG4jgtzPKQ/aHR0cHM6Ly9odWdnaW5nZmFjZS5jby9qb2luL2Rpc2NvcmQ) and:

- Follow the instructions on the `#join-course` channel=
- Join the `#image-search` channel (currently full!)
- Join the `#image-search-group2` channel

Just make sure you comment here to indicate that you’ll be contributing to this project 🙂

---

<div class="post-metadata">

**Author:** ![DrishtiSharma](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@DrishtiSharma](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FDrishtiSharma)%5C
**Post date:** [November 15, 2021, 3:07pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fuse-openais-clip-for-image-search%2F11577%2F2 "2021-11-15T15:07:46Z")

</div>

Hi @lewtun ! 🙂 I’d love to work on this project.

---

<div class="post-metadata">

**Author:** ![JLD](https://avatars.discourse-cdn.com/v4/letter/j/51bf81/32.png) [@JLD](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FJLD)%5C
**Post date:** [November 15, 2021, 6:14pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fuse-openais-clip-for-image-search%2F11577%2F3 "2021-11-15T18:14:31Z")

</div>

I would also like to participate in this project 😀

---

<div class="post-metadata">

**Author:** ![amir22010](https://avatars.discourse-cdn.com/v4/letter/a/f14d63/32.png) [@amir22010](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Famir22010)%5C
**Post date:** [November 15, 2021, 7:39pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fuse-openais-clip-for-image-search%2F11577%2F4 "2021-11-15T19:39:33Z")

</div>

I am interested in it, please share channel name 😍

---

<div class="post-metadata">

**Author:** ![ubamba98](https://avatars.discourse-cdn.com/v4/letter/u/898d66/32.png) [@ubamba98](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fubamba98)%5C
**Post date:** [November 15, 2021, 8:50pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fuse-openais-clip-for-image-search%2F11577%2F5 "2021-11-15T20:50:51Z")

</div>

Hey I would be interested in working on this project 😀

---

<div class="post-metadata">

**Author:** ![lewtun](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/lewtun/32/30995_2.png) [@lewtun](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Flewtun)%5C
**Post date:** [November 15, 2021, 10:08pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fuse-openais-clip-for-image-search%2F11577%2F6 "2021-11-15T22:08:30Z")

</div>

Awesome, 4 people already! You can head over to Discord if you want to coordinate / chat etc 🙂  
I’ve added the project name in this topic’s description

---

<div class="post-metadata">

**Author:** ![sgugger](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/sgugger/32/2291_2.png) [@sgugger](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fsgugger)%5C
**Post date:** [November 15, 2021, 10:19pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fuse-openais-clip-for-image-search%2F11577%2F7 "2021-11-15T22:19:38Z")

</div>

Don’t forget to all fill out the [AWS form](https://docs.google.com/forms/d/e/1FAIpQLSdj2gGoV3tcrXrjjc9P897ju5WDvq_PsYqWXxfsHKWMPGAYuA/viewform?usp=sf_link) to get access to an account for the free compute on SageMaker!

---

<div class="post-metadata">

**Author:** ![RobotJelly](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/robotjelly/32/3129_2.png) [@RobotJelly](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FRobotJelly)%5C
**Post date:** [November 16, 2021, 5:58am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fuse-openais-clip-for-image-search%2F11577%2F8 "2021-11-16T05:58:26Z")

</div>

Hi , I am also interested in this project !! 😊

---

<div class="post-metadata">

**Author:** ![lewtun](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/lewtun/32/30995_2.png) [@lewtun](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Flewtun)%5C
**Post date:** [November 16, 2021, 9:34am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fuse-openais-clip-for-image-search%2F11577%2F9 "2021-11-16T09:34:08Z")

</div>

Hey @RobotJelly, I think we already have 4 people in this project (the team limit), so you can either join [this](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fuse-openais-clip-for-style-transfer%2F11833) similar project or work on this one by yourself

---

<div class="post-metadata">

**Author:** ![RobotJelly](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/robotjelly/32/3129_2.png) [@RobotJelly](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FRobotJelly)%5C
**Post date:** [November 16, 2021, 9:57am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fuse-openais-clip-for-image-search%2F11577%2F10 "2021-11-16T09:57:32Z")

</div>

Hi , @lewtun ok so can you please suggest me the beginner project where i can work by myself only (without any other team member) ?

---

<div class="post-metadata">

**Author:** ![lewtun](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/lewtun/32/30995_2.png) [@lewtun](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Flewtun)%5C
**Post date:** [November 16, 2021, 9:59am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fuse-openais-clip-for-image-search%2F11577%2F11 "2021-11-16T09:59:46Z")

</div>

Hi @RobotJelly the only constraint is that we’re reserving the Amazon SageMaker compute for teams, so if you have your own GPUs / cloud provider, then your more than welcome to work on this project by yourself 🙂

---

<div class="post-metadata">

**Author:** ![RobotJelly](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/robotjelly/32/3129_2.png) [@RobotJelly](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FRobotJelly)%5C
**Post date:** [November 16, 2021, 10:02am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fuse-openais-clip-for-image-search%2F11577%2F12 "2021-11-16T10:02:52Z")

</div>

oh ok @lewtun actually i dont have any cloud provider service so hmm… actually i dont have idea that team is really needed & thats why i’ve submitted the form also with this project title

---

<div class="post-metadata">

**Author:** ![RobotJelly](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/robotjelly/32/3129_2.png) [@RobotJelly](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FRobotJelly)%5C
**Post date:** [November 16, 2021, 10:04am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fuse-openais-clip-for-image-search%2F11577%2F13 "2021-11-16T10:04:11Z")

</div>

so should i again fill the form with other project ? also can you suggest me that project where team is available

---

<div class="post-metadata">

**Author:** ![lewtun](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/lewtun/32/30995_2.png) [@lewtun](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Flewtun)%5C
**Post date:** [November 16, 2021, 10:09am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fuse-openais-clip-for-image-search%2F11577%2F14 "2021-11-16T10:09:55Z")

</div>

Hey @RobotJelly here’s a few free alternatives for GPUs:

- Google Colab: [https://colab.research.google.com/](https://colab.research.google.com/)
- Kaggle notebooks: [Notebooks Documentation | Kaggle](https://www.kaggle.com/docs/notebooks)
- Paperspace Gradient: [Free GPU](https://gradient.run/free-gpu)

If those aren’t an option for you, I recommend checking through the #course:course-event category and seeing if there’s an idea that interests you and doesn’t have anyone signed up (just check the comments).

Alternatively you are more than welcome to propose a project of your own!

---

<div class="post-metadata">

**Author:** ![RobotJelly](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/robotjelly/32/3129_2.png) [@RobotJelly](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FRobotJelly)%5C
**Post date:** [November 16, 2021, 12:41pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fuse-openais-clip-for-image-search%2F11577%2F15 "2021-11-16T12:41:48Z")

</div>

thank you for sharing . will surely check these alternatives 🙂🤗

---

<div class="post-metadata">

**Author:** ![marcelcastrobr](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/marcelcastrobr/32/3166_2.png) [@marcelcastrobr](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fmarcelcastrobr)%5C
**Post date:** [November 16, 2021, 6:25pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fuse-openais-clip-for-image-search%2F11577%2F16 "2021-11-16T18:25:09Z")

</div>

@RobotJelly Lets do together the image search project as a second group? Is that ok @lewtun ? Or should we select a complete new project? This relates to an idea I have connected to my current job.

---

<div class="post-metadata">

**Author:** ![sgugger](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/sgugger/32/2291_2.png) [@sgugger](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fsgugger)%5C
**Post date:** [November 17, 2021, 1:43am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fuse-openais-clip-for-image-search%2F11577%2F17 "2021-11-17T01:43:16Z")

</div>

I think it’s okay to have a second group working on this 🙂 I have create a team for you and @RobotJelly. If anyone else join you, the code is `use-openais-clip-for-image-search-group2` (when filling the name of the project in the AWS form).

---

<div class="post-metadata">

**Author:** ![RobotJelly](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/robotjelly/32/3129_2.png) [@RobotJelly](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FRobotJelly)%5C
**Post date:** [November 17, 2021, 7:24am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fuse-openais-clip-for-image-search%2F11577%2F18 "2021-11-17T07:24:38Z")

</div>

Great! Ok I am ready 💪 though i am quite a beginner in NLP related things so going through the course content as well 🙂 do let me know when to start ?

---

<div class="post-metadata">

**Author:** ![marcelcastrobr](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/marcelcastrobr/32/3166_2.png) [@marcelcastrobr](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fmarcelcastrobr)%5C
**Post date:** [November 17, 2021, 7:34am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fuse-openais-clip-for-image-search%2F11577%2F19 "2021-11-17T07:34:18Z")

</div>

Thanks Sylvain. I just fill the AWS form, now with use-openais-clip-for-image-search-group2 as project code.

---

<div class="post-metadata">

**Author:** ![ysharma](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/ysharma/32/17537_2.png) [@ysharma](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fysharma)%5C
**Post date:** [November 17, 2021, 8:43am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fuse-openais-clip-for-image-search%2F11577%2F20 "2021-11-17T08:43:31Z")

</div>

Hi @marcelcastrobr @sgugger , this sounds like a very interesting project, can I also join your second team on use-openais-clip-for-image-search-group2 project as well?

[Next page](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fuse-openais-clip-for-image-search%2F11577.md%3Fpage%3D2)
