Skip to content

Latest commit

 

History

History
35 lines (29 loc) · 1.46 KB

README.md

File metadata and controls

35 lines (29 loc) · 1.46 KB

CLIP_photo_search

OpenAI CLIP model for photo search based on OpenVINO acceleration

In this project, we use OpenVINO for OpenVINO CLip model acceleration, and construct one photo search demo with converted model. architecutre

Input:

  • A description text, encoded once
  • The entire collection of images, encoded only once and will be indexed and resued later

Output:

  • The K most similar images

Step 1: Environment Setup

Follow Below guide to set up the virtual environment

conda create -n openvino_env python=3.8
conda activate openvino_env
# Upgrade pip to the latest version to ensure compatibility with all dependencies
python -m pip install --upgrade pip==21.3.*
pip install -r requirements.txt

Step 2: Model Conversion

You can follow below guide to get converted CLIP image model and text model, and put them under ir folder, or even convert it to lower precision with nncf OpenVINO notebook for clip model conversion

Step 3: Image folder

In current code the images folder under data will be searched recursively, pls put your images under data folder

Step 4: Run the code

python clip-search.py

Below please find a video show the demo

2023-08-07.22-22-39.mp4