Tomáš Zemčík, Lukáš Kratochvíla, Šimon Bilík, Ondřej Boštík, Pavel Zemčík & Karel Horák International Journal of Image Processing (IJIP), Volume (15) : Issue (1) : 2021 1 Performance Evaluation of CNN Based Pedestrian and Cyclist Detectors On Degraded Images Tomáš Zemčík
[email protected] Faculty of Electrical Engineering and Communications Dept. of Automation and Instrumentation Brno University of Technology, Brno, Czech Republic Lukáš Kratochvíla
[email protected] Faculty of Electrical Engineering and Communications Dept. of Automation and Instrumentation Brno University of Technology, Brno, Czech Republic Šimon Bilík
[email protected] Faculty of Electrical Engineering and Communications Dept. of Automation and Instrumentation Brno University of Technology, Brno, Czech Republic Ondřej Boštík
[email protected] Faculty of Electrical Engineering and Communications Dept. of Automation and Instrumentation Brno University of Technology, Brno, Czech Republic Pavel Zemčík
[email protected] Faculty of Information Technology Dept. of Computer Graphics and Multimedia Brno University of Technology, Brno, Czech Republic Karel Horák
[email protected] Faculty of Electrical Engineering and Communications Dept. of Automation and Instrumentation Brno University of Technology, Brno, Czech Republic Abstract This paper evaluates the effects of input image degradation on performance of image object detectors. The purpose of the evaluation is to determine usability of the detectors trained on original images in adverse conditions. SSD and Faster R-CNN based pedestrian and cyclist detector performance with images degraded with motion blur, out-of-focus blur, and JPEG compression artefacts, most commonly occurring in mobile or static traffic systems. An experiment was designed to assess the effect of degradations on detection precision and cross class confusion. The paper describes the two datasets created for this evaluation, evaluation of a number of detectors on increasingly more degraded images, comparison of their performance, and assessment of their tolerance to different types of image degradation as well as a discussion of the results. Keywords: Object Detection, Image Degradation, Pedestrian Detection, Cyclist Detection, SSD, Faster R-CNN. 1. INTRODUCTION Image object detection is one of the keys to solving technical problems in machine vision-based traffic application. CNN object detection architectures currently seem to be the most promising ones towards robust and reliable image object detection in very difficult traffic environments. With
Tomáš Zemčík, Lukáš Kratochvíla, Šimon Bilík, Ondřej Boštík, Pavel Zemčík & Karel Horák International Journal of Image Processing (IJIP), Volume (15) : Issue (1) : 2021 2 the latest advances in this field, the pressures of regulatory bodies to implement them into traffic safety improving applications is higher than ever, as demonstrated by EU’s “Vision Zero” plan to have zero road accident deaths by 2050 [1]. Pedestrians and cyclists represent the most vulnerable road users making up for approximately 26% of all road accident-related deaths in 2018 according to WHO [2]. In the EU this number is even higher, at 32%, so it is no surprise that detecting them is a central issue in Autonomous Vehicles (AV), Advanced Driver Assistance Systems (ADAS), Intelligent Traffic Systems (ITS), and Intelligent Vehicle Systems (IVS). With the shift towards more automated transportation a lot of research in this area is being done, such as [3 - 5]. From the semantic point of view, both pedestrians and cyclists are very similar, as both classes represent humans in different poses with or without a bicycle. Therefore, their appearance in images is very similar. This similarity means that common features exist and can aid detector training. On the other hand, while similarities exist across classes, also an enormous variety occurs within individual instances of each class making distinguishing between pedestrians and cyclists, especially in certain orientations, a challenging task [6]. Despite the aforementioned similarity in appearance, however, for a higher-level AV or ADAS system, they represent dramatically different objects that have very different behavioural patterns in traffic and as such need to be dealt with very differently in the trajectory planning algorithms, thus it is needed to have a robust and accurate detector. 2. OBJECT DETECTION IN TRAFFIC APPLICATIONS Since the publication of pedestrian targeted Viola Jones detector in 2003 [7], which is by many regarded the first pedestrian-in-image detector [8], major advances in the field have been made. In consequent years, the attention has shifted from hand-selected Haar-like features and boosted classifiers through HOG features using SVM classifiers [9, 10] to deformable part models [11]. In recent years, however, the most attention is concentrated on Deep Learning models based around CNNs. The DL approach finally allows for the feature extraction to be trained along with the classifiers [8]. Up until the rise of CNNs, detection methods of pedestrians and cyclists (and other classes) have been largely kept separate requiring multiple runs of different algorithms on a single image to detect various classes of road users [12]. With the capabilities of modern CNN metaarchitectures, no reason not to implement multiclass capability into today’s detectors exists anymore and with deployed AV and ADAS, this is a de-facto standard [12]. In practical deployment, ideal conditions rarely apply and many applications need to perform well even with poor input image quality. This paper evaluates performance of state-of-the-art object detection architectures on varying quality datasets. We do not intend to create a detector to compete with the state-of-the-art detectors. Effects of image degradation on various CNN classification architectures were previously studied [13, 14]. With results showing that while all tested architectures were affected, not all are affected by the same way, with Roy at al. [13] concluding deeper networks are affected more. Pei et al. [14] concluded that while algorithms exist for removing the tested degradations from image (motion blur and haze), the improvement in CNN classification performance was insignificant. The effect of image degradation on object detection networks has not been that extensively studied. Single Shot multibox Detector (SSD) and Faster Region-based Convolutional Neural Network (R- CNN) have been selected to be the candidates based on performance as measured by Tilgner [15].
Tomáš Zemčík, Lukáš Kratochvíla, Šimon Bilík, Ondřej Boštík, Pavel Zemčík & Karel Horák International Journal of Image Processing (IJIP), Volume (15) : Issue (1) : 2021 3 2.1 R-CNN Object Detector Family Girshick et al. have presented their Region-based Convolutional Neural Network (R-CNN) in 2014 [16]. The R-CNN workflow consists of 3 steps, where in the first one, an input image is divided into 2000 regions-of-interest (RoI). Consequently, all 2000 subimages are run through a CNN feature extraction and finally classified via SVM. FIGURE 1: R-CNN Workflow [16]. R-CNN outperformed most of its contemporaries in terms of accuracy but running the CNN on all RoIs separately is obviously rather computationally expensive (tens of seconds per image), so primarily to address this drawback, Girshick introduced Fast R-CNN [17] in 2015. Fast R-CNN improves upon the original method by only running the CNN once on each input image generating a convolutional feature map, by adding bounding box regression into the network, and then by resizing the selected region of interest in the feature map to be classified using a fully connected neural network. These improvements managed to improve computational performance by an order of magnitude without any significant loss in detection accuracy [17]. In 2016 Ren et al. published another major improvement in the R-CNN object detector family - the Faster R-CNN [18]. Similarly to Fast R-CNN, the convolutional feature map is only computed once per image but unlike in the above method, the region proposals are handled by a custom Region Proposal Network (RPN). These changes add the benefit of the method being implementable in GPUs and such acceleration improves the computational performance by yet another order of magnitude into the frame rate range of units of frames per second (FPS), making it a viable option for real time detection. FIGURE 2: Faster R-CNN Workflow. 2.2 SSD Object Detector Single Shot Multibox Detector (SSD) was published by Liu et al. in 2016 as a competitive realtime object detection method and at that time, it outclassed its contemporaries including Faster R- CNN both in terms of mAP and framerate on VOC2007 [19].
Tomáš Zemčík, Lukáš Kratochvíla, Šimon Bilík, Ondřej Boštík, Pavel Zemčík & Karel Horák International Journal of Image Processing (IJIP), Volume (15) : Issue (1) : 2021 4 SSD uses a pre-trained image classification CNN base as a feature extractor to which further progressively smaller convolutional layers are attached. This progressive decrease in feature map size means that objects of very different scales can be detected [19]. As opposed to preceding object detection approaches, single shot detectors like YOLO [20] and SSD [19] do away with a trained region proposal approach and generally apply a variant of a grid based RoI generator, in SSD, a set of default bounding boxes is generated for each feature map. These default boxes are of pre-selected aspect ratios in order to accommodate different object classes [19]. FIGURE 3: SSD Workflow (NMS - Non Maximum Suppression). From all the default boxes classification, scores for all classes are extracted and Non Maximum Suppression is used to select only the strongest of the closely located detections. SSD, when first published, outperformed Faster R-CNN on Pascal VOC and COCO datasets both in mAP and framerate. SSD300 performed with mAP 74.3% compared to 73.2% of Faster R- CNN, at 46 FPS compared to 7 FPS [19]. 3. IMAGE DEGRADATIONS In traffic images, different image degradations appear in many cases, such as JPEG compression artifacts, motion blur, and out-of-focus blur, that have been selected as the representative ones. JPEG compression is still one of the most widely used compression algorithms. Based on 8x8 block DCT, the compression leaves rather prominent artifacts in images compressed at higher compression rates [21]. These artifacts are mostly ringing (caused by missing higher frequencies as more of the DCT is truncated) and block-to-block discontinuities. Although more modern and better compression standards have since been introduced, JPEG is still used across the industry especially in static traffic monitoring systems where lowering data sizes is important. Methods exist for JPEG artifact removal [22], but they require additional computational costs. Motion blur is a blur caused by objects in the imaging moving too fast relatively to the exposure time. Motion blur affects mobile and static traffic systems similarly, while in static installations it is the objects to be detected that can move, in mobile systems it can be both motion of the camera and motion of the scene at the same time causing the blur. Similarly to the JPEG artifact removal, motion blur removal has been studied and removal methods are available [23]. Out-of-focus blur is the final type of degradation discussed. It is caused by objects in the scene being outside of the camera’s depth-of-field. This type of degradation affects static traffic cameras the most. This type of blur can be readily removed as well [24].
Tomáš Zemčík, Lukáš Kratochvíla, Šimon Bilík, Ondřej Boštík, Pavel Zemčík & Karel Horák International Journal of Image Processing (IJIP), Volume (15) : Issue (1) : 2021 5 As stated above, all selected degradations are to an extent removable and their avoidance or removal is advisable. Should they still occur, their removal might be computationally costly and time consuming and that is why investigating their effect on object detection is important. 4. DATASETS & EXPERIMENTS To assess performance of the selected architectures, an experiment was devised where pedestrian and cyclist detectors trained on undegraded data applied on newly compiled datasets with varying magnitude of degradation. Detectors were evaluated in terms of their average precision for each class. Average precision being used as defined by the Pascal VOC challenge [25, 26], and in terms of their cross-class confusion (cases where a pedestrian is detected to be a cyclist and vice versa). 4.1 Object Detectors Two object detection models were trained of the selected architectures. The models trained by the authors were trained to detect both pedestrians and cyclists, while those selected for comparison only detect pedestrians. A Faster R-CNN based detector has been selected for evaluation. The particular variant selected uses Resnet101 [27] as a feature extractor. The detector was trained on a combination of the left colour image of the stereo pair in the KITTI 2012 stereo dataset [28] and authors’ own pedestrian dataset. Data augmentation using horizontal flip and limited skew were used to further improve the training. The training has been done through Tensorflow Object Detection API [29]. We will further refer to this detector as FRCNN Zemcik. For comparison, two more faster R-CNN detectors were used, FRCNN Tilgner [15] and FRCNN Kitti zoo [29], both using Resnet101 as a feature extractor. Representing SSD architecture an SSDLite model SSD Zemcik has been trained on the same data. The model utilizes MobileNetV2 as the CNN backbone [30]. The same architecture trained by Tilgner will be used for comparison as SSD Tilgner [15]. 4.2 Datasets Testing datasets were collected to assess quality of all measured detectors. The datasets were designed to be representative of a multitude of traffic situation and individual images were not selected to purposely help or hinder detection. Two datasets have been compiled for this purpose: Small Pedestrian and Cyclist Dataset - SPCD - consists of 200 images gathered using a state-of- the-art mid-range dashcam. The image data has been gathered in urban and suburban conditions in Brno, Czech Republic. This dataset only contains daytime images and all images contain at least one instance of a pedestrian or a cyclist. FIGURE 4: Selected Images from SPCD.
Tomáš Zemčík, Lukáš Kratochvíla, Šimon Bilík, Ondřej Boštík, Pavel Zemčík & Karel Horák International Journal of Image Processing (IJIP), Volume (15) : Issue (1) : 2021 6 The Low Quality Traffic Dataset – LQTD - consists of over 400 images taken using a purposely selected low resolution low image quality dashcam with further image degradations, such as item reflections on the windscreen or more dirty windscreen achieved by placing the camera out of the wiper arch. Similarly to the SPCD, it was gathered in daytime and all weather. Majority of the images contain an instance of a pedestrian, a cyclist or both. FIGURE 5: Selected Images from LQTD. All three types of degradations were applied on all images of both datasets consecutively in varying severity. JPEG compression was applied with quality graduated from 100% to 10% to achieve images with increasing severity of JPEG artifact degradation. FIGURE 6: JPEG compressed image with quality of 100%, 50%, and 10% respectively. Motion blur was applied using a horizontal linear averaging filter from 2 to 20 pixels in width. FIGURE 7: Motion blurred images with kernels of 0px, 10px and 20px.
Tomáš Zemčík, Lukáš Kratochvíla, Šimon Bilík, Ondřej Boštík, Pavel Zemčík & Karel Horák International Journal of Image Processing (IJIP), Volume (15) : Issue (1) : 2021 7 The out-of-focus blur was approximated by application of a linear averaging filter with circular aperture simulating a Point Spread Function of an out-of-focus lens. The circle radius was selected from 1 to 10 pixels to correspond to the width of the motion blur kernel size. FIGURE 8: Out-of-focus blurred images with kernel radius of 0px, 5px and 10px. JPEG (quality) 100% 90% 80% 70% 60% 50% 40% 30% 20% 10% SPCD 1.000 0.987 0.980 0.973 0.961 0.960 0.950 0.926 0.870 0.811 LQTD 1.000 0.975 0.962 0.952 0.941 0.933 0.923 0.906 0.878 0.811 Motion (kernel) 2px 4px 6px 8px 10px 12px 14px 16px 18px 20px SPCD 0.973 0.957 0.934 0.904 0.875 0.851 0.830 0.812 0.797 0.784 LQTD 0.966 0.940 0.908 0.880 0.857 0.837 0.821 0.808 0.797 0.787 OoF (kernel rad) 1px 2px 3px 4px 5px 6px 7px 8px 9px 10px SPCD 0.973 0.936 0.882 0.830 0.767 0.732 0.706 0.681 0.653 0.650 LQTD 0.957 0.902 0.834 0.787 0.737 0.708 0.686 0.664 0.648 0.635 TABLE 1: Mean Structural Similarity Index Measure for all degradations on both datasets (SPCD and LQTD) with respect to JPEG compression quality, motion blur kernel width and out-of-focus blur kernel radius. The severity of the degradation was quantified using Structural Similarity Index Measure (SSIM) [31]. Table 1 gives the mean SSIM for both SPCD and LQTD datasets with each degradation severity. 5. RESULTS The results of the experiments described above are presented in the following charts. Figure 9 gives the class average precision as per the Pascal VOC metric [25, 26] for each classifier using both datasets. Pedestrian detectors are shown in solid line, while cyclist detectors are in dashed line. In all cases, the severity of the degradation increases from right to left. Figure 10 gives the cross-class confusion for each of the classifiers. The confusion was quantified using the same Pascal VOC average precision metric, only the pedestrian and cyclist ground truth labels were switched. The solid line represents cyclists in the image that were erroneously detected and classified as pedestrians, while dashed line represents pedestrians erroneously labelled as cyclists.
Tomáš Zemčík, Lukáš Kratochvíla, Šimon Bilík, Ondřej Boštík, Pavel Zemčík & Karel Horák International Journal of Image Processing (IJIP), Volume (15) : Issue (1) : 2021 8 FIGURE 9: Average precision of all classifiers on both datasets.
Tomáš Zemčík, Lukáš Kratochvíla, Šimon Bilík, Ondřej Boštík, Pavel Zemčík & Karel Horák International Journal of Image Processing (IJIP), Volume (15) : Issue (1) : 2021 9 FIGURE 10: Cross-confusion of all classifiers on both datasets.