File size: 1,500 Bytes
63085b9
 
 
 
 
 
 
 
 
 
 
b3a7580
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
86e6f10
 
b3a7580
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
---
title: Image Search with ColModernVBert
emoji: πŸ”
colorFrom: blue
colorTo: green
sdk: gradio
sdk_version: "4.44.0"
app_file: app.py
pinned: false
---

# Image Search with ColModernVBert

A multimodal image search demo using ColModernVBert for cross-modal retrieval between text queries and images.

## Features

- **Multimodal Search**: Query images using natural language text
- **ImageNet-1K Dataset**: Searches through 1000 diverse validation images
- **Real-time Indexing**: Automatically indexes 1000 images on startup
- **512x512 Optimization**: Images resized for optimal model performance
- **Multiprocessing**: Fast parallel image preprocessing
- **Upload Support**: Upload custom images or switch datasets

## Usage

Enter text queries like:
- `"dog"` β†’ Various dog breeds
- `"sports car"` β†’ Different car models  
- `"musical instrument"` β†’ Guitars, pianos, violins
- `"food"` β†’ Fruits, vegetables, dishes
- `"nature"` β†’ Trees, flowers, landscapes

Adjust the Top-K slider to control the number of results returned.

## Technical Details

- **Model**: ColModernVBert (ModernVBERT/colmodernvbert)
- **Dataset**: ImageNet-1K validation set (1000 images)
- **Image Size**: 512x512 pixels
- **Embeddings**: Cosine similarity between text and image embeddings

## Performance

- **Indexing**: ~2-3 minutes for 1000 images
- **Search**: Near-instant results
- **Memory**: Optimized for Space hardware limits

---

Built with Gradio and ColModernVBert for demonstration purposes.