everest: efficient top-k queries for video analytics · third, video data has temporal locality and...

19
Everest: Efficient Top-K eries for Video Analytics Ziliang Lai The Chinese University of Hong Kong [email protected] Chenxia Han The Chinese University of Hong Kong [email protected] Chris Liu The Chinese University of Hong Kong [email protected] Pengfei Zhang The Chinese University of Hong Kong [email protected] Eric Lo The Chinese University of Hong Kong [email protected] Ben Kao University of Hong Kong [email protected] ABSTRACT Recently, the impressive accuracy of deep neural networks (DNNs) has created great demands on practical analytics over video data. Although efficient and accurate, the latest video analytic systems have not supported analytics beyond simple queries like selection. In data analytics, Top-K is a very important analytical operation that enables analysts to focus on the most important entities. In this paper, we present Everest, the first system that supports efficient and accurate Top-K video analytics. Everest ranks and identi- fies the most interesting frames/moments from videos with probabilistic guarantees. Everest is built with a careful syn- thesis of deep computer vision, machine learning, uncertain data management, and Top-K query processing. Evaluations on five real-world videos and the latest Visual Road bench- mark show that Everest achieves between 16.3× to 20.6× higher efficiency than baseline approaches with high result accuracy. 1 INTRODUCTION Cameras are ubiquitous. Billions of them are being deployed in public (e.g., at road junctions) and private (e.g., in retail stores) all over the world [53]. Recent advances in deep con- volutional neural networks (CNNs) have led to incredible leaps in their accuracies in many machine learning tasks, notably image and video analysis. Such developments have created great demands on practical analytics over video data [6, 37, 38, 55, 74]. For instance, civil engineers are using traf- fic cameras in intelligent transportation systems for road planning, traffic incident detection, and vehicle re-routing in public transit [37]. Tools for fast and accurate video analytics are essential in numerous applications. Object recognition in image and video using CNNs are accurate [2830]. However, CNNs are computationally ex- pensive to train and to serve. This poses significant challenge in using CNN-based object recognition techniques to analyze massive amounts of streaming videos. For example, state- of-the-art object detectors run at about 5 fps (frames per second) using GPUs [28]. This frame-processing rate is 6 times slower than the frame rate of a typical 30-fps video. Consequently, a “scan-and-test” approach that invokes an object detector on every frame would take 6 times the dura- tion of a video to complete. While we can parallelize that by, say, using multiple GPUs in the cloud, the computational ex- pense remains high regardless of parallelism. Consequently, the research community has started to build systems with innovative solutions to support fast analytics over video data [4, 6, 25, 31, 36–38, 46, 47, 52, 55, 67, 74, 77]. Video analytics is an emerging research area that inter- sects database and computer vision. It is, however, still in its infancy. For example, latest systems support only selection queries such as object selection [4, 19, 31, 37, 38, 47, 50, 68] and object-trajectory selection [6, 42]. In data analytics, Top- K is a very important analytical operation that enables an- alysts to focus on the most important entities in the data [7, 10, 34, 58]. In this paper we present the very first set of solutions for efficient Top-K video analytics. Top-K can help rank and identify the most interesting frames/moments from videos. Example use cases include: Property Valuation. The valuation/rent of a shop is strongly related to its peak foot traffic [13]. Instead of manual count- ing, one can use a camera to capture pedestrian flow and use a machine to identify, say, the Top-10 frames (time of the day) with the highest pedestrian counts. Data-Driven Agriculture. The global food demand is ex- pected to increase by 70% from 2010 to 2050 [39]. In order to improve farm productivity, the FarmBeats project at Mi- crosoft sends drones to collect and analyze farm videos [66]. Recent news also report that oil-palm farmers in Malaysia send drones to monitor the growth of oil-palm [57]. With oil-palm plantations spread across 86,100 square miles in Malaysia, farmers with limited resources can only inspect a small number of fields onsite each day. Finding the Top- K fields (e.g., based on number of well-grown palm trees) over drone videos can drastically help farmers prioritize field trips. arXiv:2003.00773v2 [cs.DB] 13 Sep 2020

Upload: others

Post on 03-Oct-2020

5 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Everest: Efficient Top-K Queries for Video Analytics · Third, video data has temporal locality and thus Top-K queries can be frame-based or window-based. For example, one could be

Everest: Efficient Top-KQueries for Video AnalyticsZiliang Lai

The Chinese University of HongKong

[email protected]

Chenxia HanThe Chinese University of Hong

[email protected]

Chris LiuThe Chinese University of Hong

[email protected]

Pengfei ZhangThe Chinese University of Hong

[email protected]

Eric LoThe Chinese University of Hong

[email protected]

Ben KaoUniversity of Hong Kong

[email protected]

ABSTRACT

Recently, the impressive accuracy of deep neural networks(DNNs) has created great demands on practical analyticsover video data. Although efficient and accurate, the latestvideo analytic systems have not supported analytics beyondsimple queries like selection. In data analytics, Top-K is avery important analytical operation that enables analyststo focus on the most important entities. In this paper, wepresent Everest, the first system that supports efficient andaccurate Top-K video analytics. Everest ranks and identi-fies the most interesting frames/moments from videos withprobabilistic guarantees. Everest is built with a careful syn-thesis of deep computer vision, machine learning, uncertaindata management, and Top-K query processing. Evaluationson five real-world videos and the latest Visual Road bench-mark show that Everest achieves between 16.3× to 20.6×higher efficiency than baseline approaches with high resultaccuracy.

1 INTRODUCTION

Cameras are ubiquitous. Billions of them are being deployedin public (e.g., at road junctions) and private (e.g., in retailstores) all over the world [53]. Recent advances in deep con-volutional neural networks (CNNs) have led to incredibleleaps in their accuracies in many machine learning tasks,notably image and video analysis. Such developments havecreated great demands on practical analytics over video data[6, 37, 38, 55, 74]. For instance, civil engineers are using traf-fic cameras in intelligent transportation systems for roadplanning, traffic incident detection, and vehicle re-routing inpublic transit [37]. Tools for fast and accurate video analyticsare essential in numerous applications.Object recognition in image and video using CNNs are

accurate [28–30]. However, CNNs are computationally ex-pensive to train and to serve. This poses significant challengein using CNN-based object recognition techniques to analyzemassive amounts of streaming videos. For example, state-of-the-art object detectors run at about 5 fps (frames per

second) using GPUs [28]. This frame-processing rate is 6times slower than the frame rate of a typical 30-fps video.Consequently, a “scan-and-test” approach that invokes anobject detector on every frame would take 6 times the dura-tion of a video to complete. While we can parallelize that by,say, using multiple GPUs in the cloud, the computational ex-pense remains high regardless of parallelism. Consequently,the research community has started to build systems withinnovative solutions to support fast analytics over video data[4, 6, 25, 31, 36–38, 46, 47, 52, 55, 67, 74, 77].Video analytics is an emerging research area that inter-

sects database and computer vision. It is, however, still in itsinfancy. For example, latest systems support only selectionqueries such as object selection [4, 19, 31, 37, 38, 47, 50, 68]and object-trajectory selection [6, 42]. In data analytics, Top-K is a very important analytical operation that enables an-alysts to focus on the most important entities in the data[7, 10, 34, 58]. In this paper we present the very first set ofsolutions for efficient Top-K video analytics. Top-K can helprank and identify the most interesting frames/moments fromvideos. Example use cases include:PropertyValuation. The valuation/rent of a shop is stronglyrelated to its peak foot traffic [13]. Instead of manual count-ing, one can use a camera to capture pedestrian flow and usea machine to identify, say, the Top-10 frames (time of theday) with the highest pedestrian counts.Data-Driven Agriculture. The global food demand is ex-pected to increase by 70% from 2010 to 2050 [39]. In orderto improve farm productivity, the FarmBeats project at Mi-crosoft sends drones to collect and analyze farm videos [66].Recent news also report that oil-palm farmers in Malaysiasend drones to monitor the growth of oil-palm [57]. Withoil-palm plantations spread across 86,100 square miles inMalaysia, farmers with limited resources can only inspecta small number of fields onsite each day. Finding the Top-K fields (e.g., based on number of well-grown palm trees)over drone videos can drastically help farmers prioritize fieldtrips.

arX

iv:2

003.

0077

3v2

[cs

.DB

] 1

3 Se

p 20

20

Page 2: Everest: Efficient Top-K Queries for Video Analytics · Third, video data has temporal locality and thus Top-K queries can be frame-based or window-based. For example, one could be

Transport Planning. Severe traffic congestion can occurwhen multiple bus routes pass through the same narrowexpressway. A Top-K query on the moments with the biggestbus convoy provides valuable information on the congestioncaused and for better bus scheduling.In video analytics, CNN Specialization and Approximate

Query Processing (AQP) are two popular techniques for over-coming the inefficiency of the scan-and-test method [4, 31, 37,38]. With CNN specialization, a video analytics system trainsa lightweight query-specific model (e.g., a model specificallyfor “bus” selection) using frames sampled from the video-of-interest as training data. Since the specialized CNN is highlyspecific to the query instance and the video-of-interest, itis both efficient to train and to serve (but is generally lessaccurate). The specialized CNN is then applied to all videoframes to obtain a set of candidate frames that are likelyto satisfy the given query. Finally, the candidate frames arepassed to an accurate but less efficient object detector (e.g.,YOLOv3 [60], Mask R-CNN [28]) to verify their validity. Ap-proximate Query Processing (AQP) [1, 37] is an orthogonaltechnique for fast analytics when users are willing to toler-ate some statistical error. The complex interplay betweendeep model inference and Top-K query processing, however,creates novel challenges for CNN specialization and AQP.First, unlike selection queries where a frame satisfies a

predicate or not is independent of other frames, whethera frame is in Top-K requires score comparisons between itand others. Consequently, short circuiting expensive filterpredicates using specialized CNNs (e.g., [4, 31, 38]) is insuffi-cient to Top-K query processing. Second, AQP techniquesfor video analytics (e.g., [37]) estimate statistics (e.g. averagenumber of cars) but Top-K query returns a set (of frames)instead of a statistic. Third, video data has temporal localityand thus Top-K queries can be frame-based or window-based.For example, one could be interested in finding the Top-K5-second clips with the highest number of vehicles. Thisadds to the complexity of answering Top-K queries in videoanalytics.To address these challenges, we present Everest, a sys-

tem that empowers users to pose Top-K queries on videosbased on any given scoring (ranking) function. Everest isthe first to return results with probabilistic guarantees.This design plays in unison with deep networks becausemodel inference results are intrinsically probabilistic, whichis in sharp contrast to recent video analytic systems wherevaluable uncertainty information is discarded. To illustrate,Table 1a shows an example output of the specialized CNNused in BlazeIt [37]. The (car) count in each traffic videoframe is best given in the form a probability distributionby the softmax layer of the classifier, which captures theuncertainty of the prediction. Existing systems (e.g., [37]),however, process queries based on a trimmed view where all

cases except the most probable one are discarded (see Table 1b).Everest, in contrast, treats the valuable distribution as a

first-class citizen. Furthermore, Everest is extensible tosupport windowing so that users can ask Top-K-windows

queries as well.Supporting Top-K analytics over videos enables rich anal-

yses over the visual world, just as what traditional Top-Kquery processing has done over relational data. Everest de-velops new uncertain Top-K techniques based on its novelsetting. Specifically, most Top-K uncertain query process-ing techniques assume no ground-truth is accessible at run-time [3, 32, 59, 63, 64, 70]. In contrast, Everest can accessan accurate object detector online to reduce the data uncer-tainties and achieve ground-truth-in-the-loop uncertain

data analytics. While an object detector can be viewed as a“cleaning agent” in traditional uncertain data cleaning (e.g.,[14, 49]), the cleaning result in those work is out-of-the-loop.That is, the cleaning is done offline and the algorithms returna subset of uncertain data to be cleaned based on a givenbudget. Although some recent works have further extendeduncertain query processing to reduce the uncertainties on-line through a crowdsourcing platform (e.g., [17, 73]), theymostly focus on the human efficiency issues (e.g., the plu-rality of a task that is needed to improve answer accuracygiven that human workers make mistakes [20, 40]). By con-trast, Everest focuses on the system and algorithm designsto perform probabilistic Top-K video analytics at scale.We evaluate Everest on five real-world videos and the latestVisual Road benchmark [27]. We show that Everest canachieve 16.3× to 20.6× speedup over the baseline approaches.In summary, we make the following contributions:

(1) We design and present a novel notion of Top-K ana-lytics over videos. Our design is the first to treat theprobability distribution from specialized CNNs as afirst-class citizen in video analytics.

(2) We present Everest, the first video analytics systemthat supports Top-K queries with probabilistic guaran-tees. The system is able to support both frame-basedand window-based queries and support different typesof ranking functions.

(3) We develop efficient algorithms and implementationsfor each system module. Our algorithms overcomethe combinatorial explosion in the number of possibleworlds commonly found in uncertain query processing.Our system is highly optimized using techniques suchas batch inference and prefetching.

The remainder of this paper is organized as follows. Sec-tion 2 provides essential background for this paper. Section3 discusses Everest in detail. Section 4 gives evaluationresults. Section 5 discusses related work. Finally, Section 6concludes the paper.

Page 3: Everest: Efficient Top-K Queries for Video Analytics · Third, video data has temporal locality and thus Top-K queries can be frame-based or window-based. For example, one could be

timestamp/frame

count prob.

f1

0 0.781 0.212 0.01

f2

0 0.491 0.422 0.09

f3

0 0.161 0.482 0.36

(a) Output of a lightweight

model

timestamp/frame

count

f1 0f2 0f3 1

(b) Existing systems dis-

card uncertainty informa-

tion

Table 1: State-of-the-art

2 BACKGROUND

In this section we provide essential background to our study.More discussions and other related works are given in Sec-tion 5.CNN. Object detection is an important problem in ComputerVision (CV). The problem is to identify object occurrences inimages. Convolutional neural networks (CNNs) are reportedto achieve near-human or even better-than-human accuracyin image classification [29]. However, these deep models arecomplex with millions to billions of parameters. Inferencingwith these models is thus computationally expensive. Forexample, Mask R-CNN and YOLOv3, two state-of-the-artmodels, process video at respective rates of 5 fps and 30 fpson GPUs [8].Modern Video Analytics. The huge volume of video dataposes great challenges to modern video analytics research[4, 31, 37, 38, 50, 55, 74]. For analytical processing, videodata is often modeled as relations, which captures objectoccurrences in a specific video clip [37]. Specifically, eachtuple in a video relation corresponds to a single object in avideo frame. Since a frame may contain 0 or more objects(of interest) and an object may appear in multiple frames, aframe can be associated with 0 or more tuples in a relationand an object can be associated with multiple tuples. Typicalattributes of a tuple include a frame timestamp (ts), a uniqueid of an identified object (objectID), the object’s class label(class), bounding polygon (polygon), raw pixel content (con-tent), and feature vector (features). A video relation can bematerialized by invoking an object detector per frame. Table2 shows an example of a materialized video relation. TheobjectID attribute can be populated by invoking an objecttracker (e.g, [75]), which takes as input two polygons fromtwo consecutive frames and returns the same objectID if thetwo polygons represent the same object. In video analytics, a

Timestamp (ts) Class Polygon ObjectID Content Features01-01-2019:23:05 Human (10, 50), (30, 40), . . . 16 . . . . . .01-01-2019:23:05 Bus (45, 58), (66, 99), . . . 58 . . . . . .

01-01-2019:23:06 Human (20, 80), (7, 55), . . . 16 . . . . . .01-01-2019:23:06 Car (6, 91), (10, 55), . . . 59 . . . . . .01-01-2019:23:06 Car (78, 91), (40, 55), . . . 60 . . . . . .

. . . . . . . . . . . . . . . . . .

Table 2: A video relation fully populated by a ground-

truth object detector

video relation that is materialized by an accurate object detec-tor such as YOLOv3 is regarded as the system’s ground-truth[31]. However, fully materializing a ground-truth relation iscomputationally expensive. Therefore, the key challenge ishow to answer queries without fully materializing that videorelation [4, 31, 37, 38, 50, 55, 74]. This distinguishes modernvideo analytics with classic video databases (e.g., [11, 22, 35]).The latter assumes the video relations are given, presumablyvia some external means (such as human annotations).

CNN specialization is a popular technique used to speedup modern video analytics [31, 37, 38, 62]. Inspired by theconcept of “cascade” [69] in computer vision, the idea isto use frames sampled from the video-of-interest to train alightweight CNN (e.g, with fewer layers) as a proxy to anexpensive ground-truth object detector (e.g., Mask R-CNN).Training specialized CNNs is significantly faster becausethere are fewer layers and the context is specific. For example,training of a CNN using only frames from a traffic videoconverges much faster than in a general setting because thereare far fewer object classes to consider (e.g., cars, pedestrians)than a general object detector which considers thousands ofclasses. Inference speeds of specialized CNNs are also faster(e.g., 10,000 fps [37]) with certain accuracy loss. As a remedy,systems like BlazeIt [37] use statistical techniques to boundthe errors.Top-K Query Processing. In many application domains(e.g., multimedia databases [23] and spatial databases [61]),users are more interested in the K most important tuplesordered by a scoring (ranking) function. The essence of ef-ficient Top-K query processing is to wisely schedule dataaccesses such that most of the irrelevant (non-top-K) itemsare skipped. This minimizes expensive data accesses (e.g.,from disk) and provides early stopping criteria to avoid un-necessary computation.Uncertain Query Processing. One common uncertaindata representation is “x-tuples” [2]. An uncertain relation isa collection of x-tuples, each consists of a number of alterna-tive outcomes that are associated with their correspondingprobabilities. Together, the alternatives form a discrete prob-ability distribution of the true outcome. x-tuples are assumedto be independent of each other. We will discuss later howEverest uses a difference detector so that the outputs of aspecialized CNN can be represented by the x-tuple model

Page 4: Everest: Efficient Top-K Queries for Video Analytics · Third, video data has temporal locality and thus Top-K queries can be frame-based or window-based. For example, one could be

timestamp num of cars

f1 0f2 0f3 0

(a) Pr (W1) = 0.78 × 0.49 × 0.16

timestamp num of cars

f1 1f2 0f3 0

(b) Pr (W2) = 0.21 × 0.49 × 0.16

Table 3: Two possible worldsW1 andW2

timestamp num of cars conf.

f1

0 0.781 0.212 0.01

f2

0 0.491 0.422 0.09

f3 0 1.0

Table 4: After GTOD(f3) on Table 1a

(i.e., the inference result of a video frame is captured by onex-tuple). Hence, in the following discussion, we use the termsx-tuple, frame, and timestamp interchangeably.

3 EVEREST

Everest allows users to set a per-query threshold, thres,to ensure that the returned Top-K result has a minimum ofthres probability to be the exact answer. Given an uncertainrelation D obtained from a video (Section 3.2 discusses howto obtain that) and a scoring function S (e.g., count the num-ber of cars in a frame f ), Everest returns a Top-K result R̂with confidence p̂ = Pr(R̂ = R) ≥ thres, where R is the exactresult and thres is the probability threshold specified by theuser. The probability p̂ is defined over an uncertain relationD (e.g., Table 1a) using the possible world semantic (PWS)[51]. The possible world semantic is widely used in uncer-tain databases, where an uncertain relation is instantiated tomultiple possible worlds, each of which is associated with aprobability. Table 3 shows two possible worlds (out of 33) ofTable 1a. Given the probability of each possible world, theconfidence p̂ of a Top-K answer R̂ is the sum of probabilitiesof all possible worlds in which R̂ is Top-K:

p̂ =∑

W ∈W(D)∧R̂=Top-K(W )

Pr(W ). (1)

Here, W(D) denotes the set of all possible worlds of anuncertain relation D. In addition, the answer R̂ has to satisfythe following:

Definition 3.1. TheCertain-Result (CR)Condition: TheTop-K result R̂ has to be chosen from Dc , where frames inDc ⊆ D are all certain, i.e., they have already been verified

by a ground-truth object detector (GTOD) so that they haveno uncertainty.

The certain-result condition is important and unique invideo analytics. For instance, the Top-1 result of the uncertainrelation D in Table 1a is R̂ = { f3} and it has a confidence ofp̂ = 0.85 based on Equation 1. Assuming thres = 0.8, theconfidence of R̂ being the correct answer is above the userthreshold.

However, after all this is a probabilistic result, and so theuser will feel weird if she visually inspects f3 and actuallysees no cars in it. The certain result condition avoids suchawkward answers and constrains that all the tuples in R̂have to be confirmed by a GTOD before it is returned to theusers. With the CR condition, { f3} would not be returnedas the Top-1 result because its probability of being Top-1is only 0.38 based on the updated uncertain relation D ′ inTable 4, in which the exact score of f3 has been obtained bya GTOD (we denote that operation as GTOD(f3)). Finally,we remark that p̂ = Pr(R̂ = R) ≥ thres guarantees notonly the whole result set R̂ has at least thres probabilityof being the true answer, but every frame f̂ in R̂ also hasat least thres probability of being in the exact result setR because Pr( f̂ ∈ R) ≥ Pr(R̂ = R) ≥ thres. Pr( f̂ ∈ R)reflects the precision of Top-K answer, i.e., the fraction ofresults in R̂ that belongs to R. Therefore, Everest effectivelyprovides probabilistic guarantees on the precision of thequery answers.

3.1 System Overview

Following recent works [4, 31, 38], Everest also focuses on abatch setting. In this setting, large quantities of video are col-lected for post-analysis. Online analytics on live video streamis a different setting and is beyond the scope of this paper. Wefocus on a fixed set of labels because the pre-trained GTODcan detect “cars” but cannot distinguish between sedan andhatchback. Users can supply user-defined functions (UDFs)to do further classification if necessary. To our knowledge,tracking model drift in visual data is still an ongoing researchin computer vision [38]. We will tackle that problem uponrobust techniques for resolving model drift are developed.Figure 1 shows a system overview. Everest leverages

CNN specialization and uncertain query processing to ac-celerate Top-K analytics with probabilistic guarantee. Pro-cessing a query involves two phases. The first phase trains alightweight convolutional mixture density network (CMDN)[21] that outputs a distribution of a frame’s score (e.g., thenumber of cars in the frame), followed by quantifying thedistribution into an initial uncertain relation D0. The firstphase can be done offline (i.e., ingestion time) for standardscoring functions (e.g., counting). The second phase takesas input the resulting uncertain relation D0 from Phase 1

Page 5: Everest: Efficient Top-K Queries for Video Analytics · Third, video data has temporal locality and thus Top-K queries can be frame-based or window-based. For example, one could be

Video

 

Sampling Training

CMDNDifferencedetector

Quantization

timestamp numofcars conf.00:00:01 0 0.300:00:02 1 0.400:00:03 2 0.3

... ...

f1

Uncertaintable

count

9

Phase1

if

Return

update

True

False

Phase2Ground-truthObjectdetector

Ground-truthobjectdetector

Figure 1: System Overview

and finds a Top-K result R̂ that has a confidence p̂ ≥ thres.Initially, given D0 only, it is unlikely that the initial Top-Kresult R̂0 from D0 gives a confidence that is above the thresh-old. Furthermore, we see from the beginning of this sectionthat given a potential Top-K result R̂, we have to confirmits frames for the CR condition using a GTOD — but thatmay conversely give the same R̂ a lower confidence basedon the updated uncertain relation D ′ (e.g., drops from 0.85 to0.38). Of course, if the uncertain relationD ′ contains no moreuncertainty (i.e., all tuples are certain), the Top-K result fromthat D ′ has a confidence of 1. Consequently, Phase 2 can beviewed as Top-K processing via online uncertain data cleaning,in which the system selectively “cleans” the uncertain tuplesin the uncertain relation using a GTOD until the Top-K resultfrom the latest uncertain relation satisfies the probabilisticguarantee. For high efficiency, Phase 2 aims to clean as fewuncertain tuples as possible because each cleaning operationinvokes the computationally expensive GTOD. Furthermore,the algorithms in Phase 2 have to be carefully designed be-cause uncertain query processing often introduces an expo-nential number of possible worlds. Recent uncertain queryprocessing techniques that use a crowdsourcing platform toclean uncertain data (e.g., [18, 20, 40, 44]) are inapplicablehere because they are heuristic solutions and do not con-sider the probabilistic guarantee threshold as input. We willdiscuss this in more detail in Section 3.3.

3.2 Phase 1: Building the initial uncertain

relation D0 using convolutional

mixture density network (CMDN)

The crux of CNN specialization is the design of a lightweightmodel that is suitable for the specific query type. In Everest,a specialized CNN is used as a cheap proxy of the scoringfunction. The specialized CNN is trained on frames sampledfrom the video with ground-truth labeled using the ground-truth object detector (GTOD). Prior works [37, 38] mostly

Convolutionlayers MDNlayer

Figure 2: Everest’s lightweight Convolutional Mix-

ture Density Network

build classifiers, where each distinct integer is treated asa standalone class in the softmax layer. The softmax layereffectively generates a discrete distribution of number of carsfor frames as shown in Table 1a. One drawback of building aclassifier is that the maximum number of classes is restrictedto be the maximum value found in the sample frames. Thisis undesirable because it fails once the Top-1 frame is missedin the sampled training frames. We therefore discard thatapproach.In order to predict scores unrestricted to the maximum

score seen in the training examples and to support any userdefined scoring function, we use a regression model. Fur-thermore, in order to obtain the uncertainty information, weuse a mixture density network (MDN) [48]. MDN has the ad-vantage of capturing the probability density of the estimatedscore instead of a point-estimate. Our specialized model istherefore a convolutional mixture density network (CMDN).Our CMDN is shown in Figure 2. It uses five convolutionlayers to extract features from the input frame, followed byan MDN layer (with h hypothesis) to output parameters ofд Gaussians (each has a mean µ and variance σ ) and theirweights π in the mixture.

The training data of the CMDN are frames randomly sam-pled from the video-of-interest with real scores (e.g., numberof cars) obtained from a GTOD. In order to generate robustmodels, we train multiple CMDN models with different setsof hyperparameters. Since both the model and the training

Page 6: Everest: Efficient Top-K Queries for Video Analytics · Third, video data has temporal locality and thus Top-K queries can be frame-based or window-based. For example, one could be

data are small, the total training time is less than severalminutes. After training, Everest selects the best model byevaluating the models on a holdout set. The holdout set isobtained the same way as the training samples. The modelwith the smallest negative log-likelihood (NLL) [26] is chosenand the rest are discarded.Before building the uncertain relation using the chosen

CMDN, Everest uses a difference detector to discard sim-ilar frames from the video. This step serves two purposes.First, frames with little differences are not informative. Sec-ond, it approximates independence among frames so as toenable the use of “x-tuples” to model the data. After that,Everest feeds the unique frames to the CMDN to obtaintheir score distributions. An x-tuple captures a discrete dis-tribution but the Gaussian mixture is continuous and withinfinitely long tails on both ends. In order to get a finiteuncertain relation, we follow [16] to truncate the Gaussiansso that the probabilities beyond 3σ are set to zero and evenlydistributed to the rest. After that, we populate the uncer-tain relation D0 by quantizing the truncated mixed Gaussiandistribution. For counting based scoring function, the scoredistribution is quantized to a discrete distribution with non-negative integer support. For others, users have to providethe quantization step size when defining the scoring func-tion. For frames already labeled by the GTOD when trainingthe CMDN, their real scores are known and certain. Theyare inserted into the uncertain relation straight with no un-certainty so that no work is wasted. Nevertheless, we stillcall that as an “uncertain relation”.

3.3 Phase 2: Top-K processing with

ground-truth-in-the-loop uncertain

data cleaning

Figure 1 (right) outlines the flow of Phase 2. Starting from anuncertain relation D0 given by Phase 1, it iteratively selectsthe best frame f ∗ (by the Select-candidate function) to cleanusing the GTOD until a Top-K result R̂i based on the latesttable Di has a confidence p̂i (computed by the Topk-probfunction) exceeding the user threshold thres.Finding a Top-K result R̂i from the latest updated table

Di (by the Top-K(Dci ) function) is straightforward because it

simply extracts all the certain tuples Dci (because of the CR

condition) from Di and applies an existing Top-K algorithm(e.g., [10]) to find the Top-K as R̂i . The function Topk-probthat computes the probability p̂i for R̂i being the exact re-sult and the function Select-candidate that selects the mostpromising frame are more challenging because they involvean exponential number of possible worlds. Unfortunately,the techniques used in traditional uncertain data cleaning(e.g., [15, 49]) are inapplicable here because of the differencesin problem settings.

D Uncertain relationDi Uncertain relation at iteration iDci Subset of Di whose x-tuples are all certain

Dui Subset of Di whose x-tuples are all uncertainR̂ Approximate Top-K resultp̂ Confidence/probability of R̂

R̂i , p̂i R̂, p̂ obtained in i-th iterationR Actual resultf Frame / x-tuple

GTOD Ground-truth object detectorSf Score of fki The frame ranked K-th in R̂ipi The frame ranked penultimately in R̂i

Table 5: Major Notations

Traditional uncertain data cleaning problems have a bud-get constraint, which is usually the number of x-tuples thatcould be cleaned [14, 15, 49]. Their objective is to minimizethe entropy of all possible Top-K results from the updated ta-ble [20, 49]. Since their setting is to return a batch of x-tuplesfor manual offline cleaning, using entropy allows them tomeasure the answer quality solely based on the uncertaindata as the results of the cleaning operation are not availableat run-time. By contrast, our constraint is to pass the proba-bility threshold thres and our objective is to minimize thecost of using the GTOD (and the algorithm overhead). Forus, the GTOD provides instant feedback, allowing us to putthat in the loop to come up with a probabilistic guarantee(between 0 and 1), which is way more intuitive than usingentropy (which could be 0 to ∞). Recent approaches thatare based on crowdsourcing to clean uncertain data onlinewhile processing a Top-K query (e.g., [18, 20, 40, 44]) are alsoinapplicable because they are heuristic solutions and stop oncethe given monetary budget is exhausted. They are thus hard,if not impossible, to establish our probabilistic guarantee.In the following, we discuss efficient algorithms to im-

plement the Topk-prob and the Select-candidate functions.Table 5 gives a summary of the major notations used.

3.3.1 Topk-prob(Di , R̂i ). Given a potential result R̂i extractedfrom Dc

i , computing its confidence p̂i via Equation 1 has toexpand all O(mn) possible worlds, where n is the number offrames in D and assume each of them hasm possible scoresin the uncertain relation. However, given the Certain Result(CR) condition, we can simplify the calculation of p̂i as:

p̂i =∏f ∈Du

i

Pr(Sf ≤ Ski ) (2)

where (a) S stands for the score of a frame, (b) ki is the“threshold” frame that ranks K-th in R̂i , and its score Ski is

Page 7: Everest: Efficient Top-K Queries for Video Analytics · Third, video data has temporal locality and thus Top-K queries can be frame-based or window-based. For example, one could be

known and certain (because ki is from R̂i ⊆ Dci ), and (c) Du

iare frames in Di with uncertainty, i.e., Du

i = Di \ Dci .

Computing Equation 2 requires only time that is linear to|Du

i |. Equations 1 and 2 are equivalent because the probabilityof R̂i being Top-K is equal to the probability that no framesin Du

i having scores larger than the frames in R̂i .1A further optimization is to compute two functions before

Phase 2 begins: (a) the CDF F for the score of each frame f ,

i.e., Ff (t) = Pr(Sf ≤ t) =t∑j=0

Pr(Sf = t) and (b) a function

H (t) = ∏f ∈Du

0Ff (t), which is the joint CDF of all uncer-

tain frames in D0. With them, in the i-th iteration, we cancompute p̂i as follows:

p̂i =H (Ski )∏

f ∈DciFf (Ski )

(3)

Equations 2 and 3 are equivalent because by definitionDui = Du

0 \ Dci . Ff (t) and H (t) for all f and t can be easily

pre-computed one-off at a cost of O(|Du0 |). With Equation 3,

Topk-prob(Di , R̂i ) in the i-th iteration can compute p̂i usingO(|Dc

i |) time instead, where |Dci | << |Di |.

According to Equation 2, p̂i improves exponentially withthe number of frames cleaned. Therefore, we expect Phase2 would spend more iterations to reach a small probabil-ity threshold, say, 0.5. But after that, it would take feweriterations to reach any probability threshold beyond.

3.3.2 Select-candidate(Dui ). Select-candidate(D

ui ) is the func-

tion to select a frame f ∗ from the set of uncertain frames Dui

in the i-th iteration to apply the GTOD such that cleaningf ∗ can maximize p̂i+1 of the next iteration; and hopefullyp̂i+1 ≥ thres after that and thus Phase 2 can stop early.

Of course, p̂i+1 is unknown before we apply GTOD(f ∗).Therefore, we use a random variable Xf to denote the valueof p̂i+1 after a frame f is cleaned. To maximize p̂i+1, we aimto find f ∗ = arg maxf ∈Du

iEi [Xf ]. Using xsf to denote the

value of Xf when Sf = s , where s is a particular score, E[Xf ]is thus:

E[Xf ] =∑s

Pr(Sf = s)xsf (4)

[Efficient computation of xsf ] xsf is the probability of theresult R̂i+1 being the Top-K based on Di+1, where the x-tuplerepresenting f in Di+1 is assumed to be cleaned and its scoreis s and certain. Therefore, xsf can be calculated on top ofpi (Equation 3) by removing the uncertainty of f , based onhow the actual score s of f influences the Top-K result:

1We allow frames in Dui to have scores tie with the threshold frame ki .

xsf =

H (Ski )Ff (Ski )

∏f ′∈Dc

iFf ′(Ski )

=p̂i

Ff (Ski )s ≤ Ski

H (s)Ff (s)

∏f ′∈Dc

iFf ′(s)

Ski < s ≤ Spi

H (Spi )Ff (Spi )

∏f ′∈Dc

iFf ′(Spi )

s > Spi

(5)The idea of Equation 5 is that:

• when s ≤ Ski , frame f is not qualified to be in Top-K;the Top-K result would not change, and the thresholdscore is still Ski ; So, discounting the uncertainty of fsuffices.

• when Ski < s ≤ Spi , frame f enters the Top-K andbut its score is lower than the penultimate frame piin the Top-K result, i.e., the one ranks (K − 1)-st, soframe f gets the K-th rank; the new “threshold” scoreis changed to s;

• when s > Spi , frame f enters the Top-K with a scoregreater than the original penultimate frame, the newthreshold frame ispi , the new threshold score is changedto Spi .

Putting Equations 5 and 4 together, we get:

E[Xf ] = p̂i +Spi∑

s=Ski +1

Pr(Sf = s)H (s)Ff (s)

∏f ′∈Dc

iFf ′(s)

+(1 − Ff (Spi ))H (Spi )

Ff (Spi )∏

f ′∈DciFf ′(Spi )

(6)

Equation 6 greatly reduces the cost of computing E[Xf ]compared to Equation 4 because the summation sums onlyover the range from (Ski + 1) to Spi .

[Finding f ∗ by early stopping] To find f ∗ in an iterationi , a baseline implementation of Select-candidate(Du

i ) hasto compute Ei [Xf ] for every frame f in Du

i . It is inefficientbecause Du

i is large.Fortunately, we can deduce an upper bound, U (Xf ), for

each E[Xf ] and process frames in descending order ofU (Xf )to early stop the computation of f ∗. Specifically, startingfrom Equation 6, we have:

Page 8: Everest: Efficient Top-K Queries for Video Analytics · Third, video data has temporal locality and thus Top-K queries can be frame-based or window-based. For example, one could be

E[Xf ] = p̂i +Spi∑

s=Ski +1

Pr(Sf = s)H (s)Ff (s)

∏f ′∈Dc

iFf ′(s)

+(1 − Ff (Spi ))H (Spi )

Ff (Spi )∏

f ′∈DciFf ′(Spi )

≤p̂i +Spi∑

s=Ski +1

Pr(Sf = s)H (Spi )Ff (Spi )

∏f ′∈Dc

iFf ′(Spi )

+(1 − Ff (Spi ))H (Spi )

Ff (Spi )∏

f ′∈DciFf ′(Spi )

= p̂i +(1 − Ff (Ski ))H (Spi )

Ff (Spi )∏

f ′∈DciFf ′(Spi )

= p̂i + γψi (f ) = U (Xf ) (7)

where the last line factors the terms into:γ = H (Spi )∏f ′∈Dci

Ff ′ (Spi )

andψi (f ) =1−Ff (Ski )Ff (Spi )

.In the i-th iteration, the order of frames’ upper bound

is only determined by the “sort-factor” ψi (f ) because theframes share the same p̂i andγ . This suggests Select-candidate(Du

i )to examine the frames in the descending order of theirψi (f ).When it examines a frame f − whose U (Xf − ) is smaller thanany examined frame fseen ’s E[Xfseen ], Select-candidate(Du

i )would stop early and return f ∗ from those that have beenexamined. However, since Ski (and thusU (Xf )) changes withi , we might have to re-compute and re-sort the frames per it-eration. To avoid this overhead, we further re-write Equation7 to:

E[Xf ] ≤ p̂i + γψj (f ) (8)

where j ≤ i . The inequality still holds becauseψj (f ) ≤ ψi (f )by observing Skj ≤ Ski and Spj ≤ Spi .

With Equation 8, we can simply set j = 0 so that we onlyneed to computeψj (f ) and sort frames in the first iteration.However, to balance between tighter bounds and efficiency,in the first 100 iterations, we set j =

⌊ i10⌋, i.e., we update

ψj (f ) and sort frames every 10 iterations. For iterations there-after, we updateψj (f ) whenever Ski or Spi change. The ideais that Ski and Spi change more in early iterations but arerelatively stable afterwards.

3.4 Top-K Windows

Videos are spatial-temporal in nature and thus users maywant to split a video into time windows of finite size, computetheir scores, and examine the Top-K ones. For example, anurban planner may be interested in the Top-50 5-secondwindows, where the score of a window is the average numberof cars observed in its frames.

Everest supports Top-K over tumbling windows like theexample given above. Specifically, a video-of-interest is di-vided into consecutive non-overlapping time windows w1,w2,...,wn , each of which contains L frames. The score of awindow w , denoted by Sw , is the average of the scores ofthe frames in it, i.e., Sw = 1

L∑

f ∈w Sf . For Top-K-windowqueries, we find the Top-K windows R̂ such that p̂ = Pr(R̂ =R) ≥ thres, where R is the set of true Top-K windows.

To support this type of query, Everest builds anotheruncertain table whose schema is akin to Table 1a: (window,avg(num of cars), prob). Let the i-th frame in w be f i .The distribution of Sw can be calculated based on the distribu-tions of Sf 1 , Sf 2 , . . . , Sf L . From Section 3.2, the distribution ofSf i , as obtained from the CMDN, is a д-component Gaussianmixture with a density of:

д∑j=1

πi jN(µi j ,σ 2i j )

where πi j , µi j , σi j are the weight, mean and variance of the j-th component in the mixture distribution of Sf i , respectively.Since Everest’s difference detector (Section 3.5) discards aframe f i if it is too similar to a retained frame rt , the scoredistribution of Sf i is approximated by the distribution ofSrt . Furthermore, Everest ’s difference detector effectivelydivides a window into l segments, where the frames in thesame segment are similar to the same retained frame rt . Sincethe retained frames are judged by the difference detector assufficiently dissimilar, we assume their score distributionsare independent. Let r1, r2, ..., rl denote the l retained framesinw , we approximate the distribution of Sw by

Sw ∼ N( 1L

l∑t=1

|st |µ̄rt ,1L

l∑t=1

|st |σ̄ 2rt ) (9)

where |st | denotes the size of t-th segment; µ̄rt and σ̄rt arethe mean and the total variance of Srt , respectively. Supposert is the q-th frame inw , then

µ̄rt =

д∑j=1

πqjµqj ,

σ̄ 2rt =

д∑j=1

πqj (σ 2qj + µ

2qj − µ̄2

rt ).

By quantizing the distribution in Equation 9, Everest ob-tains an uncertain table of x-tuples on the mean score ofeach tumbling window. That uncertain table is compatiblewith the algorithms in Phase 2. When confirming a windowusing the GTOD (to compute the average score of a window)during Phase 2, a large window size may require cleaning

Page 9: Everest: Efficient Top-K Queries for Video Analytics · Third, video data has temporal locality and thus Top-K queries can be frame-based or window-based. For example, one could be

a lot of frames. Therefore, we only sample some frames toverify with the GTOD and compute the sample mean.

3.5 System Details and Optimizations

Everest is implemented in Python 3.7 with Numpy 1.17.We use a Pytorch implementation of YOLOv3 [60] as theground-truth object detector, whose weights are pretrainedusing the COCO dataset [45] with 416×416 image resolution.Training and inference of the CMDN are implemented usingPytorch 1.4; and we use Decord 0.4 for video decoding.CMDNTraining. The sampled frames are resized to 128×128resolution and pixel values are normalized to the rangefrom 0 to 1. Everest trains 4 × 3 = 12 models of differenthyperparameters and selects the best one with the small-est negative log-likelihood. The set of hyperparameters areд = {5, 8, 12, 15} and h = {20, 30, 40}, where д is the numberof Gaussians and h is the number of hypotheses in the MDNlayer. All models use five convolution layers because that isempirically stable across all videos and further reducing thenumber of convolution layers offers no additional speedupbecause decoding the video would become the bottleneck.Difference Detector. Various difference detectors (e.g., [9])can be used in Everest. In the current implementation, wefollow [38] and use mean-square-error (MSE) among pixelsto measure the difference between two frames. To eliminatesimilar consecutive frames, in principle we need to sequen-tially scan through the video and discard a frame if its MSEwith the last retained frame is lower than a threshold. Inorder to parallelize this step, we split the video into clipsof c frames each. Each frame in a clip is compared with themiddle one in the clip (i.e., the ⌊ c2 ⌋-th) and is discarded iftheir MSE is lower than a threshold. The clips are then pro-cessed in parallel. Although similar frames at the boundariesof clips may be retained or two adjacent clips may be quitesimilar, c can be adjusted to ensure these situations are rare.Batch Inference. The Select-candidate function in Phase 2selects the most promising frame and infers its ground-truthscore using the ground-truth object detector in each iteration.However, selecting and confirming only one frame at a timemight not fully utilize the abundant GPU processing power.Therefore, our implementation selects a batch of b framesthat have the highest expectations based on Equation 6 andcarries out batch inference. The value of b depends on theFLOPS and the memory bandwidth of GPU. Although theGPU is better utilized for larger b, setting b too large maycause cleaning unnecessary frames. Therefore, we choose bbased on a measurement of inference latency to ensure thatthe latency of cleaning b frames has no significant differencefrom cleaning one frame.Prefetching. Deep network inference may have I/O over-heads when frames are fetched from the disk to the main

Video(Used in / From)

Object-of-interest

Resolution FPS# of

framesLength(hrs)

Archie ([37]) car 1920×1080 30 2130k 19.7Daxi-old-street2 person 1920×1080 30 8640k 80

Grand-Canal ([37, 38]) boat 1920×1080 60 25100k 116.2Irish-Center3 car 1920×1080 30 32401k 300

Taipei-bus ([37, 38]) car 1920×1080 30 32488k 300.8

Table 6: Real Dataset Characteristics

memory thus stalling the GPU. The baseline scan-and-testapproach can alleviate that easily by prefetching the framesbecause it accesses them sequentially. Our Top-K algorithm,however, selects frames to clean, which is non-sequential.Fortunately, Everest can achieve high throughput by alsoprefetching the input frames based on the sort-order of ψjin Equation 8. Therefore, batches of frames with the high-estψj would be pre-fetched while the GPU is carrying outcomputation.

4 EVALUATION

We performed experiments on an Intel i9-7900X server with64GB RAM and one NVIDIA GTX1080Ti GPU. The serverruns CentOS 7.0.Queries and Datasets. We evaluate Everest on five realvideos in which three of them are also used in prior workand we add two moving camera videos (Daxi-old-street2and Irish-Center3) collected from Youtube. Table 6 showsthe characteristics of the real datasets. In addition, we alsoinclude synthetic datasets generated by the latest VisualRoad benchmark [27]. The synthetic datasets are used in thelast experiment (Section 4.6) to evaluate the impact of thenumber of objects appeared in the video since we cannotcontrol the number of objects in real videos.Except one experiment that evaluates Everest’s capabil-

ity of handling complex scoring functions that query multi-ple objects (Section 4.4), we evaluate Everest using Top-Kqueries where frames are ranked by the number of mainobject-of-interest shown in Table 6. The main object-of-interest varies by the video content. For example, Archie andTaipei-bus are traffic footages so that their main objectsare cars. By default, K=50 and thres=0.9.Baselines To our best knowledge, Everest is the first sys-tem that supports Top-K queries in video analytics. There-fore, there are no other systems that we can directly com-pare Everest against. One baseline is the exact scan-and-testmethod which invokes the GTOD on all frames. We createanother baseline by using a system that supports selectionqueries (e.g., [4, 31, 38]). Specifically, we rewrite a Top-K

2https://www.youtube.com/watch?v=z_mlibCfgFI3https://www.youtube.com/watch?v=MXqKk4WEhsE

Page 10: Everest: Efficient Top-K Queries for Video Analytics · Third, video data has temporal locality and thus Top-K queries can be frame-based or window-based. For example, one could be

query as a range selection query followed by a Top-K oper-ation. First, we issue a range query “Sf ≥ λM” to retrieveall frames C with scores are higher than λM , whereM is themaximum score found during specialized CNN training andλ ∈ [0, 1]. Then, C is regarded as the set of candidate frameswith the highest scores and the Top-K inC is returned as theanswer. We refer this baseline as the select-and-topk method.This baseline, however, is impractical because it is hard toget the value λ right. For example, setting λ too large maymake the number of candidate frames |C | smaller than K . Onthe other hand, setting λ too small would severely increasethe selection latency because it gets a bigger set of candidateframes C .In our implementation of “select-and-topk”, we choose

NoScope [38] to handle the range selection operation be-cause it is open-source. We use the default parameters ofNoScope’s optimizer and set its tolerable false negative rateto 0.1 (to mimic Everest’s thres=0.9) and false positive rateto 0 (to mimic Everest’s CR-condition). As there are twonewer systems (Focus [31] and TAHOMA [4]) that are simi-lar to NoScope, we give advantages to this baseline. First, wemanually calibrate λ in each experiment and report the onethat yields the largest speedup subject to precision over 0.9.Second, we exclude NoScope’s specialized CNN training timebecause Focus [31] advocates to do training/indexing offlineduring data ingestion rather than online query processing.Third, we count only its time spent on the GTOD in orderto rule out the other factors such as the speed difference ofusing different video decoders.Evaluation Metrics For each experiment, we report (a) theend-to-end query runtime (for Everest, we include every-thing from Phase 1 to Phase 2 and the algorithm runtime)and the speedup over the scan-and-test baseline. We alsoreport the result quality in terms of (b) precision (the frac-tion of results in R̂ that belongs to R)4, (c) rank distance (thenormalized footrule distance between the ranks of the R̂ andtheir true ranks in R), and (d) score error (the average absoluteerror for scores between R̂ and R).System configurations. For Everest , in Phase 1, the num-ber of frames in training data is set to min{0.5%n, 30000},where n is the number of frames. We cap the sample size tobe 30000 because that is sufficient even for the longest video(300.8 hours) in our datasets. The size of holdout set is 3000frames for all the datasets. Although the MSE threshold inthe difference detector can be tuned based on the speed ofthe moving objects or the speed of the moving camera, weare able to use a unified MSE threshold of 0.0001 and clip sizeof 30 for all datasets. In Phase 2, we set the batch inference

4 The recall (the fraction of results in R that were covered by R̂) is the sameas the precision because both R and R̂ contain K elements.

size b to be 8 after measuring the inference latency on ourserver.

4.1 Overall result

Our first experiment aims to give an overall evaluation ofEverest. We run the default Top-50 query (thres=0.9) onall the real datasets. Figure 3 shows the evaluation results.The variation of the speedup on different datasets could beattributed to many factors such as the video quality as wellas the distributions of the object-of-interests. Nonetheless,Everest is able to achieve a significant speedup of 16.3× to18.3× over the scan-and-test baseline. The result quality ofEverest is also excellent. Query precision values are all over0.9 (90%), which are coherent with the 0.9 probability thresh-old of the queries. More specifically, all queries get results ofvery small rank distance, which indicates that Everest re-turns almost perfect result with an order of speedup over theexact baseline. That can be further evidenced by observingthat the score errors are all less than 0.1.

Table 7 shows a breakdown of the end-to-end query run-time of Everest. Most execution time (80+%) is spent onPhase 1 to populate the initial uncertain table because of thehigh volumes of frames processed by the CMDN. The costof Phase 1 gets relatively smaller for longer videos becausewe cap the sample size as 30000 frames. In fact, Phase 1 canalso be done offline during data ingestion (e.g., Focus [31])or even at the edge where the videos are produced [33]. Butwe make no such assumption here in this paper.

Phase 2 spent most time on confirming the frames usingthe GTOD. Nonetheless, that is almost minimal because thefraction of frames being cleaned is very small (0.16%–0.76%).The algorithmic overheads are also minimal. In fact, thefractions of time spent executing the functions Top-K(Dc

i )and Topk-prob(Di , R̂i ) are both less than 0.01% and thuswe do not show them in the table. That indicates that ouralgorithmic optimizations are very effective.From Figure 3, we see that the select-and-topk baseline

yields almost no speedup over the scan-and-test baselineeven we have given it all the advantages (e.g., not count-ing its training time). That is because we found that theseselection-only systems perform well on point query (e.g.,finding frames that have “cars”) but poor on range query(e.g., finding frames that have more than 10 cars). The resultquality of the select-and-topk baseline is not shown in Fig-ure 3 because we manually tune their λ to ensure precisionsover 0.9. Thus, we exclude them for clarity. Since the select-and-topk baseline does not offer any notable performancegain over the scan-and-test baseline and is impractical (re-quires manual tuning of λ), we drop it from our followingdiscussion that evaluates Everest in detail.

Page 11: Everest: Efficient Top-K Queries for Video Analytics · Third, video data has temporal locality and thus Top-K queries can be frame-based or window-based. For example, one could be

Archie

Daxi-old-street

Grand-Canal

Irish-Center

Taipei-bus

103

104

105

106

runt

ime(

s)

1.0x1.0x

1.0x 1.0x 1.0x

16.3x16.5x

17.2x 17.7x 18.3x

scan-and-testselect-and-topkEverest

(a) Speedup

Archie

Daxi-old-street

Grand-Canal

Irish-Center

Taipei-bus0

20

40

60

80

100

Prec

ision

(%)

(b) Precision

Archie

Daxi-old-street

Grand-Canal

Irish-Center

Taipei-bus02468

10121416

Rank

dist

ance

(c) Rank distance

Archie

Daxi-old-street

Grand-Canal

Irish-Center

Taipei-bus0.0

0.2

0.4

0.6

0.8

1.0

1.2

Scor

e er

ror

(d) Score error

Figure 3: Overall result under the default setting

5 10 25 50 75 100K

0x

5x

10x

15x

Spee

dup

ArchieDaxi-old-streetGrand-Canal

Irish-CenterTaipei-bus

(a) Speedup

5 10 25 50 75 100K

0

20

40

60

80

100

Prec

ision

(%)

ArchieDaxi-old-streetGrand-Canal

Irish-CenterTaipei-bus

(b) Precision

5 10 25 50 75 100K

02468

10121416

Rank

Dist

ance

ArchieDaxi-old-streetGrand-Canal

Irish-CenterTaipei-bus

(c) Rank distance

5 10 25 50 75 100K

0.0

0.2

0.4

0.6

0.8

1.0

1.2

Scor

e er

ror

ArchieDaxi-old-streetGrand-Canal

Irish-CenterTaipei-bus

(d) Score error

Figure 4: Impact of K

0.5 0.6 0.7 0.8 0.9 1.0thres

0x

5x

10x

15x

20x

Spee

dup

ArchieDaxi-old-streetGrand-Canal

Irish-CenterTaipei-bus

(a) Speedup

0.5 0.6 0.7 0.8 0.9 1.0thres

0

20

40

60

80

100

Prec

ision

(%)

ArchieDaxi-old-streetGrand-Canal

Irish-CenterTaipei-bus

(b) Precision

0.5 0.6 0.7 0.8 0.9 1.0thres

02468

10121416

Rank

Dist

ance

ArchieDaxi-old-streetGrand-Canal

Irish-CenterTaipei-bus

(c) Rank distance

0.5 0.6 0.7 0.8 0.9 1.0thres

0.0

0.2

0.4

0.6

0.8

1.0

1.2

Scor

e Er

ror

ArchieDaxi-old-streetGrand-Canal

Irish-CenterTaipei-bus

(d) Score error

Figure 5: Impact of the confidence threshold thres

Archie

Daxi-old-street

Irish-Center

Taipei-bus0x

5x

10x

15x

Spee

dup

(a) Speedup

Archie

Daxi-old-street

Irish-Center

Taipei-bus0

20

40

60

80

100

Prec

ision

(%)

(b) Precision

Archie

Daxi-old-street

Irish-Center

Taipei-bus02468

10121416

Rank

dist

ance

(c) Rank distance

Archie

Daxi-old-street

Irish-Center

Taipei-bus

Number of objects

0.0

0.2

0.4

0.6

0.8

1.0

1.2

Scor

e er

ror

(d) Score error

Figure 6: Complex scoring function

Page 12: Everest: Efficient Top-K Queries for Video Analytics · Third, video data has temporal locality and thus Top-K queries can be frame-based or window-based. For example, one could be

Phase 1 Phase 2

DatasetLabel sample

frames by GTODCMDNtraining

Populate D0 byCMDN inference

Select-candidate

Confirm framesusing GTOD

Archie 10.48% 35.19% 41.75% 0.16% 12.42%Daxi-old-street 6.34% 43.48% 45.19% 0.11% 4.88%Grand-Canal 2.27% 20.82% 65.79% 0.34% 10.79%Irish-Center 1.81% 15.81% 79.38% 0.16% 2.84%Taipei-bus 1.87% 17.25% 72.23% 0.41% 8.24%

(a) Latency breakdown

Num ofiterations

% of framescleaned

2021 0.76%3173 0.29%19612 0.63%6474 0.16%18184 0.45%

(b) More about Phase 2

Table 7: A Detailed Breakdown

4.2 Impact of K

The objective of this second experiment is to understand theimpact of K on Everest. We run Top-K queries on all realdatasets with different K values: 5, 10, 25, 50, 75, and 100.

Figure 4 shows that Everest has consistently high speedupin different values of K. Generally, Everest offers slightlybetter speedup when K is small. That is because a smaller Kresults in a smaller result set, and thus the “threshold” frametends to have a higher score (i.e., a higher Ski ). That in turnsimplies a higher p̂i based on Equation 2 and so that it canstop earlier by reaching thres easier.

While the accuracy remains high for different values of K,we observe that small K values tend to influence the precisionmore. That is natural because the precision is a fractioninfluenced by the result size. For example, the precision ofEverest drops below 90% on Irish-center even thoughEverest missed only two frames out of the Top-10 result,resulting in a 80% precision. Nonetheless, we observe thatthe result quality is actually high from the other two qualitymetrics when K is small. Therefore, if we look at the resultaccuracy using all three quality metrics, we can see thatEverest produces high quality results across different valuesof K.

4.3 Impact of thresThe objective of this third experiment is to understand theimpact of the probability threshold on Everest. We run Top-50 queries on all real datasets with different thres values:0.5, 0.75, 0.9, 0.95, and 0.99.Figure 5 shows that the value of thres is not crucial as

long as it is over 0.5. This is expected because we mentionedthat p̂i actually improves exponentially with the number offrames cleaned according to Equation 2. In our experiments,it took 99% of iterations to reach a probability threshold of0.5 but only 1% of iterations to reach 0.99. This is indeed anice result because it confirms that Everest can hide thisparameter from users in real deployments.

4.4 Complex Scoring Function

The objective of this fourth experiment is to demonstratethat Everest is able to handle general user-defined scoringfunctions more than object counting. We therefore run Top-50 queries with the following scoring function:

Sf =area(cars) + area(buses)

total area

This scoring function is continuous and involves twoobjects-of-interest. The areas of cars and buses are refer-ring to the pixel areas of their bounding boxes reported bythe ground-truth object detector. The total area is the areaof the image. This scoring function is a simplified metric toevaluate the degree of congestion of the road. We run thisexperiment with quantization step size set to 0.01 on Archie,Daxi-old-street, Taipei-bus and Irish-Center becauseonly these videos contain both types of objects.

Figure 6 shows that Everestmaintains high result qualitywith that scoring function. In Figure 6 we observe a minordrop in speedup especially for Daxi-old-streetwhen com-pared with using the standard counting function. That isactually reasonable because a more complex scoring func-tion is more challenging to the CMDN, causing its outputdistribution has a higher variance. That leads Everest toclean more frames in order to pass the probability threshold.

4.5 Top-K Windows

The objective of this fifth experiment is to evaluate the win-dow feature of Everest. We run Top-50 window querieswith different window sizes: no window (i.e., a window of 1frame), 30, 60, 150, and 300 frames. The probability thresholdis still 0.9. In Phase 2, each window samples 10% of its framesto infer the ground-truth.Figure 7 shows that Everest performs as good as frame-

based Top-K, but the speedup drops slightly when the win-dow size gets larger. This is because of two reasons. First, a

Page 13: Everest: Efficient Top-K Queries for Video Analytics · Third, video data has temporal locality and thus Top-K queries can be frame-based or window-based. For example, one could be

1 30 60 150 300Window size (frames)

0x

5x

10x

15x

Spee

dup

ArchieDaxi-old-streetGrand-Canal

Irish-CenterTaipei-bus

(a) Speedup

1 30 60 150 300Window size (frames)

0

20

40

60

80

100

Prec

ision

(%)

ArchieDaxi-old-streetGrand-Canal

Irish-CenterTaipei-bus

(b) Precision

1 30 60 150 300Window size (frames)

02468

10121416

Rank

Dist

ance

ArchieDaxi-old-streetGrand-Canal

Irish-CenterTaipei-bus

(c) Rank distance

1 30 60 150 300Window size (frames)

0.0

0.2

0.4

0.6

0.8

1.0

1.2

Scor

e Er

ror

ArchieDaxi-old-streetGrand-Canal

Irish-CenterTaipei-bus

(d) Score error

Figure 7: Varying the window size

50 100 150 200 250Number of objects

0x

5x

10x

15x

20x

Spee

dup

(a) Speedup

50 100 150 200 250Number of objects

0

20

40

60

80

100

Prec

ision

(%)

(b) Precision

50 100 150 200 250Number of objects

02468

10121416

Rank

dist

ance

(c) Rank distance

50 100 150 200 250Number of objects

0.0

0.2

0.4

0.6

0.8

1.0

1.2

Scor

e er

ror

(d) Score error

Figure 8: Varying the number of objects in Visual Road

larger window size essentially reduces the number of win-dows. As shown in the experiments above, our Top-K algo-rithm is smart at picking the most promising frame out ofmillions of frames to clean. A reduced number of windowswould, however, reduce the number of choices Everest has.Second, a larger window implies more frames have to be con-firmed by the GTOD per selected candidate (compared withonly one frame has to be confirmed per selected candidatewhen no window is specified).

In terms of accuracy, the result quality remains high ingeneral. Sometimes, the precision may fluctuate a bit becauseof the randomness in sampling. For example, the precision ofTaipei-bus drops slightly below 0.9 when the window sizeis 30 frames. The fluctuation diminishes when the windowsize gets larger because of larger sample size.

4.6 Impact of the number of objects

In this last experiment, we aim to evaluate Everest basedon the number of objects in a video. Since we cannot controlthat in real videos, we generate five 30-fps videos using theVisual Road benchmark [27], each of which is ten hours longin 416×416 resolution. All five synthetic videos share thesame setting except the total number of cars. Specifically,the videos are all taken by the same “camera” shooting fromthe same “angle” of the same “mini-city”. The only movingobjects in the videos are cars and we control the total numberof cars in that mini-city from 50 to 250. During the data gen-eration process, we uncovered a problem in the Visual Road

benchmark in which we could only stably generate at most15 minutes long video. After discussing with the authors ofVisual Road, we concatenated 40 clips of 15-minute videosto form each ten-hour video.

Figure 8 shows the evaluation result on Visual Road underthe default Top-50 query. We observe a speedup of 17.8×to 20.6× with excellent accuracy. This experiment indicatesthat the good performance of Everestwould not be affectedby the object density in the videos.

5 RELATEDWORK

Everest builds upon research in modern video analytics anduncertain Top-K query processing. While we have coveredsome of them throughout the paper, the following is a morecomprehensive discussion.Modern Video Analytics. Classic video databases largelyfocus on retrieving frames or video segments based on low-level features such as the frame color [5, 11, 12, 24, 35, 43, 54,56, 71, 72]. Modern video analytics contrasts sharply with thetraditional ones by extracting the semantic information fromvideos using neural network models. NoScope [38] supportsobject selection queries based on CNN specialization andhas an optimizer to select the best model architecture (e.g.,number of layers) that maximizes the throughput subject toa specified accuracy target. BlazeIt [37] develops a SQL-likelanguage for declarative video analytics. BlazeIt also doesnot support Top-K query and its proposed language has no

Page 14: Everest: Efficient Top-K Queries for Video Analytics · Third, video data has temporal locality and thus Top-K queries can be frame-based or window-based. For example, one could be

ranking semantic. SVQ [67] is similar to BlazeIt where it sup-ports video streams and spatial constraints (but not Top-K).DeepLens [42] and MIRIS [6] are systems that support objecttracking (i.e., predicates that span across multiple frames).Nonetheless, they have not addressed Top-K queries eitherand Everest is also able to support multi-frame analyticsthrough windowing. Focus [31] is a system that pre-buildsindexes for objects in videos. During the ingestion time, avideo is fed into a lightweight CNN to obtain the classifica-tion results and build an inverted-index between a class andthe frames that contain objects of that class. At query-time,a query that looks for a particular object class is physicallytranslated to an index-lookup operation instead. Focus alsosupports selection queries only. ExSample [50] is a samplingmethod to find distinct objects from videos. Everest candistinguish distinct objects at semantic level by using a corre-sponding difference detector (e.g., [9]). TAHOMA [4], VStore[68], and TASM [19] also work on selection, but their focus ison reducing the per-image inference cost (e.g., image trans-formation cost), reducing the video quality, and the videostorage layout, respectively.

Recently, Panorama [77] discusses the support of unboundedvocabulary querying over videos. Specifically, all systems wementioned above and Everest also inherit a limitation ofthe existing object detectors where the set of object classes isfixed. Panorama alleviates that by asking users to label an un-known object at run-time. Then, by designing a network thatoutput embeddings, it can identify the other appearance ofthe same unknown object by using nearest neighbor search.The abovemethod is compatible with Everest and we regardthat as one of our future work. Other modern video analyticssystems include Optasia [46], VideoStorm [74], Chameleon[36], Scanner [55], and and Vista [52]. These systems aremore for expressing workloads over videos, tuning the knobslike the resolution and the frame rate, or scheduling the op-erations on the heterogeneous computer hardware, etc.Uncertain Top-K Processing There are different notionsof uncertain Top-K queries. The notion of U-TopK [64, 70]returns a result set which has the highest probability of beingTop-K under the possible world semantic. Everest adoptsthe same notion although U-TopK finds the most probable an-swer without cleaning. Therefore, it is possible that U-TopKreturns an answer whose probability is 10−6. By contrast,Everest guarantees the answer meets a probability thresh-old. U-KRanks [63, 64] is another notion. In an U-KRanksresult set, the i-th result in the result set is the most probableone to be ranked i-th over all the possible worlds. However,that does not guarantee that the result set as a whole is themost probable Top-K answer. Probabilistic threshold Top-K[32] is yet another notion. A Top-K result of such kind con-sists of all the tuples (can be less/more than K tuples) whoseprobability of being one of the Top-K tuples larger than a

given threshold. The result set of this type also does notguarantee that the result set as a whole is the most probableTop-K answer. For example, it may return an empty set whenno tuple satisfies the threshold requirement.UncertainDataCleaning Traditional uncertain data clean-ing aims to minimize the expected entropy over the set ofpossible query answers with a constraint on cleaning budget(e.g., number of times allowed to ask experts for trustworthyanswers) [14, 49]. Everest gives probabilistic guaranteeson the query answer, which is way more intuitive than us-ing entropy. Everest also differs from traditional uncertaindata cleaning in both optimization objective and constraints.Everest aims to minimize the cleaning cost under the con-straint of probability threshold. In addition, Everest intro-duces the certain result condition to mitigate surprises forusers. These considerations are both unique and novel. Withthe advent of crowdsourcing platforms like AmazonMechan-ical Turk (AMT) [65], some works have started to leveragehuman as the cleaning agent [18, 73]. Human inputs, how-ever, are not the ground truth per se because human makemistakes. Therefore, most works in this direction focus onmaximizing the quality of the crowdsourced data (e.g., by ag-gregating the responses of multiple workers [18, 40, 44, 76])within a given budget.MLSys Everest also belongs the area of Machine Learningand Systems (MLSys). In terms of MLSys, Everest is relatedto “Probabilistic predicates” [47], which can be viewed as ageneralization of CNN specialization. A probabilistic predi-cate is a weak binary classifier that groups the input blobsinto those that disagree and those that may agree with thequery predicate. The former are discarded and the latter arepassed to further processing. Nonetheless, there is no prob-abilistic predicates on Top-K query yet. Willump [41] is ageneralization of NoScope [38]. It extends NoScope’s solutionto other machine learning tasks such as recommendations.Recommendation systems also focus only the Top-K recom-mendation results. However, Willump handles Top-K exactlylike the “select-and-topk” baseline in our experiments. Ourresults show that such an approach has limited speedup inpractice.

6 CONCLUSIONS

With a massive amount of video data available and generatedincessantly, the discovery of interesting information fromvideos becomes an exciting area of data analytics. Althoughdeep neural networks enable semantic extraction from videoswith human-level accuracy, they are unable to process videodata at scale unless efficient systems are built on top. State-of-the-art video analytics systems have not supported richanalytics like Top-K. In response, we build Everest, a fast

Page 15: Everest: Efficient Top-K Queries for Video Analytics · Third, video data has temporal locality and thus Top-K queries can be frame-based or window-based. For example, one could be

and accurate Top-K video analytics system. To our knowl-edge, Everest is the first video analytics system that treatsthe uncertain output of deep networks as a first-class citizenand provides probabilistic guaranteed accuracy. Currently,Everest is a standalone system that supports only ranking.Richer analytics can be enabled by integrating it with anexpressive video query language or library like FrameQL[37] and Rekall [25]. We will open-source Everest.

REFERENCES

[1] S. Agarwal, B. Mozafari, A. Panda, H. Milner, S. Madden, and I. Stoica.Blinkdb: queries with bounded errors and bounded response times onvery large data. In Proceedings of the 8th ACM European Conference onComputer Systems, pages 29–42, 2013.

[2] C. C. Aggarwal. Trio a system for data uncertainty and lineage. InManaging and Mining Uncertain Data, pages 1–35. Springer, 2009.

[3] C. C. Aggarwal and S. Y. Philip. A survey of uncertain data algorithmsand applications. IEEE Transactions on knowledge and data engineering,21(5):609–623, 2008.

[4] M. R. Anderson, M. Cafarella, T. F. Wenisch, and G. Ros. Predicateoptimization for a visual analytics database. SysML, 2018.

[5] I. Bartolini, M. Patella, and C. Romani. SHIATSU: tagging and retrievingvideos without worries. Multim. Tools Appl., 63(2):357–385, 2013.

[6] F. Bastani, S. He, A. Balasingam, K. Gopalakrishnan, M. Alizadeh,H. Balakrishnan, M. Cafarella, T. Kraska, and S. Madden. Miris: Fastobject track queries in video.

[7] N. Bruno, L. Gravano, and A. Marian. Evaluating top-k queries overweb-accessible databases. In Proceedings 18th International Conferenceon Data Engineering, pages 369–380. IEEE, 2002.

[8] P. Burlina. Mrcnn: A stateful fast r-cnn. In 2016 23rd InternationalConference on Pattern Recognition (ICPR), pages 3518–3523. IEEE, 2016.

[9] C. Canel, T. Kim, G. Zhou, C. Li, H. Lim, D. G. Andersen, and S. Dul-loor. Picking interesting frames in streaming video. In 2018 SysMLConference, volume 1, pages 1–3, 2018.

[10] M. J. Carey and D. Kossmann. On saying âĂIJenough already!âĂİ insql. In Proceedings of the 1997 ACM SIGMOD international conferenceon Management of data, pages 219–230, 1997.

[11] C. Carson, S. Belongie, H. Greenspan, and J. Malik. Region-basedimage querying. In 1997 Proceedings IEEE Workshop on Content-BasedAccess of Image and Video Libraries, pages 42–49. IEEE, 1997.

[12] M. L. Cascia and E. Ardizzone. JACOB: just a content-based querysystem for video databases. In 1996 IEEE International Conference onAcoustics, Speech, and Signal Processing Conference Proceedings, ICASSP’96, Atlanta, Georgia, USA, May 7-10, 1996, pages 1216–1219. IEEEComputer Society, 1996.

[13] C. Charles and V. Kerry. Store location in shopping centers: Theoryand estimates. Journal of Real Estate Research, 27(3):237–266, 2005.

[14] R. Cheng, J. Chen, and X. Xie. Cleaning uncertain data with qualityguarantees. Proceedings of the VLDB Endowment, 1(1):722–735, 2008.

[15] R. Cheng, E. Lo, X. S. Yang, M. Luk, X. Li, and X. Xie. Explore orexploit? effective strategies for disambiguating large databases. PVLDB,3(1):815–825, 2010.

[16] N. Chopin. Fast simulation of truncated gaussian distributions. Statis-tics and Computing, 21(2):275–288, 2011.

[17] X. Chu, J. Morcos, I. F. Ilyas, M. Ouzzani, P. Papotti, N. Tang, and Y. Ye.Katara: A data cleaning system powered by knowledge bases andcrowdsourcing. In Proceedings of the 2015 ACM SIGMOD InternationalConference on Management of Data, pages 1247–1261, 2015.

[18] E. Ciceri, P. Fraternali, D. Martinenghi, and M. Tagliasacchi. Crowd-sourcing for top-k query processing over uncertain data. IEEE Trans-actions on Knowledge and Data Engineering, 28(1):41–53, 2015.

[19] M. Daum, B. Haynes, D. He, A. Mazumdar, M. Balazinska, and A. Che-ung. Tasm: A tile-based storage manager for video analytics. arXivpreprint arXiv:2006.02958, 2020.

[20] S. B. Davidson, S. Khanna, T. Milo, and S. Roy. Using the crowd fortop-k and group-by queries. In Proceedings of the 16th InternationalConference on Database Theory, pages 225–236, 2013.

[21] A. D’Isanto and K. L. Polsterer. Dcmdn: Deep convolutional mixturedensity network. Astrophysics Source Code Library, 2017.

Page 16: Everest: Efficient Top-K Queries for Video Analytics · Third, video data has temporal locality and thus Top-K queries can be frame-based or window-based. For example, one could be

[22] M. E. Dönderler, Ö. Ulusoy, and U. Güdükbay. Rule-based spatiotempo-ral query processing for video databases. the VLDB Journal, 13(1):86–103, 2004.

[23] R. Fagin, A. Lotem, and M. Naor. Optimal aggregation algorithms formiddleware. J. Comput. Syst. Sci., 66(4):614–656, 2003.

[24] M. Flickner, H. S. Sawhney, J. Ashley, Q. Huang, B. Dom, M. Gorkani,J. Hafner, D. Lee, D. Petkovic, D. Steele, and P. Yanker. Query by imageand video content: The QBIC system. IEEE Computer, 28(9):23–32,1995.

[25] D. Y. Fu,W. Crichton, J. Hong, X. Yao, H. Zhang, A. Truong, A. Narayan,M. Agrawala, C. Ré, and K. Fatahalian. Rekall: Specifying video eventsusing compositions of spatiotemporal labels. CoRR, abs/1910.02993,2019.

[26] F. Giri and E.-W. Bai. Block-oriented nonlinear system identification,volume 1. Springer, 2010.

[27] B. Haynes, A. Mazumdar, M. Balazinska, L. Ceze, and A. Cheung. Visualroad: A video data management benchmark. In P. A. Boncz, S. Mane-gold, A. Ailamaki, A. Deshpande, and T. Kraska, editors, Proceedingsof the 2019 International Conference on Management of Data, SIGMODConference 2019, Amsterdam, The Netherlands, June 30 - July 5, 2019,pages 972–987. ACM, 2019.

[28] K. He, G. Gkioxari, P. Dollár, and R. Girshick. Mask r-cnn. In Pro-ceedings of the IEEE international conference on computer vision, pages2961–2969, 2017.

[29] K. He, X. Zhang, S. Ren, and J. Sun. Delving deep into rectifiers:Surpassing human-level performance on imagenet classification. InProceedings of the IEEE international conference on computer vision,pages 1026–1034, 2015.

[30] K. He, X. Zhang, S. Ren, and J. Sun. Deep residual learning for imagerecognition. In Proceedings of the IEEE conference on computer visionand pattern recognition, pages 770–778, 2016.

[31] K. Hsieh, G. Ananthanarayanan, P. Bodik, S. Venkataraman, P. Bahl,M. Philipose, P. B. Gibbons, and O. Mutlu. Focus: Querying large videodatasets with low latency and low cost. In 13th USENIX Symposium onOperating Systems Design and Implementation OSDI 18), pages 269–286,2018.

[32] M. Hua, J. Pei, W. Zhang, and X. Lin. Ranking queries on uncertaindata: a probabilistic threshold approach. In Proceedings of the 2008ACM SIGMOD international conference on Management of data, pages673–686, 2008.

[33] C.-C. Hung, G. Ananthanarayanan, P. Bodik, L. Golubchik, M. Yu,P. Bahl, and M. Philipose. Videoedge: Processing camera streamsusing hierarchical clusters. In 2018 IEEE/ACM Symposium on EdgeComputing (SEC), pages 115–131. IEEE, 2018.

[34] I. F. Ilyas, G. Beskales, and M. A. Soliman. A survey of top-k queryprocessing techniques in relational database systems. ACM ComputingSurveys (CSUR), 40(4):1–58, 2008.

[35] R. Jain and A. Hampapur. Metadata in video databases. ACM SigmodRecord, 23(4):27–33, 1994.

[36] J. Jiang, G. Ananthanarayanan, P. Bodik, S. Sen, and I. Stoica.Chameleon: scalable adaptation of video analytics. In Proceedingsof the 2018 Conference of the ACM Special Interest Group on Data Com-munication, pages 253–266, 2018.

[37] D. Kang, P. Bailis, and M. Zaharia. Blazeit: optimizing declarativeaggregation and limit queries for neural network-based video analytics.Proceedings of the VLDB Endowment, 13(4):533–546, 2019.

[38] D. Kang, J. Emmons, F. Abuzaid, P. Bailis, and M. Zaharia. Noscope:Optimizing deep cnn-based queries over video streams at scale. Proc.VLDB Endow., 10(11):1586–1597, 2017.

[39] B. A. Keating, M. Herrero, P. S. Carberry, J. Gardner, and M. B. Cole.Food wedges: framing the global food demand and supply challengetowards 2050. Global Food Security, 3(3-4):125–132, 2014.

[40] N. M. Kou, Y. Li, H. Wang, L. H. U, and Z. Gong. Crowdsourced top-kqueries by confidence-aware pairwise judgments. In Proceedings ofthe 2017 ACM International Conference on Management of Data, pages1415–1430, 2017.

[41] P. Kraft, D. Kang, D. Narayanan, S. Palkar, P. Bailis, and M. Zaharia.Willump: A statistically-aware end-to-end optimizer for machine learn-ing inference. In Proceedings of Machine Learning and Systems, 2020.

[42] S. Krishnan, A. Dziedzic, and A. J. Elmore. Deeplens: Towards a visualdata management system. In CIDR 2019, 9th Biennial Conference onInnovative Data Systems Research, Asilomar, CA, USA, January 13-16,2019, Online Proceedings. www.cidrdb.org, 2019.

[43] J. Lee, J. Oh, and S. Hwang. Strg-index: Spatio-temporal region graphindexing for large video databases. In F. Özcan, editor, Proceedings ofthe ACM SIGMOD International Conference on Management of Data,Baltimore, Maryland, USA, June 14-16, 2005, pages 718–729. ACM, 2005.

[44] K. Li, X. Zhang, and G. Li. A rating-ranking method for crowdsourcedtop-k computation. In Proceedings of the 2018 International Conferenceon Management of Data, pages 975–990, 2018.

[45] T.-Y. Lin, M. Maire, S. Belongie, J. Hays, P. Perona, D. Ramanan, P. Dol-lár, and C. L. Zitnick. Microsoft coco: Common objects in context. InEuropean conference on computer vision, pages 740–755. Springer, 2014.

[46] Y. Lu, A. Chowdhery, and S. Kandula. Optasia: A relational platformfor efficient large-scale video analytics. In Proceedings of the SeventhACM Symposium on Cloud Computing, pages 57–70, 2016.

[47] Y. Lu, A. Chowdhery, S. Kandula, and S. Chaudhuri. Accelerating ma-chine learning inference with probabilistic predicates. In Proceedingsof the 2018 International Conference on Management of Data, pages1493–1508, 2018.

[48] O. Makansi, E. Ilg, O. Cicek, and T. Brox. Overcoming limitationsof mixture density networks: A sampling and fitting framework formultimodal future prediction. In Proceedings of the IEEE Conference onComputer Vision and Pattern Recognition, pages 7144–7153, 2019.

[49] L. Mo, R. Cheng, X. Li, D. W. Cheung, and X. S. Yang. Cleaning uncer-tain data for top-k queries. In 2013 IEEE 29th International Conferenceon Data Engineering (ICDE), pages 134–145. IEEE, 2013.

[50] O. Moll, F. Bastani, S. Madden, M. Stonebraker, V. Gadepally, andT. Kraska. Exsample: Efficient searches on video repositories throughadaptive sampling. arXiv preprint arXiv:2005.09141, 2020.

[51] R. C. Moore. Possible-world semantics for autoepistemic logic. In Pro-ceedings of the Non-Monotonic Reasoning Workshop, Mohonk MountainHouse, New Paltz, NY 12561, USA, October 17-19, 1984, pages 344–354.American Association for Artificial Intelligence (AAAI), 1984.

[52] S. Nakandala and A. Kumar. Vista: Declarative feature transfer fromdeep cnns at scale.

[53] C. Norris, M. McCahill, and D. Wood. The growth of cctv: a globalperspective on the international diffusion of video surveillance inpublicly accessible space. Surveillance & Society, 2(2/3), 2004.

[54] J. Oh and K. A. Hua. Efficient and cost-effective techniques for brows-ing and indexing large video databases. In W. Chen, J. F. Naughton,and P. A. Bernstein, editors, Proceedings of the 2000 ACM SIGMOD In-ternational Conference on Management of Data, May 16-18, 2000, Dallas,Texas, USA, pages 415–426. ACM, 2000.

[55] A. Poms, W. Crichton, P. Hanrahan, and K. Fatahalian. Scanner: Ef-ficient video analysis at scale. ACM Transactions on Graphics (TOG),37(4):1–13, 2018.

[56] T. Potluri and N. G. Rao. Content based video retrieval using surf,BRISK and HARRIS features for query-by-image. In K. C. Santosh andR. S. Hegadi, editors, Recent Trends in Image Processing and PatternRecognition - Second International Conference, RTIP2R 2018, Solapur,India, December 21-22, 2018, Revised Selected Papers, Part I, volume1035 of Communications in Computer and Information Science, pages265–276. Springer, 2018.

Page 17: Everest: Efficient Top-K Queries for Video Analytics · Third, video data has temporal locality and thus Top-K queries can be frame-based or window-based. For example, one could be

[57] A. Raghu. Drones that do the work of 500 farmers are trans-forming palm oil. https://www.thestar.com.my/tech/tech-news/2019/11/20/drones-that-do-the-work-of-500-farmers-are-transforming-palm-oil, Nov 2019.

[58] C. Re, N. Dalvi, and D. Suciu. Efficient top-k query evaluation onprobabilistic data. In 2007 IEEE 23rd International Conference on DataEngineering, pages 886–895. IEEE, 2007.

[59] C. Re, N. Dalvi, and D. Suciu. Efficient top-k query evaluation onprobabilistic data. In 2007 IEEE 23rd International Conference on DataEngineering, pages 886–895. IEEE, 2007.

[60] J. Redmon and A. Farhadi. Yolov3: An incremental improvement. arXivpreprint arXiv:1804.02767, 2018.

[61] J. B. Rocha-Junior, O. Gkorgkas, S. Jonassen, and K. Nørvåg. Ef-ficient processing of top-k spatial keyword queries. In D. Pfoser,Y. Tao, K. Mouratidis, M. A. Nascimento, M. F. Mokbel, S. Shekhar, andY. Huang, editors, Advances in Spatial and Temporal Databases - 12thInternational Symposium, SSTD 2011, Minneapolis, MN, USA, August24-26, 2011, Proceedings, volume 6849 of Lecture Notes in ComputerScience, pages 205–222. Springer, 2011.

[62] H. Shen, S. Han, M. Philipose, and A. Krishnamurthy. Fast videoclassification via adaptive cascading of deep models. In 2017 IEEEConference on Computer Vision and Pattern Recognition, CVPR 2017,Honolulu, HI, USA, July 21-26, 2017, pages 2197–2205. IEEE ComputerSociety, 2017.

[63] M. A. Soliman, I. F. Ilyas, and K. C.-C. Chang. Top-k query processingin uncertain databases. In 2007 IEEE 23rd International Conference onData Engineering, pages 896–905. IEEE, 2007.

[64] M. A. Soliman, I. F. Ilyas, and K. C.-C. Chang. Probabilistic top-k andranking-aggregate queries. ACM Transactions on Database Systems(TODS), 33(3):1–54, 2008.

[65] A. M. Turk. Amazon mechanical turk. Retrieved August, 17:2012, 2012.[66] D. Vasisht, Z. Kapetanovic, J. Won, X. Jin, R. Chandra, S. Sinha,

A. Kapoor, M. Sudarshan, and S. Stratman. Farmbeats: An iot platformfor data-driven agriculture. In 14th USENIX Symposium on NetworkedSystems Design and Implementation (NSDI 17), pages 515–529, 2017.

[67] I. Xarchakos and N. Koudas. SVQ: streaming video queries. In P. A.Boncz, S. Manegold, A. Ailamaki, A. Deshpande, and T. Kraska, editors,Proceedings of the 2019 International Conference on Management ofData, SIGMOD Conference 2019, Amsterdam, The Netherlands, June 30 -July 5, 2019, pages 2013–2016. ACM, 2019.

[68] T. Xu, L. M. Botelho, and F. X. Lin. Vstore: A data store for analyticson large videos. In Proceedings of the Fourteenth EuroSys Conference2019, pages 1–17, 2019.

[69] Z. E. Xu, M. J. Kusner, K. Q. Weinberger, M. Chen, and O. Chapelle.Classifier cascades and trees for minimizing feature evaluation cost. J.Mach. Learn. Res., 15(1):2113–2144, 2014.

[70] K. Yi, F. Li, G. Kollios, and D. Srivastava. Efficient processing of top-kqueries in uncertain databases with x-relations. IEEE Trans. Knowl.Data Eng., 20(12):1669–1682, 2008.

[71] A. Yoshitaka and T. Ichikawa. A survey on content-based retrieval formultimedia databases. IEEE Trans. Knowl. Data Eng., 11(1):81–93, 1999.

[72] V. Zavrel, M. Batko, and P. Zezula. Visual video retrieval systemusing MPEG-7 descriptors. In P. Ciaccia and M. Patella, editors, ThirdInternational Workshop on Similarity Search and Applications, SISAP2010, 18-19 September 2010, Istanbul, Turkey, pages 125–126. ACM,2010.

[73] C. J. Zhang, L. Chen, Y. Tong, and Z. Liu. Cleaning uncertain datawith a noisy crowd. In 2015 IEEE 31st International Conference on DataEngineering, pages 6–17. IEEE, 2015.

[74] H. Zhang, G. Ananthanarayanan, P. Bodik, M. Philipose, P. Bahl, andM. J. Freedman. Live video analytics at scale with approximation anddelay-tolerance. In 14th USENIX Symposium on Networked Systems

Design and Implementation (NSDI 17), pages 377–392, 2017.[75] L. Zhang, R. Vaisenberg, S. Mehrotra, and D. V. Kalashnikov. Video

entity resolution: Applying er techniques for smart video surveillance.In 2011 IEEE International Conference on Pervasive Computing andCommunications Workshops (PERCOM Workshops), pages 26–31. IEEE,2011.

[76] X. Zhang, G. Li, and J. Feng. Crowdsourced top-k algorithms: Anexperimental evaluation. Proceedings of the VLDB Endowment, 9(8):612–623, 2016.

[77] Y. Zhang and A. Kumar. Panorama: a data system for unboundedvocabulary querying over video. Proceedings of the VLDB Endowment,13(4):477–491, 2019.

REFERENCES

[1] S. Agarwal, B. Mozafari, A. Panda, H. Milner, S. Madden, and I. Stoica.Blinkdb: queries with bounded errors and bounded response times onvery large data. In Proceedings of the 8th ACM European Conference onComputer Systems, pages 29–42, 2013.

[2] C. C. Aggarwal. Trio a system for data uncertainty and lineage. InManaging and Mining Uncertain Data, pages 1–35. Springer, 2009.

[3] C. C. Aggarwal and S. Y. Philip. A survey of uncertain data algorithmsand applications. IEEE Transactions on knowledge and data engineering,21(5):609–623, 2008.

[4] M. R. Anderson, M. Cafarella, T. F. Wenisch, and G. Ros. Predicateoptimization for a visual analytics database. SysML, 2018.

[5] I. Bartolini, M. Patella, and C. Romani. SHIATSU: tagging and retrievingvideos without worries. Multim. Tools Appl., 63(2):357–385, 2013.

[6] F. Bastani, S. He, A. Balasingam, K. Gopalakrishnan, M. Alizadeh,H. Balakrishnan, M. Cafarella, T. Kraska, and S. Madden. Miris: Fastobject track queries in video.

[7] N. Bruno, L. Gravano, and A. Marian. Evaluating top-k queries overweb-accessible databases. In Proceedings 18th International Conferenceon Data Engineering, pages 369–380. IEEE, 2002.

[8] P. Burlina. Mrcnn: A stateful fast r-cnn. In 2016 23rd InternationalConference on Pattern Recognition (ICPR), pages 3518–3523. IEEE, 2016.

[9] C. Canel, T. Kim, G. Zhou, C. Li, H. Lim, D. G. Andersen, and S. Dul-loor. Picking interesting frames in streaming video. In 2018 SysMLConference, volume 1, pages 1–3, 2018.

[10] M. J. Carey and D. Kossmann. On saying âĂIJenough already!âĂİ insql. In Proceedings of the 1997 ACM SIGMOD international conferenceon Management of data, pages 219–230, 1997.

[11] C. Carson, S. Belongie, H. Greenspan, and J. Malik. Region-basedimage querying. In 1997 Proceedings IEEE Workshop on Content-BasedAccess of Image and Video Libraries, pages 42–49. IEEE, 1997.

[12] M. L. Cascia and E. Ardizzone. JACOB: just a content-based querysystem for video databases. In 1996 IEEE International Conference onAcoustics, Speech, and Signal Processing Conference Proceedings, ICASSP’96, Atlanta, Georgia, USA, May 7-10, 1996, pages 1216–1219. IEEEComputer Society, 1996.

[13] C. Charles and V. Kerry. Store location in shopping centers: Theoryand estimates. Journal of Real Estate Research, 27(3):237–266, 2005.

[14] R. Cheng, J. Chen, and X. Xie. Cleaning uncertain data with qualityguarantees. Proceedings of the VLDB Endowment, 1(1):722–735, 2008.

[15] R. Cheng, E. Lo, X. S. Yang, M. Luk, X. Li, and X. Xie. Explore orexploit? effective strategies for disambiguating large databases. PVLDB,3(1):815–825, 2010.

[16] N. Chopin. Fast simulation of truncated gaussian distributions. Statis-tics and Computing, 21(2):275–288, 2011.

[17] X. Chu, J. Morcos, I. F. Ilyas, M. Ouzzani, P. Papotti, N. Tang, and Y. Ye.Katara: A data cleaning system powered by knowledge bases andcrowdsourcing. In Proceedings of the 2015 ACM SIGMOD International

Page 18: Everest: Efficient Top-K Queries for Video Analytics · Third, video data has temporal locality and thus Top-K queries can be frame-based or window-based. For example, one could be

Conference on Management of Data, pages 1247–1261, 2015.[18] E. Ciceri, P. Fraternali, D. Martinenghi, and M. Tagliasacchi. Crowd-

sourcing for top-k query processing over uncertain data. IEEE Trans-actions on Knowledge and Data Engineering, 28(1):41–53, 2015.

[19] M. Daum, B. Haynes, D. He, A. Mazumdar, M. Balazinska, and A. Che-ung. Tasm: A tile-based storage manager for video analytics. arXivpreprint arXiv:2006.02958, 2020.

[20] S. B. Davidson, S. Khanna, T. Milo, and S. Roy. Using the crowd fortop-k and group-by queries. In Proceedings of the 16th InternationalConference on Database Theory, pages 225–236, 2013.

[21] A. D’Isanto and K. L. Polsterer. Dcmdn: Deep convolutional mixturedensity network. Astrophysics Source Code Library, 2017.

[22] M. E. Dönderler, Ö. Ulusoy, and U. Güdükbay. Rule-based spatiotempo-ral query processing for video databases. the VLDB Journal, 13(1):86–103, 2004.

[23] R. Fagin, A. Lotem, and M. Naor. Optimal aggregation algorithms formiddleware. J. Comput. Syst. Sci., 66(4):614–656, 2003.

[24] M. Flickner, H. S. Sawhney, J. Ashley, Q. Huang, B. Dom, M. Gorkani,J. Hafner, D. Lee, D. Petkovic, D. Steele, and P. Yanker. Query by imageand video content: The QBIC system. IEEE Computer, 28(9):23–32,1995.

[25] D. Y. Fu,W. Crichton, J. Hong, X. Yao, H. Zhang, A. Truong, A. Narayan,M. Agrawala, C. Ré, and K. Fatahalian. Rekall: Specifying video eventsusing compositions of spatiotemporal labels. CoRR, abs/1910.02993,2019.

[26] F. Giri and E.-W. Bai. Block-oriented nonlinear system identification,volume 1. Springer, 2010.

[27] B. Haynes, A. Mazumdar, M. Balazinska, L. Ceze, and A. Cheung. Visualroad: A video data management benchmark. In P. A. Boncz, S. Mane-gold, A. Ailamaki, A. Deshpande, and T. Kraska, editors, Proceedingsof the 2019 International Conference on Management of Data, SIGMODConference 2019, Amsterdam, The Netherlands, June 30 - July 5, 2019,pages 972–987. ACM, 2019.

[28] K. He, G. Gkioxari, P. Dollár, and R. Girshick. Mask r-cnn. In Pro-ceedings of the IEEE international conference on computer vision, pages2961–2969, 2017.

[29] K. He, X. Zhang, S. Ren, and J. Sun. Delving deep into rectifiers:Surpassing human-level performance on imagenet classification. InProceedings of the IEEE international conference on computer vision,pages 1026–1034, 2015.

[30] K. He, X. Zhang, S. Ren, and J. Sun. Deep residual learning for imagerecognition. In Proceedings of the IEEE conference on computer visionand pattern recognition, pages 770–778, 2016.

[31] K. Hsieh, G. Ananthanarayanan, P. Bodik, S. Venkataraman, P. Bahl,M. Philipose, P. B. Gibbons, and O. Mutlu. Focus: Querying large videodatasets with low latency and low cost. In 13th USENIX Symposium onOperating Systems Design and Implementation OSDI 18), pages 269–286,2018.

[32] M. Hua, J. Pei, W. Zhang, and X. Lin. Ranking queries on uncertaindata: a probabilistic threshold approach. In Proceedings of the 2008ACM SIGMOD international conference on Management of data, pages673–686, 2008.

[33] C.-C. Hung, G. Ananthanarayanan, P. Bodik, L. Golubchik, M. Yu,P. Bahl, and M. Philipose. Videoedge: Processing camera streamsusing hierarchical clusters. In 2018 IEEE/ACM Symposium on EdgeComputing (SEC), pages 115–131. IEEE, 2018.

[34] I. F. Ilyas, G. Beskales, and M. A. Soliman. A survey of top-k queryprocessing techniques in relational database systems. ACM ComputingSurveys (CSUR), 40(4):1–58, 2008.

[35] R. Jain and A. Hampapur. Metadata in video databases. ACM SigmodRecord, 23(4):27–33, 1994.

[36] J. Jiang, G. Ananthanarayanan, P. Bodik, S. Sen, and I. Stoica.Chameleon: scalable adaptation of video analytics. In Proceedingsof the 2018 Conference of the ACM Special Interest Group on Data Com-munication, pages 253–266, 2018.

[37] D. Kang, P. Bailis, and M. Zaharia. Blazeit: optimizing declarativeaggregation and limit queries for neural network-based video analytics.Proceedings of the VLDB Endowment, 13(4):533–546, 2019.

[38] D. Kang, J. Emmons, F. Abuzaid, P. Bailis, and M. Zaharia. Noscope:Optimizing deep cnn-based queries over video streams at scale. Proc.VLDB Endow., 10(11):1586–1597, 2017.

[39] B. A. Keating, M. Herrero, P. S. Carberry, J. Gardner, and M. B. Cole.Food wedges: framing the global food demand and supply challengetowards 2050. Global Food Security, 3(3-4):125–132, 2014.

[40] N. M. Kou, Y. Li, H. Wang, L. H. U, and Z. Gong. Crowdsourced top-kqueries by confidence-aware pairwise judgments. In Proceedings ofthe 2017 ACM International Conference on Management of Data, pages1415–1430, 2017.

[41] P. Kraft, D. Kang, D. Narayanan, S. Palkar, P. Bailis, and M. Zaharia.Willump: A statistically-aware end-to-end optimizer for machine learn-ing inference. In Proceedings of Machine Learning and Systems, 2020.

[42] S. Krishnan, A. Dziedzic, and A. J. Elmore. Deeplens: Towards a visualdata management system. In CIDR 2019, 9th Biennial Conference onInnovative Data Systems Research, Asilomar, CA, USA, January 13-16,2019, Online Proceedings. www.cidrdb.org, 2019.

[43] J. Lee, J. Oh, and S. Hwang. Strg-index: Spatio-temporal region graphindexing for large video databases. In F. Özcan, editor, Proceedings ofthe ACM SIGMOD International Conference on Management of Data,Baltimore, Maryland, USA, June 14-16, 2005, pages 718–729. ACM, 2005.

[44] K. Li, X. Zhang, and G. Li. A rating-ranking method for crowdsourcedtop-k computation. In Proceedings of the 2018 International Conferenceon Management of Data, pages 975–990, 2018.

[45] T.-Y. Lin, M. Maire, S. Belongie, J. Hays, P. Perona, D. Ramanan, P. Dol-lár, and C. L. Zitnick. Microsoft coco: Common objects in context. InEuropean conference on computer vision, pages 740–755. Springer, 2014.

[46] Y. Lu, A. Chowdhery, and S. Kandula. Optasia: A relational platformfor efficient large-scale video analytics. In Proceedings of the SeventhACM Symposium on Cloud Computing, pages 57–70, 2016.

[47] Y. Lu, A. Chowdhery, S. Kandula, and S. Chaudhuri. Accelerating ma-chine learning inference with probabilistic predicates. In Proceedingsof the 2018 International Conference on Management of Data, pages1493–1508, 2018.

[48] O. Makansi, E. Ilg, O. Cicek, and T. Brox. Overcoming limitationsof mixture density networks: A sampling and fitting framework formultimodal future prediction. In Proceedings of the IEEE Conference onComputer Vision and Pattern Recognition, pages 7144–7153, 2019.

[49] L. Mo, R. Cheng, X. Li, D. W. Cheung, and X. S. Yang. Cleaning uncer-tain data for top-k queries. In 2013 IEEE 29th International Conferenceon Data Engineering (ICDE), pages 134–145. IEEE, 2013.

[50] O. Moll, F. Bastani, S. Madden, M. Stonebraker, V. Gadepally, andT. Kraska. Exsample: Efficient searches on video repositories throughadaptive sampling. arXiv preprint arXiv:2005.09141, 2020.

[51] R. C. Moore. Possible-world semantics for autoepistemic logic. In Pro-ceedings of the Non-Monotonic Reasoning Workshop, Mohonk MountainHouse, New Paltz, NY 12561, USA, October 17-19, 1984, pages 344–354.American Association for Artificial Intelligence (AAAI), 1984.

[52] S. Nakandala and A. Kumar. Vista: Declarative feature transfer fromdeep cnns at scale.

[53] C. Norris, M. McCahill, and D. Wood. The growth of cctv: a globalperspective on the international diffusion of video surveillance inpublicly accessible space. Surveillance & Society, 2(2/3), 2004.

[54] J. Oh and K. A. Hua. Efficient and cost-effective techniques for brows-ing and indexing large video databases. In W. Chen, J. F. Naughton,

Page 19: Everest: Efficient Top-K Queries for Video Analytics · Third, video data has temporal locality and thus Top-K queries can be frame-based or window-based. For example, one could be

and P. A. Bernstein, editors, Proceedings of the 2000 ACM SIGMOD In-ternational Conference on Management of Data, May 16-18, 2000, Dallas,Texas, USA, pages 415–426. ACM, 2000.

[55] A. Poms, W. Crichton, P. Hanrahan, and K. Fatahalian. Scanner: Ef-ficient video analysis at scale. ACM Transactions on Graphics (TOG),37(4):1–13, 2018.

[56] T. Potluri and N. G. Rao. Content based video retrieval using surf,BRISK and HARRIS features for query-by-image. In K. C. Santosh andR. S. Hegadi, editors, Recent Trends in Image Processing and PatternRecognition - Second International Conference, RTIP2R 2018, Solapur,India, December 21-22, 2018, Revised Selected Papers, Part I, volume1035 of Communications in Computer and Information Science, pages265–276. Springer, 2018.

[57] A. Raghu. Drones that do the work of 500 farmers are trans-forming palm oil. https://www.thestar.com.my/tech/tech-news/2019/11/20/drones-that-do-the-work-of-500-farmers-are-transforming-palm-oil, Nov 2019.

[58] C. Re, N. Dalvi, and D. Suciu. Efficient top-k query evaluation onprobabilistic data. In 2007 IEEE 23rd International Conference on DataEngineering, pages 886–895. IEEE, 2007.

[59] C. Re, N. Dalvi, and D. Suciu. Efficient top-k query evaluation onprobabilistic data. In 2007 IEEE 23rd International Conference on DataEngineering, pages 886–895. IEEE, 2007.

[60] J. Redmon and A. Farhadi. Yolov3: An incremental improvement. arXivpreprint arXiv:1804.02767, 2018.

[61] J. B. Rocha-Junior, O. Gkorgkas, S. Jonassen, and K. Nørvåg. Ef-ficient processing of top-k spatial keyword queries. In D. Pfoser,Y. Tao, K. Mouratidis, M. A. Nascimento, M. F. Mokbel, S. Shekhar, andY. Huang, editors, Advances in Spatial and Temporal Databases - 12thInternational Symposium, SSTD 2011, Minneapolis, MN, USA, August24-26, 2011, Proceedings, volume 6849 of Lecture Notes in ComputerScience, pages 205–222. Springer, 2011.

[62] H. Shen, S. Han, M. Philipose, and A. Krishnamurthy. Fast videoclassification via adaptive cascading of deep models. In 2017 IEEEConference on Computer Vision and Pattern Recognition, CVPR 2017,Honolulu, HI, USA, July 21-26, 2017, pages 2197–2205. IEEE ComputerSociety, 2017.

[63] M. A. Soliman, I. F. Ilyas, and K. C.-C. Chang. Top-k query processingin uncertain databases. In 2007 IEEE 23rd International Conference onData Engineering, pages 896–905. IEEE, 2007.

[64] M. A. Soliman, I. F. Ilyas, and K. C.-C. Chang. Probabilistic top-k andranking-aggregate queries. ACM Transactions on Database Systems(TODS), 33(3):1–54, 2008.

[65] A. M. Turk. Amazon mechanical turk. Retrieved August, 17:2012, 2012.[66] D. Vasisht, Z. Kapetanovic, J. Won, X. Jin, R. Chandra, S. Sinha,

A. Kapoor, M. Sudarshan, and S. Stratman. Farmbeats: An iot platformfor data-driven agriculture. In 14th USENIX Symposium on NetworkedSystems Design and Implementation (NSDI 17), pages 515–529, 2017.

[67] I. Xarchakos and N. Koudas. SVQ: streaming video queries. In P. A.Boncz, S. Manegold, A. Ailamaki, A. Deshpande, and T. Kraska, editors,Proceedings of the 2019 International Conference on Management ofData, SIGMOD Conference 2019, Amsterdam, The Netherlands, June 30 -July 5, 2019, pages 2013–2016. ACM, 2019.

[68] T. Xu, L. M. Botelho, and F. X. Lin. Vstore: A data store for analyticson large videos. In Proceedings of the Fourteenth EuroSys Conference2019, pages 1–17, 2019.

[69] Z. E. Xu, M. J. Kusner, K. Q. Weinberger, M. Chen, and O. Chapelle.Classifier cascades and trees for minimizing feature evaluation cost. J.Mach. Learn. Res., 15(1):2113–2144, 2014.

[70] K. Yi, F. Li, G. Kollios, and D. Srivastava. Efficient processing of top-kqueries in uncertain databases with x-relations. IEEE Trans. Knowl.Data Eng., 20(12):1669–1682, 2008.

[71] A. Yoshitaka and T. Ichikawa. A survey on content-based retrieval formultimedia databases. IEEE Trans. Knowl. Data Eng., 11(1):81–93, 1999.

[72] V. Zavrel, M. Batko, and P. Zezula. Visual video retrieval systemusing MPEG-7 descriptors. In P. Ciaccia and M. Patella, editors, ThirdInternational Workshop on Similarity Search and Applications, SISAP2010, 18-19 September 2010, Istanbul, Turkey, pages 125–126. ACM,2010.

[73] C. J. Zhang, L. Chen, Y. Tong, and Z. Liu. Cleaning uncertain datawith a noisy crowd. In 2015 IEEE 31st International Conference on DataEngineering, pages 6–17. IEEE, 2015.

[74] H. Zhang, G. Ananthanarayanan, P. Bodik, M. Philipose, P. Bahl, andM. J. Freedman. Live video analytics at scale with approximation anddelay-tolerance. In 14th USENIX Symposium on Networked SystemsDesign and Implementation (NSDI 17), pages 377–392, 2017.

[75] L. Zhang, R. Vaisenberg, S. Mehrotra, and D. V. Kalashnikov. Videoentity resolution: Applying er techniques for smart video surveillance.In 2011 IEEE International Conference on Pervasive Computing andCommunications Workshops (PERCOM Workshops), pages 26–31. IEEE,2011.

[76] X. Zhang, G. Li, and J. Feng. Crowdsourced top-k algorithms: Anexperimental evaluation. Proceedings of the VLDB Endowment, 9(8):612–623, 2016.

[77] Y. Zhang and A. Kumar. Panorama: a data system for unboundedvocabulary querying over video. Proceedings of the VLDB Endowment,13(4):477–491, 2019.