scieee AI-readable full text Open interactive document viewer

Evaluating YOLO in real computer vision tasks

Mbarek, Amine

Abstract

Departamento de Informática (Arquitectura y Tecnología de Computadores, Ciencias de la Computación e Inteligencia Artificial, Lenguajes y Sistemas Informáticos)

Full text

Escuela de Ingeniería Informática & Department of Computer Science and Communications Final Year Project Bachelor’s Degree in Informatics Engineering Computer Science Evaluating YOLO in real computer vision tasks Autor: Amine Mbarek Escuela de Ingeniería Informática & Department of Computer Science and Communications FINAL YEAR PROJECT Bachelor’s Degree in Informatics Engineering Computer Science Evaluating YOLO in real computer vision tasks Autor: Amine Mbarek Tutores: Valentín Cardeñoso Payo Mohamed Hammami Fatma Bouhlel I dedicate my dissertation work: To my loving parents, Sadok and Khiriya Mbarek, a special feeling of gratitude goes to you. Your unwavering support, encouragement, and insistence on tenacity have been a constant source of motivation and strength. To my sister Ahlem and my brother Ahmed, who have never left my side. Your support has been very special to me, and I am deeply grateful for your love and understanding. To all my professors, for their invaluable guidance and wisdom. To all my friends, who offered their support and encouragement throughout this journey. Acknowledgements I wish to express my sincere gratitude and appreciation to everyone who assisted and supported me during this project. First and foremost, I would like to express my deepest gratitude to my tutors, Mr. Valentín Cardeñoso Payo, Mr. Mohamed Hammami and Mme. Fatma Bouhlel, whose constant reviews, corrections, and guidance were fundamental to the development of this research. Their knowledge, patience, and support were invaluable throughout the entire process. I am also grateful to the University of Valladolid and the University of Sfax for providing me with the opportunity to carry out this project. Their resources and academic environment significantly contributed to the successful completion of my research. My thanks also go to all the professors at the Faculty of Sciences in Sfax for their invaluable help and their admirable human qualities, which I have greatly appreciated throughout my course. Last but not least, I would like to express my gratitude to the Entornos de Computación Avanzada y Sistemas de Interacción Multimodal (ECA-SIMM) Group at the University of Valladolid for welcoming me as one of its members. To all of you, I owe a great part of this achievement. Thank you very much. Resumen El objetivo principal de este trabajo es evaluar la efectividad del modelo YOLO en tareas reales de visión por computadora, específicamente en el contexto de vehículos autónomos, utilizando el conjunto de datos KITTI. La motivación surge de la necesidad de mejorar la seguridad en la conducción autónoma, donde la detección precisa de peatones, ciclistas y otros vehículos es crucial para evitar accidentes. Las tareas realizadas incluyen la investigación y análisis de soluciones actuales, la preparación y preprocesamiento del conjunto de datos KITTI, el entrenamiento y optimización del modelo YOLO, y la evaluación de su rendimiento en escenarios de conducción variados. Los resultados demuestran una mejora significativa en la precisión y eficiencia del sistema de detección de objetos, contribuyendo al desarrollo de tecnologías de conducción autónoma más seguras y confiables. En conclusión, este trabajo avanza en la comprensión y aplicación de la tecnología de detección de objetos, reduciendo potencialmente la incidencia de lesiones y muertes en el tráfico vial. Abstract The main objective of this project is to evaluate the effectiveness of the YOLO model in real-world computer vision tasks, specifically within the context of autonomous vehicles, using the KITTI dataset. The motivation stems from the need to improve safety in autonomous driving, where accurate detection of pedestrians, cyclists, and other vehicles is crucial to prevent accidents. Tasks performed include research and analysis of current solutions, preparation and preprocessing of the KITTI dataset, training and optimization of the YOLO model, and evaluation of its performance in various driving scenarios. The results demonstrate a significant improvement in the accuracy and efficiency of the object detection system, contributing to the development of safer and more reliable autonomous driving technologies. In conclusion, this work advances the understanding and application of object detection technology, potentially reducing the incidence of road traffic injuries and fatalities. Résumé L’objectif principal de ce projet est d’évaluer l’efficacité du modèle YOLO dans des tâches réelles de vision par ordinateur, spécifiquement dans le contexte des véhicules autonomes, en utilisant le jeu de données KITTI. La motivation découle de la nécessité d’améliorer la sécurité dans la conduite autonome, où la détection précise des piétons, des cyclistes et des autres véhicules est cruciale pour prévenir les accidents. Les tâches effectuées incluent la recherche et l’analyse des 8.1 Example of confusion matrix ............................. 42 8.2 Four images to be combined using DSCT ...................... 44 8.3 Resizing images .................................... 44 8.4 Creating the composite image ............................ 45 8.5 Adjusting bounding boxes .............................. 45 8.6 Taking a random cutout ............................... 46 8.7 Removing out-of-bounds boxes ........................... 46 8.8 Final composite image with object detections ................... 47 vi Chapter 1 Introduction Over time, car safety systems have significantly advanced, beginning with fundamental features like seat belts introduced by Volvo in 1959 and crumple zones by Mercedes-Benz. The 1980s saw the widespread adoption of airbags and anti-lock braking systems (ABS). By the 1990s, electronic stability control (ESC) and side airbags became common. The 2000s brought advanced driver assistance systems (ADAS) such as lane departure warnings, adaptive cruise control (ACC), and blind-spot detection. Recent years have seen the emergence of autonomous features like automatic emergency braking (AEB) and pedestrian detection systems, with continued advancements towards fully autonomous vehicles and vehicle-to-everything (V2X) communication. Despite these advancements, according to the World Health Organization, approximately 1.19 million people die each year due to road traffic crashes. Vulnerable road users, such as pedestrians, cyclists, and motorcyclists, account for more than half of all road traffic deaths. Given these statistics, the need for advanced object detection systems is evident. The implementation of such systems, particularly in autonomous vehicles, has the potential to significantly reduce these tragic numbers. Recent research shows that broadside and pedestrian collisions represent only about 5.7% of AV accidents, significantly lower than the 42.1% seen with conventional vehicles [33]. This significant reduction is achieved by accurately identifying and responding to various road hazards, pedestrians, and other vehicles. This final project focuses on evaluating the YOLO (You Only Look Once) algorithm in realworld computer vision tasks relevant to autonomous driving. The objective is to assess the performance of YOLO using the KITTI dataset, which is renowned for its complexity and diversity in autonomous driving scenarios. We will delve into the architecture and functioning of the YOLO algorithm, examining how it can be optimized and adapted for use in the dynamic and complex environments that autonomous vehicles navigate. By leveraging the comprehensive data provided by the KITTI dataset, we aim to enhance the accuracy and efficiency of object detection systems in identifying various road hazards, pedestrians, cyclists, and other vehicles. This thesis is presented in 9 chapters: 1. Introduction: Overview of car safety advancements and the need for better object 1 CHAPTER 1. INTRODUCTION detection systems in autonomous vehicles. 2. Objectives and Scope: Outlines the project’s primary goal of developing and evaluating an object detection system using YOLO and the KITTI dataset, along with specific tasks. 3. Planning: Breaks down the project phases, timeline, and estimated costs. 4. Conceptual Framework: Reviews machine learning and deep learning principles relevant to computer vision and object detection. 5. State of the Art: Explores the latest advancements and challenges in object detection for autonomous vehicles. 6. You Only Look Once (YOLO): Discusses the YOLO algorithm’s evolution, versions, and architectural improvements. 7. Dataset: Details the KITTI dataset, its components, and preparation for training the detection model. 8. Experiments and Evaluation: Describes the experimentation setup, evaluation metrics, and results. 9. Conclusions: Summarizes project contributions, results, and suggests future research areas. 2 Chapter 2 Objectives and Scope 2.1 Objectives The primary objective of this project is to evaluate the effectiveness of the YOLO model in real-world computer vision tasks, specifically within the context of autonomous vehicles, using the KITTI dataset. This overarching goal is broken down into several secondary objectives that will guide the project’s development. Additionally, specific tasks are outlined to achieve these objectives. 2.1.1 Principal Objective •Evaluate an Object Detection System: The main objective is to evaluate the performance of the YOLO (You Only Look Once) model in real computer vision tasks by leveraging the KITTI dataset. This involves analyzing the model’s effectiveness in accurately detecting various objects within the dynamic and complex environments encountered by autonomous vehicles. 2.1.2 Secondary Objectives •Understand YOLO: Gain a comprehensive understanding of the YOLO (You Only Look Once) model, including its various versions, functionalities, and practical applications in computer vision. •Research and Analysis of Current Solutions: Conduct thorough research and analysis of existing and prior solutions in the field of object detection for autonomous vehicles. •Dataset Preparation and Preprocessing: Prepare and preprocess the KITTI dataset to ensure it is suitable for use with the YOLO model. •Model Training and Optimization: Train and optimize the YOLO model to enhance its accuracy and efficiency in detecting objects. 3 2.2. SCOPE CHAPTER 2. OBJECTIVES AND SCOPE •Performance Evaluation: Evaluate the performance of the trained YOLO model using standard metrics and tests in various driving scenarios. 2.2 Scope The scope of this project encompasses the following key areas: 1. Define the Work and Develop a Plan: Clearly define the scope of the project and develop a detailed plan with specific stages and timelines. 2. Study the Problem: Thoroughly investigate the problem of object detection in autonomous vehicles, including specific challenges and requirements. 3. Locate Similar Solutions: Identify and analyze existing similar solutions, evaluating their strengths and weaknesses. 4. Develop Our Solution: Develop a customized solution based on the YOLO model, adapting it to the specific needs of the project. 5. Test and Experiment: Conduct tests and experiments with the developed solution, making adjustments and improvements based on the results obtained. By completing these tasks, we aim to achieve the primary objective of effectively evaluating the YOLO model’s performance in real-world computer vision tasks, thereby contributing to the advancement of object detection systems in autonomous vehicles. This evaluation is expected to provide valuable insights that enhance the safety and reliability of autonomous driving technologies. 4 Chapter 3 Planning This chapter outlines the planned phases and associated costs for the development and evaluation of the YOLO model in real computer vision tasks. 3.1 Phases and costs This section provides an overview of the planned phases and associated costs for the project development. 3.1.1 Phases Table 3.1 outlines the planned phases of the project development along with their respective durations. Activity Name Days Preliminary research and literature review 1 - 9 Definition of objectives and scope 10 - 15 Development of the conceptual framework 16 - 24 State-of-the-art and comparative analysis 25 - 33 Study and application of the YOLO algorithm 34 - 43 Dataset preparation 44 - 52 Design and execution of experiments 53 - 72 Evaluation and analysis of results 73 - 81 Writing the final document 82 - 87 Final review and corrections 88 - 90 Table 3.1: Planned phases of project development. 5 3.1. PHASES AND COSTS CHAPTER 3. PLANNING 3.1.2 Costs The following is a detailed breakdown of the estimated costs associated with each phase of the project: •Preliminary research and literature review: 9 days, approximate cost of €270 for access to databases and scientific articles. •Definition of objectives and scope: 6 days, time spent without additional cost. •Development of the conceptual framework: 9 days, estimated time cost of €540 (based on a rate of €15/hour for 4 hours/day). •State-of-the-art and comparative analysis: 9 days, estimated time cost of €540. •Study and application of the YOLO algorithm: 10 days, estimated time cost of €600. •Dataset preparation: 9 days, estimated cost of €540 in time and €450 in materials. •Design and execution of experiments: 20 days, estimated cost of €1,200 in time and €75 for 75 hours of GPU A40 usage. •Evaluation and analysis of results: 9 days, estimated time cost of €540. •Writing the final document: 6 days, estimated time cost of €360. •Final review and corrections: 3 days, estimated time cost of €180. The total estimated cost of the project is €5745, considering both material resources and time spent. 6 Chapter 4 Conceptual Framework 4.1 Introduction The conceptual framework of this research is grounded in the foundational principles and advancements of machine learning and deep learning. This chapter aims to provide a comprehensive overview of these fields, focusing on the algorithms, techniques, and architectures that form the backbone of modern computer vision systems. We will explore key concepts, such as supervised and unsupervised learning, delve into the evolution of deep learning with a particular emphasis on neural networks, and discuss the impact of convolutional neural networks (CNNs) in transforming the landscape of image processing and object detection. This framework sets the stage for understanding the methodologies and technologies applied in the subsequent chapters of this work. 4.2 Machine Learning Machine Learning [4] is a branch of Artificial Intelligence that aims to design and develop algorithms that allow computers to improve their performance in performing a task from experience. However, unlike traditional programming, where software is developed based on pre-established rules, in Machine Learning, we let computers ”program themselves” through the information in the provided data [27]. This process is known as training. Once this stage is completed, the obtained model will be able to obtain answers for new, unknown data sets. The most widely adopted machine learning methods are supervised learning and unsupervised learning: •Supervised Learning: supervised learning involves designing a model that connects training data to a set of output values. This means that the training data provided to the algorithm includes the desired solutions, known as labels. This method allows the algorithm to learn by comparing its actual output with the taught outputs to find errors and adjust the model accordingly. Supervised learning enables the model to predict label values on additional unlabeled data. 7 4.3. DEEP LEARNING CHAPTER 4. CONCEPTUAL FRAMEWORK •Unsupervised Learning: in this case, the example data used to train the algorithm is not labeled, meaning we do not know the outcome. The goal is to find associations or patterns among the data based on their similarities. As examples of unsupervised learning techniques, we can differentiate between two groups: those oriented towards clustering (searching for groupings within the data), which include algorithms like kmeans, k-medians, or self-organizing maps, and those oriented towards dimensionality reduction, such as principal component analysis [27]. 4.3 Deep Learning Deep learning is defined as a class of machine learning techniques that enable computational models composed of multiple processing layers to learn representations of data with multiple levels of abstraction [23]. This concept has emerged since the 2000s and it relies on artificial neural networks which are systems inspired by the biological neurons in the human brain. However, artificial neural networks have been exciting since the middle of the 20th century. The first artificial neuron was mentioned in 1943 when Warren McCulloch and Walter Pitts published their first mathematical and computational model of the biological neuron: the formal neuron, which is directly inspired by its biological counterpart. Figure 4.1: A biological neuron A biological neuron is composed of a soma (cell body), an axon and dendrites as shown in Figure 4.1. The dendrites form a network of neural receptors that transmit electrical signals from other neurons to the neuron’s body. A neuron receives electrical signals through the dendrites, and when the neuron receives enough signals in a given time (a few milliseconds), it triggers its own signals. The functioning of a neuron is relatively simple, but when a neuron is connected to thousands of others and there are billions of neurons, it creates networks capable of solving extremely complex problems. Warren McCulloch and Walter Pitts proposed the first artificial neuron which is a very simplified model of the biological neuron. The neuron shown in Figure 4.2 has one or more binary inputs and an output. The way it operates is simple: 8 CHAPTER 4. CONCEPTUAL FRAMEWORK 4.3. DEEP LEARNING the neuron activates its output (output active = 1) if its inputs exceed a certain threshold. From this neuron, it is possible to construct any network of artificial neurons capable of solving logical operations. Figure 4.2: Formal neural network functioning as the OR logical operation. Nowadays, the neuron architecture has developed and evolved significantly from its early conceptualization. As illustrated in the Figure 4.3, a modern artificial neuron consists of multiple inputs (x1, x2, . . . , xn), each associated with a weight (w1j, w2j, . . . , wnj). These inputs are processed through a transfer function that computes the net input (netj) by summing the weighted inputs. This net input is then passed through an activation function, which determines the neuron’s output (oj). The activation function introduces non-linearity into the model, enabling the network to capture complex patterns in data. Additionally, a threshold (θj) can be applied to control the activation. This intricate structure allows deep learning models to perform sophisticated tasks, learning representations from raw data through multiple layers of abstraction. Figure 4.3: Artificial Neural Network Deep learning uses neural networks with multiple layers to automatically learn and extract features from raw data. This process involves stacking many layers of artificial neurons, each layer learning increasingly abstract representations of the data. In contrast to traditional machine learning, where a significant portion of the process involves manual feature extraction by experts, deep learning automates this step. As illustrated in Figure 4.4, machine learning typically involves an initial step of feature extraction performed by a human, followed by 9 4.5. CONCLUSION CHAPTER 4. CONCEPTUAL FRAMEWORK participated in the ImageNet Large Scale Visual Recognition Challenge (ILSVRC) in 2012. AlexNet significantly outperformed all its previous competitors and won the challenge by reducing the top-5 error from 26% to 15.3%. It was designed by the Supervision group, consisting of Alex Krizhevsky [22]. AlexNet had a major impact in the field of machine learning, particularly in the application of deep learning to computer vision. AlexNet contained eight layers; the first five were convolutional layers, and the last three were fully connected layers. It had two parallel CNN pipelines trained on two GPUs with cross-connections and used the non-saturating activation function ReLU, which showed improved training performance compared to Tanh and Sigmoid. •ZFNet: ZFNet was proposed by Matthew Zeiler and Rob Fergus [48]. ZFNet won the ILSVRC 2013. It was an improvement on AlexNet by fine-tuning the architecture hyperparameters, notably by increasing the size of the intermediate convolutional layers and making the stride and filter size on the first layer smaller. •VGGNet: VGGNet secured first place at the ILSVRC competition in 2014 for the VGG group. It is an improvement over AlexNet and consists of 19 layers. This architecture strikes a balance between the depth of the CNN, which positively impacts its performance, and its requirements in terms of memory and computation time [40]. •GoogleNet: GoogleNet was invented by Szegedy et al. [43] and it was the winner of the ILSVRC 2014. Its main contribution was the addition of an inception module. This module applies convolutions of different sizes to extract features at various scales. •ResNet: Residual Network, developed by Kaiming He et al., won the ILSVRC 2015 [17]. The ResNet architecture is composed of 152 layers, making it seven times deeper than previous architectures. This number of layers has had a positive impact on the correct classification rate. ResNet surpasses the performance of VGGNet and GoogLeNet architectures in terms of correct classification rates. However, it is computationally intensive. These advancements in computer vision have laid the groundwork for more complex tasks, such as object detection, which involves identifying and localizing objects within an image. The next section will delve into the evolution and significance of object detection in the realm of computer vision. 4.5 Conclusion This chapter has provided a comprehensive overview of the conceptual framework underpinning our research, focusing on the essential aspects of machine learning and deep learning, with a particular emphasis on convolutional neural networks. We have explored the historical context, theoretical foundations, and practical implementations of these technologies, illustrating their evolution and significance in the field of computer vision. By understanding these concepts, 16 CHAPTER 4. CONCEPTUAL FRAMEWORK 4.5. CONCLUSION we have established a solid foundation for the subsequent chapters, where we will apply these principles to specific tasks in autonomous driving and object detection. 17 4.5. CONCLUSION CHAPTER 4. CONCEPTUAL FRAMEWORK 18 Chapter 5 State of the Art 5.1 Introduction The field of object detection has witnessed significant advancements in recent years, driven by the development of sophisticated algorithms and the increasing computational power available for training complex models. This chapter provides an overview of the current state-of-the-art techniques in object detection, highlighting key methodologies and their applications, particularly in the domain of autonomous vehicles. We will explore various convolutional neural network (CNN) architectures that have revolutionized object detection, discuss the specific challenges faced in this field, and review the methods developed to address these challenges. This exploration sets the stage for understanding the technical foundation upon which modern object detection systems are built. 5.2 Object Detection Object detection is important in computer vision which aims to identify and locate objects present in an image or video. It uses convolutional neural networks (CNNs) to analyze and classify specific features of the image, such as edges and shapes. Then, it uses this information to identify objects and their locations in the image. It plays an essential role in many applications, such as autonomous vehicles where an understanding of the visual environment is required the needs of object detection include accuracy, speed, the ability to process scenes and adaptation to different object categories. Several specialized CNN architectures have been developed for this purpose. Region-based CNNs (R-CNN) was proposed by Ross Girshick in 2014. As illustrated in Figure 5.1, This model introduced a three-module approach: Region Proposal Generation, Feature Extraction, and Classification and Localization [15]. The Region Proposal Generation module defines the set of candidate detections available for the detector. The Feature Extraction module uses a large convolutional neural network to extract a fixed-length feature vector from each region. Finally, the Classification and Localization module utilizes class-specific linear SVMs to classify 19 5.2. OBJECT DETECTION CHAPTER 5. STATE OF THE ART and precisely locate objects. The R-CNN achieved a mean average precision (mAP) de 53.7% on PASCAL VOC 2010 and 31.4% on the 200-class detection dataset ILSVRC2013 [15]. It outperformed the best previous model OverFeat [38], which had a top result of 24.3%. Figure 5.1: R-CNN Architecture: Regions with CNN features This approach was later refined in Fast R-CNN by Ross Girshick [14] which improved speed and accuracy. Fast R-CNN takes an entire image and a set of object proposals as input. First, it processes the entire image with several convolutional (conv) and max pooling layers to produce a feature map. Next, for each object proposal, a region of interest (RoI) pooling layer extracts a fixed-length feature vector from the feature map. Each feature vector is then fed into a sequence of fully connected (FC) layers, which ultimately branch into two sibling output layers: One layer produces softmax probability estimates over K object classes plus a ”background” class and one layer produces four real-valued numbers for each of the K object classes. Each set of 4 values encodes the refined bounding box positions for one of the K classes. Fast R-CNN achieves a result of 66.1% on VOC2010 and the best result on VOC12 with a mAP of 65.7% (and 68.4% with additional data) [14]. Figure 5.2: Fast R-CNN Architecture In 2016, Shaoqing Ren proposed Faster R-CNN [18]. Faster R-CNN uses the proposed regions in Fast-CNN and introduced a Region Proposal Network (RPN), that takes the feature map (of any size) and produces a set of rectangular object proposals, each with a precision score (cf. Figure 5.3). The result obtained by this model with the mscoco (COCO val) database is a [email protected] of 41.5% and a [email protected] of 42.7% on COCO test-dev. 20 CHAPTER 5. STATE OF THE ART 5.3. AUTONOMOUS VEHICLE Figure 5.3: Faster R-CNN Architecture Other notable architectures include YOLO (You Only Look Once), which will be discussed in chapter 6. 5.3 Autonomous vehicle An autonomous vehicle is a type of vehicle that uses advanced technologies to operate without human intervention. It is equipped with cameras and other technologies to perceive the environment and make appropriate decisions. Automakers have developed these vehicles to improve road safety, considering the increase in fatal accidents on the roads. 5.4 Object Detection for Autonomous Vehicles 5.4.1 Challenges in Object Detection for Autonomous Vehicles The challenges in object detection for autonomous vehicles are multifaceted and arise from various technical and environmental factors. Some of the key challenges include: •Scale and Shape Variability: Different sizes of objects such as cars and cyclists, and multiple objects with different aspect ratios within the same window pose significant challenges for detection systems. •Occlusion and Overlapping Objects: Detecting objects that are partially visible or 21 5.4. OBJECT DETECTION FOR AUTONOMOUS VEHICLESCHAPTER 5. STATE OF THE ART occluded by other objects requires advanced algorithms capable of handling incomplete information. •Real-Time Processing: Real-time detection and interpretation of objects with high accuracy and speed are critical for the safety and efficiency of autonomous vehicles. This includes minimizing false positives and negatives. These challenges highlight the need for continuous advancements in object detection algorithms, integration of robust models, and development of comprehensive datasets to improve the performance and reliability of autonomous vehicles. 5.4.2 Methods for object detection for Autonomous Vehicles Object detection methods can be broadly categorized into two types: two-stage detectors and one-stage detectors. Two stage detectors Two-stage detectors first generate a set of object proposals and then refine these proposals to achieve precise detection. This approach typically involves a proposal generation stage followed by a classification stage. •Regionlets [26]: Regionlets propose boxes through Selective Search and then re-localize them using a top-down approach. It extracts 1-D features from rectangular regions within the detection window and trains thousands of weak classifiers using RealBoost. These features are transformed into sparse binary vectors, which are then combined to form a high-dimensional feature space for robust detection. The model also includes a precise localization component that adjusts bounding box coordinates based on predicted localization errors, learned through support vector regression. This approach uses a voting mechanism for better accuracy and mitigates overfitting by sampling numerous bounding boxes around ground truth objects during training. •DPM-VOC+VP [32]: DPM-VOC+VP extend the Deformable Part-based Model [10], which is an object detection method that uses a collection of deformable parts and discriminative training to accurately detect and localize objects within images, to 3D by connecting parts across various viewpoints and incorporating a 3D-aware loss function. •Mono3D [3]: Mono3D generates 3D object proposals from a single monocular image using an energy minimization approach that places object candidates in 3D space and scores them based on semantic segmentation, context, size, location priors, and typical object shape (c.f Figure 5.4). 22 CHAPTER 5. STATE OF THE ART 5.5. CONCLUSION Figure 5.4: Mono3D architecture •LSVM-MDPM-sv [9,10]: LSVM-MDPM-sv is an adaptation of the DPM that utilizes latent support vector machines (LSVM) for supervised learning to improve object detection by training on a representative subset of clean training samples and fine-tuning the model parameters. One stage detectors One-stage detectors perform object localization and classification in a single forward pass through the network, offering faster processing times at the potential cost of lower accuracy compared to two-stage detectors. •Complexer-YOLO [39]: Complexer-YOLO is a real-time 3D object detection that operates on semantic point clouds by incorporating visual point-wise class features predicting real 3D object dimensions. 5.5 Conclusion In this chapter, we have examined the cutting-edge advancements in object detection, focusing on the evolution from traditional methods to advanced CNN architectures like R-CNN, Fast R-CNN, and Faster R-CNN. These technologies have significantly improved the accuracy and speed of detecting and localizing objects in images, which is critical for applications such as autonomous vehicles. We have also discussed the unique challenges in object detection for autonomous vehicles, emphasizing the need for real-time processing and robust algorithms to handle scale variability, occlusions, and overlapping objects. Understanding these state-of-the- art techniques and their applications provides a comprehensive foundation for the subsequent discussions on the implementation and evaluation of object detection systems in our research. 23 5.5. CONCLUSION CHAPTER 5. STATE OF THE ART 24 Chapter 6 You Only Look Once YOLO appeared in 2015 and since then has become a standard in ANN applied to computer vision. This chapter summarises the main motivation for this work, an overview and objectives. 6.1 Scope Nowadays, in the world of computers, finding and recognizing objects in pictures or videos is highly important. It helps in various things like making self-driving cars safer, keeping an eye on places with surveillance cameras, and even helping doctors spot diseases in medical scans. Among the algorithms developed for this purpose, YOLO, ”You Only Look Once”, stands out as a new approach to object detection known for its balance between speed and latency. It has become almost a standard way of detecting objects in computer vision. The primary objective of this chapter is to delve into YOLO, the difference between this approach and old algorithms, its architectural design, and methodology, giving a close examination of its impact on object detection. We’ll see how YOLO’s efficient single-network approach is different from the old way of detecting objects, paving the way for real-time applications across various domains. 6.2 A revolution in object detection YOLO is a state-of-the-art, real-time object detection algorithm and is extremely fast and accurate. Before YOLO’s emergence in 2015, Systems used sliding window object detection and iterations such as RCNN, fast RCNN, and faster RCNN they segment an image into numerous regions and then run a classifier on each one, and high scores for that classifier would be considered detections in the image. This process required thousands of classifier runs and neural network evaluations per image to achieve detection. With YOLO, instead of looking at an image thousands of times to produce detection, You Only Look Once, YOLO only needs the image or video to pass one time through its network (c.f Figure 6.1), and that’s why it is called YOLO. 25 6.3. VERSIONS CHAPTER 6. YOU ONLY LOOK ONCE 3. Training Enhancements: YOLOv5 incorporates diverse training enhancements to bolster model convergence and performance. These include advanced techniques such as hyperparameter optimization, learning rate scheduling, and data augmentation strategies like CutMix and MixUp. 4. Experiment Tracking: YOLOv5 seamlessly integrates experiment tracking functionalities, enabling users to monitor and analyze training progress in real-time. This functionality proves invaluable for researchers and developers, facilitating a deeper understanding of model behavior and informed decision-making throughout the training process. 5. Automatic Export: YOLOv5 streamlines the deployment process by automatically exporting trained models to popular export formats, such as TensorFlow SavedModel or ONNX. 6. Usability Improvements: YOLOv5 introduces several enhancements geared towards improving user experience, including a user-friendly command-line interface (CLI) and comprehensive documentation. Figure 6.5 illustrates the intricate design and network components of YOLOv5. Figure 6.5: Architecture of the YOLOv5 model [24] 6.3.6 YOLOv6 YOLOv6 [21] introduces several enhancements to its architectural design and training methodology, including the implementation of a Bi-directional Concatenation (BiC) module, an anchoraided training (AAT) strategy, and an improved backbone , neck design and Self-Distillation. 32 CHAPTER 6. YOU ONLY LOOK ONCE 6.3. VERSIONS Figure 6.6: Overview of YOLOv6:(a) The neck of YOLOv6. (b) The structure of a BiC module. (c) A SimCSPSPPF block [21]. 1. Bidirectional Concatenation (BiC) Module: The BiC module is introduced to provide more accurate localization signals in the neck of the YOLOv6 detector. It is applied to the top-down pathway of the Feature Pyramid Network (FPN) to improve performance without significant loss of efficiency. Also, The BiC module significantly boosts the performance of small object detection, particularly for YOLOv6-S and YOLOv6-L, improving the detection performance on small objects by 1.8%. 2. Enhanced Backbone and Neck Design: The YOLOv6 introduces an extended backbone and neck design, reinforcing it to achieve state-of-the-art performance on the COCO dataset at a high-resolution input. Also, feature integration at multiple scales is proven to be a critical and effective component of object detection, and the Feature Pyramid Network (FPN) is used to aggregate high-level semantic features and low-level features via a top-down pathway (c.f Figure 6.6). 3. Anchor-Aided Training (AAT) Strategy: The AAT strategy combines the advantages of both anchor-based and anchor-free paradigms. It introduces anchor-based auxiliary branches in the classification and regression head during training, which are removed at inference to boost accuracy performance without decreasing speed. 4. Self-Distillation: YOLOv6 introduces self-distillation to boost the performance of small models, where the heavier branch for DFL is taken as an enhanced auxiliary regression branch during training and is removed at inference to avoid marked speed decline. 6.3.7 YOLOv7 YOLOv7 [45] introduces an architecture of real-time object detectors and model scaling method. It includes model re-parameterization, and dynamic label assignment. 1. Model Re-parameterization: Model re-parameterization techniques merge multiple computational modules into one at the inference stage. This technique can be divided into module-level ensemble and model-level ensemble. At the module level, re-parameterization splits a module into multiple identical or different module branches during training and 33 6.3. VERSIONS CHAPTER 6. YOU ONLY LOOK ONCE integrates them into a completely equivalent module during inference. These new reparameterization modules have been developed and designed for various architectures, enhancing their efficiency and performance. 2. Dynamic Label Assignment: Dynamic label assignment technology introduces new issues in the training of models with multiple output layers, particularly in assigning dynamic targets for the outputs of different branches. To tackle this issue, a new label assignment method called coarse-to-fine lead guided label assignment has been proposed to address this problem, aiming to provide effective solutions for handling dynamic label assignments across different branches. 3. Model Scaling: Model scaling involves scaling up or down an already designed model to fit different computing devices using factors such as resolution, depth, width, and stage. These Compound scaling methods have been proposed to maintain the properties of the model and its optimal structure during scaling. 6.3.8 YOLOv8 Figure 6.7: YOLOv8 Architecture [37]. YOLOv8 [37] builds on the success of previous versions, introducing new features and improvements for enhanced performance, flexibility, and efficiency. YOLOv8 supports various vision AI tasks, including detection, segmentation, pose estimation, tracking, and classification. This flexibility lets users apply YOLOv8’s features in different areas and fields. YOLOv8 introduces numerous improvements compared to the earlier versions of YOLO such as a new neural network architecture (c.f Figure 6.7) that utilizes both Feature Pyramid Network (FPN) and Path Aggregation Network (PAN) and a new labeling tool called RoboFlow Annotate that simplifies the annotation process. 1. Feature Pyramid Network (FPN): The FPN operates by gradually reducing the spatial resolution of the input image while increasing the number of feature channels. This technique generates feature maps that are capable of detecting objects at different scales and resolutions. 34 CHAPTER 6. YOU ONLY LOOK ONCE 6.3. VERSIONS 2. Path Aggregation Network (PAN): The PAN architecture aggregates features from different levels of the network through skip connections. This enables the network to effectively capture features at multiple scales and resolutions, which is crucial for accurately detecting objects of different sizes and shapes. 3. RoboFlow Annotate: RoboFlow Annotate is used for image annotation and object detection tasks in computer vision. It makes it easier to annotate images for training the model and includes several features such as auto labeling, labeling shortcuts, and customizable hotkeys. Figure 6.8 demonstrates the effectiveness of YOLOv8 in object detection and its potential for further improvements in the future. Figure 6.8: Comparison YOLOv8 with other YOLO versions [37]. Table 6.4 presents the performance metrics for different pre-trained models of YOLOv8. The table highlights the balance between model complexity, speed, and accuracy, providing insights into the trade-offs for various applications. Model Size (pixels) mAPval 50- 95 Speed CPU ONNX (ms) Speed A100 TensorRT (ms) Params (M) FLOPs (B) YOLOv8n 640 37.3 80.4 0.99 3.2 8.7 YOLOv8s 640 44.9 128.4 1.20 11.2 28.6 YOLOv8m 640 50.2 234.7 1.83 25.9 78.9 YOLOv8l 640 52.9 375.2 2.39 43.7 165.2 YOLOv8x 640 53.9 479.1 3.53 68.2 257.8 Table 6.4: Performance metrics for YOLOv8 models [44] 35 6.4. APPLICATIONS IN COMPUTER VISION CHAPTER 6. YOU ONLY LOOK ONCE 6.4 Applications in Computer Vision Now we will see some real examples of YOLO systems applied in different sectors. •Agriculture: In agriculture, YOLO-based systems are applied for monitoring crop health, detecting pests, and assessing plant growth. These systems provide farmers with valuable insights, helping them to optimize crop yield and reduce losses. As demonstrated in [25], YOLO is employed to detect pests such as true bugs in hazelnut orchards.The system achieves high precision, aiding in early pest detection. •Medical Imaging: YOLO algorithms have significant applications in the healthcare sector, particularly in medical imaging. They assist in the detection and diagnosis of various diseases, including cancer, from medical images. According to [31], YOLOv8 is applied to medical images such as blood smear images for acute lymphoblastic leukemia, Pap smear images for cervical cancer, histopathological images for lung and colon cancer, and dermatoscopic images for skin cancer. By detecting and delineating tumor boundaries, YOLOv8 assists radiologists in identifying malignant areas more accurately. •Manufacturing: YOLO algorithms also find applications in the manufacturing industry for quality control and anomaly detection. According to [41], YOLOv4 is used to detect three critical anomalies in bottles: dents on the bottle surface, skewed caps, and nonstraight bottles. By leveraging computer vision and machine learning techniques, the system efficiently identifies defects in real-time, ensuring high-quality production. 6.5 Conclusion In this chapter, we explored the evolution and significance of the YOLO algorithm in object detection. We examined its different versions, from the original YOLO to the latest YOLOv8, highlighting the architectural advancements and improvements in accuracy and speed. The unified detection approach, combined with continuous enhancements, has made YOLO a standard in the field of computer vision, enabling real-time applications across various domains such as agriculture, medical imaging, and manufacturing. 36 Chapter 7 Dataset 7.1 Introduction In this chapter, we provide a detailed overview of the KITTI dataset, which is fundamental to our research in autonomous driving object detection. We will discuss the dataset’s collection process, its structure, and the specific preparations required to utilize it effectively for training our model. 7.2 KITTI The KITTI dataset, introduced by Geiger et al. in 2012, serves as a benchmark for object detection in autonomous driving research [13]. It has been recorded from a moving platform (c.f Figure 7.1) while driving in and around Karlsruhe, Germany by the Karlsruhe Institute of Technology (KIT) and the Toyota Technological Institute of Chicago (TTI-C) and it consists of 7,481 training images and 7,518 test images. Figure 7.1: Recording platform: Volkswagen Passat B6 is equipped with four video cameras (two color and two grayscale cameras), a rotating 3D laser scanner and a combined GPS/IMU inertial navigation system [12]. We used the 2D object detection in KITTI dataset consisting of 7481 training images, labeled, 37 7.2. KITTI CHAPTER 7. DATASET and 7518 test images, unlabeled, comprising a total of 80.256 labeled objects. All images are color and saved as png. The dataset contains 9 labels, as shown in Figure 7.2: Car, Van, Truck, Pedestrian, Person_sitting, Cyclist, Tram, Misc (Miscellaneous): this label is used for miscellaneous objects that do not fit neatly into other categories, and Dontcare: this label is used to indicate regions of the image where objects are present but are not annotated. Figure 7.3 shows a representative samples from the dataset. Figure 7.2: Training labels Figure 7.3: Representative samples from the dataset 38 CHAPTER 7. DATASET 7.3. DATASET PREPARATION 7.3 Dataset Preparation Due to the unavailability of ground truth annotations for the test set, our work will focus on the 7,481 training images. Following the train/test split suggested by Chen et al. [2], we divided the KITTI training dataset into 3,712 training images and 3,769 testing images. Our analysis primarily focused on the labels: Car, Pedestrian, and Cyclist. YOLO requires the directory structure to include separate train, validation, and test data. We organized the data to be like this: kitti train images labels test images labels data.yaml Initially, the labels were structured as follows: •(object_type): Specifies the type of annotated object. •(truncation): Represents the visible portion of the object as a float between 0.0 and 1.0, where 0.0 indicates full visibility and 1.0 signifies that the object is entirely outside the image frame. •(occlusion): Indicates the level of occlusion with an integer value, where 0 means the object is fully visible and higher values indicate increased occlusion. •(alpha): Measures the observation angle of the object in radians relative to the camera, specifically the angle between the object’s heading direction and the camera’s positive x-axis. •(left),(top),(right),(bottom): These are the 2D bounding box coordinates in the image, specifying the pixel positions of the top-left and bottom-right corners of the bounding box. •(height),(width),(length): Provide the object’s 3D dimensions (height, width, and length) in meters. •(x),(y),(z): The 3D coordinates of the object’s center within the camera coordinate system, measured in meters. •(rotation_y): Describes the object’s rotation around the y-axis in the camera coordinate system, expressed in radians. However, for training a YOLOv8 model, only (object_type),(left),(top),(right), and (bottom) were necessary. So, we removed all the rest of the labels. Since (object_type)is represented as 39 7.4. CONCLUSION CHAPTER 7. DATASET a string, we proceeded to map all labels, converting (object_type)into corresponding numerical identifiers. The mapping is as follows: { "0": "Car", "1": "Pedestrian", "2": "Cyclist", } Then, we then normalized the coordinates ((left)(top)(right)(bottom)) using the equations: xcenter =left +right 2 ycenter =top +bottom 2 width =right −left height =bottom −top xcenter_normalized =xcenter image_width ycenter_normalized =ycenter image_height width_normalized =width image_width height_normalized =height image_height The data.yaml file contains the following configuration: •train: ../train/images (path to the directory containing training images) •val: (path to the directory containing validation images) •test: ../test/images (path to the directory containing testing images) •nc: 3 (number of classes) •names: [”Car”, ”Pedestrian”, ”Cyclist”] (Class Labels) 7.4 Conclusion In this chapter, we have provided an overview of the KITTI dataset, detailing its components, structure, and the specific preparations required for training our model. By understanding the dataset’s intricacies and how to properly format and utilize it, we lay the groundwork for effective model training and evaluation. In the next chapter, we will delve into the experimentation and evaluation processes to assess the performance of our trained model. 40 Chapter 8 Experiments and Evaluation 8.1 Introduction This chapter details the experimental setup and evaluation metrics used to assess the performance of our object detection models. We begin by outlining the configuration and hyperparameters. Subsequently, we introduce the metrics utilized to evaluate model performance. Additionally, we explore the Dynamic Scene Composition Technique (DSCT). The chapter concludes with a comprehensive analysis of the results, comparing our models with state-of-the-art alternatives to highlight their effectiveness and potential for real-world applications. 8.2 Experiment To get the best model, we used the YOLOv8 pre-trained model, which is trained on the COCO dataset and includes 80 pre-defined classes: yolov8x.pt. The model was initialized with the following configuration and hyperparameters: •Batch Size (batch): This determines the number of images the algorithm processes within each sub-cycle into which an epoch is divided. During the experimentation, the model was executed with batch value of 32. •Learning Rate (lr0|lrf): This is the step value in which weights are updated in each iteration to minimize the loss function. In this case, we adjusted the initial learning rate and final learning rate with a value of 0.0001. •Epochs (epochs): An epoch is a complete cycle of processing all the data grouped in batches. Therefore, the number of epochs set for training equals the number of times each image is processed. During training, the epoch value was 100 epochs and we saved the model for each 10 epochs. •Image size (imgz): the desired image size for training. Before being input into the model, all images are adjusted to this specified dimension. we tested on image size 640. 41 8.5. RESULTS CHAPTER 8. EXPERIMENTS AND EVALUATION DSCT Car Pedestrian Cyclist Overall Easy Moderate Hard Easy Moderate Hard Easy Moderate Hard Easy Moderate Hard 0.0 92.42 85.32 77.9 56.14 47.41 40.39 63.0 37.64 35.28 70.52 56.12 51.19 0.1 93.79 86.01 78.8 58.56 51.79 46.68 60.57 41.79 40.48 70.97 59.86 55.32 0.2 94.36 86.58 79.35 59.55 52.34 45.32 62.38 39.59 37.54 72.10 59.50 54.74 0.3 91.37 85.56 80.82 64.02 54.81 47.75 65.66 42.08 40.29 73.02 60.82 56.95 0.4 91.77 85.32 80.38 59.57 52.06 45.1 63.39 40.79 38.56 71.58 59.39 54.68 0.5 93.43 84.96 77.44 55.25 48.44 43.49 63.13 42.83 40.81 70.60 58.08 53.25 0.6 91.44 85.69 80.78 62.69 53.89 46.96 64.51 42.29 40.45 72.21 60.62 56.06 0.7 93.8 88.52 81.38 62.24 54.5 47.6 65.5 43.51 41.95 73.85 62.18 56.98 0.8 92.99 86.05 78.76 59.62 50.84 45.8 61.83 42.27 40.72 71.48 59.72 55.09 0.9 91.84 85.37 80.52 59.44 51.93 45.16 63.25 44.95 42.88 71.51 60.75 56.19 1.0 92.0 85.54 80.62 61.66 52.9 47.97 66.04 42.47 40.68 73.23 60.97 56.42 Table 8.1: Performance comparison across different DSCT numbers and categories The results, shown in Table 8.1, highlights the effectiveness of our models across various DSCT values and object categories. Notably, DSCT 0.7 consistently delivers the best overall performance, demonstrating its importance and dominance: •Car Detection: DSCT 0.7 achieves the highest performance in the Moderate (88.52%) and Hard (81.38%) categories, while maintaining competitive performance in the Easy category (93.8%). This showcases the robustness of DSCT 0.7 in handling car detection under various conditions. •Pedestrian Detection: Although DSCT 0.3 performs best in the Easy category (64.02%), DSCT 0.7 delivers strong results across Moderate (54.5%) and Hard (47.6%) categories. This indicates DSCT 0.7’s capability to effectively detect pedestrians in more challenging scenarios. •Cyclist Detection: DSCT 0.7 shows excellent performance in the Moderate (43.51%) and Hard (41.95%) categories, while being competitive in the Easy category (65.5%). This highlights the versatility and effectiveness of DSCT 0.7 in cyclist detection tasks. •Overall Performance: DSCT 0.7 stands out with the highest overall performance across all difficulty levels, achieving 73.85% (Easy), 62.18% (Moderate), and 56.98% (Hard). This underscores the dominance of DSCT 0.7, making it the most effective setting for robust and reliable object detection across diverse categories and conditions. These results underscore the strong performance of DSCT 0.7 across different categories and difficulty levels. The comparison demonstrates the robustness and competitiveness of DSCT 0.7, highlighting its advanced capabilities and potential for further enhancement to achieve even higher accuracy and reliability in diverse and challenging environments. 48 CHAPTER 8. EXPERIMENTS AND EVALUATION 8.6. CONCLUSION 8.5.2 Second series of experiments To demonstrate the effectiveness of our model, we compare its performance with several advanced models including Regionlets, DPM-VOC+VP, Mono3D, LSVM-MDPM-sv, and Complexer- YOLO. The performance metrics are compared across three categories (Car, Pedestrian, Cyclist) and three difficulty levels (Easy, Moderate, Hard): Method Car Pedestrian Cyclist Easy Mod Hard Easy Mod Hard Easy Mod Hard Mono3D[3] 92.33 88.66 78.96 80.35 66.68 63.44 76.04 66.36 58.87 DPM-VOC+VP[32] 74.95 64.71 48.76 59.48 44.86 40.37 42.43 31.08 28.23 Regionlets[26] 84.75 76.45 59.70 73.14 61.15 55.21 70.41 58.72 51.83 LSVM-MDPM-sv[9,10] 68.02 56.48 44.18 47.74 39.36 35.95 35.04 27.50 26.21 Complexer-YOLO[39] 55.63 49.44 44.13 19.45 15.32 14.80 28.36 23.48 15.60 Proposed Method (DSCT 0.7) 93.8 88.52 81.38 62.24 54.5 47.6 65.5 43.51 41.95 Table 8.2: Performance comparison across different methods and categories The comparison, shown in Table 8.2, highlights the effectiveness of our proposed method (DSCT 0.7) relative to several advanced models: •Car Detection: Our method achieves the highest performance in the Easy (93.8%) and Hard (81.38%) categories, and shows competitive performance in the Moderate (88.52%) category. This demonstrates the robustness of our method in handling car detection under various conditions. •Pedestrian Detection: Our method delivers strong results across Moderate (54.5%) and Hard (47.6%) categories, while being competitive in the Easy category (62.24%). This indicates our method’s capability to effectively detect pedestrians in more challenging scenarios. •Cyclist Detection: Our method shows excellent performance in the Moderate (43.51%) and Hard (41.95%) categories, while being competitive in the Easy category (65.5%). This highlights the versatility and effectiveness of our method in cyclist detection tasks. These results underscore the strong performance and dominance of our proposed method across different categories and difficulty levels. The comparison demonstrates the robustness and competitiveness of our approach, highlighting its advanced capabilities and potential for further enhancement to achieve even higher accuracy and reliability in diverse and challenging environments. 8.6 Conclusion In this chapter, we have presented the detailed methodology and results of our experiments using the YOLOv8 model for object detection on the KITTI dataset. By leveraging advanced 49 8.6. CONCLUSION CHAPTER 8. EXPERIMENTS AND EVALUATION techniques such as the Dynamic Scene Composition Technique (DSCT), we have demonstrated improvements in model performance, particularly in challenging scenarios. Our evaluation, which included metrics like the confusion matrix and Average Precision (AP), highlighted the robustness and accuracy of our models. Furthermore, the comparative analysis with state- of-the-art models underscored the competitiveness of our approach. These findings validate the effectiveness of our methods and provide a solid foundation for further enhancements and applications in autonomous driving and other computer vision tasks. 50 Chapter 9 Conclusions 9.1 Contributions This final project has made significant contributions to the field of object detection for autonomous vehicles through the exploration and application of the YOLOv8 algorithm using the KITTI dataset. A thorough review of existing object detection methods and technologies was conducted, highlighting the evolution and advancements in the field, especially in the context of autonomous vehicles. Additionally, a novel approach called the Dynamic Scene Composition Technique (DSCT) was introduced to enhance the robustness of the detection model. This technique involves merging multiple images to create a diverse training dataset, which helps the model learn to handle a variety of real-world scenarios. The results of the proposed YOLOv8 model demonstrated significant improvements in certain categories and conditions, particularly with the integration of DSCT. The performance of the YOLOv8 model was also benchmarked against other advanced models, showing competitive results and highlighting the effectiveness of the proposed methods. Moreover, the preparation and preprocessing of the KITTI dataset were meticulously documented, providing a clear framework for future research and applications in this domain. 9.2 Future Work While this final project has achieved substantial progress, there are several avenues for future research and improvement. Future work could involve integrating data from additional sensors, such as LiDAR and radar, to enhance the accuracy and reliability of the object detection model. Additionally, utilizing more diverse and extensive datasets beyond KITTI can help in training a more robust model capable of handling various driving environments and conditions. The techniques and methodologies developed in this thesis can be extended to other fields such as robotics, surveillance, and smart city infrastructure, where object detection plays a critical role. By building on the findings and contributions of this research, future studies can further advance the capabilities of object detection systems and their applications in various domains. 51 9.2. FUTURE WORK CHAPTER 9. CONCLUSIONS In conclusion, this thesis has laid a solid foundation for the application of advanced object detection algorithms in autonomous vehicles. The proposed methods and findings not only contribute to the academic knowledge base but also have practical implications for enhancing the safety and efficiency of autonomous driving technologies. Future research building on this work has the potential to make significant strides in the field of computer vision and autonomous systems. 52 Appendices 53 Appendix A Code repository In this appendix, we describe the code repository associated with the project and provide instructions on how to use it to replicate the experiments. Directory Structure •DatasetPreparation: Contains scripts for preparing datasets. –keep_ness.py –map.py –normalization.py •devkit_object-3: Contains scripts and data for evaluation and mapping. •train.py: Script for training the YOLO model. •test.py: Script for testing the YOLO model. •data.yaml: Configuration file for the dataset. •trainlist.txt: List of training data files. •testlist.txt: List of testing data files. •reverse.py: Script to prepare and convert normalized labels to actual coordinates for testing. •keep.py: Script to test the labels. Getting Started Prerequisites • Python 3.10 55 APPENDIX A. CODE REPOSITORY • Install ultralytics: pip install ultralytics • Install pillow: pip install pillow==10.3.0 Usage Dataset Preparation Prepare your dataset using the scripts in the DatasetPreparation directory. For example: python DatasetPreparation/keep_ness.py Training Train the YOLO model using the train.py script: python train.py Testing Generate the test results of the model using the test.py script: python test.py Model Evaluation To evaluate the model, use the evaluation kit. You need to reverse the normalization and change the labels first. For missing values (occlusion, 3D coordinates, etc.), insert the ignored values (e.g., -1, -10). To reverse the normalization and fill in the missing data use: python reverse.py To evaluate the model use: python keep.py Check this link for more information on testing using the KITTI evaluation kit. GitHub link: LINK 56 APPENDIX A. CODE REPOSITORY Conclusion By following the steps outlined above, you should be able to replicate the experiments conducted in this project. For any issues or questions, refer to the README.md file in the repository for additional information. 57