A scenario is defined that including models of vehicles and a typical driving environment as well as a traffic light having a state (red, green, amber). A model of a subject vehicle is added to the scenario and camera location is defined on the subject vehicle. Perception of the scenario by a camera is simulated to obtain an image. The image is annotated with a location and state of the traffic light. Various annotated images may be generated for difference scenarios, including scenarios lacking a traffic light or having traffic lights that do not govern the subject vehicle. A machine learningmodel is then trained using the annotated images to identify the location and state of traffic lights that govern the subject vehicle.
Training automatic traffic light detection model using simulated images