Giter VIP home page Giter VIP logo

jina-clip-streamlit's Introduction

jina-clip-streamlit

Wait forrrr ittt....

Jina app which allows you to search a collection of tattoo images by text or image.


This project was inspired by: https://github.com/jina-ai/example-multimodal-fashion-search


Examples

Searching by text. Query text: video games video_games_query

Searching by image. mario

How to run:

1. Setup

git clone https://github.com/k-zehnder/jina-clip-streamlit

cd jina-clip-streamlit

pip install -r requirements.txt

2. Download data

https://www.fer.unizg.hr/_download/repository/tattoo_images.zip

When you go to the link above it should begin downloading the tattoo image dataset. Its about 1500 images. Create a folder in the root directory called "data", and then inside the data folder make another folder called "tattoo_images". Dump the images you downloaded into the "tattoo_images" folder that you made inside the "data" folder. Use the directory structure below to help keep you oriented.

.
├── data
│   └── tattoo_images
├── docs
│   └── usage
├── frontend
│   ├── __pycache__
│   ├── config.py
│   ├── frontend.py
│   ├── helpers.py
│   └── widgets.py
├── image_searcher
│   ├── app.py
│   └── config.py
├── indexer
│   ├── __pycache__
│   ├── app.py
│   └── helpers.py
├── text_searcher
│   ├── app.py
│   └── config.py
├── workspace # 'workspace' directory will be created automatically when you index so don't worry about this to start. It will be created when you index.
│   └── PQLiteIndexer
├── README.md
├── dataset_instructions.txt
├── post.txt
├── requirements.txt
└── website.txt

3. Create embeddings and index your data

This will create embeddings for all images using CLIPImageEncoder, and then store them on disk (with metadata) with PQLiteIndexer.

Open a new terminal window/tab, and run from same root directory.

  1. python indexer/app.py to index data

4. Run text search backend

Open a new terminal window/tab, run from same root directory.

  1. python text_searcher/app.py to start the text search server

5. Run image search backend

Open a new terminal window/tab, run from same root directory.

  1. python image_searcher/app.py to start the image search server

6. Run frontend

Open a new terminal window/tab, run from same root directory.

  1. streamlit run frontend/frontend.py to start frontend

7. Yahtzee! Jina FTW

jina-clip-streamlit's People

Contributors

k-zehnder avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.