Skip to main content

EVA Video Database System (Think MySQL for videos).

Project description

EVA (Exploratory Video Analytics)

Build Status Coverage Status License Documentation Status

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

  1. EVA requires Python 3.8+. To install EVA, we recommend using an virtual environment and the pip package manager:
pip install evadb
  1. Start the EVA server and the client programs
eva_server&   # launch server
eva_client    # launch client
  1. 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';
  1. LOAD the video using the client terminal:
LOAD DATA INFILE 'test_video.mp4' INTO MyVideo;
  1. That's it. You can now start issuing queries over that video:
SELECT id, data FROM MyVideo WHERE id < 5;

More Interesting Queries

  1. Search for frames in a video that contain a car
SELECT id, data FROM MyVideo WHERE ['car'] <@ FastRCNNObjectDetector(data).labels;

QueryResult

  1. Search for frames in a video that contain a pedestrian and a car
SELECT id, data FROM MyVideo WHERE ['pedestrian', 'car'] <@ FastRCNNObjectDetector(data).labels;
  1. Search frames in a video containing more than 3 cars
SELECT id, data FROM MyVideo WHERE Array_Count(FastRCNNObjectDetector(data).labels, 'car') > 3;
  1. 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;
  1. 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;
  1. Drop a table
DROP TABLE MyVideo;
  1. 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';
  1. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

evadb-0.0.5-py3-none-any.whl (395.5 kB view details)

Uploaded Python 3

File details

Details for the file evadb-0.0.5-py3-none-any.whl.

File metadata

  • Download URL: evadb-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 395.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.10

File hashes

Hashes for evadb-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 cc1400a27baf76d279b0421693cbb87209f78f931bfe912590eb95835a572d37
MD5 7ab94e35d3549702f44ef84ab2a913ae
BLAKE2b-256 9fb707f4c47491badda93285c8ff0f50029c5bfb8646624d355be18337fc8040

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page