Skip to content

OpenAI CLIP model for photo search based on OpenVINO acceleration

License

Notifications You must be signed in to change notification settings

juan-OY/CLIP_photo_search

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

OpenAI CLIP model for photo search based on OpenVINO acceleration

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages