1 of 10

GAURAV TARLOK KAKKAR

PhD Student – Georgia Tech

�EXPLORATORY�VIDEO �ANALYTICS

2 of 10

EVA: AN END-TO-END VIDEO database SYSTEM

2

Output

SELECT frame, bbox

FROM VIDEO

WHERE  'car’ in OBJECT_DETECTOR(frame).labels�

Distributed Execution Engine

Parser

Optimizer

EVA-QL

3 of 10

CASE STUDY: FINDING SUSPICIOUS VEHICLE

3

Officer searching for suspicious vehicle

Suspicious Vehicle Tracking

SELECT timestamp, VEHICLE_COLOR(frame,bbox)

FROM   VIDEO

CROSS APPLY OBJECT_DETECTOR(frame)�WHERE  timestamp > 6pm� AND label = 'car’� AND VEHICLE_MODEL(frame, bbox) = 'SUV';

  • Apply Object Detector on the video
  • Find bounding boxes with label = “car”
  • Use Vehicle Model to filter out the SUV

​

4 of 10

CASE STUDY: FINDING SUSPICIOUS VEHICLE

4

Multiple Overlapping executions of the User Defined Functions (UDFs)

SELECT timestamp, VEHICLE_COLOR(frame,bbox)

FROM   VIDEO CROSS APPLY OBJECT_DETECTOR(frame)�WHERE  timestamp BETWEEN 6pm AND 7pm� AND label = 'car'� AND VEHICLE_MODEL(frame, bbox) = 'SUV'

SELECT  timestamp, bbox, LICENSE(frame, bbox)�FROM    VIDEO CROSS APPLY OBJECT_DETECTOR(frame)�WHERE   timestamp BETWEEN 6pm AND 6:30pm� AND   label = 'car'� AND   VEHICLE_MODEL(frame, bbox) = 'SUV'

AND   VEHICLE_COLOR(frame, bbox) = 'RED'

Narrows search time looking for license plates of red SUVs

SELECT  timestamp

FROM    VIDEO

CROSS APPLY OBJECT_DETECTOR(frame)�WHERE   timestamp > 4pm� AND  label = 'car’� AND  LICENSE(frame, bbox)= 'XYZ123’

Track suspicious vehicle using license plate

Original Query

5 of 10

Problem Statement

Accelerating Exploratory Video Analytics by automatically materializing and reusing outcomes of expensive User Defined Functions (e.g., Object detection)

​

1. Identifying reuse opportunities

2. Impact of UDF reuse on query optimization decisions

3. Automatically rewriting the queries to use the views

​

5

6 of 10

1. SYMBOLIC PREDICATE ANALYSIS

6

t < 10

Compute and Materialize

5 < t < 15

Reuse: None

Reuse: t < 10 ∧ (5 < t < 15 )

= 5 < t < 10

Reuse

Compute and Materialize

7 of 10

2. Materialization-Aware Optimization

7

AND

VEH_MODEL is 'SUV'

VEH_COLOR

is 'RED'

AND

VEH_COLOR

is 'RED'

VEH_MODEL

is 'SUV'

sp- selectivity of the difference predicate

cr estimated cost for reading a tuple from the input relation

Predicate Reordering

8 of 10

3. Materialization-Aware QUERY REWRITE

8

Join With Materialized

 View MUDF

Append results to the materialized view

Conditional apply operator

9 of 10

CONCLUSION

9

Workload Speed-up

  • EVA adopts a symbolic approach to analyze the degree of reuse across queries
  • EVA outperforms Function Caching by a factor of 2x
  • Unlike function caching, EVA
    • Does not suffer from runtime hashing overhead
    • Leverages materialization-aware optimization opportunities
  • To know more about EVA, feel free to stop by our poster

​

​

10 of 10

Thank you