EVA Video Database System (Think MySQL for videos).
Project description
EVA AI-Relational Database System
EVA is an open-source AI-relational database with first-class support for deep learning models. It aims to support AI-powered database applications that operate on both structured (tables) and unstructured data (videos, text, podcasts, PDFs, etc.) with deep learning models.
EVA accelerates AI pipelines using a collection of optimizations inspired by relational database systems including function caching, sampling, and cost-based operator reordering. It comes with a wide range of models for analyzing unstructured data including image classification, object detection, OCR, face detection, etc. It is fully implemented in Python, and licensed under the Apache license.
EVA supports a AI-oriented query language for analysing unstructured data. Here are some illustrative applications:
- Examining the emotion palette of actors in a movie
- Analysing traffic flow at an intersection
- Classifying images based on their content
- Recogizing license plates
- Analysing toxicity of social media memes
If you are wondering why you might need a AI-relational database system, start with the page on Video Database Systems. It describes how EVA lets you easily make use of deep learning models and you can save money spent on inference on large image or video datasets.
The Getting Started page shows how you can use EVA for different computer vision tasks: image classification, object detection, action recognition, and how you can easily extend EVA to support your custom deep learning model in the form of user-defined functions.
The User Guides section contains Jupyter Notebooks that demonstrate how to use various features of EVA. Each notebook includes a link to Google Colab, where you can run the code by yourself.
Why EVA?
Easily combine SQL and Deep Learning to build next-generation database applications
Easily query videos in user-facing applications with a SQL-like interface for commonly used computer vision models.Speed up queries and save money spent on model inference
EVA comes with a collection of built-in sampling, caching, and filtering optimizations inspired by time-tested relational database systems.Extensible by design to support custom deep learning models
EVA has first-class support for user-defined functions that wrap around your deep learning models in PyTorch.Links
Quick Start
- To install EVA, we recommend using the pip package manager (EVA supports Python versions 3.7+).
pip install evadb
- EVA is based on a client-server architecture. It works in Jupyter notebooks (illustrative notebooks are available in the Tutorials folder) and also supports a terminal-based client. To start the EVA server and a terminal-based client, use the following commands:
eva_server & # launch server
eva_client # launch client
- Load a video onto the EVA server from the client (we use ua_detrac.mp4 video as an example):
LOAD VIDEO "data/ua_detrac/ua_detrac.mp4" INTO MyVideo;
- That's it! You can now run queries over the loaded video:
SELECT id, data FROM MyVideo WHERE id < 5;
- Search for frames in the video that contain a car
SELECT id, data FROM MyVideo WHERE ['car'] <@ FastRCNNObjectDetector(data).labels;
Source Video | Query Result |
---|---|
- Search for frames in the video that contain a pedestrian and a car
SELECT id, data FROM MyVideo WHERE ['pedestrian', 'car'] <@ FastRCNNObjectDetector(data).labels;
- Search for frames in the video with more than 3 cars
SELECT id, data FROM MyVideo WHERE ArrayCount(FastRCNNObjectDetector(data).labels, 'car') > 3;
- You can create a new user-defined function (UDF) that wraps around your custom vision model or an off-the-shelf model like FastRCNN:
CREATE UDF IF NOT EXISTS MyUDF
INPUT (frame NDARRAY UINT8(3, ANYDIM, ANYDIM))
OUTPUT (labels NDARRAY STR(ANYDIM), bboxes NDARRAY FLOAT32(ANYDIM, 4),
scores NDARRAY FLOAT32(ANYDIM))
TYPE Classification
IMPL 'eva/udfs/fastrcnn_object_detector.py';
- You can combine multiple user-defined functions in a single query to accomplish more complicated tasks.
-- Analyse emotions of faces in a video
SELECT id, bbox, EmotionDetector(Crop(data, bbox))
FROM MyVideo JOIN LATERAL UNNEST(FaceDetector(data)) AS Face(bbox, conf)
WHERE id < 15;
Illustrative EVA Applications
Traffic Analysis (Object Detection Model)
Source Video | Query Result |
---|---|
MNIST Digit Recognition (Image Classification Model)
Source Video | Query Result |
---|---|
Movie Analysis (Face Detection + Emotion Classfication Models)
Source Video | Query Result |
---|---|
License Plate Recognition (Plate Detection + OCR Extraction Models)
Query Result |
---|
Meme Toxicity Classification (OCR Extraction + Toxicity Classification Models)
Query Result |
---|
Community
Join the EVA community on Slack to ask questions and to share your ideas for improving EVA.
Architecture Diagram of EVA
Contributing to EVA
We welcome all kinds of contributions to EVA. To file a bug or request a feature, please use GitHub issues. Pull requests are welcome.
For more information on contributing to EVA, see our contribution guide.
License
Copyright (c) 2018-2023 Georgia Tech Database Group Licensed under Apache License.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file evadb-0.1.6.tar.gz
.
File metadata
- Download URL: evadb-0.1.6.tar.gz
- Upload date:
- Size: 235.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3f0c670d0dfc5ca5d577af4678cfbfed492f56112dbfeb88526c83a4bc8e1eab |
|
MD5 | 6436909fd68e9946c0e124a8cbc78a87 |
|
BLAKE2b-256 | 7ce6cded87901c3c8f53f9d26cdc89386ecf1848e5dcda14045246fd27c5e2a9 |
File details
Details for the file evadb-0.1.6-py3-none-any.whl
.
File metadata
- Download URL: evadb-0.1.6-py3-none-any.whl
- Upload date:
- Size: 483.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 38d4f12c1b047b3d8659513000bf7841437f78f43336a8c190db25bb5e1395aa |
|
MD5 | 9ed69fc2ed4c13853c06e8ba8c6972c0 |
|
BLAKE2b-256 | 67ca63ccf028710f7d8532c368c657fbf4b369a1f6882fc711e2e20253132ede |