scs
scs copied to clipboard
Simple image search engine by a text query using CLIP
SCS: Simple CLIP Search
Simple CLIP Search (SCS) is a system for searching images based on a text query using the OpenCLIP model. It is designed for educational purposes and can be run in a codespace (click the above badge!).
Tutorial
See our video tutorial (in Japanese):
Prerequisites
Before running SCS, you will need to have Python 3 installed on your system. You will also need to install the following dependencies:
pip install -r requirements.txt
How to run
To run SCS, follow these steps:
- Download images (Caltech256 dataset) to the
imgdirectory:python download_caltech256.py - Extract features to the
featuredirectory:python extract_features.py - Search by querying a text. You can find the search results in the
outdirectory:python search.py
How to use your own images
To use your own images, delete all images in the img directory and replace them with your own JPEG images. Then, run extract_features.py and search.py as described above.
Bonus: GUI by streamlit
pip install streamlit
streamlit run search_streamlit.py
Reference
- OpenCLIP: Our project is heavily based on this repository.