# Brake Light Detection Algorithm for Predictive Braking
## 1 Introduction  
In recent years, the number of automated and partially automated systems has grown rapidly in passenger vehicles. Advanced driver-assistance systems (ADAS), such as adaptive cruise control (ACC) and collision avoidance (CA), have become common features or at least common accessories in new vehicles. ADAS development has particularly focused on passenger safety and comfort. ACC has proven to work smoothly and safely on the open road, as well as when driving behind another vehicle. However, radar-based ACC can have difficulties detecting a slowly moving or stopped vehicle in time to perform a controlled deceleration that is comfortable for the passengers. Similar deceleration issues were also observed with the ACC of the research vehicle used in this study. Vigorous deceleration reduces passenger comfort, as the ride feels unstable. Previously described deceleration scenarios typically occur in suburban areas where speed limit is approximately 60-70 km/h and vehicles experience frequent stops, for example, due to traffic lights. On these types of roads, vehicles move relatively fast, may also abruptly stop, and the visibility is not as good as when driving on highways. By introducing more ways of recognizing and identifying if the vehicle is at a standstill, especially from a distance, ride comfort levels could be dramatically improved.  
The adaptive cruise controller of a vehicle could act more robustly and with more reaction time if the system could perceive braking or stopped vehicles from afar. By utilizing machine vision, in this case a brake light status indicator, the control system could use the intention of the preceding vehicle as one input. When approaching a vehicle that is at a standstill, the decision of when to start braking in order to come to a full stop needs to be as robust as possible. More information about stopped and slow-moving vehiclescould be used in intersection areas in which a large portion of fatal vehicle accidents are known to occur [1; 2]. In addition to in-vehicle systems, careful consideration in traffic infrastructure and road design play an important role in overall traffic flow and driving comfort, especially in intersection areas [3; 4].  
In this paper, a novel brake light detection algorithm is presented. The presented method is designed to help a vehicle detect decelerating vehicles in front earlier than by relying on a radar system alone. The method is mainly intended for use in ACC systems, but can also be applied in other driver assistance systems. The concept of Brake Light Detection Algorithm for Predictive Braking is illustrated in Figure 1. A camera is installed in the top center of the windshield inside the research vehicle. An existing machine vision algorithm, YOLOv3 [5], is applied to detect any vehicles straight ahead, however this could be replaced with any vehicle detector. Then, a novel algorithm is developed to classify the brake light status of the vehicles in front. In addition to the color information used to detect the lights, the final brake light status is classified using a random forest algorithm [6]. A clear triangle shape identification can be seen in the weights learned by the algorithm. This highlights the transparency of the implemented machine learning model. The brake light status is then used for anticipatory braking for passenger comfort, which will be implemented in a separate study.  
This article is structured as follows. Next, a state-of-the-art review is given of the most related scientific research. Then, the utilized dataset and the constructed hardware and software are described in the methods section, which is followed by a description of the experiments. Experimental results are demonstrated which highlight the accuracy of the proposed brake light detector on the gathered dataset. Finally, discussion regarding the impact of the acquired results is presented.