Patent attributes
The disclosure provides a method and an apparatus for detecting a mobile traffic light. The method includes: obtaining a set of positive sample images with the mobile traffic light and a set of negative sample images without the mobile traffic light; extracting current training data respectively from the set of positive sample images and the set of negative sample images based on a preset sampling ratio; detecting the mobile traffic light of each image in the current training data with a first preset detection model to determine a detection result of each image; determining current classification loss and detecting frame regression loss based on a difference between the detection result of each image and labeled data; and generating a detection model for detecting the mobile traffic light in case that the current classification loss and the current detecting frame regression loss meet a preset condition.