Metadata-Version: 2.1
Name: evadb
Version: 0.0.6
Summary: EVA Video Database System (Think MySQL for videos).
Home-page: https://github.com/georgia-tech-db/eva
Author: Georgia Tech Database Group
Author-email: georgia.tech.db@gmail.com
License: Apache License 2.0
Download-URL: https://github.com/georgia-tech-db/eva
Platform: UNKNOWN
Classifier: Intended Audience :: Science/Research
Classifier: Topic :: Scientific/Engineering :: Information Analysis
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Development Status :: 3 - Alpha
Classifier: Operating System :: OS Independent
Requires-Python: >=3.7
Description-Content-Type: text/markdown
Requires-Dist: Pillow (==9.0.1)
Requires-Dist: antlr4-python3-runtime (==4.8)
Requires-Dist: black (==22.6.0)
Requires-Dist: isort (==5.10.1)
Requires-Dist: numpy (==1.20.1)
Requires-Dist: opencv-python (==4.5.1.48)
Requires-Dist: pandas (==1.2.3)
Requires-Dist: petastorm (==0.9.8)
Requires-Dist: pyspark (==3.0.2)
Requires-Dist: pyyaml (==5.1)
Requires-Dist: sqlalchemy-utils (==0.36.6)
Requires-Dist: sqlalchemy (==1.3.20)
Provides-Extra: database
Requires-Dist: Pillow (==9.0.1) ; extra == 'database'
Requires-Dist: antlr4-python3-runtime (==4.8) ; extra == 'database'
Requires-Dist: black (==22.6.0) ; extra == 'database'
Requires-Dist: isort (==5.10.1) ; extra == 'database'
Requires-Dist: numpy (==1.20.1) ; extra == 'database'
Requires-Dist: opencv-python (==4.5.1.48) ; extra == 'database'
Requires-Dist: pandas (==1.2.3) ; extra == 'database'
Requires-Dist: petastorm (==0.9.8) ; extra == 'database'
Requires-Dist: pymysql (==0.10.1) ; extra == 'database'
Requires-Dist: pyspark (==3.0.2) ; extra == 'database'
Requires-Dist: pyyaml (==5.1) ; extra == 'database'
Requires-Dist: sqlalchemy-utils (==0.36.6) ; extra == 'database'
Requires-Dist: sqlalchemy (==1.3.20) ; extra == 'database'
Provides-Extra: dev
Requires-Dist: Pillow (==9.0.1) ; extra == 'dev'
Requires-Dist: antlr4-python3-runtime (==4.8) ; extra == 'dev'
Requires-Dist: black (==22.6.0) ; extra == 'dev'
Requires-Dist: coveralls (==3.0.1) ; extra == 'dev'
Requires-Dist: flake8 (==3.9.1) ; extra == 'dev'
Requires-Dist: isort (==5.10.1) ; extra == 'dev'
Requires-Dist: mock (==4.0.3) ; extra == 'dev'
Requires-Dist: numpy (==1.20.1) ; extra == 'dev'
Requires-Dist: opencv-python (==4.5.1.48) ; extra == 'dev'
Requires-Dist: pandas (==1.2.3) ; extra == 'dev'
Requires-Dist: petastorm (==0.9.8) ; extra == 'dev'
Requires-Dist: pymysql (==0.10.1) ; extra == 'dev'
Requires-Dist: pyspark (==3.0.2) ; extra == 'dev'
Requires-Dist: pytest-cov (==2.11.1) ; extra == 'dev'
Requires-Dist: pytest-virtualenv ; extra == 'dev'
Requires-Dist: pytest (==6.1.2) ; extra == 'dev'
Requires-Dist: pyyaml (==5.1) ; extra == 'dev'
Requires-Dist: scriv (==0.16.0) ; extra == 'dev'
Requires-Dist: sqlalchemy-utils (==0.36.6) ; extra == 'dev'
Requires-Dist: sqlalchemy (==1.3.20) ; extra == 'dev'
Requires-Dist: torch (==1.7.1) ; extra == 'dev'
Requires-Dist: torchvision (==0.8.2) ; extra == 'dev'
Requires-Dist: wheel (==0.37.1) ; extra == 'dev'
Provides-Extra: minimal
Requires-Dist: Pillow (==9.0.1) ; extra == 'minimal'
Requires-Dist: antlr4-python3-runtime (==4.8) ; extra == 'minimal'
Requires-Dist: numpy (==1.20.1) ; extra == 'minimal'
Requires-Dist: opencv-python (==4.5.1.48) ; extra == 'minimal'
Requires-Dist: pandas (==1.2.3) ; extra == 'minimal'
Requires-Dist: petastorm (==0.9.8) ; extra == 'minimal'
Requires-Dist: pyspark (==3.0.2) ; extra == 'minimal'
Requires-Dist: pyyaml (==5.1) ; extra == 'minimal'
Requires-Dist: sqlalchemy-utils (==0.36.6) ; extra == 'minimal'
Requires-Dist: sqlalchemy (==1.3.20) ; extra == 'minimal'

# EVA (Exploratory Video Analytics)

[![Build Status](https://circleci.com/gh/georgia-tech-db/eva.svg?style=svg)](https://circleci.com/gh/georgia-tech-db/eva)
[![Coverage Status](https://coveralls.io/repos/github/georgia-tech-db/eva/badge.svg?branch=master)](https://coveralls.io/github/georgia-tech-db/eva?branch=master)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
[![Documentation Status](https://readthedocs.org/projects/exvian/badge/?version=latest)](https://evadb.readthedocs.io/en/latest/index.html)


## 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
* [Demo](https://ada-00.cc.gatech.edu/eva/playground)
* [Website](https://georgia-tech-db.github.io/eva/index.html)
* [Documentation](https://evadb.readthedocs.io/en/latest/)
* [Tutorials](https://github.com/georgia-tech-db/eva/tree/master/tutorials)
* [Chat](https://gitter.im/georgia-tech-db/eva)

## QuickStart

1. EVA requires Python 3.8+. To install EVA, we recommend using an virtual environment and the pip package manager:

```shell
pip install evadb
```

1. Start the EVA server and the client programs
```shell
eva_server&   # launch server
eva_client    # launch client
```

2. UPLOAD a video using the client terminal (we use [ua_detrac.mp4](data/ua_detrac/ua_detrac.mp4) video as an example):

```mysql
UPLOAD INFILE 'data/ua_detrac/ua_detrac.mp4' PATH 'test_video.mp4';
```

3. LOAD the video using the client terminal:

```mysql
LOAD DATA INFILE 'test_video.mp4' INTO MyVideo;
```

4. That's it. You can now start issuing queries over that video:

```mysql
SELECT id, data FROM MyVideo WHERE id < 5;
```

## More Interesting Queries

1. Search for frames in a video that contain a car

```mysql
SELECT id, data FROM MyVideo WHERE ['car'] <@ FastRCNNObjectDetector(data).labels;
```
![QueryResult](https://georgia-tech-db.github.io/eva/Img/car.gif)

2. Search for frames in a video that contain  a pedestrian and a car

```mysql
SELECT id, data FROM MyVideo WHERE ['pedestrian', 'car'] <@ FastRCNNObjectDetector(data).labels;
```
3. Search frames in a video containing more than 3 cars

```mysql
SELECT id, data FROM MyVideo WHERE Array_Count(FastRCNNObjectDetector(data).labels, 'car') > 3;
```

4. Materialize the objects detected in a video

```mysql
CREATE MATERIALIZED VIEW IF NOT EXISTS MyVideoObjects (id, labels, scores, bboxes) AS
SELECT id, FastRCNNObjectDetector(data) FROM MyVideo;
```

5. Create a metadata table that keeps tracks of details about objects in a video

```mysql
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;
```
6. Drop a table
```mysql
DROP TABLE MyVideo;
```
7. Create a UDF
```mysql
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';
```
8. Drop a UDF
```mysql
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.

```shell
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.

```shell
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](https://evadb.readthedocs.io/en/latest/source/contribute/index.html).

## Contributors

See the [people page](https://github.com/georgia-tech-db/eva/graphs/contributors) for the full listing of contributors.

## License
Copyright (c) 2018-2022 [Georgia Tech Database Group](http://db.cc.gatech.edu/)
Licensed under [Apache License](LICENSE).


