EVA Video Database System (Think MySQL for videos).
Project description
EVA (Exploratory Video Analytics)
What is EVA?
EVA is a visual data management system (think MySQL for videos). It supports a declarative language similar to SQL and a wide range of commonly used computer vision models.
What does EVA do?
-
EVA enables querying of visual data in user facing applications by providing a simple SQL-like interface for a wide range of commonly used computer vision models.
-
EVA improves throughput by introducing sampling, filtering, and caching techniques.
-
EVA improves accuracy by introducing state-of-the-art model specialization and selection algorithms.
Links
QuickStart
- EVA requires Python 3.8+. To install EVA, we recommend using an virtual environment and the pip package manager:
pip install evadb
- Start the EVA server and the client programs
eva_server& # launch server
eva_client # launch client
- UPLOAD a video using the client terminal (we use ua_detrac.mp4 video as an example):
UPLOAD INFILE 'data/ua_detrac/ua_detrac.mp4' PATH 'test_video.mp4';
- LOAD the video using the client terminal:
LOAD DATA INFILE 'test_video.mp4' INTO MyVideo;
- That's it. You can now start issuing queries over that video:
SELECT id, data FROM MyVideo WHERE id < 5;
More Interesting Queries
- Search for frames in a video that contain a car
SELECT id, data FROM MyVideo WHERE ['car'] <@ FastRCNNObjectDetector(data).labels;
- Search for frames in a video that contain a pedestrian and a car
SELECT id, data FROM MyVideo WHERE ['pedestrian', 'car'] <@ FastRCNNObjectDetector(data).labels;
- Search frames in a video containing more than 3 cars
SELECT id, data FROM MyVideo WHERE Array_Count(FastRCNNObjectDetector(data).labels, 'car') > 3;
- Materialize the objects detected in a video
CREATE MATERIALIZED VIEW IF NOT EXISTS MyVideoObjects (id, labels, scores, bboxes) AS
SELECT id, FastRCNNObjectDetector(data) FROM MyVideo;
- Create a metadata table that keeps tracks of details about objects in a video
CREATE TABLE IF NOT EXISTS MyCSV (
id INTEGER UNIQUE,
frame_id INTEGER,
video_id INTEGER,
dataset_name TEXT(30),
label TEXT(30),
bbox NDARRAY FLOAT32(4),
object_id INTEGER
);
UPLOAD INFILE 'data/ua_detrac/metadata.csv' PATH 'test_metadata.csv';
LOAD DATA INFILE 'test_metadata.csv' INTO MyCSV WITH FORMAT CSV;
- Drop a table
DROP TABLE MyVideo;
- Create a UDF
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';
- Drop a UDF
DROP UDF IF EXISTS MyUDF;
Contributing
Environment Setup
To install EVA from source, use a virtual environment and the pip package manager. EVA requires JAVA 8 for generating the parser.
git clone https://github.com/georgia-tech-db/eva.git && cd eva
python3 -m venv env38 # to create a virtual environment
. env38/bin/activate
pip install --upgrade pip
sudo -E apt install -y openjdk-8-jdk openjdk-8-jre # to install JAVA
sh script/antlr4/generate_parser.sh # to generate the EVA parser
pip install -e ".[dev]"
To verify that installation was successfull, run the test suite.
bash script/test/test.sh
Contributing Guidelines
To file a bug or request a feature, please use GitHub issues. Pull requests are welcome. For more information on installing from source, troublshooting,and contributing to EVA, see our contributing guidelines.
Contributors
See the people page for the full listing of contributors.
License
Copyright (c) 2018-2022 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.0.6.tar.gz
.
File metadata
- Download URL: evadb-0.0.6.tar.gz
- Upload date:
- Size: 212.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8a545b902eaf1825c646d821cc89fd6665476477a1f02509d7ce8f10c91a2128 |
|
MD5 | 7567d629c81b77674a38c8b41c40a730 |
|
BLAKE2b-256 | 373bba5c4e99a1025bd1b83b250ddac4fb4eb49b42d59207e60e3d8b90a6855e |
File details
Details for the file evadb-0.0.6-py3-none-any.whl
.
File metadata
- Download URL: evadb-0.0.6-py3-none-any.whl
- Upload date:
- Size: 394.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 502ea0d2d2619ad1ff55b131b63b1448e260148e100ad775c9ed06b394e5440b |
|
MD5 | 31085ba57f2663fb4e8f12094024ba05 |
|
BLAKE2b-256 | d0288db8808e3fcbffb7a0311574ba8feaf30375ae4917fda95e331ae4683639 |