https://github.com/wrannaman/infinisearch
video search infrastructure
https://github.com/wrannaman/infinisearch
Last synced: 3 months ago
JSON representation
video search infrastructure
- Host: GitHub
- URL: https://github.com/wrannaman/infinisearch
- Owner: wrannaman
- Created: 2024-12-05T18:37:47.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-12-08T04:43:12.000Z (10 months ago)
- Last Synced: 2025-04-04T04:26:44.814Z (6 months ago)
- Language: JavaScript
- Size: 895 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ๐ InfiniSearch
A blazing-fast video search engine powered by CLIP embeddings and Milvus vector database. Search through video content using natural language queries and find exact moments in your video library.
## โจ Features
- ๐ง Advanced AI-powered video understanding using CLIP embeddings
- โก๏ธ Lightning-fast vector search with Milvus
- ๐ฏ Precise timestamp matching for instant scene location
- ๐ Folder organization for video collections
- ๐ฌ Frame-by-frame analysis for detailed scene understanding
- ๐ Real-time indexing of new video content## ๐ Quick Start
### Prerequisites
- Python 3.11+
- CUDA-capable GPU (recommended)
- Docker for Milvus### Setup
1. Create and activate conda environment:
```bash
conda create -n infinisearch python=3.11
conda activate infinisearch
conda install pytorch torchvision torchaudio pytorch-cuda=12.1 -c pytorch -c nvidia
pip install open-clip-torch opencv-python pymilvus flask flask-cors python-dotenv
```2. Start Milvus:
```bash
curl -sfL https://raw.githubusercontent.com/milvus-io/milvus/master/scripts/standalone_embed.sh -o standalone_embed.sh
bash standalone_embed.sh start
```3. Create a `.env` file:
```plaintext
MILVUS_HOST=localhost
MILVUS_PORT=19530
```## ๐ฅ Indexing Videos
Index your videos using the REST API:
```bash
curl -X POST http://localhost:5555/index \
-H "Content-Type: application/json" \
-d '{
"url": "http://example.com/video.mp4",
"name": "my_video.mp4",
"folder_id": "my_folder",
"frame_interval": 60
}'
```Parameters:
- `url`: Video file URL
- `name`: Identifier for the video
- `folder_id`: Group videos into collections
- `frame_interval`: Frames to skip between indexing (higher = faster but less precise)## ๐ Searching Videos
Search through indexed videos using natural language:
```bash
curl -X POST http://localhost:5555/search \
-H "Content-Type: application/json" \
-d '{
"query": "person walking on beach at sunset",
"limit": 5,
"folder_id": "my_folder"
}'
```## ๐ Architecture
- Frontend: Next.js with Tailwind CSS
- Backend: Flask REST API
- Vector DB: Milvus
- ML Model: CLIP (ViT-H-14-384)
- Video Processing: OpenCV## ๐งช Development
Run the development server with auto-reload:
```bash
nodemon --exec python3 -m api --ext py,json
```## ๐ Model Details
Using Apple's DFN5B-CLIP-ViT-H-14-384 for superior video understanding:
https://huggingface.co/apple/DFN5B-CLIP-ViT-H-14-384## ๐ License
MIT License - Feel free to use in your own projects!