/DoveDB_MVP

Redefining Video Management with power of SQL

Primary LanguagePythonApache License 2.0Apache-2.0

DoveDB

DoveDB 🕊️ is a database for intelligent video data management and analysis. Drawing inspiration from the world's most advanced vision AI methods, DoveDB represents a significant leap forward in open-source research and development in the field of video data handling.

Introduction

DoveDB is a video database designed to handle and manage video data efficiently. This repository contains the MVP version of DoveDB.

Requirements

  1. Clone the repository
git clone https://github.com/dovedb/DoveDB_MVP.git
  1. Ensure either OpenGauss or PostgreSQL is installed.

You have two options for installing the database management system as the engine of index storage: OpenGauss or PostgreSQL. Choose the one that best suits your needs.

  • Option1: OpenGauss

To install OpenGauss, please follow the installation instructions provided in the official documentation.

  • Option2: PostgreSQL

Alternatively, you can install PostgreSQL by following the steps outlined in the official PostgreSQL documentation. You can find the installation guide here.

  1. Install the necessary dependencies provided in the requirements.txt.
cd src && pip install -r requirements.txt 

Quick start

  1. Download the provided ETL (Extract, Transform, Load) data which will be used for demonstration purposes.

Download ETL Data Here

Once downloaded, move the file to the src/data directory.

  1. Launch DoveDB Server Navigate to the src directory and start the server:
cd src
python run_server.py --load_etl_data data/parsed.json
  1. Launch DoveDB Client In another terminal instance, initiate the client:
cd src
python client.py
  1. Aggregation Query:

Count Cars in the First 120 Seconds:

SELECT COUNT(DISTINCT track_id) FROM cars WHERE timestamp < 120 AND confidence > 0.7;

Calculate Stay Duration of a Specific Car:

SELECT MAX(timestamp) - MIN(timestamp) as stay_duration FROM cars WHERE track_id = 20;
  1. Selection Query:

Top Frames with Most Cars:

SELECT frameid, COUNT(track_id) as car_count FROM cars GROUP BY frameid ORDER BY car_count DESC LIMIT 5;

Contribute

We greatly value your contributions and are committed to making your involvement with DoveDB as straightforward and transparent as possible.

License

MIT License: DoveDB is distributed under the MIT License, which is widely recognized for its permissive nature, allowing for various use cases, including commercial and open-source projects. It promotes flexibility, collaboration, and knowledge sharing. You can find more details in the LICENSE file in the DoveDB repository.