An open API service indexing awesome lists of open source software.

https://github.com/htanh2003/llm_powered_video_search

The LLM-Powered Video Search System is an advanced multimodal video search solution that leverages Large Language Models (LLMs) to enhance video retrieval through text, image, and metadata queries.
https://github.com/htanh2003/llm_powered_video_search

clip django docker faiss multimodal retrieval retrieval-augmented-generation text-image-retrieval tf-idf yolo

Last synced: 21 days ago
JSON representation

The LLM-Powered Video Search System is an advanced multimodal video search solution that leverages Large Language Models (LLMs) to enhance video retrieval through text, image, and metadata queries.

Awesome Lists containing this project

README

        



🧠 LLM-Powered Video Search System for AIC2024


An intelligent video retrieval system leveraging Large Language Models (LLMs) and multimodal search, developed for the AIC2024 competition and accepted at the international SOICT 2024 conference.

![Static Badge](https://img.shields.io/badge/python->=3.10-blue)
![Static Badge](https://img.shields.io/badge/django-3.x-blue)
![Static Badge](https://img.shields.io/badge/clip-v1.0-blue)
![Static Badge](https://img.shields.io/badge/tfidf-1.5.2-blue)

Table of Contents

- [πŸ“ Overview](#-overview)
- [🎯 Features](#-features)
- [πŸ€– Tech Stack](#-tech-stack)
- [πŸš€ Setup and Usage](#-setup-and-usage)
- [🎬 Demo](#-demo)
- [πŸ‘£ Workflow](#-workflow)
- [πŸ“ App Structure](#-app-structure)
- [πŸ§‘β€πŸ’» Contributors](#-contributors)

## πŸ“ Overview
The `LLM-Powered Video Search System` is an advanced multimodal video search solution that leverages Large Language Models (LLMs) to enhance video retrieval through text, image, and metadata queries. This project was developed for the [AIC2024](https://aichallenge.hochiminhcity.gov.vn/) competition and has been accepted at the international [SOICT 2024](https://soict.org/) conference, aiming to provide an intelligent and efficient video search system. Details about the paper can be found on [Springer](https://www.springer.com/).

## 🎯 Features

1. **Multimodal Search Capabilities**
- **Text-based search:** Supports ASR (Automatic Speech Recognition), OCR, captions, and descriptive image queries for improved accuracy.
- **Image-based search:** Enables users to find specific video segments based on images.
- **Metadata-based search:** Provides a 7x7 matrix for tagging objects and color attributes for contextual search.

2. **LLM-Powered Interaction**
- Integrates LLMs (e.g., GPT-4) to handle natural language queries and deliver relevant search results tailored to the context.

3. **User-Friendly Interface**
- A responsive user interface allows users to view results as keyframes or full video segments and interact with detailed metadata.

## πŸ€– Tech Stack

- **Back-end**: Django
- **Core Technologies**: CLIP, Faiss, TFIDF
- **Supporting Technologies**: OpenCV, PyTorch, Transformers
- **Development Tools**: Docker, Git, Jupyter Notebook

## πŸš€ Setup and Usage

1. **Clone Repository**
```bash
git clone https://github.com/HTAnh2003/LLM_Powered_Video_Search.git
cd LLM_Powered_Video_Search
```

2. **Install Dependencies**
Ensure Python and Django are installed. Then, install other dependencies from `requirements.txt`:

```bash
pip install -r requirements.txt
```

3. **Configure `MEDIA_ROOT`**
Open [settings.py](./AIC/settings.py) in the `AIC/` folder and set `MEDIA_ROOT` to point to your local `media` directory:

```python
MEDIA_ROOT = '/path/to/your/media'
```
You can download the dataset from [Google Drive](https://drive.google.com/drive/folders/17Yab4iMAEzok0pO_czgbAkKBlaQ2ptqU) or [Kaggle](https://www.kaggle.com/datasets/tienanh2003/keyframes-v1-aic2024).

4. **Verify Paths in `viewAPI.py`**
Ensure paths in [app/viewAPI.py](./app/viewAPI.py) are correct.

5. **Run Migrations**
Update the database with migrations:

```bash
python manage.py migrate
```

6. **Run the Application**
To start the application, use:

```bash
python manage.py runserver
```

The app will run by default at `http://127.0.0.1:8000/`.

## 🎬 Demo

- **Screenshots**: ![image](./figs/image/demo.png)

## πŸ‘£ Workflow
![Pipeline](./figs/image/Pipeline.png)
- **Data Processing**: Video data is processed using ASR or extracted via TransnetV2, then converted into image features and metadata.
![Data Processing](./figs/image/data_processing.png)
- **LLM Powered Interaction**: Natural language queries are processed by the LLM and combined with image features and metadata for relevant video retrieval.
![LLM Interaction](./figs/image/LLM.png)

## πŸ“ App Structure
```
β”œβ”€β”€ LLM_Powered_Video_Search/
β”‚ β”œβ”€β”€ AIC/
β”‚ β”‚ β”œβ”€β”€ settings.py
β”‚ β”œβ”€β”€ app/
β”‚ β”‚ β”œβ”€β”€ admin.py
β”‚ β”‚ β”œβ”€β”€ data_utils.py
β”‚ β”‚ β”œβ”€β”€ migrations/
β”‚ β”‚ β”œβ”€β”€ static/
β”‚ β”‚ β”œβ”€β”€ templates/
β”‚ β”‚ β”œβ”€β”€ viewAPI.py
β”‚ β”œβ”€β”€ data_extraction/
β”‚ β”‚ β”œβ”€β”€ TransnetV2/
β”‚ β”‚ β”œβ”€β”€ audio/
β”‚ β”‚ β”œβ”€β”€ metadata/
β”‚ β”œβ”€β”€ docker-compose.yml
β”‚ β”œβ”€β”€ figs/
β”‚ β”œβ”€β”€ manage.py
β”‚ β”œβ”€β”€ requirements.txt
β”‚ β”œβ”€β”€ utils/
β”‚ β”œβ”€β”€ LLM/
β”‚ β”œβ”€β”€ video_retrieval/
β”‚ β”œβ”€β”€ faiss_search.py
β”‚ β”œβ”€β”€ combine_search.py
| |...
```

## πŸ§‘β€πŸ’» Contributors

- [HoΓ ng TiαΊΏn Anh](https://github.com/HTAnh2003)
- [TrαΊ§n XuΓ’n Diện](https://github.com/xndien2004)
- [DưƑng Văn Tài](https://github.com/TaiDuongRepo)