<?xml-model href='http://www.tei-c.org/release/xml/tei/custom/schema/relaxng/tei_all.rng' schematypens='http://relaxng.org/ns/structure/1.0'?><TEI xmlns="http://www.tei-c.org/ns/1.0">
	<teiHeader>
		<fileDesc>
			<titleStmt><title level='a'>AROD: Adaptive Real-Time Object Detection Based on Pixel Motion Speed</title></titleStmt>
			<publicationStmt>
				<publisher>IEEE</publisher>
				<date>10/07/2024</date>
			</publicationStmt>
			<sourceDesc>
				<bibl> 
					<idno type="par_id">10613264</idno>
					<idno type="doi">10.1109/VTC2024-Fall63153.2024.10757874</idno>
					
					<author>Yu Liu</author><author>Kyoung-Don Kang</author>
				</bibl>
			</sourceDesc>
		</fileDesc>
		<profileDesc>
			<abstract><ab><![CDATA[Real-time object detection is essential for AI-based intelligent traffic management. However, growing complexities of deep learning models for object detection cause increased latency and resource requirements. To tackle the challenge, we introduce a new approach, named AROD (Adaptive Real-Time Object Detection), that infers the pixel motion speed in continuous traffic video frames and skips redundant frames when the pixel velocity is low. Thereby, AROD aims to significantly enhance the efficiency and scalability, sustaining the accuracy of object detection. Our evaluation using real-world traffic videos reveals that our method for pixel velocity inference via lightweight deep learning reduces the RMSE (Root Mean Square Error) by up to two orders of magnitude compared to state-of-the-art approaches. AROD improves the frame processing rate of YOLOv5, SSD, and EfficientDet by approximately 32-61%, 110-174%, and 120-213%, respectively. AROD considerably enhances scalability by supporting real-time object detection for up to three concurrent traffic video streams on a commodity machine. Moreover, AROD demonstrates its generalizability by supporting competitive accuracy in object detection for a separate traffic video that was fully hidden during training.]]></ab></abstract>
		</profileDesc>
	</teiHeader>
	<text><body xmlns="http://www.tei-c.org/ns/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xlink="http://www.w3.org/1999/xlink">
<div xmlns="http://www.tei-c.org/ns/1.0"><head>I. INTRODUCTION</head><p>Real-time object detection is crucial in AI-based intelligent traffic management in a smart city <ref type="bibr">[1]</ref>. Although deep learning models, such as <ref type="bibr">[2]</ref>- <ref type="bibr">[8]</ref>, have significantly improved the quality of inference for computer vision tasks, their increasing complexities result in higher latency and resource requirements. Therefore, it is challenging to improve the efficiency and scalability of object detection, supporting the desired processing rate of 30 fps (frames per second) for real-time object detection.</p><p>To tackle the challenge, we introduce AROD (Adaptive Real-Time Object Detection) that is not yet another object detection model but an adaptive framework for efficient realtime object detection. AROD infers the speed of pixel movements (measured in pixels per frame), indicating the average movement of objects between successive frames in a traffic video. AROD then dynamically reduces the object detection rate and drops redundant frames when the pixel velocity is low. A summary of our contributions follows:</p><p>&#8226; To minimize errors in pixel motion speed inference, we carefully design and train a new lightweight MLP (Multiple Layer Perceptron) model for cost-effective regression, avoiding overfitting.</p><p>&#8226; We devise a new, flexible object detection framework that can utilize any effective object detection model. The execution rate of the plugged-in object detection model is dynamically adapted according to the inferred pixel velocity for efficient object detection. &#8226; To further enhance efficiency, AROD utilizes both the CPU and GPU via pipelining. In the CPU that is mostly idle otherwise, AROD infers the average pixel speed of moving objects and adapts the object detection rate accordingly. At the same time, object detection is performed for the frames that are forwarded to the GPU, instead of getting dropped due to the slow pixel velocity. To conceal the latency of AROD and improve the overall frame processing rate in terms of fps, we ensure that the latency of AROD run in the CPU is shorter than that of object detection in the GPU.</p><p>Our evaluation is conducted using four real-world traffic videos in a cost-effective video analytics system consisting of commodity hardware components, much less powerful and expensive than its cloud counterparts. Using the test sets of the first three traffic videos captured under diverse environmental lighting conditions, we analyze the accuracy of pixel velocity inference, frame processing rate, and scalability in terms of the RMSE, fps, and number of traffic video streams processed concurrently, respectively. Our evaluation reveals that our MLP model decreases the RMSE of pixel velocity inference by up to two orders of magnitude compared to several SOTA (stateof-the-art) methods. To demonstrate the flexibility of AROD, we combine it with three popular object detection models: YOLOv5 <ref type="bibr">[4]</ref>, SSD <ref type="bibr">[5]</ref>, and EfficientDet <ref type="bibr">[6]</ref>. AROD improves their fps by approximately 32-61%, 110-174%, and 120-213%, respectively. When AROD runs alongside YOLOv5 (fastest among the three models above), it can process up to three traffic video streams in real-time, supporting 30-34 fps for each stream. Thus, AROD could considerably reduce the number of machines needed for AI-based intelligent traffic management in a smart city. Moreover, the integration of AROD with YOLOv5 effectively generalizes to the fourth traffic video entirely unseen during training. It maintains an approximately equivalent mean average precision (mAP), which serves as the standard metric for assessing object detection accuracy, in comparison to the mAP attained by the standalone YOLOv5 model without AROD.</p><p>The rest of the paper is organized as follows. Related work is discussed in Section II. In Section III, background information on optical flow analysis is followed by a discussion of its limitations. Section IV describes AROD introduced in this paper. Design and training of the MLP model for pixel velocity inference, data sets, and system configurations for evaluation are described in Section V. Section VI discusses the evaluation results. Finally, Section VII concludes the paper and discusses future work. Our source code is available at <ref type="url">https://github.com/Real- Time-Lab/AROD-Adaptive-Real-Time-Object-Detestion- Aware-of-the-Traffic-Flow-Speed</ref>.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>II. RELATED WORK</head><p>Object detection: Deep learning-based object detection models have significantly outperformed traditional approaches. Single-stage object detection models based on CNNs (Convolutional Neural Networks), such as YOLO <ref type="bibr">[4]</ref>, SSD <ref type="bibr">[5]</ref>, and EfficientDet <ref type="bibr">[6]</ref>, detect objects, produce their bounding boxes, and classify them in one stage. Thus, they are more suitable for real-time applications than two-stage object detection models, such as <ref type="bibr">[2]</ref>, <ref type="bibr">[3]</ref>, <ref type="bibr">[9]</ref>. Novel vision transformers, such as <ref type="bibr">[7]</ref>, <ref type="bibr">[8]</ref>, have improved the accuracy of computer vision tasks. However, self-attention in vision transformers suffers from quadratic complexity. Generally speaking, increasing complexities of newer models tend to improve object detection accuracy, while increasing the latency and resource consumption. Efficiency Improvements: In <ref type="bibr">[10]</ref>, <ref type="bibr">[11]</ref>, structural similarity in successive frames is analyzed to drop redundant frames. In <ref type="bibr">[12]</ref>, a new CNN model, called ERD (Empty Road Detection), is used to preprocess every traffic video frame to infer if there exists any predefined object of interest (e.g., a vehicle). ERD then performs object detection only for nonempty frames with at least one object. Also, L-filter <ref type="bibr">[13]</ref> reduces the overhead of ERD via hybrid time series analysis. However, the overhead for structural similarity analysis <ref type="bibr">[10]</ref>, <ref type="bibr">[11]</ref> and road occupancy (empty or nonempty) inference <ref type="bibr">[12]</ref>, <ref type="bibr">[13]</ref> cannot be amortized when successive traffic video frames are dissimilar or nonempty, for example, on a busy highway. Consequently, they can actually decrease the frame processing rate essential for real-time object detection. Different from <ref type="bibr">[10]</ref>- <ref type="bibr">[13]</ref>, AROD hides its latency via efficient CPU-GPU pipelining. Thus, it supports at least as high fps as the corresponding standalone object detection model without AROD does. Moreover, AROD can use any object detection model, e.g., a singlestage YOLO model, and therefore it is complementary to most existing work on object detection, including the ones discussed above. This contrasts to <ref type="bibr">[10]</ref>, <ref type="bibr">[11]</ref> that depend on a relatively slow two-stage object detector <ref type="bibr">[3]</ref>. Although model compression <ref type="bibr">[14]</ref>, <ref type="bibr">[15]</ref> reduces model complexity, we do not utilize a compressed object detection model in this paper, since it often decreases accuracy.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>III. BACKGROUND ON OPTICAL FLOW ANALYSIS</head><p>The Lucas-Kanade method (L-K method) <ref type="bibr">[16]</ref> is a widely used optical flow analysis algorithm. It assumes 1) brightness constancy, 2) temporal continuity, and 3) spatial coherence in a sequence of images (frames). Brightness constancy assumes that a pixel's grayscale value does not change between frames. Temporal continuity assumes that the displacement of image contents between consecutive frames is small and approximately constant. The first two assumptions allow taking partial derivatives of grayscale values with respect to the pixel position:</p><p>where v x = dx/dt is the optical flow velocity of a pixel in the horizontal direction and v y = dy/dt is the optical flow velocity in the vertical direction. Additionally, I x = dI/dx and I y = dI/dy are the gradients (partial derivatives) of image intensity at position (x, y), while I t = dI/dt is the gradient of the intensity at time t.</p><p>In Equation <ref type="formula">1</ref>, we encounter two unknown variables: v x and v y . Thus, Equation 1 is under-constrained and cannot be solved directly. The L-K algorithm addresses this challenge using the third assumption of spatial coherence. It assumes that adjacent pixels on the same surface in the scene share similar motion and, therefore, their projections onto the image plane and velocities are closely aligned and consistent. Based on this assumption, the L-K method formulates multiple equations for n neighboring pixels in matrix form, Av = b, to solve for v x and v y :</p><p>2 6 6 6 6 6 6 4 I x1 I y1 . . . . . . I xi I yi . . . . . . I xn I yn 3 7 7 7 7 7 7 5 , v = &#63743; v x v y , b = 2 6 6 6 6 6 6 4 I t1 . . . I ti . . . I tn 3 7 7 7 7 7 7 5</p><p>In the equation, (I x1 , I y1 ) . . . (I xn , I yn ) denote the positional gradients at (x, y) coordinates of the n pixels, while I t1 . . . I tn represent the gradients of the pixels at time t. Finally, the least square method is applied to find a solution for the following linear equation:</p><p>Unfortunately, the L-K method has significant limitations. First, the assumptions of the L-K method may not hold in reality. A pixel's gray scale value may change substantially in nearby frames. Image contents between consecutive frames may vary considerably if objects move fast. Thus, it is susceptible to large errors in the presence of noise or fast-moving objects <ref type="bibr">[17]</ref>, <ref type="bibr">[18]</ref>. Second, the L-K method suffers from the depth compression effect, where the pixel motion velocity is incorrectly considered higher when objects are closer to the camera compared to when they are farther away, even if the actual speed is the same. Moreover, solving Equations 1, 2, and 3 for every pixel is prohibitively costly. OD Rate Adaptor Optical Flow Tracker MLP Pixel Speed Estimator Object Detector YOL Input Frame Top-K Objects Locations Average Pixel Speed Bounding Boxes Classes Adjusted OD Rate Output Fig. 1: Overall structure of AROD.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>IV. AROD: ADAPTIVE REAL-TIME OBJECT DETECTION</head><p>objects estimated via optical flow analysis are inputted to our MLP model to infer the average pixel motion speed, where K is a predetermined maximum threshold for efficient pixel velocity inference. Given the inferred pixel motion speed, the rate adaptor in Figure <ref type="figure">1</ref> dynamically adjusts the rate of object detection and feeds traffic video frames into the adopted object detection model, such as a YOLO model, according to the adjusted rate. Then, the object detection model generates bounding boxes around all objects it detects, while classifying them as illustrated in Figure <ref type="figure">1</ref>.</p><p>To address the limitations of optical flow analysis, we design a new lightweight MLP model that significantly reduces potential errors in pixel velocity inference. Furthermore, we substantially reduce computational costs for optical flow analysis as follows:</p><p>&#8226; Utilizing the Shi-Tomasi method <ref type="bibr">[19]</ref>, the optical flow tracker of AROD in Figure <ref type="figure">1</ref> identifies the corners of a maximum of K moving objects (e.g., K = 10). If there are a total of m objects in a frame, it tracks only one corner of each of the n = min(m, K) objects. By doing this, we limit the number of objects and decrease the number of pixels to track in consecutive frames. &#8226; To further enhance the efficiency, our optical flow tracker tracks n object corners using the L-K <ref type="bibr">[16]</ref> method within the region of measurements (RoM) only, where an arbitrary object appears big enough for visual identification, as illustrated in Figure <ref type="figure">2</ref>.</p><p>Given that, Algorithm 1 formally describes how AROD works. In line 1, we initialize the frame number t = 1. Lines 2-12 are applied to incoming video frames for efficient object detection. In line 3, we perform efficient optical flow analysis to estimate the positions of n objects (i.e., their corners) in the RoM of frame t as discussed above.</p><p>If t &gt; 1, AROD executes lines 4-12. In lines 5-6, the positions of n objects in frames t 1 and t are stored in vectors L(t 1) and L(t), respectively: L(t 1) = [(x 1 (t 1), y 1 (t 1)) . . . (x n (t 1), y n (t 1))]</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Region Of Measurement</head><p>In line 6, we concatenate L(t 1) and L(t) into a vector, `(t). In line 7, given n and `(t), the MLP model of AROD infers the average pixel motion speed of the n objects, v(t). The design and training of the MLP model for efficient, highaccuracy inference of average pixel velocity is described in Section V.</p><p>In line 8, we dynamically adapt the object detection rate, (t), according to v(t). In this paper, we assume that the input frame rate c from the camera, e.g., 30 fps, is constant. Given that, (t) &#63743; c , 8t; that is, the current object detection rate is less than or equal to the input frame rate, depending on the pixel motion speed of objects. In particular, in line 8, the object detection rate is adapted using a set of prespecified pixel velocity thresholds: &#8999; 1 , . . . , &#8999; max (pixels per frame), where &#8999; 1 &lt; . . . &lt; &#8999; max . Using them, we dynamically adapt the object detection rate, (t), according to v(t):</p><p>Algorithm 1: Adaptive Real-Time Object Detection input : Incoming video frames output: Object detection results 1 t = 1 2 while true do // optical flow analysis 3 L(t) = OFA(frame t) 4 if t &gt; 1 then // n objects in frames t 1 and t 5 n = min(m, K) 6 `(t) = L(t 1) + L(t) // infer pixel motion speed 7 v(t) = MLP(n, `(t)) // adapt obj. detection rate 8 (t) = adapt(v(t)) // Do obj. detection at rate (t) 9 results = OD( (t)) // Bounding boxes &amp; obj. classes 10 display(results) 11 end 12 t++; 13 end</p><p>where (1) &gt; . .. &gt; (max) &gt; 1 to use a lower object detection rate for a lower pixel motion speed, v(t). If v(t) &#8999; max , object detection is set to c and therefore AROD performs object detection for every input frame. Otherwise, object detection rate is reduced according to the pixel motion speed using Equation <ref type="formula">5</ref>. For example, if (j + 1) = 2, AROD skips every other frame when &#8999; j &#63743; v(t) &lt; &#8999; j+1 .</p><p>In lines 9-10, we perform object detection at the rate of (t) and display the result. In line 12, we increment the frame number, and repeat lines 2-12 for incoming traffic video frames.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>V. MLP MODEL DESIGN, DATASETS, AND TRAINING</head></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>A. Objectives of Model Design</head><p>A main challenge for high-accuracy inference of pixel velocity is how to minimize the risk of overfitting and improve generalizability with little computational overhead. To face the challenge, we take systematic approaches to design, train, and evaluate the MLP model of AROD:</p><p>&#8226; Per-Weight Regularization: During training, we utilize an effective optimization algorithm that significantly reduces overfitting via per-weight regularization <ref type="bibr">[20]</ref>.</p><p>&#8226; Early Stopping: To avoid overfitting, we analyze training and validation losses over training epochs and terminate training early as soon as both losses converge to small values and stabilize. &#8226; MLP Architecture Search: In an iterative feedback loop, we vary the depth and width of MLP models and analyze their losses. Thereby, we find an MLP model with as low complexity as possible that converges to minimal validation and training losses, reducing the risk of overfitting due to a more complex structure. &#8226; Generalizability Analysis using a Different Dataset:</p><p>We also verify the generalizability of AROD to a traffic video entirely unseen during training (in Section VI).</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>B. Datasets</head><p>In this paper, four HD (1280&#8677;720 pixels) traffic monitoring videos are used for evaluation. Video 1 <ref type="bibr">[21]</ref>, Video 2 <ref type="bibr">[22]</ref>, and Video 3 <ref type="bibr">[23]</ref> were captured at different locations in bright sunlight, under a cloudy condition, and at night, respectively. Moreover, Video 4 <ref type="bibr">[24]</ref>, annotated with ground-truth bounding boxes, is set aside for assessing the risk of overfitting and the generalization capability of AROD. None of the frames in Video 4 are utilized in training our MLP model. If the MLP model becomes overfitted and fails to generalize to a new video, it could result in a degradation of the mAP (mean Average Precision) by AROD.</p><p>In this paper, an object (e.g., a vehicle) in a traffic video frame is one sample used for training. Videos 1, 2, and 3 have 2,833,699 samples in total. We split the videos so that the samples in the first 30% of the videos are reserved for testing, while the samples in the remaining 70% of the videos are used for training and validation. (The 70% of the videos is further divided into training and validation datasets with the split ratio of 0.8:0.2.)</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>C. MLP Model Search and Training</head><p>For the sake of training only, we track a large number of possible vehicle corners (e.g., K = 200). To reliably derive the reference speed, we manually identify vehicle corners that pass through the entire RoM (Figure <ref type="figure">2</ref>), while rejecting noisy ones that fail to go through the RoM. Subsequently, we analyze the position of the identified vehicle i over w successive frames (e.g., w=120 frames for 4 seconds at 30 fps) using the Lucas-Kanade <ref type="bibr">[16]</ref> and Shi-Tomasi <ref type="bibr">[19]</ref> methods (Section III). Based on that, we derive the reference pixel velocity of an arbitrary vehicle i, v(i), for all i.</p><p>To train the MLP model, we use the following loss function, where n denotes the number of samples in each mini-batch and v(i; &#10003;) is the inferred pixel speed of the vehicle i using the MLP with the current set of weights &#10003;:</p><p>To minimize the loss, we apply the Adam with weight decay (AdamW) optimizer <ref type="bibr">[20]</ref>. AdamW improves upon Adam <ref type="bibr">[25]</ref> by decoupling weight decay from gradient updates, supporting per-weight regularization. In this way, it avoids overfitting and enhances generalizability compared to Adam. In Equation <ref type="formula">7</ref>, at the j th iteration, each weight is updated based on its gradient mean (moving average), m j , and squared gradient (uncentered variance), 2 j . In the equation, &#8629; is the learning rate, &#9999; is a</p><p>... ... ... ... ... ... ... ... x _t-1 x _t y_t-1 y_t No. of neurons&#65306;512 256 64 16 4</p><p>Optical flow analysis MLP</p><p>x 1 ,y 1 x 2 ,y 2 x 3 ,y 3 x 4 ,y 4</p><p>x 1 ,y 1 x 2 ,y 2 x 3 ,y 3 x 4 ,y 4</p><p>Frame t</p><p>Frame t-1 v (t ) ^ Fig. <ref type="figure">3</ref>: Pixel motion speed inference for n objects via MLP-based regression small constant used to prevent division by zero, and is the weight decay factor used to avoid overfitting via regularization:</p><p>Thus, AdamW updates a weight by a smaller step size, if its squared gradient is large or vice versa. In this paper, we set &#8629; = 0.001 and = 0.0005.</p><p>Based on this, we have analyzed various MLP model architectures with different depths and widths, finding the cost-effective MLP model in Figure <ref type="figure">3</ref> that minimizes the loss efficiently. As depicted in the figure, our MLP model has 5 hidden layers with 512, 256, 64, 16, and 4 neurons, respectively. The final layer in Figure <ref type="figure">3</ref> has a single neuron that produce the average pixel velocity of n objects, v(t). As illustrated in Figure <ref type="figure">4</ref>, both the validation and training loss curves of the MLP model exhibit a downward trend until they plateau in the vicinity of the 20th epoch. The figure demonstrates a favorable pattern of consistently decreasing losses that swiftly stabilize. Hence, to avoid overfitting, we terminate the training at epoch 20.</p><p>In addition, we empirically tune several parameters in Algorithm 1 to optimize inference accuracy with minimal complexity. For efficient inference, we set K=10 to track at most 10 moving objects, e.g., vehicles, with the highest confidence. The corner size is set to 15 &#8677; 15 pixels to track fewer pixels than the entire pixels of a moving object. Finally, in Equation <ref type="formula">5</ref>, we set &#8999; max = &#8999; 6 = 10 pixels/frame and &#8999; 1 = 1.7 pixels/frame, configuring (1) &gt; . . . &gt; (6).</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>D. Hardware Platform and Implementation</head><p>We assess AROD on a personal computer configured to mimic a relatively inexpensive video analytics server, in contrast to a high-end cloud server, for performing real-time object detection near data sources (cameras) <ref type="bibr">[1]</ref>. It consists of commodity hardware components: an Intel&#174; Core i7-7820X CPU, 64 GB of RAM, and an NVIDIA GeForce GTX 3080Ti GPU. The operating system is Ubuntu 18.04.6 LTS. All methods are implemented using Python 3.10, PyTorch 2.0.1, Scikit-learn 1.0.2, and OpenCV-python 4.7.0. For evaluation, we employ three pretrained one-stage object detection models: EfficientDet <ref type="bibr">[6]</ref>, SSD <ref type="bibr">[5]</ref>, and YOLOv5 <ref type="bibr">[26]</ref>, which provide superior fps and similar detection accuracy, compared to twostage object detection models, such as <ref type="bibr">[2]</ref>, <ref type="bibr">[3]</ref>, <ref type="bibr">[9]</ref>.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>VI. EVALUATION</head><p>In Subsections VI-A through VI-D, we describe the evaluation results acquired using the test sets of Videos 1, 2, and 3 unseen during the training. Furthermore, in Subsection VI-E, we assess the mAP and generalizability of AROD using entire Video 4 completely unseen during the training.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>A. Pixel Speed Inference Errors</head><p>We compare the RMSE of our MLP model to those of the Lucas-Kanade method <ref type="bibr">[16]</ref> and five other SOTA machine learning methods in Table <ref type="table">I</ref>. Our model provides the most robust inference in terms of RMSE. It achieves the smallest RMSE for Video 1 and the second smallest RMSE values for the other videos. For Videos 2 and 3, polynomial linear regression achieves the smallest RMSE; however, its RMSE for Video 1 is over 6.25&#8677; the RMSE of our model. In contrast to the L-K method, our model exhibits an RMSE that is one or two orders of magnitude smaller for all three videos.</p><p>TABLE I: RMSEs (pixels/frame) in pixel velocity inference (boldface: best; underlined: second best) Models Video 1 Video 2 Video 3 L-K method 79.4 25.7 26.6 Linear Regression 4.02 1.37 1.86 Polynomial LR 5.38 1.24 0.89 ElasticNet 4.02 2.17 2.18 XGBoost 0.91 1.36 1.45 CatBoost 1.03 1.61 1.49 MLP of AROD 0.86 1.26 1.26</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>B. Model Size, GFLOP, and Latency Comparisons</head><p>In Table <ref type="table">II</ref>, the model size, GFLOP, and latency of AROD are one or more orders-of-magnitude smaller than those of the object detection models due to the lightweight design. Also, the latency of AROD is concealed via effective CPU-GPU pipelining: AROD runs in the CPU and its latency is significantly shorter than that of object detection simultaneously performed in the GPU, as shown in Table <ref type="table">II</ref>.</p><p>TABLE II: AROD vs. the three object detection models utilized for evaluation. AROD is executed in the CPU, but each object detection model is executed in the GPU. Models Parameters GFLOP Latency YOLOv5 7.2 M 7.7 21.1 ms SSD300 22.9 M 18.9 45.2 ms EfficientDet-B0 3.9 M 2.5 114.4 ms AROD 0.6 M 0.002 3.8 ms</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>C. Frame Processing Rate for A Traffic Video Stream</head><p>As illustrated in Table <ref type="table">III</ref>, AROD improves the fps by approximately 32-61%, 110-174%, and 120-213% for YOLOv5, SSD300, and EfficientDet-B0, respectively. AROD significantly outperforms ERD <ref type="bibr">[12]</ref> and L-filter <ref type="bibr">[13]</ref> that enhance the fps of the three object detection models by 10-44% and 31-47%, respectively, on the same hardware platform. This is because, unlike ERD <ref type="bibr">[12]</ref>, L-filter <ref type="bibr">[13]</ref>, and the methods based on structural similarity analysis <ref type="bibr">[10]</ref>, <ref type="bibr">[11]</ref> (discussed in Section II), the fps of AROD is at least as high as the fps of the standalone models without AROD, regardless of the road occupancy status or structural similarity between frames, due to efficient CPU-GPU pipelining. 1  In Table <ref type="table">III</ref>, AROD+object detection achieves the lowest fps for Video 1 and highest fps for Video 2, because Video 1 and Video 2 exhibit the highest and lowest pixel velocity, respectively. However, the fps values of the object detection 1 ERD <ref type="bibr">[12]</ref> and L-filter <ref type="bibr">[13]</ref> are much faster than structural similarity analysis used in <ref type="bibr">[10]</ref>, <ref type="bibr">[11]</ref>. Detailed results are omitted due to space limitations. models without AROD in the "Baseline" column do not noticeably change across videos, since they are not adaptive to the pixel motion speed.</p><p>TABLE III: Average fps of the baseline object detection models without AROD in the 2nd column and AROD+object detection models in the 3rd though 5th columns. Models Baseline Video 1 Video 2 Video 3 YOLOv5 46.1 61.1 74.3 70.6 SSD300 11.5 24.2 31.5 27.1 EfficientDet-B0 8.7 19.1 27.2 26.2</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>D. Scalability of AROD for Concurrent Streams</head><p>In this subsection, we assess the scalability of AROD when it works alongside YOLOv5, which is the fastest among the tested object detection models. As shown in Table IV, AROD+YOLOv5 supports approximately 30-34 fps per stream, when it processes three concurrent streams. This represents a significant scalability advancement, particularly given the high resource demands of real-time object detection. For instance, even a high-end NVIDIA V100 GPU can only process two 30 fps video streams for object detection using YOLOv5 <ref type="bibr">[27]</ref>.</p><p>TABLE IV: Per-stream fps of AROD+YOLOv5 when one or more streams are processed concurrently Number of Streams 1 2 3 Video 1 61.1 41.5 30.2 Video 2 74.3 49.7 34.2 Video 3 70.6 48.5 31.6</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>E. Generalizability</head><p>For Video 4, AROD+YOLOv5 in Table V achieves comparable mAP to YOLOv5 with respect to different IoU (Intersection over Union) thresholds used to measure the mAP. This reveals that our MLP model is not overfitted and effectively generalizes to Video 4 totally unseen during training. Moreover, AROD+YOLOv5 produces good visual results, as captured in Figure <ref type="figure">5</ref>.</p><p>TABLE V: mAP of object detection for different IoU thresholds IoU threshold 0.1 0.2 0.5 YOLOv5 0.443 0.442 0.401 AROD+YOLOv5 0.445 0.444 0.406</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>VII. CONCLUSIONS AND FUTURE WORK</head><p>Efficient real-time object detection is essential for AI-based intelligent traffic management. However, increasing complexities of deep learning models for object detection result in significant latency and resource requirements. In this paper, we introduce a new framework for adaptive object detection that dynamically reduces the execution rate of a plugged-in object detection model during periods of low pixel velocity. We rigorously design and train a new lightweight MLP model to infer pixel velocity with high accuracy, avoiding overfitting. Moreover, AROD hides its latency via efficient CPU-GPU pipelining. Our evaluation verifies the cost-effectiveness of AROD: 1) AROD supports robust pixel velocity inference; 2) it enhances the fps of YOLOv5, SSD, and EfficientDet by approximately 32-61%, 110-174%, and 120-213%, respectively; and 3) AROD+YOLOv5 can concurrently process up to three traffic video streams, supporting at least 30 fps per stream without requiring expensive cloud GPUs. Moreover, it effectively generalizes to a separate traffic video set aside by providing the comparable mean average precision to that of YOLOv5. In the future, we will investigate more advanced approaches to further improve the efficiency and scalability of real-time object detection, sustaining accuracy. Moreover, we will explore how to raise the accuracy of real-time object detection without largely increasing latency and resource demands.</p></div></body>
		</text>
</TEI>
