GAURAV TARLOK KAKKAR
PhD Student – Georgia Tech
�EXPLORATORY�VIDEO �ANALYTICS
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
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';
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
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
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
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
3. Materialization-Aware QUERY REWRITE
8
Join With Materialized
View MUDF
Append results to the materialized view
Conditional apply operator
CONCLUSION
9
Workload Speed-up
Thank you