jina-ai / example-multimodal-fashion-search

Input text or image, get back matching image fashion results, using Jina, DocArray, and CLIP
Apache License 2.0
47 stars 12 forks source link
computer-vision deep-learning neural-search nlp python

Multimodal Fashion Search with Jina

Multimodal search lets you use one type of data (in this case, text) to search another type of data (in this case, images). This example leverages core Jina technologies that make it simpler to build and run your search, including:

The front-end is built in Streamlit.

Play with the search engine now

We've got a live demo for you to play with.

Run the fashion search engine yourself

There are multiple ways you can run this:

First steps

Run on JCloud

JCloud lets you run the fashion backend Jina Flow on the cloud, without having to use your own compute.

pip install jcloud
cd backend
jc login
jc deploy jcloud

After that you can use Jina Client to connect and search/index your data.

Run with Docker-Compose

This will spin up:

docker-compose up

Run on bare metal

pip install -r requirements.txt

Then, in backend:

To open the frontend, go to the frontend directory and run streamlit run frontend.py

Tips

Troubleshooting

I get the error stacks: "sqlite3.IntegrityError: UNIQUE constraint failed: table_0._doc_id\n"

This is because you're trying to index data that's already been indexed. The database we use has a UNIQUE constraint that means it won't index duplicate data. You can fix this by: