CoolFace
Apppublic

pal2004/Vlm-search

sourceHugging Facemitupdated 1y agoView on Hugging Face
1likes
App README

๐Ÿ” VLM Cloud Image Search

Search through images from cloud sources using AI-powered content recognition

This application uses OpenAI's CLIP (Contrastive Language-Image Pre-training) model to understand image content and find matches from various cloud sources.

โœจ Features

  • โ€”๐ŸŒ Cloud Image Fetching: Load images from URLs, Google Drive, local files
  • โ€”๐Ÿค– AI Content Search: Describe what you're looking for in natural language
  • โ€”๐Ÿ“ Filename Search: Search by exact or partial filename
  • โ€”๐Ÿ“Š Similarity Scoring: See how confident the AI is about matches
  • โ€”๐Ÿ–ผ๏ธ Image Preview: View results immediately
  • โ€”โšก Smart Caching: Images cached for faster repeated searches
  • โ€”๐Ÿ“ฑ Responsive Design: Works on desktop and mobile

๐Ÿš€ How to Use

1. Add Image Sources

In the "Image Sources" box, add one source per line:

https://example.com/banana.jpg
https://drive.google.com/file/d/1ABC123DEF456/view
/path/to/local/cat.jpg
https://picsum.photos/400/300

2. Search Images

Content Search (AI)
  • โ€”Type descriptions like: "yellow fruit", "cute animal", "red car"
  • โ€”The AI will analyze image content and find matches
  • โ€”See similarity scores and confidence levels
Filename Search
  • โ€”Type exact filenames: "banana.jpg", "cat.png"
  • โ€”Or partial names: "banana", "cat"
  • โ€”Perfect for finding specific files

3. View Results

  • โ€”See the matched image
  • โ€”Check similarity score and confidence
  • โ€”View source information

๐ŸŒ Supported Cloud Sources

  • โ€”Direct URLs: https://example.com/image.jpg
  • โ€”Google Drive: https://drive.google.com/file/d/FILE_ID/view
  • โ€”Local Files: /path/to/image.jpg
  • โ€”Base64: data:image/jpeg;base64,...

๐Ÿ› ๏ธ Technical Details

  • โ€”Model: OpenAI CLIP ViT-Base-Patch16
  • โ€”Framework: Gradio
  • โ€”Backend: PyTorch + Transformers
  • โ€”Deployment: Hugging Face Spaces
  • โ€”Caching: Local image caching for performance

๐Ÿ”ง Local Development

bash
pip install -r requirements.txt
python app.py

๐Ÿ“„ License

MIT License - feel free to use and modify!