WO2021018144A1 - Indication lamp detection method, apparatus and device, and computer-readable storage medium - Google Patents

Indication lamp detection method, apparatus and device, and computer-readable storage medium Download PDF

Info

Publication number
WO2021018144A1
WO2021018144A1 PCT/CN2020/105223 CN2020105223W WO2021018144A1 WO 2021018144 A1 WO2021018144 A1 WO 2021018144A1 CN 2020105223 W CN2020105223 W CN 2020105223W WO 2021018144 A1 WO2021018144 A1 WO 2021018144A1
Authority
WO
WIPO (PCT)
Prior art keywords
classification
indicator light
indicator
image
display state
Prior art date
Application number
PCT/CN2020/105223
Other languages
French (fr)
Chinese (zh)
Inventor
何哲琪
马佳彬
王坤
曾星宇
Original Assignee
浙江商汤科技开发有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 浙江商汤科技开发有限公司 filed Critical 浙江商汤科技开发有限公司
Priority to KR1020217020933A priority Critical patent/KR20210097782A/en
Priority to JP2021538967A priority patent/JP2022516183A/en
Publication of WO2021018144A1 publication Critical patent/WO2021018144A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/50Context or environment of the image
    • G06V20/56Context or environment of the image exterior to a vehicle by using sensors mounted on the vehicle
    • G06V20/58Recognition of moving objects or obstacles, e.g. vehicles or pedestrians; Recognition of traffic objects, e.g. traffic signs, traffic lights or roads
    • G06V20/584Recognition of moving objects or obstacles, e.g. vehicles or pedestrians; Recognition of traffic objects, e.g. traffic signs, traffic lights or roads of vehicle lights or traffic lights
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology

Definitions

  • the present disclosure relates to the field of computer vision technology, and in particular to an indicator light detection method, device, equipment and computer-readable storage medium.
  • Indicator light detection is a very important part of autonomous vehicle driving and autonomous robot driving. In the process of vehicle autonomous driving and robot autonomous driving, it is necessary to detect the indicator light in the road image captured by the camera, and determine its status and meaning, in order to make the correct decision in compliance with the traffic rules for safe driving.
  • the present disclosure provides an indicator light detection method, device, equipment and computer-readable storage medium.
  • an indicator light detection method which includes: recognizing a collected road image to obtain a candidate bounding box of the indicator in the road image; and according to the image area corresponding to the candidate bounding box in the road image , Predict multiple categories of indicator lights, and obtain prediction results of multiple categories of the indicator lights, where the multiple categories include at least two of the following: use category, shape category, arrangement category, function category, color Classification and orientation classification; according to the prediction results of multiple classifications of the indicator, the display state of the indicator is determined.
  • an indicator light detection device which includes: an identification unit for recognizing collected road images to obtain candidate bounding boxes of indicator lights in the road image; In the image area corresponding to the candidate bounding box in the above, multiple classifications of the indicator are predicted to obtain prediction results of the multiple classifications of the indicator, wherein the multiple classifications include at least two of the following: use classification, Shape classification, arrangement classification, function classification, color classification, and orientation classification; the determining unit is used to determine the display state of the indicator light according to the prediction results of the multiple classifications of the indicator light.
  • an indicator light detection device in a third aspect, includes a memory and a processor, the memory is used to store computer instructions that can be run on the processor, and the processor is used to implement the computer instructions when the computer instructions are executed. The method described above.
  • a computer-readable storage medium on which a computer program is stored, and the program is executed by a processor to implement the above-mentioned method.
  • a computer program including computer-readable code, which, when executed by a computer, implements the method described in the embodiments of the present disclosure.
  • the indicator light detection method, device, device, and computer-readable storage medium of one or more embodiments of the present disclosure can detect and classify indicator lights by using road images collected by a camera without relying on high-precision sensors, etc. Effectively reduce the equipment hardware cost required to achieve indicator light detection; in the process of identifying the image area corresponding to the candidate bounding box of the indicator in the road image, the indicator has been clearly classified and logically divided, and the
  • the classification of indicator lights in various aspects and multiple dimensions enables the prediction results of multiple classifications to cover the indicator lights in their respective situations as much as possible, which is beneficial to judge the display status of the indicator lights in various situations, which can be effective Improve the comprehensiveness and accuracy of indicator light detection.
  • Fig. 1 is a schematic flowchart of a method for detecting an indicator light according to an exemplary embodiment of the present disclosure
  • Fig. 2 is a logical schematic diagram showing a classification of indicator lights according to an exemplary embodiment of the present disclosure
  • Fig. 3A is a schematic structural diagram of a neural network model shown in an exemplary embodiment of the present disclosure
  • FIG. 3B is a schematic flow diagram of a variety of classification and prediction methods for indicator lights using the neural network model in FIG. 3A;
  • Fig. 4 is a schematic diagram showing a detection result of an indicator light according to an exemplary embodiment of the present disclosure
  • FIG. 5 is a schematic flowchart of a method for judging whether a detected indicator light is an indicator light at the same position according to an exemplary embodiment of the present disclosure
  • Fig. 6 is a schematic flowchart of a method for training a neural network model according to an exemplary embodiment of the present disclosure
  • Fig. 7 is a schematic structural diagram of an indicator light detection device according to an exemplary embodiment of the present disclosure.
  • Fig. 8 is a structural diagram of an indicator light detection device according to an exemplary embodiment of the present disclosure.
  • FIG. 1 is a schematic flowchart of a method for detecting an indicator light according to an embodiment of the disclosure. As shown in FIG. 1, the method in this embodiment includes steps 110 to 130.
  • step 110 the collected road image will be identified to obtain the candidate bounding box of the indicator in the road image.
  • At least one image acquisition device (such as a camera, etc.) arranged on or around the smart device is used to collect road images around the smart device.
  • the candidate bounding box of the indicator lamp in the road image can be obtained.
  • the indicator light includes, for example, a traffic signal light, a railway signal light, etc., and the present disclosure does not limit the type of the indicator light.
  • step 120 according to the image area corresponding to the candidate bounding box in the road image, multiple classifications of indicator lights are predicted to obtain prediction results of the multiple classifications of the indicator lights.
  • the multiple classifications include at least two of the following: use classification, shape classification, arrangement classification, function classification, color classification, and orientation classification.
  • the multiple classifications refer to the classification of the indicator lights in multiple aspects and multiple dimensions.
  • the indicator light classification logic can be designed so that the indicator light classification covers various types of indicator lights.
  • At least two categories of the multiple categories are predicted, and each seed category of the two categories requires category prediction.
  • step 130 the display state of the indicator light is determined according to the prediction results of the multiple classifications of the indicator light.
  • the display state of the indicator light is determined according to the prediction result of each of the at least two categories.
  • the road image collected by the camera is used to detect and classify the indicator light, instead of relying on high-precision sensors, etc., it can effectively reduce the hardware cost of the equipment required to achieve indicator light detection;
  • the indicator is clearly classified logically, and the indicator is classified from multiple aspects and multiple dimensions, so that the prediction of multiple categories
  • the indicator lights in various situations can be covered as much as possible, which is helpful for judging the display status of the indicator lights in various situations, thereby effectively improving the comprehensiveness and accuracy of indicator light detection.
  • Figure 2 shows an exemplary indicator light classification logic.
  • the use classification may include, for example, that the indicator light is used to indicate pedestrians/used to indicate vehicles; in the case that the indicator light is used to indicate vehicles, the shape classification may include, for example, the indicator light is a full-screen light (also It can be called a circular light)/arrow light; the arrangement classification can include, for example, the indicator light belongs to a horizontal arrangement/vertical arrangement/individual indicator light; the function classification can include, for example, the indicator light belongs to a normal indicator light/warning light/electronic Electronic Toll Collection (ETC) indicator; color classification can include, for example, the indicator is red/yellow/green/unknown in color (corresponding to the case of not lighting); when the indicator is an arrow light Down, the pointing category may include, for example, left/right/front/left front/right front.
  • ETC Electronic Toll Collection
  • the neural network model can be trained in advance through the road image with label information (which can be called sample image) (the training process will be detailed later), and the trained neural network model
  • label information which can be called sample image
  • the indicator lights can be identified from the input road image, and the identified indicator lights can be predicted on multiple categories to obtain prediction results of multiple categories.
  • multiple sub-network branches included in the neural network model may be used to respectively predict multiple categories of the indicator light, and obtain prediction results of multiple categories of the indicator light.
  • the number of sub-network branches is the same as the number of the multiple categories, and each sub-network branch is used to identify a sub-category of one of the multiple categories.
  • FIG. 3A shows a schematic diagram of the network structure of a neural network model provided by at least one embodiment of the present disclosure.
  • the neural network model includes a feature extraction layer 301, a region candidate (Region Proposal Network) layer 302, and a pool.
  • the fully connected layer 304 includes a regression branch 3041 and multiple sub-network branches 3042.
  • the fully connected layer 304 further includes a convolutional layer, and the convolutional layer is connected to the pooling layer 303.
  • FIG. 3B shows a schematic flowchart of a method for applying the neural network model in FIG. 3A to perform various classification predictions of indicator lights. As shown in FIG. 3B, the method includes steps 310-340.
  • step 310 the feature map of the road image is obtained through the feature extraction layer.
  • the feature extraction layer 301 is used to extract features of the input road image, which can be a convolutional neural network, for example, an existing Visual Geometry Group (VGG) network, residual network (Residual Network, ResNet), Dense Connection Network (DenseNet), etc., can also adopt other convolutional neural network structures.
  • VCG Visual Geometry Group
  • ResNet residual network
  • DenseNet Dense Connection Network
  • the present disclosure does not limit the specific structure of the feature extraction layer 301.
  • the feature extraction layer 301 may include network units such as a convolutional layer, an incentive layer, and a pooling layer. Way stacked. Among them, the convolutional layer can extract different features in the input road image through multiple convolution kernels to obtain multiple feature maps.
  • the pooling layer is located behind the convolutional layer and can perform local averaging and down-sampling operations on the feature maps. , Reduce the resolution of the feature map. As the number of convolutional layers and pooling layers increases, the number of feature maps gradually increases, and the resolution of the feature maps gradually decreases.
  • step 320 the feature map is processed through the area candidate layer to generate a candidate bounding box of the indicator lamp in the road image.
  • the area candidate layer 302 is used to predict the candidate bounding box of the indicator light, that is, to generate prediction information of the candidate bounding box.
  • the regional candidate layer 302 may be a regional candidate network (RPN, Region Proposal Network), and the present disclosure does not limit the specific structure of the regional candidate layer 302.
  • the regional candidate layer 302 may include network units such as a convolutional layer, a classification layer, and a regression layer, which are formed by stacking the foregoing network units in a certain manner.
  • the convolutional layer uses a sliding window (for example, 3*3) to convolve the input feature map. Each window corresponds to multiple anchor boxes, and each window generates one for the classification layer and the regression layer. Fully connected vector.
  • the classification layer is used to determine whether the image area in the candidate bounding box generated by the anchor point box is the foreground or the background.
  • the regression layer is used to obtain the approximate position of the candidate bounding box. Based on the output results of the classification layer and the regression layer, it can be predicted Contains the candidate bounding box of the indicator, and outputs the probability that the image area in the candidate bounding box is foreground and background, and the position parameter of the candidate bounding box.
  • the generated candidate bounding box may be called Region Proposal, and in subsequent steps, the region may be called Region of Interest (ROI).
  • ROI Region of Interest
  • step 330 an image feature of a set size corresponding to the candidate bounding box in the feature map is obtained through the pooling layer.
  • the pooling layer 303 is used to extract a feature map of a set size (fixed size, for example 7 ⁇ 7) for each ROI, that is, the ROIs of different sizes obtained in step 320 are mapped into regions of the same size This process can be called ROI Polling.
  • the pooling layer 303 may also be used to perform feature extraction on regions of the same size to obtain the image features corresponding to the ROI.
  • step 340 multiple classification prediction results of the indicator light are obtained through the fully connected layer 304.
  • the fully connected layer 304 includes a regression branch 3041 and multiple sub-network branches 3042.
  • the regression branch 3041 and each sub-network branch 3042 can perform further feature extraction through a 1 ⁇ 1 convolution kernel respectively.
  • the 1 ⁇ 1 convolution kernel has different parameters for each channel, which is equivalent to a fully connected function.
  • the regression branch 3041 regresses the aforementioned candidate bounding box, and corrects the position of the candidate bounding box, so as to more accurately locate the bounding box of the indicator light.
  • the regression branch 3041 uses the conversion relationship between the candidate bounding box and the real bounding box obtained through learning in the training process to predict the bounding box of the indicator light, that is, predict the position information of the bounding box of the indicator light.
  • the position information can be expressed as (x1, y1, x2, y2), where x1, y1 are the coordinates of the upper left corner of the predicted bounding box, and x2, y2 are the coordinates of the lower right corner of the predicted bounding box; the position
  • the information can also be expressed as (x, y, w, h), where x, y represent the coordinates of the center point of the predicted bounding box, and w, h represent the width and height of the predicted bounding box, respectively.
  • each sub-network branch 3042 is used to identify a sub-category of one of the above-mentioned multiple categories.
  • the sub-network branch can obtain the prediction results of multiple classifications of the indicator light in the following manner: using the image feature corresponding to the candidate bounding box and the first sub-network branch of the multiple sub-network branches, Predict the first category in the multiple categories of the indicator light to obtain the predicted probabilities of at least two subcategories corresponding to the first category; mark the subcategory with the highest predicted probability in the at least two subcategories as The subcategory of the indicator lamp in the first category.
  • the first sub-network branch may be any one of a plurality of sub-network branches, and the first category may be any one of multiple categories.
  • the first sub-network branch is a sub-network branch for shape classification, which can obtain the predicted probabilities of the two sub-categories (full-screen lights and arrow lights) corresponding to the shape classification.
  • the predicted probability of the full-screen lights is 90%
  • arrow The predicted probability of the lamp is 10%.
  • the sub-network branch marks the sub-category with the highest predicted probability, that is, the full-screen light as the sub-category under the shape classification.
  • the following methods are used to determine the display state of the indicator light:
  • the multiple classifications include the usage classification and the shape classification, and the prediction result of the usage classification is that the indicator lamp is used to indicate a vehicle, and the prediction result of the shape classification indicates that the indicator lamp is circular In the case of a lamp, combining prediction results corresponding to the arrangement classification, the function classification, and the color classification to obtain the first display state of the indicator;
  • the multiple classifications include the usage classification and the shape classification, and the prediction result of the usage classification is that the indicator lamp is used to indicate a vehicle, and the prediction result of the shape classification indicates that the indicator lamp is an arrow lamp In the case of combining the prediction results corresponding to the color classification and the pointing classification to obtain the second display state of the indicator;
  • the multiple classifications include the use classification
  • the prediction result of the use classification is that the indicator light is used to indicate pedestrians
  • the third display state of the indicator light is obtained.
  • Figure 4 shows an exemplary output result of the indicator light detection.
  • the detection result includes the predicted bounding box of the indicator light, and the predicted results of multiple classifications of the indicator light, and also includes The confidence score of the bounding box obtained by this prediction.
  • the confidence score comprehensively reflects the possibility of an indicator light in the predicted bounding box and the accuracy of the predicted bounding box position.
  • the bounding boxes of the three predicted indicators are output.
  • the classification prediction result of the indicator in the black rectangular bounding box is "red horizon", which means that the indicator is a horizontally arranged, red ordinary indicator, and the confidence score of the predicted bounding box is 1.0. Since the classification prediction result of the ordinary indicator light is set to not be displayed (hidden), the display state of the indicator light corresponds to the first display state.
  • the classification prediction result of the indicator in the black square bounding box is "unknown color alone", that is, the indicator is a separate, unlit indicator. Since the two classification prediction results are set to not be displayed, they are displayed on the image Not shown, it also corresponds to the first display state. The confidence score of the bounding box obtained by this prediction is 0.98.
  • the classification prediction result of the indicator in the white square is "green arrow left", which means that the indicator is a separate arrow-shaped indicator, the color is green and points to the left, and the confidence of the bounding box obtained by this prediction
  • the score is 0.99.
  • the display state of the indicator light corresponds to the second display state.
  • Determining the display status of the indicator light also includes judging whether the indicator light is always on or flashing, so as to better guide the smart device's decision-making for automatic driving, so that the smart device can comply with traffic rules and realize safe driving.
  • the indicator light at the same position in the multiple road images collected within a set time and the prediction results of multiple classifications of the indicator light are obtained; according to the prediction results of the same position in the multiple road images The prediction results of the multiple classifications of the indicator light determine the display state of the indicator light.
  • the indicator lights at the same position in the multiple road images may be obtained by collecting consecutive frames of road images.
  • the continuous frame image may be a continuously captured multi-frame image, or may be a target frame selected every few frames from the continuously captured multi-frame image, and the continuously selected multiple target frames are regarded as continuous frames.
  • Fig. 5 shows a schematic flowchart of a method for judging whether the detected indicator light is an indicator light at the same position. As shown in Fig. 5, the method includes:
  • step 510 the position of the indicator light in the first frame of the continuous frame of road images is obtained.
  • the predicted position of the indicator lamp in the initial frame within the set time is obtained.
  • the position of the indicator light in the image can be obtained through the neural network model, that is, the position parameters of the predicted indicator light bounding box can be obtained;
  • the processing method is to obtain the position of the detected indicator in the image.
  • step 520 according to the position of the indicator light in the first frame of image, the movement speed and the shooting frequency of the device that took the road image, the indicator light is calculated to be divided by the continuous frame of the road image.
  • the device that takes the road image is the image acquisition device (such as a camera, etc.).
  • the movement speed of the device is the same as the movement speed of an autonomous smart device.
  • the shooting frequency can be preset or can be read by the device. Configure to get.
  • the position of the indicator light in the image is known in the initial frame, according to the movement speed of the device and the frequency of shooting, it can be calculated to obtain the difference in each subsequent frame (other frames, that is, the continuous frame image) In an image other than the first frame), the theoretical position of the indicator light in the image. This position is called the first position to distinguish it from the position in the subsequent steps.
  • step 530 the second position of the indicator light in the other frames of the image in the continuous frame is obtained.
  • the position of the detected indicator in the image can be predicted by the neural network model, or the position of the detected indicator in the image can be obtained through image processing, which is called The second position.
  • step 540 for each frame of the other frame images, in the case where the difference between the second position and the first position is less than a set value, determine the indication detected in the continuous frame of road image The light is the indicator light at the same position.
  • the second position of the indicator in the image detected in step 530 should be close to the first position calculated in step 520. Therefore, for each subsequent frame, when the difference between the second position and the first position is less than the set value, it can be determined that the detected indicator lights in the consecutive frames of road images are the indicator lights at the same position; , It is judged that it is not the indicator light at the same position. In the case that the detected indicator light is not the indicator light of the same position, there is no need to perform the subsequent step of determining the status of the indicator light.
  • the above set value can be set according to the required detection accuracy.
  • the indicator light at the same position in multiple road images After obtaining the indicator light at the same position in multiple road images, it can be judged by comparing whether the multiple classification prediction results of the indicator light at the same position in the multiple road images remain unchanged or have changed. Whether the indicator light is always on or flashing.
  • the color classification prediction results of the indicator lamps at the same position are the same, it means that the color of the indicator lamp has not changed within the set time (for example, 3 seconds), so it can be determined
  • the indicator light is always on. It should be noted that the color classification with the same prediction result here does not include the unknown color.
  • the color classification prediction results of the indicator lights in the same position change at intervals, for example, the prediction result of color classification is green for a period of time, and the prediction result of color classification for a period of time is unknown (or impossible). It is detected that there is a light here), and the two situations alternately appear, it means that the color of the indicator light has alternately changed within the set time, so it can be judged that the indicator light is flashing.
  • FIG. 6 is a schematic flowchart of a training method of a neural network model according to an embodiment of the disclosure. As shown in Figure 6, the method in this embodiment includes:
  • step 610 the sample image containing the indicator light is input to the neural network model to obtain multiple classification prediction results and bounding box prediction results of the indicator light.
  • the sample image input to the neural network model may be a road image containing indicator lights, and the sample image is pre-marked with the indicator information, and the label information contains the true bounding box information of the indicator, for example, the bounding box
  • the label information also includes various classification information of the indicator light.
  • Inputting the sample image to the initialized neural network model can predict multiple classification prediction results of the indicator lights in the sample image and the bounding box prediction results.
  • step 620 the loss value of the loss function is calculated according to the multiple classification prediction results and the bounding box prediction result, as well as the multiple classification information and the real bounding box information.
  • the loss value of the loss function represents the difference between the predicted multiple classification results and the predicted bounding box, and the pre-labeled multiple classification information and the true bounding box information.
  • step 630 the network parameters of the neural network model are adjusted according to the loss value.
  • the loss value determined based on the loss function is passed back to the neural network model to adjust network parameters, such as adjusting the value of the convolution kernel of each layer and the weight parameter of each layer and many more.
  • the training sample can be divided into multiple image subsets (batch), each iteration of training to input an image subset to the neural network model in turn, combined with the prediction results of each sample in the training samples included in the image subset Adjust the network parameters for the loss value. After this iteration training is completed, input the next image subset to the neural network model for the next iteration training.
  • the training samples included in different image subsets are at least partially different.
  • the predetermined ending condition for example, may be that the loss value is reduced to a certain threshold, or the predetermined number of iterations of the neural network model is reached.
  • the neural network model training method of this implementation uses pre-marked classification information of indicator lights and sample images of real bounding boxes to train the neural network model, so that the trained neural network model can detect the indicator lights in the input image. And predict the various classifications of the indicator lights.
  • the neural network model to be trained is the neural network model used in the above embodiment of the indicator light detection method. Its structure is as shown in FIG. 3A. The only difference is that the input image is a sample image containing annotation information.
  • obtaining the prediction result of the indicator light based on the sample image may include: obtaining a feature map of the sample image through the feature extraction layer; processing the feature map through the region candidate layer , Generate the candidate bounding box of the indicator in the sample image; obtain the image feature of the set size corresponding to the candidate bounding box in the feature map through the pooling layer; obtain the indication through the fully connected layer
  • the prediction results of multiple classifications of lights and the prediction results of bounding boxes may include: obtaining a feature map of the sample image through the feature extraction layer; processing the feature map through the region candidate layer , Generate the candidate bounding box of the indicator in the sample image; obtain the image feature of the set size corresponding to the candidate bounding box in the feature map through the pooling layer; obtain the indication through the fully connected layer.
  • the indicator light prediction process in the training process is similar to the indicator light prediction process in the indicator light detection method described above, and the detailed process can refer to the description in the indicator light detection method embodiment.
  • FIG. 7 provides an indicator light detection device. As shown in FIG. 7, the device may include: an identification unit 701, a prediction unit 702, and a determination unit 703.
  • the recognition unit 701 is used to recognize the collected road image to obtain the candidate bounding box of the indicator in the road image;
  • the prediction unit 702 is used to identify the image area corresponding to the candidate bounding box in the road image , Predict multiple categories of indicator lights, and obtain prediction results of multiple categories of the indicator lights, where the multiple categories include at least two of the following: use category, shape category, arrangement category, function category, color Classification and direction classification;
  • the determining unit 703 is configured to determine the display state of the indicator light according to the prediction results of the multiple classifications of the indicator light.
  • the prediction unit 702 is configured to: use a neural network model to perform feature extraction on the image region corresponding to the candidate bounding box to obtain the image feature corresponding to the candidate bounding box; and use the candidate bounding box to correspond to
  • the image features of and the multiple sub-network branches included in the neural network model respectively predict multiple categories of the indicator light to obtain prediction results of the multiple categories of the indicator light; wherein, the multiple sub-networks The number of branches is the same as the number of the multiple categories, and each sub-network branch is used to identify a subcategory of one of the multiple categories.
  • the prediction unit 702 is configured to: use the image feature corresponding to the candidate bounding box and the first sub-network branch of the plurality of sub-network branches to classify the first sub-network branch of the multiple classifications of the indicator light.
  • One category is predicted to obtain the predicted probabilities of at least two subcategories corresponding to the first category; the subcategory with the highest predicted probability in the at least two subcategories is marked as the indicator of the indicator in the first category Subcategory.
  • the determining unit 703 is configured to: in the multiple classifications, include the usage classification and the shape classification, and the prediction result of the usage classification is that the indicator light is used to indicate the vehicle, and the The prediction result of the shape classification indicates that when the indicator light is a circular light, the prediction results corresponding to the arrangement classification, the function classification, and the color classification are combined to obtain the first display of the indicator light State; or, in the multiple classifications including the usage classification and the shape classification, and the prediction result of the usage classification is that the indicator lamp is used to indicate the vehicle, and the prediction result of the shape classification indicates the indication When the light is an arrow light, the prediction results corresponding to the color classification and the pointing classification are combined to obtain the second display state of the indicator; or, the use classification is included in the multiple classifications , And when the prediction result of the usage classification is that the indicator light is used to indicate pedestrians, the third display state of the indicator light is obtained.
  • the determining unit 703 is configured to: obtain the indicator light at the same position in the multiple road images collected within a set time and the prediction results of multiple classifications of the indicator light; The prediction results of multiple classifications of the indicator lamps at the same position in a road image are used to determine the display state of the indicator lamps.
  • the multiple road images are continuous frame road images; the determining unit 703 is configured to: obtain the position of the indicator light in the first frame image of the continuous frame road image; The position of the lamp in the first frame of image, the movement speed and the shooting frequency of the device that took the road image, and calculate the indicators in the continuous frame of road images other than the first frame of image The first position in each frame of image; obtain the second position of the indicator light in the other frames of the continuous frame of image; for each frame of the other frame of image, in the first In the case that the difference between the second position and the first position is less than the set value, it is determined that the indicator lights detected in the consecutive frames of road images are the indicator lights at the same position.
  • the display state of the indicator light includes: always on or flashing; the determining unit 703 is configured to: in the case where the color classification prediction results of the indicator lights at the same position in the multiple road images are the same, It is determined that the display state of the indicator light is always on; when the color classification prediction result interval of the indicator light at the same position in the multiple images changes, it is determined that the display state of the indicator light is blinking.
  • Fig. 8 is an indicator light detection device provided by at least one embodiment of the present disclosure.
  • the device includes a memory and a processor.
  • the memory is used to store computer instructions that can run on the processor.
  • the processor is used to execute the The indicator light detection method described in any embodiment of this specification is implemented when the computer is instructed.
  • At least one embodiment of this specification also provides a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, the indicator light detection method described in any embodiment of this specification is implemented.
  • the embodiment of the present disclosure provides a computer program, including computer readable code, which, when executed by a computer, implements the indicator light detection method described in any embodiment of the present disclosure.
  • the writing order of the steps does not mean a strict execution order but constitutes any limitation on the implementation process.
  • the specific execution order of each step should be based on its function and possibility.
  • the inner logic is determined.
  • the functions or modules contained in the device provided in the embodiments of the present disclosure can be used to execute the methods described in the above method embodiments.
  • the functions or modules contained in the device provided in the embodiments of the present disclosure can be used to execute the methods described in the above method embodiments.
  • the computer-readable storage medium may be in various forms.
  • the machine-readable storage medium may be: RAM (Radom Access Memory, random access memory), volatile Memory, non-volatile memory, flash memory, storage drives (such as hard drives), solid state drives, any type of storage disks (such as optical discs, DVDs, etc.), or similar storage media, or a combination thereof.
  • the computer-readable medium may also be paper or other suitable medium capable of printing programs. Using these media, these programs can be obtained by electrical means (for example, optical scanning), can be compiled, interpreted, and processed in a suitable manner, and then can be stored in a computer medium.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Physics & Mathematics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Evolutionary Computation (AREA)
  • General Engineering & Computer Science (AREA)
  • Artificial Intelligence (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Biology (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Multimedia (AREA)
  • Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Image Analysis (AREA)
  • Traffic Control Systems (AREA)

Abstract

The present disclosure relates to an indication lamp detection method, apparatus and device, and a computer-readable storage medium. The method comprises: identifying a collected road image to obtain candidate boundary boxes of an indication lamp in the road image; predicting, according to image regions corresponding to the candidate boundary boxes in the road image, various classifications for the indication lamps to obtain a prediction result of the classifications of the indication lamp, wherein the classifications comprise at least two of the following: a usage classification, a shape classification, an arrangement classification, a function classification, a color classification and an orientation classification; and determining an exhibition state of the indication lamp according to the prediction result of the classifications of the indication lamp.

Description

指示灯检测方法、装置、设备及计算机可读存储介质Indicator lamp detection method, device, equipment and computer readable storage medium
相关申请的交叉引用Cross references to related applications
本公开要求在2019年7月31日提交中国专利局、申请号为CN2019107037635、发明名称为“指示灯检测方法、装置、设备及计算机可读存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本公开中。This disclosure requires the priority of a Chinese patent application filed with the Chinese Patent Office, the application number is CN2019107037635, and the invention title is "indicator lamp detection method, device, equipment and computer-readable storage medium" on July 31, 2019, and its entire content Incorporated in this disclosure by reference.
技术领域Technical field
本公开涉及计算机视觉技术领域,具体涉及一种指示灯检测方法、装置、设备及计算机可读存储介质。The present disclosure relates to the field of computer vision technology, and in particular to an indicator light detection method, device, equipment and computer-readable storage medium.
背景技术Background technique
指示灯检测是车辆自动驾驶、机器人自主行驶中非常重要的部分。在车辆自动驾驶和机器人自主行驶过程中,需要在摄像头所捕捉的道路图像中检测出指示灯,并判断其状态和表示的含义,才能做出符合交通规则的正确决策,以进行安全行驶。Indicator light detection is a very important part of autonomous vehicle driving and autonomous robot driving. In the process of vehicle autonomous driving and robot autonomous driving, it is necessary to detect the indicator light in the road image captured by the camera, and determine its status and meaning, in order to make the correct decision in compliance with the traffic rules for safe driving.
发明内容Summary of the invention
为克服相关技术中存在的问题,本公开提供了一种指示灯检测方法、装置、设备及计算机可读存储介质。In order to overcome the problems in the related art, the present disclosure provides an indicator light detection method, device, equipment and computer-readable storage medium.
第一方面,提供一种指示灯检测方法,包括:对采集的道路图像进行识别,获得所述道路图像中指示灯的候选边界框;根据所述道路图像中所述候选边界框对应的图像区域,对指示灯的多种分类进行预测,获得所述指示灯的多种分类的预测结果,其中,所述多种分类包括以下至少两种:用途分类、形状分类、排列分类、功能分类、颜色分类、指向分类;根据所述指示灯的多种分类的预测结果,确定所述指示灯的展示状态。In a first aspect, an indicator light detection method is provided, which includes: recognizing a collected road image to obtain a candidate bounding box of the indicator in the road image; and according to the image area corresponding to the candidate bounding box in the road image , Predict multiple categories of indicator lights, and obtain prediction results of multiple categories of the indicator lights, where the multiple categories include at least two of the following: use category, shape category, arrangement category, function category, color Classification and orientation classification; according to the prediction results of multiple classifications of the indicator, the display state of the indicator is determined.
第二方面,提供一种指示灯检测装置,包括:识别单元,用于对采集的道路图像进行识别,获得所述道路图像中指示灯的候选边界框;预测单元,用于根据所述道路图像中所述候选边界框对应的图像区域,对指示灯的多种分类进行预测,获得所述指示灯的多种分类的预测结果,其中,所述多种分类包括以下至少两种:用途分类、形状分类、排列分类、功能分类、颜色分类、指向分类;确定单元,用于根据所述指示灯的多种分 类的预测结果,确定所述指示灯的展示状态。In a second aspect, an indicator light detection device is provided, which includes: an identification unit for recognizing collected road images to obtain candidate bounding boxes of indicator lights in the road image; In the image area corresponding to the candidate bounding box in the above, multiple classifications of the indicator are predicted to obtain prediction results of the multiple classifications of the indicator, wherein the multiple classifications include at least two of the following: use classification, Shape classification, arrangement classification, function classification, color classification, and orientation classification; the determining unit is used to determine the display state of the indicator light according to the prediction results of the multiple classifications of the indicator light.
第三方面,提供一种指示灯检测设备,所述设备包括存储器、处理器,所述存储器用于存储可在处理器上运行的计算机指令,所述处理器用于在执行所述计算机指令时实现以上所述的方法。In a third aspect, an indicator light detection device is provided. The device includes a memory and a processor, the memory is used to store computer instructions that can be run on the processor, and the processor is used to implement the computer instructions when the computer instructions are executed. The method described above.
第四方面,提供一种计算机可读存储介质,其上存储有计算机程序,所述程序被处理器执行时实现以上所述的方法。In a fourth aspect, a computer-readable storage medium is provided, on which a computer program is stored, and the program is executed by a processor to implement the above-mentioned method.
第五方面,提供了一种计算机程序,包括计算机可读代码,所述计算机可读代码被计算机执行时实现本公开实施例所述的方法。In a fifth aspect, a computer program is provided, including computer-readable code, which, when executed by a computer, implements the method described in the embodiments of the present disclosure.
本公开一个或多个实施例的指示灯检测方法、装置、设备及计算机可读存储介质,通过利用摄像头采集的道路图像进行指示灯的检测与分类,而可以不必依赖高精度的传感器等,可以有效降低实现指示灯检测所需的设备硬件成本;在通过对道路图像中指示灯的候选边界框对应的图像区域进行识别的过程中,通过对指示灯进行了清晰的分类逻辑的划分,从多个方面、多个维度对指示灯进行的分类,使得到的多种分类的预测结果能够尽可能覆盖各自情况下的指示灯,有利于判断各种情况下的指示灯的展示状态,从而可以有效提高指示灯检测的全面性和准确性。The indicator light detection method, device, device, and computer-readable storage medium of one or more embodiments of the present disclosure can detect and classify indicator lights by using road images collected by a camera without relying on high-precision sensors, etc. Effectively reduce the equipment hardware cost required to achieve indicator light detection; in the process of identifying the image area corresponding to the candidate bounding box of the indicator in the road image, the indicator has been clearly classified and logically divided, and the The classification of indicator lights in various aspects and multiple dimensions enables the prediction results of multiple classifications to cover the indicator lights in their respective situations as much as possible, which is beneficial to judge the display status of the indicator lights in various situations, which can be effective Improve the comprehensiveness and accuracy of indicator light detection.
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本公开。It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the present disclosure.
附图说明Description of the drawings
此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本说明书的实施例,并与说明书一起用于解释本说明书的原理。The drawings here are incorporated into the specification and constitute a part of the specification, show embodiments conforming to the specification, and are used together with the specification to explain the principle of the specification.
图1是本公开一示例性实施例示出的一种指示灯检测方法的流程示意图;Fig. 1 is a schematic flowchart of a method for detecting an indicator light according to an exemplary embodiment of the present disclosure;
图2是本公开一示例性实施例示出的一种指示灯分类逻辑示意图;Fig. 2 is a logical schematic diagram showing a classification of indicator lights according to an exemplary embodiment of the present disclosure;
图3A是本公开一示例性实施例示出的一种神经网络模型的结构示意图;Fig. 3A is a schematic structural diagram of a neural network model shown in an exemplary embodiment of the present disclosure;
图3B是应用图3A中的神经网络模型进行指示灯的多种分类预测方法的流程示意图;FIG. 3B is a schematic flow diagram of a variety of classification and prediction methods for indicator lights using the neural network model in FIG. 3A;
图4是本公开一示例性实施例示出的一种指示灯检测结果示意图;Fig. 4 is a schematic diagram showing a detection result of an indicator light according to an exemplary embodiment of the present disclosure;
图5是本公开一示例性实施例示出的一种判断所检测到的指示灯是否为同一位置的指示灯的方法的流程示意图;5 is a schematic flowchart of a method for judging whether a detected indicator light is an indicator light at the same position according to an exemplary embodiment of the present disclosure;
图6是本公开一示例性实施例示出的一种神经网络模型的训练方法的流程示意图;Fig. 6 is a schematic flowchart of a method for training a neural network model according to an exemplary embodiment of the present disclosure;
图7是本公开一示例性实施例示出的一种指示灯检测装置的结构示意图;Fig. 7 is a schematic structural diagram of an indicator light detection device according to an exemplary embodiment of the present disclosure;
图8是本公开一示例性实施例示出的一种指示灯检测设备的结构图。Fig. 8 is a structural diagram of an indicator light detection device according to an exemplary embodiment of the present disclosure.
具体实施方式Detailed ways
这里将详细地对示例性实施例进行说明,其示例表示在附图中。下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下示例性实施例中所描述的实施方式并不代表与本公开相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本公开的一些方面相一致的装置和方法的例子。Here, exemplary embodiments will be described in detail, and examples thereof are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings indicate the same or similar elements. The implementation manners described in the following exemplary embodiments do not represent all implementation manners consistent with the present disclosure. Rather, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
本文中术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中术语“至少两种”表示多种中的任意两种或多种中的至少两种的任意组合,例如,包括A、B、C中的至少两种,可以表示包括从A、B和C构成的集合中选择的任意两个或多个元素。The term "and/or" in this article is only an association relationship describing associated objects, which means that there can be three relationships, for example, A and/or B, which can mean: A alone exists, A and B exist at the same time, exist alone B these three situations. In addition, the term "at least two" in this document means any two of the multiple or any combination of at least two of the multiple, for example, including at least two of A, B, and C, and may mean including A, Any two or more elements selected in the set formed by B and C.
图1为本公开实施例指示灯检测方法的一个流程示意图。如图1所示,该实施例方法包括步骤110~步骤130。FIG. 1 is a schematic flowchart of a method for detecting an indicator light according to an embodiment of the disclosure. As shown in FIG. 1, the method in this embodiment includes steps 110 to 130.
在步骤110中,将对采集的道路图像进行识别,获得所述道路图像中指示灯的候选边界框。In step 110, the collected road image will be identified to obtain the candidate bounding box of the indicator in the road image.
在车辆或机器人等智能设备的行驶过程中,通过设置在智能设备上或者设置在智能设备周围的至少一个图像采集装置(例如摄像头等),采集智能设备周围的道路图像。During the driving process of smart devices such as vehicles or robots, at least one image acquisition device (such as a camera, etc.) arranged on or around the smart device is used to collect road images around the smart device.
通过对所采集的道路图像进行识别,例如将所采集的道路图像输入预先训练的神经网络模型,可以获得所述道路图像中指示灯的候选边界框。所述指示灯例如包括交通信号灯、铁路信号灯等等,本公开不对指示灯的类型进行限制。By recognizing the collected road image, for example, inputting the collected road image into a pre-trained neural network model, the candidate bounding box of the indicator lamp in the road image can be obtained. The indicator light includes, for example, a traffic signal light, a railway signal light, etc., and the present disclosure does not limit the type of the indicator light.
在步骤120中,根据所述道路图像中所述候选边界框对应的图像区域,对指示灯的多种分类进行预测,获得所述指示灯的多种分类的预测结果。In step 120, according to the image area corresponding to the candidate bounding box in the road image, multiple classifications of indicator lights are predicted to obtain prediction results of the multiple classifications of the indicator lights.
其中,所述多种分类包括以下至少两种:用途分类、形状分类、排列分类、功能分类、颜色分类、指向分类。Wherein, the multiple classifications include at least two of the following: use classification, shape classification, arrangement classification, function classification, color classification, and orientation classification.
所述多种分类是指在多个方面、多个维度对指示灯进行的分类。可以通过设计指示 灯分类逻辑,使得对指示灯的分类覆盖各种类型的指示灯。The multiple classifications refer to the classification of the indicator lights in multiple aspects and multiple dimensions. The indicator light classification logic can be designed so that the indicator light classification covers various types of indicator lights.
在本公开实施例中,至少对所述多种分类中的两种分类进行预测,并且对该两种分类中的每一种子分类都需要进行类别预测。In the embodiment of the present disclosure, at least two categories of the multiple categories are predicted, and each seed category of the two categories requires category prediction.
在步骤130中,根据所述指示灯的多种分类的预测结果,确定所述指示灯的展示状态。In step 130, the display state of the indicator light is determined according to the prediction results of the multiple classifications of the indicator light.
对应于各个分类的预测结果的不同情况,可以确定所述指示灯的不同展示状态。Corresponding to different situations of the prediction results of each category, different display states of the indicator light can be determined.
在本公开实施例中,根据至少两种分类中每种分类的预测结果来确定指示灯的展示状态。In the embodiment of the present disclosure, the display state of the indicator light is determined according to the prediction result of each of the at least two categories.
本实施例通过利用摄像头采集的道路图像进行指示灯的检测与分类,而可以不必依赖高精度的传感器等,可以有效降低实现指示灯检测所需的设备硬件成本;在通过对道路图像中指示灯的候选边界框对应的图像区域进行识别的过程中,通过对指示灯进行了清晰的分类逻辑的划分,从多个方面、多个维度对指示灯进行的分类,使得到的多种分类的预测结果能够尽可能覆盖各种情况下的指示灯,有利于判断各种情况下的指示灯的展示状态,从而可以有效提高指示灯检测的全面性和准确性。In this embodiment, the road image collected by the camera is used to detect and classify the indicator light, instead of relying on high-precision sensors, etc., it can effectively reduce the hardware cost of the equipment required to achieve indicator light detection; In the process of identifying the image area corresponding to the candidate bounding box, the indicator is clearly classified logically, and the indicator is classified from multiple aspects and multiple dimensions, so that the prediction of multiple categories As a result, the indicator lights in various situations can be covered as much as possible, which is helpful for judging the display status of the indicator lights in various situations, thereby effectively improving the comprehensiveness and accuracy of indicator light detection.
如下的描述中,将对指示灯检测方法进行更详细的描述。In the following description, the indicator detection method will be described in more detail.
图2示出了一种示例性指示灯分类逻辑。如图2所示,用途分类例如可以包括该指示灯是用于指示行人/用于指示车辆;在指示灯是用于指示车辆的情况下,形状分类例如可以包括该指示灯属于全屏灯(也可被称为圆形灯)/箭头灯;排列分类例如可以包括该指示灯属于水平排列/竖直排列/单独的指示灯;功能分类例如可以包括该指示灯属于普通指示灯/警示灯/电子不停车收费(Electronic Toll Collection,ETC)指示灯;颜色分类例如可以包括该指示灯属于红灯/黄灯/绿灯/颜色未知(对应于不亮的情况);在该指示灯是箭头灯的情况下,指向分类例如可以包括左/右/前/左前/右前。本领域技术人员应当理解,指示灯的分类种类并不限于以上所述,还可以包括其他方面或者维度的分类。Figure 2 shows an exemplary indicator light classification logic. As shown in Figure 2, the use classification may include, for example, that the indicator light is used to indicate pedestrians/used to indicate vehicles; in the case that the indicator light is used to indicate vehicles, the shape classification may include, for example, the indicator light is a full-screen light (also It can be called a circular light)/arrow light; the arrangement classification can include, for example, the indicator light belongs to a horizontal arrangement/vertical arrangement/individual indicator light; the function classification can include, for example, the indicator light belongs to a normal indicator light/warning light/electronic Electronic Toll Collection (ETC) indicator; color classification can include, for example, the indicator is red/yellow/green/unknown in color (corresponding to the case of not lighting); when the indicator is an arrow light Down, the pointing category may include, for example, left/right/front/left front/right front. Those skilled in the art should understand that the types of indicator lights are not limited to those described above, and may also include other aspects or dimensions.
为了获得指示灯的多种分类的预测结果,可以预先通过带有标注信息的道路图像(可称为样本图像)对神经网络模型进行训练(训练过程容后详述),训练后的神经网络模型可以从输入的道路图像中,识别出指示灯,并对所识别出的指示灯在多种分类上进行预测,获得多种分类的预测结果。In order to obtain the prediction results of multiple classifications of the indicator lights, the neural network model can be trained in advance through the road image with label information (which can be called sample image) (the training process will be detailed later), and the trained neural network model The indicator lights can be identified from the input road image, and the identified indicator lights can be predicted on multiple categories to obtain prediction results of multiple categories.
在一些实施例中,可以利用神经网络模型中包括的多个子网络分支,分别对所述指示灯的多种分类进行预测,获得所述指示灯的多种分类的预测结果,其中,所述多个子 网络分支的数量与所述多种分类的数量相同,每个子网络分支用于识别所述多种分类中其中一个分类的子类别。In some embodiments, multiple sub-network branches included in the neural network model may be used to respectively predict multiple categories of the indicator light, and obtain prediction results of multiple categories of the indicator light. The number of sub-network branches is the same as the number of the multiple categories, and each sub-network branch is used to identify a sub-category of one of the multiple categories.
图3A示出了本公开至少一个实施例提供的一种神经网络模型的网络结构示意图,如图3A所示,该神经网络模型包括特征提取层301、区域候选(Region Proposal Network)层302、池化层303、全连接层304。其中,全连接层304包括回归分支3041以及多个子网络分支3042。FIG. 3A shows a schematic diagram of the network structure of a neural network model provided by at least one embodiment of the present disclosure. As shown in FIG. 3A, the neural network model includes a feature extraction layer 301, a region candidate (Region Proposal Network) layer 302, and a pool. Chemical layer 303, fully connected layer 304. Among them, the fully connected layer 304 includes a regression branch 3041 and multiple sub-network branches 3042.
在一种可选的实施方式中,全连接层304还包括卷积层,该卷积层与池化层303连接。In an alternative embodiment, the fully connected layer 304 further includes a convolutional layer, and the convolutional layer is connected to the pooling layer 303.
图3B示出应用图3A中的神经网络模型进行指示灯的多种分类预测的方法的流程示意图,如图3B所示,该方法包括步骤310-340。FIG. 3B shows a schematic flowchart of a method for applying the neural network model in FIG. 3A to perform various classification predictions of indicator lights. As shown in FIG. 3B, the method includes steps 310-340.
在步骤310中,通过所述特征提取层获得所述道路图像的特征图。In step 310, the feature map of the road image is obtained through the feature extraction layer.
特征提取层301用于提取输入的道路图像的特征,其可以是卷积神经网络,例如可以采用已有的视觉几何组(Visual Geometry Group,VGG)网络、残差网络(Residual Network,ResNet)、密集连接网络(Dense Connection Network,DenseNet)等等,也可以采用其他的卷积神经网络结构。本公开对特征提取层301的具体结构不做限定,在一种可选的实施方式中,特征提取层301可以包括卷积层、激励层、池化层等网络单元,由上述网络单元按照一定方式堆叠而成。其中,卷积层可以通过多个卷积核分别提取输入的道路图像中的不同特征,得到多幅特征图,池化层位于卷积层之后,可以对特征图进行局部平均和降采样的操作,降低特征图的分辨率。随着卷积层和池化层数量的增加,特征图的数目逐渐增多,并且特征图的分辨率逐渐降低。The feature extraction layer 301 is used to extract features of the input road image, which can be a convolutional neural network, for example, an existing Visual Geometry Group (VGG) network, residual network (Residual Network, ResNet), Dense Connection Network (DenseNet), etc., can also adopt other convolutional neural network structures. The present disclosure does not limit the specific structure of the feature extraction layer 301. In an alternative embodiment, the feature extraction layer 301 may include network units such as a convolutional layer, an incentive layer, and a pooling layer. Way stacked. Among them, the convolutional layer can extract different features in the input road image through multiple convolution kernels to obtain multiple feature maps. The pooling layer is located behind the convolutional layer and can perform local averaging and down-sampling operations on the feature maps. , Reduce the resolution of the feature map. As the number of convolutional layers and pooling layers increases, the number of feature maps gradually increases, and the resolution of the feature maps gradually decreases.
在步骤320中,通过所述区域候选层对所述特征图进行处理,生成所述道路图像中指示灯的候选边界框。In step 320, the feature map is processed through the area candidate layer to generate a candidate bounding box of the indicator lamp in the road image.
区域候选层302用于预测指示灯的候选边界框,也即生成候选边界框的预测信息。区域候选层302可以是区域候选网络(RPN,Region Proposal Network),本公开对区域候选层302的具体结构不做限定。在一种可选的实施方式中,区域候选层302可以包括卷积层、分类层、回归层等网络单元,由上述网络单元按照一定方式堆叠而成。其中,卷积层利用滑动窗口(例如,3*3)对输入的特征图进行卷积,每个窗口对应多个锚点(anchor)框,每个窗口产生一个用于与分类层和回归层全连接的向量。该分类层用于判断锚点框所生成的候选边界框中的图像区域是前景还是背景,回归层用于得出候选边 界框的大致位置,基于分类层和回归层的输出结果,可以预测出包含指示灯的候选边界框,并且输出该候选边界框中的图像区域为前景、背景的概率以及该候选边界框的位置参数。The area candidate layer 302 is used to predict the candidate bounding box of the indicator light, that is, to generate prediction information of the candidate bounding box. The regional candidate layer 302 may be a regional candidate network (RPN, Region Proposal Network), and the present disclosure does not limit the specific structure of the regional candidate layer 302. In an optional implementation manner, the regional candidate layer 302 may include network units such as a convolutional layer, a classification layer, and a regression layer, which are formed by stacking the foregoing network units in a certain manner. Among them, the convolutional layer uses a sliding window (for example, 3*3) to convolve the input feature map. Each window corresponds to multiple anchor boxes, and each window generates one for the classification layer and the regression layer. Fully connected vector. The classification layer is used to determine whether the image area in the candidate bounding box generated by the anchor point box is the foreground or the background. The regression layer is used to obtain the approximate position of the candidate bounding box. Based on the output results of the classification layer and the regression layer, it can be predicted Contains the candidate bounding box of the indicator, and outputs the probability that the image area in the candidate bounding box is foreground and background, and the position parameter of the candidate bounding box.
在该步骤中,所生成的候选边界框可以被称为Region Proposal,在后续步骤中,该区域可以被称为感兴趣区域(Region of Interest,ROI)。In this step, the generated candidate bounding box may be called Region Proposal, and in subsequent steps, the region may be called Region of Interest (ROI).
在步骤330中,通过所述池化层获得所述候选边界框在特征图中对应的、设定大小的图像特征。In step 330, an image feature of a set size corresponding to the candidate bounding box in the feature map is obtained through the pooling layer.
在本步骤中,采用池化层303对每个ROI提取设定大小(固定尺寸,例如7×7)的特征图,也即将在步骤320中得到的大小不同的ROI,映射成为大小相同的区域,该过程可以被称为ROI池化(ROI Polling)。还可采用池化层303对大小相同的区域进行特征提取,以得到该ROI对应的图像特征。In this step, the pooling layer 303 is used to extract a feature map of a set size (fixed size, for example 7×7) for each ROI, that is, the ROIs of different sizes obtained in step 320 are mapped into regions of the same size This process can be called ROI Polling. The pooling layer 303 may also be used to perform feature extraction on regions of the same size to obtain the image features corresponding to the ROI.
在步骤340中,经过所述全连接层304获得所述指示灯的多种分类的预测结果。该全连接层304包括回归分支3041和多个子网络分支3042。回归分支3041和每个子网络分支3042可以分别通过1×1的卷积核进行进一步的特征提取。该1×1的卷积核对各个通道具有不同的参数,相当于全连接的功能。In step 340, multiple classification prediction results of the indicator light are obtained through the fully connected layer 304. The fully connected layer 304 includes a regression branch 3041 and multiple sub-network branches 3042. The regression branch 3041 and each sub-network branch 3042 can perform further feature extraction through a 1×1 convolution kernel respectively. The 1×1 convolution kernel has different parameters for each channel, which is equivalent to a fully connected function.
其中,回归分支3041对上述候选边界框进行回归,对候选边界框的位置进行修正,以更准确地定位指示灯的边界框。回归分支3041利用在训练过程中通过学习获得的候选边界框与真实边界框之间的转换关系,预测得到指示灯的边界框,也即预测得到指示灯边界框的位置信息。该位置信息可以表示为(x1,y1,x2,y2),其中,x1、y1为预测到的边界框左上角点的坐标,x2,y2为预测到的边界框右下角点的坐标;该位置信息还可以表示为(x,y,w,h),其中,x,y表示预测到的边界框中心点坐标,w,h分别表示预测到的边界框的宽度和高度。Among them, the regression branch 3041 regresses the aforementioned candidate bounding box, and corrects the position of the candidate bounding box, so as to more accurately locate the bounding box of the indicator light. The regression branch 3041 uses the conversion relationship between the candidate bounding box and the real bounding box obtained through learning in the training process to predict the bounding box of the indicator light, that is, predict the position information of the bounding box of the indicator light. The position information can be expressed as (x1, y1, x2, y2), where x1, y1 are the coordinates of the upper left corner of the predicted bounding box, and x2, y2 are the coordinates of the lower right corner of the predicted bounding box; the position The information can also be expressed as (x, y, w, h), where x, y represent the coordinates of the center point of the predicted bounding box, and w, h represent the width and height of the predicted bounding box, respectively.
其中,每个子网络分支3042用于识别上述的多种分类其中一个分类的子类别。Among them, each sub-network branch 3042 is used to identify a sub-category of one of the above-mentioned multiple categories.
在一个示例中,所述子网络分支可以通过以下方式获得指示灯的多种分类的预测结果:利用所述候选边界框对应的图像特征和所述多个子网络分支中的第一子网络分支,对所述指示灯的多种分类中的第一分类进行预测,得到第一分类对应的至少两个子类别的预测概率;将所述至少两个子类别中所述预测概率最高的子类别,标记为所述指示灯在所述第一分类下的子类别。In an example, the sub-network branch can obtain the prediction results of multiple classifications of the indicator light in the following manner: using the image feature corresponding to the candidate bounding box and the first sub-network branch of the multiple sub-network branches, Predict the first category in the multiple categories of the indicator light to obtain the predicted probabilities of at least two subcategories corresponding to the first category; mark the subcategory with the highest predicted probability in the at least two subcategories as The subcategory of the indicator lamp in the first category.
其中,所述第一子网络分支,可以是多个子网络分支中的任一个,所述第一分类, 可以是多种分类中的任一类。Wherein, the first sub-network branch may be any one of a plurality of sub-network branches, and the first category may be any one of multiple categories.
例如,第一子网络分支为用于进行形状分类的子网络分支,其可以获得形状分类对应的两个子类别(全屏灯和箭头灯)的预测概率,如全屏灯的预测概率为90%,箭头灯的预测概率为10%。则该子网络分支将预测概率最高的子类别,也即全屏灯标记为在形状分类下的子类别。For example, the first sub-network branch is a sub-network branch for shape classification, which can obtain the predicted probabilities of the two sub-categories (full-screen lights and arrow lights) corresponding to the shape classification. For example, the predicted probability of the full-screen lights is 90%, arrow The predicted probability of the lamp is 10%. Then the sub-network branch marks the sub-category with the highest predicted probability, that is, the full-screen light as the sub-category under the shape classification.
由于关于所述指示灯的多种分类之间是有层次的,也即是有逻辑关系的,因此需要根据指示灯的多种分类的预测结果来共同确定指示灯的展示状态。Since the various categories of the indicator lights are hierarchical, that is, there is a logical relationship, it is necessary to jointly determine the display state of the indicator lights according to the prediction results of the multiple categories of the indicator lights.
在一些实施例中,利用以下方式来确定指示灯的展示状态:In some embodiments, the following methods are used to determine the display state of the indicator light:
在所述多种分类包括所述用途分类和所述形状分类,且所述用途分类的预测结果为所述指示灯用于指示车辆,所述形状分类的预测结果表示所述指示灯为圆形灯的情况下,将所述排列分类、所述功能分类和所述颜色分类分别对应的预测结果进行组合,得到所述指示灯的第一展示状态;The multiple classifications include the usage classification and the shape classification, and the prediction result of the usage classification is that the indicator lamp is used to indicate a vehicle, and the prediction result of the shape classification indicates that the indicator lamp is circular In the case of a lamp, combining prediction results corresponding to the arrangement classification, the function classification, and the color classification to obtain the first display state of the indicator;
在所述多种分类包括所述用途分类和所述形状分类,且所述用途分类的预测结果为所述指示灯用于指示车辆,所述形状分类的预测结果表示所述指示灯为箭头灯的情况下,将所述颜色分类和所述指向分类分别对应的预测结果进行组合,得到所述指示灯的第二展示状态;The multiple classifications include the usage classification and the shape classification, and the prediction result of the usage classification is that the indicator lamp is used to indicate a vehicle, and the prediction result of the shape classification indicates that the indicator lamp is an arrow lamp In the case of combining the prediction results corresponding to the color classification and the pointing classification to obtain the second display state of the indicator;
在所述多种分类包括所述用途分类,且所述用途分类的预测结果为所述指示灯用于指示行人的情况下,得到所述指示灯的第三展示状态。In the case where the multiple classifications include the use classification, and the prediction result of the use classification is that the indicator light is used to indicate pedestrians, the third display state of the indicator light is obtained.
图4示出了指示灯检测的示例性输出结果,如图4所示,该检测结果中包含了预测得到的指示灯的边界框,以及该指示灯的多种分类的预测结果,还包括了该预测得到的边界框的置信度评分。该置信度评分综合反映了该预测得到的边界框内存在指示灯的可能性,以及预测得到的边界框位置的准确性。Figure 4 shows an exemplary output result of the indicator light detection. As shown in Figure 4, the detection result includes the predicted bounding box of the indicator light, and the predicted results of multiple classifications of the indicator light, and also includes The confidence score of the bounding box obtained by this prediction. The confidence score comprehensively reflects the possibility of an indicator light in the predicted bounding box and the accuracy of the predicted bounding box position.
如图4所示,在该道路图像中(为了清晰显示输出的预测结果,仅显示了一部分的道路图像),输出三个预测得到的指示灯的边界框。其中,黑色长方形边界框中指示灯的分类预测结果是“红色水平”(red horizon),表示该指示灯是水平排列、红色的普通指示灯,该预测得到的边界框的置信度评分为1.0。由于普通指示灯的分类预测结果被设置为不显示(隐藏),因此该指示灯的展示状态对应于第一展示状态。As shown in FIG. 4, in the road image (in order to clearly display the output prediction result, only a part of the road image is displayed), the bounding boxes of the three predicted indicators are output. Among them, the classification prediction result of the indicator in the black rectangular bounding box is "red horizon", which means that the indicator is a horizontally arranged, red ordinary indicator, and the confidence score of the predicted bounding box is 1.0. Since the classification prediction result of the ordinary indicator light is set to not be displayed (hidden), the display state of the indicator light corresponds to the first display state.
黑色正方形边界框中指示灯的分类预测结果是“颜色未知单独”,也即该指示灯是单独的、不亮的指示灯,由于这两个分类预测结果被设置为不显示,所以在图像上未示 出,其也对应于第一展示状态。该预测得到的边界框的置信度评分为0.98。The classification prediction result of the indicator in the black square bounding box is "unknown color alone", that is, the indicator is a separate, unlit indicator. Since the two classification prediction results are set to not be displayed, they are displayed on the image Not shown, it also corresponds to the first display state. The confidence score of the bounding box obtained by this prediction is 0.98.
白色正方形中指示灯的分类预测结果是“绿色箭头左”(green arrow left),表示该指示灯是单独的箭头形状的指示灯,颜色为绿色,指向左,该预测得到的边界框的置信度评分为0.99。该指示灯的展示状态对应于第二展示状态。The classification prediction result of the indicator in the white square is "green arrow left", which means that the indicator is a separate arrow-shaped indicator, the color is green and points to the left, and the confidence of the bounding box obtained by this prediction The score is 0.99. The display state of the indicator light corresponds to the second display state.
确定指示灯的展示状态,还包括对指示灯是常亮或者闪烁的状态进行判断,以更好地指导智能设备自动行驶的决策,以使智能设备能够遵守交通规则,实现安全行驶。Determining the display status of the indicator light also includes judging whether the indicator light is always on or flashing, so as to better guide the smart device's decision-making for automatic driving, so that the smart device can comply with traffic rules and realize safe driving.
在一些实施例中,获得设定时间内所采集的多张道路图像中同一位置的所述指示灯以及所述指示灯的多种分类的预测结果;根据所述多张道路图像中同一位置的所述指示灯的多种分类的预测结果,判断所述指示灯的展示状态。In some embodiments, the indicator light at the same position in the multiple road images collected within a set time and the prediction results of multiple classifications of the indicator light are obtained; according to the prediction results of the same position in the multiple road images The prediction results of the multiple classifications of the indicator light determine the display state of the indicator light.
在一个可选的实施方式中,可以通过采集连续帧道路图像,来获得所述多张道路图像中同一位置的所述指示灯。所述连续帧图像,可以是连续拍摄的多帧图像,也可以是从连续拍摄的多帧图像中每间隔几帧选择一个目标帧,将连续选择的多个目标帧视为连续帧。In an optional implementation manner, the indicator lights at the same position in the multiple road images may be obtained by collecting consecutive frames of road images. The continuous frame image may be a continuously captured multi-frame image, or may be a target frame selected every few frames from the continuously captured multi-frame image, and the continuously selected multiple target frames are regarded as continuous frames.
图5示出了一种判断所检测到的指示灯是否为同一位置的指示灯的方法的流程示意图,如图5所示,该方法包括:Fig. 5 shows a schematic flowchart of a method for judging whether the detected indicator light is an indicator light at the same position. As shown in Fig. 5, the method includes:
在步骤510中,获得所述指示灯在所述连续帧道路图像的第一帧图像中的位置。In step 510, the position of the indicator light in the first frame of the continuous frame of road images is obtained.
也即,获得在设定时间内,起始帧中预测得到的指示灯的位置。That is, the predicted position of the indicator lamp in the initial frame within the set time is obtained.
在通过上述指示灯检测方法,检测出道路图像中的指示灯后,可以通过神经网络模型获得指示灯在图像中的位置,也即获得预测得到的指示灯边界框的位置参数;也可以通过图像处理的方式,获得所检测到的指示灯在图像中的位置。After the indicator light in the road image is detected by the above indicator light detection method, the position of the indicator light in the image can be obtained through the neural network model, that is, the position parameters of the predicted indicator light bounding box can be obtained; The processing method is to obtain the position of the detected indicator in the image.
在步骤520中,根据所述指示灯在所述第一帧图像中的位置、拍摄所述道路图像的设备的运动速度和拍摄频率,计算所述指示灯在所述连续帧道路图像中除所述第一帧图像之外的其它各帧图像中的第一位置。In step 520, according to the position of the indicator light in the first frame of image, the movement speed and the shooting frequency of the device that took the road image, the indicator light is calculated to be divided by the continuous frame of the road image. The first position in each frame of images other than the first frame of image.
拍摄所述道路图像的设备即为图像采集装置(例如摄像头等),该设备的运动速度与自动行驶的智能设备的运动速度相同,拍摄频率可以是预先设定的,或者可以通过读取设备的配置来获取。在已知起始帧中,指示灯在图像中的位置的情况下,根据该设备的运动速度、拍摄的频率,可以计算得到在后续的每一帧(其他帧,也即连续帧图像中除所述第一帧以外的图像)中,该指示灯理论上在图像中的位置。将该位置称为第一位 置,以与后续步骤中的位置进行区分。The device that takes the road image is the image acquisition device (such as a camera, etc.). The movement speed of the device is the same as the movement speed of an autonomous smart device. The shooting frequency can be preset or can be read by the device. Configure to get. In the case where the position of the indicator light in the image is known in the initial frame, according to the movement speed of the device and the frequency of shooting, it can be calculated to obtain the difference in each subsequent frame (other frames, that is, the continuous frame image) In an image other than the first frame), the theoretical position of the indicator light in the image. This position is called the first position to distinguish it from the position in the subsequent steps.
在步骤530中,获得所述指示灯在所述连续帧图像中所述其他各帧图像中的第二位置。In step 530, the second position of the indicator light in the other frames of the image in the continuous frame is obtained.
对于后续的每一帧,可以通过神经网络模型预测得到所检测出的指示灯在图像中的位置,或者通过图像处理的方式得到所检测出的指示灯在图像中的位置,将该位置称为第二位置。For each subsequent frame, the position of the detected indicator in the image can be predicted by the neural network model, or the position of the detected indicator in the image can be obtained through image processing, which is called The second position.
在步骤540中,针对所述其他帧图像中的每一帧图像,在所述第二位置与第一位置的差异小于设定值的情况下,确定所述连续帧道路图像中检测到的指示灯为同一位置的指示灯。In step 540, for each frame of the other frame images, in the case where the difference between the second position and the first position is less than a set value, determine the indication detected in the continuous frame of road image The light is the indicator light at the same position.
对于同一位置的指示灯,在步骤530中所检测出的指示灯在图像中的第二位置,与在步骤520中计算得到的第一位置,应该是接近的。因此,针对后续的每一帧,在第二位置与第一位置的差异小于设定值的情况下,可以确定所述连续帧道路图像中所检测到的指示灯为同一位置的指示灯;反之,则判断其不是同一位置的指示灯。在所检测的指示灯并非同一位置的指示灯的情况下,则无需进行后续的指示灯状态判断步骤。本领域技术人员应当了解,上述设定值可以依据所需的检测准确度进行设置。For the indicator lights in the same position, the second position of the indicator in the image detected in step 530 should be close to the first position calculated in step 520. Therefore, for each subsequent frame, when the difference between the second position and the first position is less than the set value, it can be determined that the detected indicator lights in the consecutive frames of road images are the indicator lights at the same position; , It is judged that it is not the indicator light at the same position. In the case that the detected indicator light is not the indicator light of the same position, there is no need to perform the subsequent step of determining the status of the indicator light. Those skilled in the art should understand that the above set value can be set according to the required detection accuracy.
在获得了多张道路图像中同一位置的所述指示灯后,可以通过比较多张道路图像中,同一位置的指示灯的多种分类预测结果是保持不变的还是发生了变化的,来判断所述指示灯处于常亮状态还是闪烁状态。After obtaining the indicator light at the same position in multiple road images, it can be judged by comparing whether the multiple classification prediction results of the indicator light at the same position in the multiple road images remain unchanged or have changed. Whether the indicator light is always on or flashing.
在一个可选的实施方式中,在所述多张道路图像中同一位置的指示灯的颜色分类预测结果相同的情况下,判断所述指示灯的展示状态为常亮;In an optional implementation manner, when the color classification prediction results of the indicator lights at the same position in the multiple road images are the same, it is determined that the display state of the indicator lights is always on;
在所述多张图像中同一位置的指示灯的颜色分类预测结果间隔变化的情况下,判断所述指示灯的展示状态为闪烁。In the case where the color classification prediction result interval of the indicator lamps at the same position in the multiple images changes, it is determined that the display state of the indicator lamps is blinking.
例如,如果在上述多张道路图像中,同一位置的指示灯的颜色分类预测结果相同,则说明在设定时间(例如3秒)内,该指示灯的颜色没有发生变化,因此可以判断出该指示灯处于常亮状态。需要注意的是,此处预测结果相同的颜色分类不包括颜色未知。For example, if in the above multiple road images, the color classification prediction results of the indicator lamps at the same position are the same, it means that the color of the indicator lamp has not changed within the set time (for example, 3 seconds), so it can be determined The indicator light is always on. It should be noted that the color classification with the same prediction result here does not include the unknown color.
如果在上述多张道路图像中,同一位置的指示灯的颜色分类预测结果间隔变化,例如,在一段时间内颜色分类的预测结果为绿色,一段时间内颜色分类的预测结果为颜色未知(或者无法检测出此处有灯),并且两种情况交替出现,则说明在设定时间内,该指示灯的颜色发生了交替的变化,因此可以判断出该指示灯处于闪烁状态。If in the above multiple road images, the color classification prediction results of the indicator lights in the same position change at intervals, for example, the prediction result of color classification is green for a period of time, and the prediction result of color classification for a period of time is unknown (or impossible). It is detected that there is a light here), and the two situations alternately appear, it means that the color of the indicator light has alternately changed within the set time, so it can be judged that the indicator light is flashing.
在如下的描述中,将说明如何训练神经网络模型。图6为本公开实施例神经网络模型的训练方法的一个流程示意图。如图6所示,该实施例方法包括:In the following description, how to train the neural network model will be explained. FIG. 6 is a schematic flowchart of a training method of a neural network model according to an embodiment of the disclosure. As shown in Figure 6, the method in this embodiment includes:
在步骤610中,将包含指示灯的样本图像输入所述神经网络模型,得到指示灯的多种分类预测结果和边界框预测结果。In step 610, the sample image containing the indicator light is input to the neural network model to obtain multiple classification prediction results and bounding box prediction results of the indicator light.
在进行训练之前,首先对神经网络模型进行初始化,确定初始化的网络参数。Before training, first initialize the neural network model and determine the initial network parameters.
输入神经网络模型的样本图像可以是包含指示灯的道路图像,并且在该样本图像上,预先标注了指示灯的标注信息,该标注信息包含指示灯的真实边界框信息,例如,该边界框的左上顶点坐标和左下顶点坐标;该标注信息还包括指示灯的多种分类信息。The sample image input to the neural network model may be a road image containing indicator lights, and the sample image is pre-marked with the indicator information, and the label information contains the true bounding box information of the indicator, for example, the bounding box The coordinates of the upper left vertex and the lower left vertex; the label information also includes various classification information of the indicator light.
将所述样本图像输入至经初始化的神经网络模型,可以预测得到所述样本图像中指示灯的多种分类预测结果,以及边界框预测结果。Inputting the sample image to the initialized neural network model can predict multiple classification prediction results of the indicator lights in the sample image and the bounding box prediction results.
在步骤620中,根据所述多种分类预测结果和所述边界框预测结果,以及所述多种分类信息和所述真实边界框信息,计算损失函数的损失值。In step 620, the loss value of the loss function is calculated according to the multiple classification prediction results and the bounding box prediction result, as well as the multiple classification information and the real bounding box information.
该损失函数的损失值,表示了预测得到的多种分类结果和预测得到的边界框,与预先标注的多种分类信息和真实边界框信息之间的差异。The loss value of the loss function represents the difference between the predicted multiple classification results and the predicted bounding box, and the pre-labeled multiple classification information and the true bounding box information.
在步骤630中,根据所述损失值对所述神经网络模型的网络参数进行调整。In step 630, the network parameters of the neural network model are adjusted according to the loss value.
在一种可选的实施方式中,将基于该损失函数确定的损失值反向回传该神经网络模型,以调整网络参数,例如调整各层的卷积核的取值、各层的权重参数等等。In an optional implementation, the loss value determined based on the loss function is passed back to the neural network model to adjust network parameters, such as adjusting the value of the convolution kernel of each layer and the weight parameter of each layer and many more.
在训练神经网络模型时,可以将训练样本分成多个图像子集(batch),每次迭代训练向神经网络模型依次输入一个图像子集,结合该图像子集包括的训练样本中各个样本预测结果的损失值进行网络参数的调整。本次迭代训练完成后,向神经网络模型输入下一个图像子集,以进行下一次迭代训练。不同图像子集包括的训练样本至少部分不同。当达到预定结束条件时,则可以完成神经网络模型的训练。所述预定训练结束条件,例如可以是损失值降低到了一定阈值,或者达到了预定的神经网络模型迭代次数。When training the neural network model, the training sample can be divided into multiple image subsets (batch), each iteration of training to input an image subset to the neural network model in turn, combined with the prediction results of each sample in the training samples included in the image subset Adjust the network parameters for the loss value. After this iteration training is completed, input the next image subset to the neural network model for the next iteration training. The training samples included in different image subsets are at least partially different. When the predetermined ending condition is reached, the training of the neural network model can be completed. The predetermined training end condition, for example, may be that the loss value is reduced to a certain threshold, or the predetermined number of iterations of the neural network model is reached.
本实施的神经网络模型训练方法,利用预先标注了指示灯的分类信息和真实边界框的样本图像对神经网络模型进行训练,使该训练好的神经网络模型能够检测出输入图像中的指示灯,并且对所述指示灯的多种分类进行预测。The neural network model training method of this implementation uses pre-marked classification information of indicator lights and sample images of real bounding boxes to train the neural network model, so that the trained neural network model can detect the indicator lights in the input image. And predict the various classifications of the indicator lights.
进行训练的神经网络模型即是上述指示灯检测方法实施例中所采用的神经网络模型,其结构例如图3A所示,区别仅在于所输入的图像为包含标注信息的样本图像。对于图 3A所示的神经网络模型,基于样本图像得到指示灯的预测结果可以包括:通过所述特征提取层获得所述样本图像的特征图;通过所述区域候选层对所述特征图进行处理,生成所述样本图像中指示灯的候选边界框;通过所述池化层获得所述候选边界框在特征图中对应的、设定大小的图像特征;通过所述全连接层获得所述指示灯的多种分类的预测结果和边界框的预测结果。The neural network model to be trained is the neural network model used in the above embodiment of the indicator light detection method. Its structure is as shown in FIG. 3A. The only difference is that the input image is a sample image containing annotation information. For the neural network model shown in FIG. 3A, obtaining the prediction result of the indicator light based on the sample image may include: obtaining a feature map of the sample image through the feature extraction layer; processing the feature map through the region candidate layer , Generate the candidate bounding box of the indicator in the sample image; obtain the image feature of the set size corresponding to the candidate bounding box in the feature map through the pooling layer; obtain the indication through the fully connected layer The prediction results of multiple classifications of lights and the prediction results of bounding boxes.
在训练过程中的指示灯预测过程,与上述指示灯检测方法中指示灯的预测过程相似,详细过程可以参考指示灯检测方法实施例中的描述。The indicator light prediction process in the training process is similar to the indicator light prediction process in the indicator light detection method described above, and the detailed process can refer to the description in the indicator light detection method embodiment.
图7提供了一种指示灯检测装置,如图7所示,该装置可以包括:识别单元701、预测单元702和确定单元703。FIG. 7 provides an indicator light detection device. As shown in FIG. 7, the device may include: an identification unit 701, a prediction unit 702, and a determination unit 703.
其中,识别单元701,用于对采集的道路图像进行识别,获得所述道路图像中指示灯的候选边界框;预测单元702,用于根据所述道路图像中所述候选边界框对应的图像区域,对指示灯的多种分类进行预测,获得所述指示灯的多种分类的预测结果,其中,所述多种分类包括以下至少两种:用途分类、形状分类、排列分类、功能分类、颜色分类、指向分类;确定单元703,用于根据所述指示灯的多种分类的预测结果,确定所述指示灯的展示状态。Wherein, the recognition unit 701 is used to recognize the collected road image to obtain the candidate bounding box of the indicator in the road image; the prediction unit 702 is used to identify the image area corresponding to the candidate bounding box in the road image , Predict multiple categories of indicator lights, and obtain prediction results of multiple categories of the indicator lights, where the multiple categories include at least two of the following: use category, shape category, arrangement category, function category, color Classification and direction classification; the determining unit 703 is configured to determine the display state of the indicator light according to the prediction results of the multiple classifications of the indicator light.
在另一个实施例中,预测单元702用于:利用神经网络模型,对所述候选边界框对应的图像区域进行特征提取,得到所述候选边界框对应的图像特征;利用所述候选边界框对应的图像特征和所述神经网络模型中包括的多个子网络分支,分别对所述指示灯的多种分类进行预测,获得所述指示灯的多种分类的预测结果;其中,所述多个子网络分支的数量与所述多种分类的数量相同,每个子网络分支用于识别所述多种分类中其中一种分类的子类别。In another embodiment, the prediction unit 702 is configured to: use a neural network model to perform feature extraction on the image region corresponding to the candidate bounding box to obtain the image feature corresponding to the candidate bounding box; and use the candidate bounding box to correspond to The image features of and the multiple sub-network branches included in the neural network model respectively predict multiple categories of the indicator light to obtain prediction results of the multiple categories of the indicator light; wherein, the multiple sub-networks The number of branches is the same as the number of the multiple categories, and each sub-network branch is used to identify a subcategory of one of the multiple categories.
在另一个实施例中,预测单元702用于:利用所述候选边界框对应的图像特征和所述多个子网络分支中的第一子网络分支,对所述指示灯的多种分类中的第一分类进行预测,得到第一分类对应的至少两个子类别的预测概率;将所述至少两个子类别中所述预测概率最高的子类别,标记为所述指示灯在所述第一分类下的子类别。In another embodiment, the prediction unit 702 is configured to: use the image feature corresponding to the candidate bounding box and the first sub-network branch of the plurality of sub-network branches to classify the first sub-network branch of the multiple classifications of the indicator light. One category is predicted to obtain the predicted probabilities of at least two subcategories corresponding to the first category; the subcategory with the highest predicted probability in the at least two subcategories is marked as the indicator of the indicator in the first category Subcategory.
在另一个实施例中,确定单元703用于:在所述多种分类包括所述用途分类和所述形状分类,且所述用途分类的预测结果为所述指示灯用于指示车辆,所述形状分类的预测结果表示所述指示灯为圆形灯的情况下,将所述排列分类、所述功能分类和所述颜色分类分别对应的预测结果进行组合,得到所述指示灯的第一展示状态;或者,在所 述多种分类包括所述用途分类和所述形状分类,且所述用途分类的预测结果为所述指示灯用于指示车辆,所述形状分类的预测结果表示所述指示灯为箭头灯的情况下,将所述颜色分类和所述指向分类分别对应的预测结果进行组合,得到所述指示灯的第二展示状态;或者,在所述多种分类包括所述用途分类,且所述用途分类的预测结果为所述指示灯用于指示行人的情况下,得到所述指示灯的第三展示状态。In another embodiment, the determining unit 703 is configured to: in the multiple classifications, include the usage classification and the shape classification, and the prediction result of the usage classification is that the indicator light is used to indicate the vehicle, and the The prediction result of the shape classification indicates that when the indicator light is a circular light, the prediction results corresponding to the arrangement classification, the function classification, and the color classification are combined to obtain the first display of the indicator light State; or, in the multiple classifications including the usage classification and the shape classification, and the prediction result of the usage classification is that the indicator lamp is used to indicate the vehicle, and the prediction result of the shape classification indicates the indication When the light is an arrow light, the prediction results corresponding to the color classification and the pointing classification are combined to obtain the second display state of the indicator; or, the use classification is included in the multiple classifications , And when the prediction result of the usage classification is that the indicator light is used to indicate pedestrians, the third display state of the indicator light is obtained.
在另一个实施例中,确定单元703用于:获得设定时间内所采集的多张道路图像中同一位置的所述指示灯以及所述指示灯的多种分类的预测结果;根据所述多张道路图像中同一位置的所述指示灯的多种分类的预测结果,判断所述指示灯的展示状态。In another embodiment, the determining unit 703 is configured to: obtain the indicator light at the same position in the multiple road images collected within a set time and the prediction results of multiple classifications of the indicator light; The prediction results of multiple classifications of the indicator lamps at the same position in a road image are used to determine the display state of the indicator lamps.
在另一个实施例中,所述多张道路图像为连续帧道路图像;确定单元703用于:获得所述指示灯在所述连续帧道路图像的第一帧图像中的位置;根据所述指示灯在所述第一帧图像中的位置、拍摄所述道路图像的设备的运动速度和拍摄频率,计算所述指示灯在所述连续帧道路图像中除所述第一帧图像之外的其它各帧图像中的第一位置;获得所述指示灯在所述连续帧图像中所述其他各帧图像中的第二位置;针对所述其他帧图像中的每一帧图像,在所述第二位置与第一位置的差异小于设定值的情况下,确定所述连续帧道路图像中检测到的指示灯为同一位置的指示灯。In another embodiment, the multiple road images are continuous frame road images; the determining unit 703 is configured to: obtain the position of the indicator light in the first frame image of the continuous frame road image; The position of the lamp in the first frame of image, the movement speed and the shooting frequency of the device that took the road image, and calculate the indicators in the continuous frame of road images other than the first frame of image The first position in each frame of image; obtain the second position of the indicator light in the other frames of the continuous frame of image; for each frame of the other frame of image, in the first In the case that the difference between the second position and the first position is less than the set value, it is determined that the indicator lights detected in the consecutive frames of road images are the indicator lights at the same position.
在另一个实施例中,所述指示灯的展示状态包括:常亮或闪烁;确定单元703用于:在所述多张道路图像中同一位置的指示灯的颜色分类预测结果相同的情况下,判断所述指示灯的展示状态为常亮;在所述多张图像中同一位置的指示灯的颜色分类预测结果间隔变化的情况下,判断所述指示灯的展示状态为闪烁。In another embodiment, the display state of the indicator light includes: always on or flashing; the determining unit 703 is configured to: in the case where the color classification prediction results of the indicator lights at the same position in the multiple road images are the same, It is determined that the display state of the indicator light is always on; when the color classification prediction result interval of the indicator light at the same position in the multiple images changes, it is determined that the display state of the indicator light is blinking.
图8为本公开至少一个实施例提供的指示灯检测设备,所述设备包括存储器、处理器,所述存储器用于存储可在处理器上运行的计算机指令,所述处理器用于在执行所述计算机指令时实现本说明书任一实施例所述的指示灯检测方法。Fig. 8 is an indicator light detection device provided by at least one embodiment of the present disclosure. The device includes a memory and a processor. The memory is used to store computer instructions that can run on the processor. The processor is used to execute the The indicator light detection method described in any embodiment of this specification is implemented when the computer is instructed.
本说明书至少一个实施例还提供了一种计算机可读存储介质,其上存储有计算机程序,所述程序被处理器执行时实现本说明书任一实施例所述的指示灯检测方法。At least one embodiment of this specification also provides a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, the indicator light detection method described in any embodiment of this specification is implemented.
本公开实施例提供了一种计算机程序,包括计算机可读代码,所述计算机可读代码被计算机执行时实现本公开任一实施例所述的指示灯检测方法。The embodiment of the present disclosure provides a computer program, including computer readable code, which, when executed by a computer, implements the indicator light detection method described in any embodiment of the present disclosure.
上文对各个实施例的描述倾向于强调各个实施例之间的不同之处,其相同或相似之处可以互相参考,为了简洁,本文不再赘述。The foregoing description of the various embodiments tends to emphasize the differences between the various embodiments, and the same or similarities can be referred to each other, and for the sake of brevity, details are not repeated herein.
本领域技术人员可以理解,在具体实施方式的上述方法中,各步骤的撰写顺序 并不意味着严格的执行顺序而对实施过程构成任何限定,各步骤的具体执行顺序应当以其功能和可能的内在逻辑确定。Those skilled in the art can understand that in the above methods of the specific implementation, the writing order of the steps does not mean a strict execution order but constitutes any limitation on the implementation process. The specific execution order of each step should be based on its function and possibility. The inner logic is determined.
在一些实施例中,本公开实施例提供的装置具有的功能或包含的模块可以用于执行上文方法实施例描述的方法,其具体实现可以参照上文方法实施例的描述,为了简洁,这里不再赘述。In some embodiments, the functions or modules contained in the device provided in the embodiments of the present disclosure can be used to execute the methods described in the above method embodiments. For specific implementation, refer to the description of the above method embodiments. For brevity, here No longer.
在本公开实施例中,计算机可读存储介质可以是多种形式,比如,在不同的例子中,所述机器可读存储介质可以是:RAM(Radom Access Memory,随机存取存储器)、易失存储器、非易失性存储器、闪存、存储驱动器(如硬盘驱动器)、固态硬盘、任何类型的存储盘(如光盘、dvd等),或者类似的存储介质,或者它们的组合。特殊的,所述的计算机可读介质还可以是纸张或者其他合适的能够打印程序的介质。使用这些介质,这些程序可以被通过电学的方式获取到(例如,光学扫描)、可以被以合适的方式编译、解释和处理,然后可以被存储到计算机介质中。In the embodiments of the present disclosure, the computer-readable storage medium may be in various forms. For example, in different examples, the machine-readable storage medium may be: RAM (Radom Access Memory, random access memory), volatile Memory, non-volatile memory, flash memory, storage drives (such as hard drives), solid state drives, any type of storage disks (such as optical discs, DVDs, etc.), or similar storage media, or a combination thereof. In particular, the computer-readable medium may also be paper or other suitable medium capable of printing programs. Using these media, these programs can be obtained by electrical means (for example, optical scanning), can be compiled, interpreted, and processed in a suitable manner, and then can be stored in a computer medium.
以上所述仅为本公开的部分实施例而已,并不用以限制本公开,凡在本公开的精神和原则之内,所做的任何修改、等同替换、改进等,均应包含在本公开保护的范围之内。The above are only part of the embodiments of the present disclosure, and are not intended to limit the present disclosure. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present disclosure shall be included in the protection of the present disclosure. Within the range.

Claims (17)

  1. 一种指示灯检测方法,包括:An indicator light detection method, including:
    对采集的道路图像进行识别,获得所述道路图像中指示灯的候选边界框;Recognizing the collected road image to obtain the candidate bounding box of the indicator in the road image;
    根据所述道路图像中所述候选边界框对应的图像区域,对指示灯的多种分类进行预测,获得所述指示灯的多种分类的预测结果,其中,所述多种分类包括以下至少两种:用途分类、形状分类、排列分类、功能分类、颜色分类、指向分类;According to the image area corresponding to the candidate bounding box in the road image, the multiple classifications of the indicator are predicted, and the prediction results of the multiple classifications of the indicator are obtained, wherein the multiple classifications include at least two of the following Species: use classification, shape classification, arrangement classification, function classification, color classification, pointing classification;
    根据所述指示灯的多种分类的预测结果,确定所述指示灯的展示状态。The display state of the indicator light is determined according to the prediction results of the multiple classifications of the indicator light.
  2. 根据权利要求1所述的方法,其特征在于,根据所述道路图像中所述候选边界框对应的图像区域,对指示灯的多种分类分别进行预测,获得所述指示灯的多种分类的预测结果,包括:The method according to claim 1, characterized in that, according to the image area corresponding to the candidate bounding box in the road image, the multiple classifications of the indicator are respectively predicted to obtain the multiple classifications of the indicator Forecast results, including:
    利用神经网络模型,对所述候选边界框对应的图像区域进行特征提取,得到所述候选边界框对应的图像特征;Using a neural network model to perform feature extraction on the image region corresponding to the candidate bounding box to obtain the image feature corresponding to the candidate bounding box;
    利用所述候选边界框对应的图像特征和所述神经网络模型中包括的多个子网络分支,分别对所述指示灯的多种分类进行预测,获得所述指示灯的多种分类的预测结果;Using the image features corresponding to the candidate bounding box and the multiple sub-network branches included in the neural network model to respectively predict multiple categories of the indicator light, and obtain prediction results of the multiple categories of the indicator light;
    其中,所述多个子网络分支的数量与所述多种分类的数量相同,每个子网络分支用于识别所述多种分类中其中一种分类的子类别。Wherein, the number of the multiple sub-network branches is the same as the number of the multiple categories, and each sub-network branch is used to identify a subcategory of one of the multiple categories.
  3. 根据权利要求2所述的方法,其特征在于,利用所述候选边界框对应的图像特征和所述神经网络模型中包括的多个子网络分支,分别对所述指示灯的多种分类进行预测,获得所述指示灯的多种分类的预测结果,包括:The method according to claim 2, wherein the image features corresponding to the candidate bounding box and the multiple sub-network branches included in the neural network model are used to respectively predict multiple categories of the indicator light, Obtain the prediction results of multiple classifications of the indicator, including:
    利用所述候选边界框对应的图像特征和所述多个子网络分支中的第一子网络分支,对所述指示灯的多种分类中的第一分类进行预测,得到第一分类对应的至少两个子类别的预测概率;Using the image features corresponding to the candidate bounding box and the first sub-network branch of the plurality of sub-network branches, the first classification of the multiple classifications of the indicator light is predicted, and at least two corresponding to the first classification are obtained. The predicted probability of each subcategory;
    将所述至少两个子类别中所述预测概率最高的子类别,标记为所述指示灯在所述第一分类下的子类别。Mark the subcategory with the highest predicted probability in the at least two subcategories as the subcategory of the indicator lamp in the first category.
  4. 根据权利要求1-3中任一项所述的方法,其特征在于,根据所述指示灯的多种分类的预测结果,确定所述指示灯的展示状态,包括:The method according to any one of claims 1 to 3, wherein determining the display state of the indicator light according to the prediction results of multiple classifications of the indicator light comprises:
    在所述多种分类包括所述用途分类和所述形状分类,且所述用途分类的预测结果为所述指示灯用于指示车辆,所述形状分类的预测结果表示所述指示灯为圆形灯的情况下, 将所述排列分类、所述功能分类和所述颜色分类分别对应的预测结果进行组合,得到所述指示灯的第一展示状态;或者,The multiple classifications include the usage classification and the shape classification, and the prediction result of the usage classification is that the indicator lamp is used to indicate a vehicle, and the prediction result of the shape classification indicates that the indicator lamp is circular In the case of a light, the prediction results corresponding to the arrangement classification, the function classification, and the color classification are combined to obtain the first display state of the indicator light; or,
    在所述多种分类包括所述用途分类和所述形状分类,且所述用途分类的预测结果为所述指示灯用于指示车辆,所述形状分类的预测结果表示所述指示灯为箭头灯的情况下,将所述颜色分类和所述指向分类分别对应的预测结果进行组合,得到所述指示灯的第二展示状态;或者,The multiple classifications include the usage classification and the shape classification, and the prediction result of the usage classification is that the indicator lamp is used to indicate a vehicle, and the prediction result of the shape classification indicates that the indicator lamp is an arrow lamp In the case of combining the prediction results corresponding to the color classification and the pointing classification respectively to obtain the second display state of the indicator; or,
    在所述多种分类包括所述用途分类,且所述用途分类的预测结果为所述指示灯用于指示行人的情况下,得到所述指示灯的第三展示状态。In the case where the multiple classifications include the use classification, and the prediction result of the use classification is that the indicator light is used to indicate pedestrians, the third display state of the indicator light is obtained.
  5. 根据权利要求1-4中任一项所述的方法,其特征在于,根据所述指示灯的多种分类的预测结果,确定所述指示灯的展示状态,包括:The method according to any one of claims 1 to 4, wherein determining the display state of the indicator light according to the prediction results of multiple classifications of the indicator light comprises:
    获得设定时间内所采集的多张道路图像中同一位置的所述指示灯以及所述指示灯的多种分类的预测结果;Obtaining the indicator light at the same position in the multiple road images collected within a set time and the prediction results of multiple classifications of the indicator light;
    根据所述多张道路图像中同一位置的所述指示灯的多种分类的预测结果,判断所述指示灯的展示状态。The display state of the indicator light is determined according to the prediction results of multiple classifications of the indicator light at the same position in the multiple road images.
  6. 根据权利要求5所述的方法,其特征在于,所述多张道路图像为连续帧道路图像;The method according to claim 5, wherein the multiple road images are consecutive frames of road images;
    获得设定时间内所采集的多张道路图像中同一位置的所述指示灯,包括:Obtaining the indicator lights at the same position in multiple road images collected within a set time includes:
    获得所述指示灯在所述连续帧道路图像的第一帧图像中的位置;Obtaining the position of the indicator light in the first frame of the continuous frame of road images;
    根据所述指示灯在所述第一帧图像中的位置、拍摄所述道路图像的设备的运动速度和拍摄频率,计算所述指示灯在所述连续帧道路图像中除所述第一帧图像之外的其它各帧图像中的第一位置;According to the position of the indicator light in the first frame of image, the movement speed of the device that took the road image, and the shooting frequency, calculate the indicator light to divide the first frame of image from the continuous frame of road image The first position in each frame image except for;
    获得所述指示灯在所述连续帧图像中其他各帧图像中的第二位置;Obtaining the second position of the indicator light in the other frames of the continuous frame image;
    针对所述其他帧图像中的每一帧图像,在所述第二位置与第一位置的差异小于设定值的情况下,确定所述连续帧道路图像中检测到的指示灯为同一位置的指示灯。For each of the other frame images, in the case where the difference between the second position and the first position is less than a set value, it is determined that the indicator lights detected in the consecutive frames of road images are at the same position Indicator light.
  7. 根据权利要求5或6所述的方法,其特征在于,所述指示灯的展示状态包括:常亮或闪烁;The method according to claim 5 or 6, wherein the display state of the indicator light comprises: always on or flashing;
    根据所述多张道路图像中同一位置的所述指示灯的多种分类的预测结果,判断所述指示灯的展示状态,包括:According to the prediction results of multiple classifications of the indicator lights at the same position in the multiple road images, determining the display state of the indicator lights includes:
    在所述多张道路图像中同一位置的指示灯的颜色分类预测结果相同的情况下,判断所述指示灯的展示状态为常亮;In the case where the color classification prediction results of the indicator lights at the same position in the multiple road images are the same, determining that the display state of the indicator lights is always on;
    在所述多张图像中同一位置的指示灯的颜色分类预测结果间隔变化的情况下,判断所述指示灯的展示状态为闪烁。In the case where the color classification prediction result interval of the indicator lamps at the same position in the multiple images changes, it is determined that the display state of the indicator lamps is blinking.
  8. 一种指示灯检测装置,包括:An indicator light detection device, including:
    识别单元,用于对采集的道路图像进行识别,获得所述道路图像中指示灯的候选边界框;A recognition unit, configured to recognize the collected road image and obtain the candidate bounding box of the indicator lamp in the road image;
    预测单元,用于根据所述道路图像中所述候选边界框对应的图像区域,对指示灯的多种分类进行预测,获得所述指示灯的多种分类的预测结果,其中,所述多种分类包括以下至少两种:用途分类、形状分类、排列分类、功能分类、颜色分类、指向分类;The prediction unit is configured to predict multiple classifications of the indicator light according to the image area corresponding to the candidate bounding box in the road image, and obtain prediction results of the multiple classifications of the indicator light, wherein the multiple Classification includes at least two of the following: use classification, shape classification, arrangement classification, function classification, color classification, and orientation classification;
    确定单元,用于根据所述指示灯的多种分类的预测结果,确定所述指示灯的展示状态。The determining unit is configured to determine the display state of the indicator light according to the prediction results of multiple classifications of the indicator light.
  9. 根据权利要求8所述的装置,其特征在于,所述预测单元用于:The device according to claim 8, wherein the prediction unit is configured to:
    利用神经网络模型,对所述候选边界框对应的图像区域进行特征提取,得到所述候选边界框对应的图像特征;Using a neural network model to perform feature extraction on the image region corresponding to the candidate bounding box to obtain the image feature corresponding to the candidate bounding box;
    利用所述候选边界框对应的图像特征和所述神经网络模型中包括的多个子网络分支,分别对所述指示灯的多种分类进行预测,获得所述指示灯的多种分类的预测结果;Using the image features corresponding to the candidate bounding box and the multiple sub-network branches included in the neural network model to respectively predict multiple categories of the indicator light, and obtain prediction results of the multiple categories of the indicator light;
    其中,所述多个子网络分支的数量与所述多种分类的数量相同,每个子网络分支用于识别所述多种分类中其中一种分类的子类别。Wherein, the number of the multiple sub-network branches is the same as the number of the multiple categories, and each sub-network branch is used to identify a subcategory of one of the multiple categories.
  10. 根据权利要求9所述的装置,其特征在于,所述预测单元用于:The apparatus according to claim 9, wherein the prediction unit is configured to:
    利用所述候选边界框对应的图像特征和所述多个子网络分支中的第一子网络分支,对所述指示灯的多种分类中的第一分类进行预测,得到第一分类对应的至少两个子类别的预测概率;Using the image features corresponding to the candidate bounding box and the first sub-network branch of the plurality of sub-network branches, the first classification of the multiple classifications of the indicator light is predicted, and at least two corresponding to the first classification are obtained. The predicted probability of each subcategory;
    将所述至少两个子类别中所述预测概率最高的子类别,标记为所述指示灯在所述第一分类下的子类别。Mark the subcategory with the highest predicted probability in the at least two subcategories as the subcategory of the indicator lamp in the first category.
  11. 根据权利要求8-10中任一项所述的装置,其特征在于,所述确定单元用于:The device according to any one of claims 8-10, wherein the determining unit is configured to:
    在所述多种分类包括所述用途分类和所述形状分类,且所述用途分类的预测结果为 所述指示灯用于指示车辆,所述形状分类的预测结果表示所述指示灯为圆形灯的情况下,将所述排列分类、所述功能分类和所述颜色分类分别对应的预测结果进行组合,得到所述指示灯的第一展示状态;或者,The multiple classifications include the usage classification and the shape classification, and the prediction result of the usage classification is that the indicator lamp is used to indicate a vehicle, and the prediction result of the shape classification indicates that the indicator lamp is circular In the case of a light, the prediction results corresponding to the arrangement classification, the function classification, and the color classification are combined to obtain the first display state of the indicator light; or,
    在所述多种分类包括所述用途分类和所述形状分类,且所述用途分类的预测结果为所述指示灯用于指示车辆,所述形状分类的预测结果表示所述指示灯为箭头灯的情况下,将所述颜色分类和所述指向分类分别对应的预测结果进行组合,得到所述指示灯的第二展示状态;或者,The multiple classifications include the usage classification and the shape classification, and the prediction result of the usage classification is that the indicator light is used to indicate a vehicle, and the prediction result of the shape classification indicates that the indicator light is an arrow light In the case of combining the prediction results corresponding to the color classification and the pointing classification respectively, to obtain the second display state of the indicator light; or,
    在所述多种分类包括所述用途分类,且所述用途分类的预测结果为所述指示灯用于指示行人的情况下,得到所述指示灯的第三展示状态。In the case where the multiple classifications include the use classification, and the prediction result of the use classification is that the indicator light is used to indicate pedestrians, the third display state of the indicator light is obtained.
  12. 根据权利要求8-11中任一项所述的装置,其特征在于,所述确定单元用于:The device according to any one of claims 8-11, wherein the determining unit is configured to:
    获得设定时间内所采集的多张道路图像中同一位置的所述指示灯以及所述指示灯的多种分类的预测结果;Obtaining the indicator light at the same position in the multiple road images collected within a set time and the prediction results of multiple classifications of the indicator light;
    根据所述多张道路图像中同一位置的所述指示灯的多种分类的预测结果,判断所述指示灯的展示状态。The display state of the indicator light is determined according to the prediction results of multiple classifications of the indicator light at the same position in the multiple road images.
  13. 根据权利要求12所述的装置,其特征在于,所述多张道路图像为连续帧道路图像;The device according to claim 12, wherein the multiple road images are consecutive frames of road images;
    所述确定单元用于:The determining unit is used for:
    获得所述指示灯在所述连续帧道路图像的第一帧图像中的位置;Obtaining the position of the indicator light in the first frame of the continuous frame of road images;
    根据所述指示灯在所述第一帧图像中的位置、拍摄所述道路图像的设备的运动速度和拍摄频率,计算所述指示灯在所述连续帧道路图像中除所述第一帧图像之外的其它各帧图像中的第一位置;According to the position of the indicator light in the first frame of image, the movement speed of the device that took the road image, and the shooting frequency, calculate the indicator light to divide the first frame of image from the continuous frame of road image The first position in each frame image except for;
    获得所述指示灯在所述连续帧图像中其他各帧图像中的第二位置;Obtaining the second position of the indicator light in the other frames of the continuous frame image;
    针对所述其他帧图像中的每一帧图像,在所述第二位置与第一位置的差异小于设定值的情况下,确定所述连续帧道路图像中检测到的指示灯为同一位置的指示灯。For each of the other frame images, in the case where the difference between the second position and the first position is less than a set value, it is determined that the indicator lights detected in the consecutive frames of road images are at the same position Indicator light.
  14. 根据权利要求12或13所述的装置,其特征在于,所述指示灯的展示状态包括:常亮或闪烁;The device according to claim 12 or 13, wherein the display state of the indicator light comprises: always on or flashing;
    所述确定单元用于:The determining unit is used for:
    在所述多张道路图像中同一位置的指示灯的颜色分类预测结果相同的情况下,判断 所述指示灯的展示状态为常亮;In the case where the color classification prediction results of the indicator lights at the same position in the multiple road images are the same, determining that the display state of the indicator lights is always on;
    在所述多张图像中同一位置的指示灯的颜色分类预测结果间隔变化的情况下,判断所述指示灯的展示状态为闪烁。In the case where the color classification prediction result interval of the indicator lamps at the same position in the multiple images changes, it is determined that the display state of the indicator lamps is blinking.
  15. 一种指示灯检测设备,包括存储器、处理器,所述存储器用于存储可在处理器上运行的计算机指令,所述处理器用于在执行所述计算机指令时实现权利要求1至7中任一项所述的方法。An indicator light detection device, comprising a memory and a processor, the memory is used to store computer instructions that can run on the processor, and the processor is used to implement any one of claims 1 to 7 when the computer instructions are executed The method described in the item.
  16. 一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现权利要求1至7中任一所述的方法。A computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the method according to any one of claims 1 to 7 is realized.
  17. 一种计算机程序,包括计算机可读代码,当所述计算机可读代码被计算机执行时实现权利要求1至7任一项所述的方法。A computer program comprising computer readable code, which when executed by a computer, implements the method according to any one of claims 1 to 7.
PCT/CN2020/105223 2019-07-31 2020-07-28 Indication lamp detection method, apparatus and device, and computer-readable storage medium WO2021018144A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
KR1020217020933A KR20210097782A (en) 2019-07-31 2020-07-28 Indicator light detection method, apparatus, device and computer-readable recording medium
JP2021538967A JP2022516183A (en) 2019-07-31 2020-07-28 Indicator light detection method, device, device, and computer readable recording medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910703763.5 2019-07-31
CN201910703763.5A CN112307840A (en) 2019-07-31 2019-07-31 Indicator light detection method, device, equipment and computer readable storage medium

Publications (1)

Publication Number Publication Date
WO2021018144A1 true WO2021018144A1 (en) 2021-02-04

Family

ID=74229503

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/105223 WO2021018144A1 (en) 2019-07-31 2020-07-28 Indication lamp detection method, apparatus and device, and computer-readable storage medium

Country Status (4)

Country Link
JP (1) JP2022516183A (en)
KR (1) KR20210097782A (en)
CN (1) CN112307840A (en)
WO (1) WO2021018144A1 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113506244A (en) * 2021-06-05 2021-10-15 北京超维世纪科技有限公司 Indicator light detection and color identification generalization capability improvement algorithm based on deep learning
CN114359844A (en) * 2022-03-21 2022-04-15 广州银狐科技股份有限公司 AED equipment state monitoring method and system based on color recognition
CN114820676A (en) * 2022-05-30 2022-07-29 深圳市科荣软件股份有限公司 Equipment running state identification method and device
CN114820616A (en) * 2022-06-29 2022-07-29 北京蒙帕信创科技有限公司 Equipment state detection method and device for flashing mode indicator light

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116468868A (en) * 2023-04-27 2023-07-21 广州小鹏自动驾驶科技有限公司 Traffic signal lamp graph building method, device, equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102176287A (en) * 2011-02-28 2011-09-07 无锡中星微电子有限公司 Traffic signal lamp identifying system and method
US9070305B1 (en) * 2010-01-22 2015-06-30 Google Inc. Traffic light detecting system and method
CN108804983A (en) * 2017-05-03 2018-11-13 腾讯科技(深圳)有限公司 Traffic signal light condition recognition methods, device, vehicle-mounted control terminal and motor vehicle

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017171659A1 (en) * 2016-03-31 2017-10-05 Agency For Science, Technology And Research Signal light detection
JP2019053619A (en) * 2017-09-15 2019-04-04 株式会社東芝 Signal identification device, signal identification method, and driving support system
CN108875608B (en) * 2018-06-05 2021-12-17 合肥湛达智能科技有限公司 Motor vehicle traffic signal identification method based on deep learning
CN110069986B (en) * 2019-03-13 2021-11-02 北京联合大学 Traffic signal lamp identification method and system based on hybrid model

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9070305B1 (en) * 2010-01-22 2015-06-30 Google Inc. Traffic light detecting system and method
CN102176287A (en) * 2011-02-28 2011-09-07 无锡中星微电子有限公司 Traffic signal lamp identifying system and method
CN108804983A (en) * 2017-05-03 2018-11-13 腾讯科技(深圳)有限公司 Traffic signal light condition recognition methods, device, vehicle-mounted control terminal and motor vehicle

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113506244A (en) * 2021-06-05 2021-10-15 北京超维世纪科技有限公司 Indicator light detection and color identification generalization capability improvement algorithm based on deep learning
CN114359844A (en) * 2022-03-21 2022-04-15 广州银狐科技股份有限公司 AED equipment state monitoring method and system based on color recognition
CN114820676A (en) * 2022-05-30 2022-07-29 深圳市科荣软件股份有限公司 Equipment running state identification method and device
CN114820616A (en) * 2022-06-29 2022-07-29 北京蒙帕信创科技有限公司 Equipment state detection method and device for flashing mode indicator light
CN114820616B (en) * 2022-06-29 2023-01-10 北京蒙帕信创科技有限公司 Equipment state detection method and device for flashing mode indicator light

Also Published As

Publication number Publication date
JP2022516183A (en) 2022-02-24
KR20210097782A (en) 2021-08-09
CN112307840A (en) 2021-02-02

Similar Documents

Publication Publication Date Title
WO2021018144A1 (en) Indication lamp detection method, apparatus and device, and computer-readable storage medium
Hasegawa et al. Robust Japanese road sign detection and recognition in complex scenes using convolutional neural networks
JP6180482B2 (en) Methods, systems, products, and computer programs for multi-queue object detection and analysis (multi-queue object detection and analysis)
US9489586B2 (en) Traffic sign recognizing apparatus and operating method thereof
CN101900567B (en) No-texture clear path detection based on pixel
CN101900566B (en) Pixel-based texture-rich clear path detection
CN108681693B (en) License plate recognition method based on trusted area
CN102076531B (en) Vehicle clear path detection
US8487991B2 (en) Clear path detection using a vanishing point
CN110619279B (en) Road traffic sign instance segmentation method based on tracking
JP7206082B2 (en) Systems and methods for recognizing traffic signs
US20090309966A1 (en) Method of detecting moving objects
US20110081081A1 (en) Method for recognizing objects in images
KR20070027768A (en) Method for traffic sign detection
CN103366179B (en) Top-down view classification in clear path detection
De Paula et al. Real-time detection and classification of road lane markings
JP5931662B2 (en) Road condition monitoring apparatus and road condition monitoring method
WO2008020544A1 (en) Vehicle detection device, vehicle detection method, and vehicle detection program
Singh et al. Vehicle detection and accident prediction in sand/dust storms
Fusek et al. Adaboost for parking lot occupation detection
Ahsan et al. A detailed study on Bangladeshi road sign detection and recognition
Álvarez et al. Perception advances in outdoor vehicle detection for automatic cruise control
CN111402185A (en) Image detection method and device
Chen et al. Context-aware lane marking detection on urban roads
Hsieh et al. Recognising daytime and nighttime driving images using Bayes classifier

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20846538

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2021538967

Country of ref document: JP

Kind code of ref document: A

ENP Entry into the national phase

Ref document number: 20217020933

Country of ref document: KR

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20846538

Country of ref document: EP

Kind code of ref document: A1