scieee AI-readable full text Open interactive document viewer

People detection on 2D laser range finder data using deep learning and machine learning

Abrego-González, José,Aguirre Molina, Eugenio,García Silvente, Miguel

Abstract

This work was made possible thanks to the support of Senacyt Panamá (Scholarship No. 270-2022-164) and Grant PID2022-138453OB-I00 funded by MCIN/AEI/10.13039/501100011033 and by "ERDF A way of making Europe".

Full text

People detection on 2D laser range nder data using deep learning and machine learning ⋆ José Abrego-González, Eugenio Aguirre, and Miguel García-Silvente Department of Computer Science and A.I. (DECSAI). Andalusian Research Institute in Data Science and Computational Intelligence (DaSCI). CITIC-UGR., University of Granada (UGR), 18071 Granada, Spain [email protected], [email protected], [email protected] Abstract. This work presents a machine learning based study on people detection using 2D Laser Range Finders (LRFs) combined with deep learning methodologies, aimed at enhancing mobile robot capabilities in various environmental conditions. The study introduces a novel integration of a monocular camera with an LRF on a mobile robot to improve the accuracy and eciency of detecting and tracking people. By employing deep learning models such as CenterNet, the system leverages both image and 2D range data to facilitate automatic labeling of datasets, crucial for training robust classication algorithms. In order to achieve the best classier, two experimental studies are introduced in this work. The former is carried out in a simulated environment and the latter in real-world, oce-like environments. In simulations, various machine learning models are trained and evaluated, showing signicant results in distinguishing human legs from other objects. The transition to realworld testing underscores the challenges and adaptations necessary to achieve high accuracy and reliability in dynamic settings. The XGBoost model emerged as the most eective classier in our study, achieving the highest scores in accuracy, precision, recall, and F1-score, outperforming other methods across these key metrics. This work aims to advance the eld of 2D LRF based people detection and also proposes a solution for real-time applications, balancing precision and computational eciency. Experimental results from both simulated and real-world environments demonstrate the system's eectiveness. Keywords: People detection · Deep learning · Machine learning · 2D LRF 1 Introduction Mobile robots rely on detecting and tracking people for applications like Human- Robot Interaction (HRI), navigating crowded spaces, and safety in shared environments [20]. Various computer vision techniques using Monocular, Stereo, and ⋆ This work was made possible thanks to the support of Senacyt Panamá (Scholarship No. 270-2022-164) and Grant PID2022-138453OB-I00 funded by MCIN/AEI/10.13039/501100011033 and by ERDF A way of making Europe. People detection on 2D laser range finder data using deep learning and machine learning 235 2 J. Abrego et al. RGB-Depth cameras, including deep learning methods like YOLO, have proven eective for these tasks [15]. Despite the advantages of vision systems, 2D Laser Range Finders (LRFs) are favored in social and service robots for their reliability and wide eld of view, overcoming the limitations of vision sensors in adverse conditions [4]. Detecting people using 2D laser technologies can be achieved through various approaches, as outlined in the survey conducted by M. Sharif [22]. Some techniques directly process laser measurements individually as inputs for supervised machine learning algorithms. Conversely, alternative methods rst cluster these measurements and then derive features to characterize these clusters. In this work, we will adopt the latter approach and propose a set of innovative features compared to those described in the specialized literature. Emerging studies utilize deep learning for enhanced detection from sensor data, oering signicant improvements in reliability [21]. Given the absence of automatic labeling tools for 2D laser data, this work explores the potential of deep learning to automate the labeling of such datasets and the use of machine learning approaches to generate ecient leg detectors, aiming to enhance e- ciency and accuracy in diverse applications [14]. This work is organized as follows: Section 2 outlines the proposed system's hardware and software, emphasizing camera and LRF integration. In Section 3, deep learning methods for object detection are detailed, with a focus on the CenterNet model. Section 4 describes the mobile robot's hardware and software components. Section 5 discusses the simulated environment for leg detection using 2D LRF and the associated machine learning training. Experimental evaluations in simulated and real-world conditions are covered in Sections 5 and 6, respectively. The conclusions and some ideas on future work are commented in Section 7. 2 Description of the proposal In the initial phase of this study, we employ a simulated environment using CoppeliaSim to rigorously test our experimental setup. This approach ensures that it performs eectively under controlled conditions designed to mirror real-world scenarios. This simulation allows us to evaluate the detection capabilities and overall system reliability without the complexity and variability inherent in physical environments. Through this simulation, we gain insights into the system's performance, providing a foundation for further development and renement before real-world application. The next step involves using real-world data to validate the ndings from our simulations. Building on prior work in people detection, tracking [2], and automatic labeling of 2D range data [1], this proposal introduces a rened method by employing a monocular camera instead of the Kinect 1.0 sensor, avoiding the Kinect's infrared drawbacks under certain lighting conditions. The system incorporates a LRF sensor mounted 30 cm above the oor on a mobile robot, paired with a Jetson TX2 Developer Kit, which manages the camera and LRF 236 People detection on 2D laser range nder data 3 integration. This setup captures both image and 2D range data alongside odometry and velocity data, stored on an onboard SSD during navigation through an oce-like environment. This data supports oine deep learning analysis on powerful machines using TensorFlow 2 Object Detection API [12]. A specic focus is on the Center- Net HourGlass104 Keypoints 512x512 model [27], trained on the COCO 2017 dataset [17], to detect people in images. This model helps in keypoint detection, aiding in the identication of human legs through images, which are then correlated with 2D range data for automatic labeling. The labeled data facilitates the development of a binary classier for detecting people's legs via machine learning algorithms. 3 Deep learning based object detection 3.1 Two and one stage approaches Object detection methods, essential for identifying categories like people and animals in images, have advanced signicantly with deep learning, particularly through Convolutional Neural Networks (CNN) [10]. These methods fall into two primary categories: two-stage and one-stage approaches. Two-stage approaches, such as R-CNN [10] and its successors, Fast-RCNN [9] and Faster-RCNN [19], involve rst extracting Regions of Interest (RoIs) and then classifying them. Innovations include Mask-RCNN [11] for simultaneous object and mask detection, and R-FCN [8], which employs position-sensitive score maps. Cascade R-CNN [5] addresses overtting by training sequential detectors with increasing Intersection over Union (IoU) thresholds. One-stage approaches, exemplied by YOLO [25] and SSD [18], streamline the process by directly classifying and regressing anchor boxes, eliminating the need for separate RoI extraction. Keypoint-based methods like CenterNet [28] represent objects using keypoints, which simplies bounding box determination and avoids traditional anchor box disadvantages. 3.2 CenterNet CenterNet utilizes a single central point in an object's bounding box for representation, regressing other properties like size and pose from image features [27]. A keypoint heatmap generated by a fully convolutional network aids in detecting object centers, and bounding boxes are predicted from these peaks. The model uses dense supervised learning for training and operates in real-time without non-maximal suppression during inference. CenterNet not only provides excellent speed-accuracy trade-os on the COCO dataset but also allows for multi-person pose estimation, identifying human joints as osets from the center [6]. Various applications have demonstrated Center- Net's ecacy, such as fault diagnosis in train catenaries [7], biometric recognition [26], vehicle detection [23], and real-time person detection in surveillance [3]. People detection on 2D laser range finder data using deep learning and machine learning 237 4 J. Abrego et al. For this project, a CenterNet HourGlass104 Keypoints 512x512 model pretrained on the COCO 2017 dataset [17] was selected based on its optimal balance between speed and accuracy. This model is integral to detecting people and their keypoints within our collected dataset, demonstrating its versatility and robustness in object detection. 4 System overview The system consists of three primary hardware components. The rst is a PeopleBot mobile robot equipped with an LRF SICK LMS200 [13], which has a 180 º eld of view and is capable of accurate measurements up to 8 meters. The second component is an NVIDIA Jetson TX2 Developer Kit, mounted on top of the LRF. This integrated unit features both GPU and CPU, optimized for high eciency and power, supporting an onboard camera with a resolution of 640 x 480 at 30 frames per second. The Jetson TX2 operates on Ubuntu 18.04 and connects to the robot's sensory system via USB. The third component is a laptop, positioned on the robot and connected to the Jetson TX2 via Ethernet, serving as the user interface. The software architecture of the system is developed in C++, utilizing Aria and ArNetworking libraries provided by the robot manufacturer for programming and network communication, although only Aria is needed due to the direct wired connection of the Jetson TX2 which replaces the robot's original onboard computer. The Jetson TX2 is powered by a LiPo battery, similar to those used in drones, while the robot operates on a standard plumb battery system. OpenCV library manages the image processing, and both laser measurements and images are saved directly to an SSD connected to the Jetson TX2. 5 Leg detection using 2D LRF in simulated environments To evaluate the eectiveness of various techniques for detecting people using 2D LRF data, a simulated environment was utilized. CoppeliaSim was chosen for its straightforward integration with several programming languages, including Python, which facilitated the simulation process. Python was the primary programming language employed in this study due to its widespread adoption in research and data science. Its clear syntax and a comprehensive array of specialized libraries support ecient, complex data analysis and model development. Key libraries used include NumPy for numerical computations, Pandas for data manipulation, scikit-learn for machine learning, and OpenCV for computer vision. This combination of accessibility and robust functionality makes Python especially suitable for conducting data-driven research eciently. 5.1 Data Collection Process The data collection process for leg detection using a 2D LRF was meticulously designed within the CoppeliaSim simulation environment. Three unique scenar- 238 People detection on 2D laser range nder data 5 ios were crafted to closely replicate real-world dynamics and interactions. These scenarios include a single person moving along a predened path, a static group of people, and an assortment of non-human objects that mimic the shape of human legs. (a) (b) (c) Fig.1: Multiple scenarios for data collection: (a) Single person following a path; (b) Multiple people in stationary positions; (c) Objects-only scenario. The detailed process for collecting the 2D LRF data is as follows:  Single Person Scenario : The scene incorporates only the Pioneer robot model and a person model that follows a predened path (Bill on track). The robot remains stationary while the person navigates a path composed of consecutive S shapes, initially in a perpendicular direction, which then shifts to a parallel orientation. The exact path is illustrated in gure 1a. This scene is designed to capture samples of legs in motion. This specic scenario is crucial as leg detection of a moving person appears slightly distorted due to the sampling speed of the 2D LRF. People detection on 2D laser range finder data using deep learning and machine learning 239 6 J. Abrego et al.  Multiple Person Scenario : In this scene, 25 person models are used, comprising 13 standing models (Standing Bill) and 12 sitting models (Sitting Bill). Each model is randomly rotated to ensure a variety of perspectives before data collection begins. The robot moves along a predened path, marked by yellow arrows in gure 1b, while the person models remain stationary.  Objects Only Scenario : This setup is lled with diverse objects including walls, rectangles, and cylinders of various sizes, arranged to simulate a complex environment. The goal is to gather non-leg samples, enhancing the dataset's diversity. The robot navigates a predened path, indicated by yellow arrows in gure 1c, during data collection. After a comprehensive data collection process, we now turn our attention to the next section where we will delve into the specics of how we have applied clustering to our collected data. 5.2 Clustering In our simulated environment, we chose to use settings that replicate those of the physical LRF SICK LMS200 laser sensor. This decision ensures that the simulated robot's operational characteristics align closely with those of its realworld counterpart. Specically, the simulated Pioneer robot employs a 2D LRF that provides a 180-degree eld of view with an angular resolution of 0.5 degrees, positioned approximately 30 cm above the ground. (a) (b) Fig.2: Outline of a person's leg in both simulated (a) and real world (b) environments. When a standing person is scanned by this LRF, the image appears as two closely spaced semi-circumferences, as illustrated in Figure 2. Each sensor scan generates 361 polar coordinates, which are then transformed into Cartesian coordinates for further analysis. 240 People detection on 2D laser range nder data 7 One of our primary objectives is to discern features within the sensor's eld of view, particularly focusing on the lower portion of a person, such as legs. To approach this challenge, we adopted a binary classication framework. The goal is to categorize the data into two groups: representations of human legs and all other objects. While this method enhances our ability to distinguish between various shapes, it is important to recognize the limitations inherent in using laser-based technology. For instance, objects like table legs or other cylindrical items that mimic the dimensions of human legs can pose challenges for accurate dierentiation. Thus, while our approach provides a structured way to analyze the sensor data, the precision of distinguishing between very similar shapes solely through this method can vary. Given the variable nature of the cluster sizes in our dataset, we incorporated a variety of features for cluster characterization. These features are drawn from established practices in related research and general techniques employed for polygon characterization. 5.3 Features extraction To prepare data samples for machine learning tasks, we extract a comprehensive set of geometric features from the clusters, expanding upon successful methods like the Leigh's detector [16]. The comprehensive set of features utilized to describe the clusters includes:  Depth: Measurement of the cluster's extent from the front to the back.  Width: Measurement across the widest part of the cluster perpendicular to the depth.  Perimeter: The total length around the boundary of the detected cluster.  Radius: The radius of the circle that best ts the point cloud as determined by the Taubin t.  Sigma: The mean squared error (MSE) between the tted circle and the actual points in the cloud, indicating the t's accuracy.  Area: Area of the polygon calculated using the shoelace formula.  Distance: Distance from the centroid of the point cloud to the 2D LRF, providing a spatial reference.  Number of points: Number of points comprising the cluster, reecting its density and complexity.  Angles: Sum of the internal angles of the polygon, which helps in understanding the geometric structure. Given the typical appearance of a leg in laser-based imagery resembling semicircles, the algebraic circle t method developed by G. Taubin [24] is applied. This technique allows us to identify the circle that most accurately represents the shape of the point cloud. With a comprehensive set of features dened for each cluster, we them proceed to the model training phase. People detection on 2D laser range finder data using deep learning and machine learning 241 8 J. Abrego et al. 5.4 Model Training The next phase of our research involves training various machine learning models, primarily selected from the scikit-learn library. Our selection encompasses a range of robust algorithms including Support Vector Machine (SVM), K- Nearest Neighbors (KNN), Random Forest, and AdaBoost. Additionally, XG- Boost, though not part of scikit-learn, has been included due to its ecacy in handling large and complex datasets. The simulated environment dataset comprised 18,890 positive samples (60%) and 12,536 negative samples (40%), revealing an initial class imbalance. To address this, we balanced the dataset by randomly sampling from the positive class to match the size of the negative class, using a xed seed for consistent results. This adjustment ensures equal representation of both classes, facilitating more eective and unbiased model training. We allocated 75% of this balanced dataset for training and the remaining 25% for testing. The splitting process was conducted through a stratied random selection using a predened seed to ensure the reproducibility of our results. To optimize the models, we utilized a grid search coupled with 5-fold cross-validation to determine the best hyperparameters for each algorithm. This structured approach aims to maximize the predictive accuracy and reliability of our classication models. With the model training complete, we now move on to evaluate their performance. In the next section, we will present key metrics such as accuracy, precision, recall, and the f1-score, providing a clear overview of the dierent models' eectiveness. 5.5 Performance metrics Table 1: Performance metrics of various classication models evaluated on the test split of the dataset, sorted by f1-score. The highest scores for each metric are highlighted in bold. Model Accuracy Precision Recall F1-Score XGBoost 0.994 0.994 0.993 0.994 Random Forest 0.992 0.990 0.995 0.992 KNN 0.992 0.991 0.993 0.992 SVM (kernel=rbf) 0.990 0.990 0.990 0.990 AdaBoost 0.981 0.977 0.985 0.981 SVM (kernel=linear) 0.966 0.946 0.989 0.967 SVM (kernel=poly) 0.963 0.957 0.969 0.963 The analysis of various machine learning algorithms on the dataset highlights distinct performances, suitable for dierent practical applications. The XGBoost exhibited superior metrics (accuracy, f1-score, precision each at 0.994, and recall 242 People detection on 2D laser range nder data 9 at 0.993), suggesting its robustness in achieving high predictive accuracy. It is followed closely by the KNN and Random Forest, both showcasing high accuracy and f1-score around 0.992, with Random Forest slightly outperforming in recall (0.995). For detailed performance metrics of each model, see Table 1. The SVM with an RBF kernel also performed commendably, maintaining balanced metrics around 0.990, although other kernel types showed reduced effectiveness. The AdaBoost and SVM with a linear kernel demonstrated moderate success. Moving forward from our simulation results, the next phase of our study involves applying the best models to a real-world setting to validate their practical ecacy. This step is crucial for transitioning from a controlled experimental environment to actual operational scenarios, where variables and conditions are more dynamic and unpredictable. 6 Real World Environment In the real-world phase, we leverage an automatic labeling process facilitated by deep learning models specializing in pose estimation. This approach aims to enhance the accuracy of data annotation, which is pivotal for training and validating our machine learning models under real-world conditions. 6.1 Data Collection Process Data was gathered using the PeopleBot mobile robot equipped with an LRF SICK LMS200. The robot captured multiple sequences, collecting both 2D laser data and visual images via an onboard camera on the Jetson TX2 development board. The scenarios involved both static and dynamic elements: the robot remained stationary while multiple individuals walked in its vicinity, and in other tests, the robot moved, simulating the task of following a designated person. This movement was managed using an industrial joystick. Although the focus of this study does not include robot controlwhich will be explored in future workthe recorded scenarios were designed to reect the expected operational conditions of the mobile robot in real-world settings. The primary environments for these recordings were oce-like spaces, including corridors, oce rooms, and larger indoor areas such as conference rooms and hallways. This setup aimed to simulate typical interactions and navigational challenges the robot would face in a working environment. In total, 9,241 frames across three dierent sequences were captured with the robot in stationary positions, and 6,320 frames in ve sequences where the robot was manually controlled to mimic the behavior of following a person. Having described the data collection process and the operational settings, we now turn our attention to the methodology for processing this data. The next section delves into the automatic data labeling process, which utilizes pose estimation techniques. People detection on 2D laser range finder data using deep learning and machine learning 243