Skip to content

A fast and efficient image retrieval tool using CLIP model to compute similarity between text and images, implemented in Rust. This tool allows you to search images using natural language by calculating cosine similarity between CLIP embeddings.

Notifications You must be signed in to change notification settings

zheng0116/retrieval_rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Image retrieval with CLIP

Build Status License Rust Version

中文 | English

🌟 Introduction

A fast and efficient image retrieval tool using CLIP model to compute similarity between text and images, implemented in Rust. This tool allows you to search images using natural language by calculating cosine similarity between CLIP embeddings.

🚀 Features

  • Text-to-image search using natural language queries
  • Fast image processing with batch operations
  • Feature caching to improve performance on repeated searches
  • Support for various image formats (JPG, JPEG, PNG, GIF, BMP)
  • GPU acceleration support

TODO

  • Add web-based user interface
  • Implement gRPC and HTTP API endpoints
  • Support multi-modal search capabilities
  • Integrate with vector databases

Installation

  1. Clone the repository:
git clone https://github.com/zheng0116/retrieval_rs.git
cd retrieval_rs
  1. Build the project:
sh run.sh build

Usage

Basic usage:

sh run.sh search

Available options:

  • --image-dir: Directory containing images to search
  • --query: Search query in natural language
  • --model: Path to custom CLIP model (optional)
  • --tokenizer: Path to custom tokenizer (optional)
  • --cpu: Force CPU execution
  • --similarity-threshold: Minimum similarity score (default: 0.5)
  • --top-k: Number of results to show (default: 5)
  • --cache-file: Path to cache file
  • --save-cache: Enable cache saving

License

This project is open-sourced under the AGPL-3.0 license.

Acknowledgement

About

A fast and efficient image retrieval tool using CLIP model to compute similarity between text and images, implemented in Rust. This tool allows you to search images using natural language by calculating cosine similarity between CLIP embeddings.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published