ClipSeek's backend is the core service that integrates the entire system. It utilizes FastAPI for the web server, Milvus for efficient search, PyTorch for model inference, and FFmpeg for video processing.
ClipSeek's API follows REST principles and offers three main resources:
- Search
- POST /search/by_text: Search by text.
- POST /search/by_file: Search by file upload.
- POST /search/by_reference: Search by indexed reference.
- POST /search/continue: Continue an ongoing search session.
- Indexes
- GET /indexes/info: Retrieve information about available indexes.
- File-Proxy
- GET /resources/raw: Retrieve the original media file.
- GET /resources/clip: Retrieve a video clip.
- GET /resources/thumbnail: Retrieve a thumbnail from a video.
The following scripts help you work with the system. You can run them with poetry run
command.
- compute_embeddings: Generates embeddings for different media modalities.
- create_index: Creates Milvus collections and indexes embeddings.
- generate_thumbnails: An optional script that generates thumbnails in advance to improve system performance.
To start developing, you have the option to use a docker container or develop locally. Following is the setup for the local environment.
Install poetry dependencies
poetry install
Run the server
make run
Run lint checkers
make lint
Prettify the code
make pretty