CN113221878A - Detection frame adjusting method and device applied to signal lamp detection and road side equipment - Google Patents

Detection frame adjusting method and device applied to signal lamp detection and road side equipment Download PDF

Info

Publication number
CN113221878A
CN113221878A CN202110452454.2A CN202110452454A CN113221878A CN 113221878 A CN113221878 A CN 113221878A CN 202110452454 A CN202110452454 A CN 202110452454A CN 113221878 A CN113221878 A CN 113221878A
Authority
CN
China
Prior art keywords
detection frame
image
determining
lamp
signal lamp
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN202110452454.2A
Other languages
Chinese (zh)
Inventor
刘博�
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Apollo Zhilian Beijing Technology Co Ltd
Original Assignee
Apollo Zhilian Beijing Technology Co Ltd
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 Apollo Zhilian Beijing Technology Co Ltd filed Critical Apollo Zhilian Beijing Technology Co Ltd
Priority to CN202110452454.2A priority Critical patent/CN113221878A/en
Publication of CN113221878A publication Critical patent/CN113221878A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/24Aligning, centring, orientation detection or correction of the image

Abstract

The application discloses a detection frame adjusting method and device applied to signal lamp detection and roadside equipment, and relates to artificial intelligence, automatic driving, intelligent transportation, vehicle and road cooperative sensing and computer vision in computer technology and image processing. The method comprises the following steps: the method comprises the steps of obtaining signal lamp detection information of each image in an image sequence, wherein the signal lamp detection information comprises a lamp holder detection frame of each lamp holder, determining a signal lamp combination to be analyzed according to the signal lamp detection information of each image, determining a pending detection frame of the signal lamp combination, wherein each lamp holder in the signal lamp combination is a lamp holder of different types, if the pending detection frame is different from a preset initial detection frame of the signal lamp, adjusting the initial detection frame to obtain a target detection frame, and the target detection frame is used for detecting the signal lamp in the image to be detected, so that the problem of high cost caused by labeling of each sample image is solved, cost and resources are saved, and the accuracy and reliability of adjustment are improved.

Description

Detection frame adjusting method and device applied to signal lamp detection and road side equipment
Technical Field
The present invention relates to computer technologies and artificial intelligence, automatic driving, intelligent transportation, vehicle and road cooperative sensing and computer vision in image processing, and in particular, to a detection frame adjustment method and apparatus applied to signal lamp detection, and roadside equipment.
Background
In roadside sensing systems, including cameras deployed on the roadside, the position of a signal light (e.g., a traffic light) may be determined by the camera, thereby enabling light color recognition of the signal light, however, over time, the position of the camera and/or the signal light may change.
In the prior art, a commonly adopted method for adjusting a detection frame of a signal lamp is as follows: the method comprises the steps of obtaining a plurality of sample images collected by a camera, labeling each sample image in a manual mode to obtain a labeled image corresponding to each sample image, inputting the labeled images to a basic network model, training the basic network model to obtain a detection model of a detection frame, and detecting and adjusting the position of the detection frame based on the detection model.
However, with the above method for constructing a detection model, each sample image needs to be labeled manually, so that there may be a problem of high labeling cost and a problem of low reliability of detection and adjustment due to the influence of human subjective factors.
Disclosure of Invention
The application provides a detection frame adjusting method and device applied to signal lamp detection and used for reducing cost and improving reliability, and roadside equipment.
According to a first aspect of the present application, a method for adjusting a detection frame applied to signal lamp detection is provided, including:
acquiring signal lamp detection information of each image in an image sequence, wherein the signal lamp detection information comprises a lamp head detection frame of each lamp head;
determining a signal lamp combination to be analyzed according to signal lamp detection information of each image, and determining a frame to be detected of the signal lamp combination, wherein each lamp holder in the signal lamp combination is a lamp holder of different types;
and if the frame to be detected is different from the preset initial detection frame of the signal lamp, adjusting the initial detection frame to obtain a target detection frame, wherein the target detection frame is used for detecting the signal lamp in the image to be detected.
According to a second aspect of the present application, there is provided a detection frame adjusting apparatus applied to signal lamp detection, including:
the system comprises a first acquisition unit, a second acquisition unit and a processing unit, wherein the first acquisition unit is used for acquiring signal lamp detection information of each image in an image sequence, and the signal lamp detection information comprises a lamp holder detection frame of each lamp holder;
the first determining unit is used for determining a signal lamp combination to be analyzed according to the signal lamp detection information of each image;
the second determination unit is used for determining the undetermined detection frame of the signal lamp combination, wherein each lamp holder in the signal lamp combination is a lamp holder of different types;
and the adjusting unit is used for adjusting the initial detection frame to obtain a target detection frame if the undetermined detection frame is different from the preset initial detection frame of the signal lamp, wherein the target detection frame is used for detecting the signal lamp in the image to be detected.
According to a third aspect of the present application, there is provided an electronic device comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of the first aspect.
According to a fourth aspect of the present application, there is provided a non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method of the first aspect.
According to a fifth aspect of the present application, there is provided a computer program product comprising: a computer program, stored in a readable storage medium, from which at least one processor of an electronic device can read the computer program, execution of the computer program by the at least one processor causing the electronic device to perform the method of the first aspect.
According to a sixth aspect of the present application, there is provided a roadside apparatus including the electronic apparatus according to the third aspect.
According to a seventh aspect of the present application, a cloud control platform is provided, which includes the electronic device according to the third aspect.
According to an eighth aspect of the present application, there is provided a detection frame adjusting system applied to signal lamp detection, including:
the apparatus of the second aspect;
and the image acquisition device is used for acquiring the image sequence and transmitting the image sequence to the device.
It should be understood that the statements in this section do not necessarily identify key or critical features of the embodiments of the present application, nor do they limit the scope of the present application. Other features of the present application will become apparent from the following description.
Drawings
The drawings are included to provide a better understanding of the present solution and are not intended to limit the present application. Wherein:
fig. 1 is a scene diagram of a detection frame adjustment method applied to signal lamp detection, which may implement an embodiment of the present application;
FIG. 2 is a schematic diagram according to a first embodiment of the present application;
FIG. 3 is a schematic diagram according to a second embodiment of the present application;
FIG. 4 is a schematic diagram of a lamp head detection frame according to an embodiment of the present application;
FIG. 5 is a schematic illustration according to a third embodiment of the present application;
FIG. 6 is a schematic illustration according to a fourth embodiment of the present application;
FIG. 7 is a schematic illustration according to a fifth embodiment of the present application;
fig. 8 is a block diagram of an electronic device for implementing the detection frame adjustment method applied to signal lamp detection according to the embodiment of the present application.
Detailed Description
The following description of the exemplary embodiments of the present application, taken in conjunction with the accompanying drawings, includes various details of the embodiments of the application for the understanding of the same, which are to be considered exemplary only. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present application. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
Fig. 1 is a scene diagram of a detection frame adjustment method applied to signal lamp detection according to an embodiment of the present disclosure, as shown in fig. 1, at least one side of a road 101 may be provided with a roadside device 102, and a camera 103 may be used for image capture (or video capture).
For example, in the application scenario shown in fig. 1, each camera 103 may be used to capture an image including an opposing traffic light 104.
For example, as shown in fig. 1, the road 101 includes an intersection, the intersection includes four segments, which are a first segment, a second segment, a third segment, and a fourth segment as shown in fig. 1, the first segment and the third segment may be referred to as segments facing each other, the second segment and the fourth segment may be referred to as segments facing each other, the camera 103 disposed on the first segment may collect an image including the traffic light 104 disposed on the third segment, and so on, which are not listed here.
It should be noted that fig. 1 and the above embodiments are only used for exemplary illustration, and the method for adjusting the detection frame applied to signal lamp detection in the present embodiment may be applied to an application scenario, and is not to be construed as a limitation to the application scenario.
For example, the intersection shown in fig. 1 may also be a t-junction; as another example, the elements shown in FIG. 1 may be increased or decreased accordingly; as another example, the positions of the elements shown in FIG. 1 may be adjusted accordingly, and so on, which are not further enumerated herein.
As shown in fig. 1, a vehicle 105 traveling on a road 101 may be further included in the scene, and when the vehicle 105 travels, an image including a traffic light may be collected, and the traffic light may be selected from the collected image based on a preset detection frame and identified, so that safe and reliable traveling is achieved.
For example, since the position between the camera and the traffic light is kept relatively fixed, the position of the traffic light (i.e., a preset detection frame) may be marked in advance in the image captured by the camera, and an image corresponding to the red road light may be extracted from the image based on the position, thereby performing light color recognition.
However, the position of the camera may change over time or the position of the traffic light may change, so that the image is extracted from the image based on the position of the traffic light labeled, which may result in incomplete traffic light in the extracted image.
If the traffic lights in the extracted image are not complete, there is a possibility that the accuracy of the recognition result is low when the light color recognition is performed based on the extracted image. In order to solve the problem, the position of the traffic light in the image may be determined again, that is, the detection frame of the traffic light needs to be adjusted.
In the related art, the commonly employed adjustment method is: the method comprises the steps of obtaining a plurality of sample images collected by a camera, labeling each sample image in a manual mode to obtain a labeled image corresponding to each sample image, inputting the labeled image to a basic network model (the type of the basic model is not limited, such as a convolutional neural network model), training the basic network model, adjusting parameters of the basic network model based on an output result of the basic network model and a preset standard result, iterating for a preset number of times (such as 50 times) to obtain a network model (which can be referred to as a detection model for short) of the adjusted parameters, and when a detection frame of a traffic light needs to be determined, adjusting the detection frame of the traffic light based on the detection model.
However, according to the method for constructing the detection model to adjust the detection frame of the traffic light based on the detection model, since each sample image needs to be labeled manually, there may be a problem of higher labeling cost, and generally speaking, the larger the number of sample images, the better the detection effect of the detection model, and when the number of sample images is larger, there may be a problem of relatively larger occupation of training resources and relatively longer training time, and when the number of sample images is smaller, there may be a problem of lower reliability and accuracy of the detection model.
In order to solve at least one of the above problems, the inventors of the present application have made creative efforts to obtain the inventive concept of the present application: determining signal lamp combinations comprising different types of lamp holders, determining undetermined detection frames of the signal lamp combinations, and adjusting the initial detection frames based on the difference between the undetermined detection frames and the preset detection frames to obtain target detection frames.
The application provides a detection frame adjusting method and device applied to signal lamp detection and roadside equipment, which are applied to artificial intelligence, automatic driving, intelligent transportation, vehicle and road cooperative sensing and computer vision in computer technology and image processing, so that the cost and resources are saved, and the efficiency and the accuracy are improved.
Fig. 2 is a schematic diagram according to a first embodiment of the present application, and as shown in fig. 2, the method for adjusting a detection frame applied to signal lamp detection includes:
s201: signal light detection information of each image in the image sequence is acquired.
The signal lamp detection information comprises a lamp cap detection frame of each lamp cap.
For example, the execution main body of this embodiment may be a detection frame adjustment device (hereinafter, referred to as an adjustment device for short) applied to signal lamp detection, the adjustment device may be a server (including a local server and a cloud server, where the server may be a cloud control platform, a vehicle route cooperative management platform, a central subsystem, an edge computing platform, a cloud computing platform, and the like), may also be a roadside device, may also be a terminal device, may also be a processor, may also be a chip, and the like, and this embodiment is not limited. In a system architecture of intelligent transportation vehicle-road cooperation, the road side equipment comprises road side sensing equipment with a computing function and road side computing equipment connected with the road side sensing equipment, the road side sensing equipment (such as a road side camera) is connected to the road side computing equipment (such as a Road Side Computing Unit (RSCU)), the road side computing equipment is connected to a server, and the server can communicate with an automatic driving vehicle or an auxiliary driving vehicle in various modes; or the roadside sensing device comprises a calculation function, and the roadside sensing device is directly connected to the server. The above connections may be wired or wireless.
In this embodiment, with reference to the application scenario shown in fig. 1 and taking the execution subject as the roadside device as an example, the following steps are understood:
the camera arranged at the first intersection can acquire images or videos of the third intersection, and the acquired images or videos comprise traffic lights arranged at the third intersection.
The camera arranged at the first intersection can transmit the collected images or videos to the roadside device.
Accordingly, the roadside apparatus may acquire a video, or an image. It can be understood that the video may include multiple frames of images, and the multiple frames of images have a certain chronological order, so that the roadside device may generate an image sequence based on the video (i.e., the multiple frames of images); similarly, the transmission of the images is a continuous process, that is, the camera arranged at the first intersection can continuously collect the images and continuously transmit the multi-frame images to the roadside unit, and the multi-frame images have a certain chronological order, so that the roadside unit can refer to the acquired multi-frame images as an image sequence.
That is to say, an image sequence can be understood as a plurality of frames of images, and in connection with the acquisition of an actual image or the acquisition of a video, the plurality of frames of images can each have a temporal property.
The elements included in each image may be the same or different, for example, some images include vehicles, and some images do not include vehicles, but each image may include a signal light, as shown in fig. 1, and the signal light may be a traffic light. Accordingly, the traffic light detection information may be understood as traffic light detection information, and the traffic light detection information includes information of detection frames corresponding to the respective light heads.
It should be noted that the roadside unit may simultaneously receive image sequences respectively transmitted by cameras disposed on different road segments, and execute the method of this embodiment in a parallel manner.
For example, in combination with the application scenario shown in fig. 1, the roadside device may receive the image sequences transmitted by the first road segment, the second road segment, the third road segment and the fourth road segment, respectively, and perform the method of the embodiment for the image sequence corresponding to each road segment.
The time for executing the method of the present embodiment is not limited. For example, the method of the present embodiment may be performed every predetermined period of time based on the period of time; for another example, the prompt information of the method of the embodiment may be executed when the roadside device receives the prompt information, where the prompt information may be sent by a vehicle or other devices, and the accuracy of characterizing and identifying the signal lamp based on the initial detection frame is low, and so on, which are not listed here.
S202: and determining a signal lamp combination to be analyzed according to the signal lamp detection information of each image, and determining a frame to be detected of the signal lamp combination.
Wherein, each lamp holder in the signal lamp combination is the lamp holder of different grade type.
Based on the above analysis, the signal lamp may be a traffic light as shown in fig. 1, and different types of lightheads may be understood as lightheads for indicating different colors, such as a lighthead indicating red (i.e. red lighthead), a lighthead indicating green (i.e. green lighthead), a lighthead indicating yellow (i.e. yellow lighthead).
Correspondingly, the frame to be detected is a detection frame comprising a red lamp holder, a green lamp holder and a yellow lamp holder.
S203: and if the undetermined detection frame is different from the preset initial detection frame of the signal lamp, adjusting the initial detection frame to obtain a target detection frame.
The target detection frame is used for detecting a signal lamp in an image to be detected. The initial detection frame may be understood as a detection frame preset by the roadside device to determine the signal lamp from the image to be detected. In connection with the above-described embodiments, the initial detection frame may be understood as a detection frame for determining a signal lamp when the positions of the traffic light and the camera have not changed.
By way of example, this step may be understood as: the roadside device may compare the undetermined detection frame with the initial detection frame to determine whether the undetermined detection frame and the initial detection frame are the same, and if the undetermined detection frame and the initial detection frame are different, it indicates that the undetermined detection frame is changed relative to the initial detection frame, and the roadside device determines and adjusts the initial detection frame, so as to obtain a target detection frame for detecting a signal lamp in the image to be detected.
Based on the above analysis, the present embodiment provides a method for adjusting a detection frame applied to signal lamp detection, including: acquiring signal lamp detection information of each image in an image sequence, wherein the signal lamp detection information comprises a lamp cap detection frame of each lamp cap, determining a signal lamp combination to be analyzed according to the signal lamp detection information of each image, and determining an undetermined detection frame of the signal lamp combination, wherein each lamp cap in the signal lamp combination is of a different type, if the undetermined detection frame is different from a preset initial detection frame of the signal lamp, adjusting the initial detection frame to obtain a target detection frame, wherein the target detection frame is used for detecting the signal lamp in the image to be detected, in the embodiment, the undetermined detection frame of the signal lamp combination is determined through the signal lamp combination comprising the different types of lamp caps, the initial detection frame is adjusted based on the difference between the undetermined detection frame and the preset detection frame to obtain the target detection frame, and the situation that each sample image needs to be marked in a manual mode in the related technology can be avoided, the problem of higher labeling cost may exist, generally speaking, the more the number of the sample images is, the better the detection effect of the detection model is, when the number of the sample images is more, the problems of relatively larger occupation of training resources and relatively longer training time may exist, and when the number of the sample images is less, the problems of relatively lower reliability and accuracy of the detection model may exist, so that the technical effects of saving cost and resources, improving training efficiency and improving accuracy and reliability of adjustment are realized.
Fig. 3 is a schematic diagram of a second embodiment of the present application, and as shown in fig. 3, the method for adjusting a detection frame applied to signal lamp detection includes:
s301: an image sequence is acquired and a foreground image for each image in the image sequence is determined.
For example, in the case where the lamp color of the signal lamp is stable, there is no foreground image, and when the lamp color of the signal lamp is switched, the signal lamp, such as being lit and extinguished, may be output as the foreground image.
In some embodiments, the foreground image for each image may be determined by constructing a background recognition model and identifying based on the background model.
The method for constructing the background recognition model can comprise the following steps:
step 1: at least one sample image including a signal light is acquired.
The number of sample images may be set based on requirements, history, and tests, and the embodiment is not limited.
It should be noted that, the execution subject for constructing the background recognition model may be an adjusting device, or may be another device, which is not limited in this embodiment, and if the execution subject for constructing the background recognition model is another device, the other device may be connected to the adjusting device, and when the background recognition model is obtained by construction, the background recognition model is sent to the adjusting device, so that the adjusting device recognizes the image sequence based on the background recognition model to obtain each foreground image.
Step 2: and determining foreground pixel distribution information of each foreground pixel point and background pixel distribution information of each background pixel point in at least one sample image according to at least one sample image.
And step 3: and constructing a background identification model according to the distribution information of each foreground pixel and the distribution information of each background pixel.
It should be noted that, in this embodiment, by constructing the background recognition model according to the foreground pixel distribution information and the background pixel distribution information, the efficiency of constructing the background recognition model can be improved, and when determining the foreground image based on the background recognition model, the efficiency of determining the foreground can be improved.
S302: and detecting the foreground image of each image to obtain a signal lamp initial frame of each image.
S303: and splitting the signal lamp initial frame of each image to obtain the lamp holder detection frame of each lamp holder of each image.
Fig. 4 is a schematic diagram of a principle of obtaining a lighthead detection frame according to an embodiment of the present application, and as shown in fig. 4, a roadside apparatus detects a foreground image of an image to obtain a signal lamp initial frame of the image (indicated by a dashed line frame in the left side of fig. 4 as a "signal lamp initial detection frame").
As shown in fig. 4, the signal lamp initial detection frame includes three signal lamps, which are different in type and generally have the same size.
Correspondingly, the roadside device splits the signal lamp initial detection frame to obtain three lamp cap detection frames (indicated as "lamp cap detection frames" in the drawing on the right side of fig. 4, and also indicated by dashed frames), as shown in fig. 4, one lamp cap corresponds to one lamp cap detection frame.
It should be noted that, in this embodiment, for any image, the roadside sets a lamp cap detection frame that can be obtained by splitting the signal lamp initial frame based on the any image (referring to each lamp cap in the any image), so that the cost of identifying each lamp cap can be saved, and the technical effect of improving the efficiency of determining the lamp cap detection frame can be improved.
S304: and selecting a plurality of lamp caps forming the signal lamp according to the lamp cap detection frame of each lamp cap of each image to obtain a signal lamp combination, and determining a to-be-determined detection frame of the signal lamp combination.
Wherein, each lamp holder in the signal lamp combination is the lamp holder of different grade type.
For example, in combination with the application scenario shown in fig. 1, if the signal lamps are traffic lights, each image includes three lamp heads, which are a red lamp head, a green lamp head, and a yellow lamp head, respectively, and the signal lamp assembly includes the red lamp head, the green lamp head, and the yellow lamp head.
If the lamp caps in the signal lamp are located on the same horizontal line, the roadside device can select the lamp caps located on the same horizontal line from the lamp caps to combine the signal lamp.
Similarly, if the lamp caps in the signal lamp are located on the same vertical line, the roadside device can select the lamp caps located on the same vertical line from the lamp caps to make the signal lamp combination.
It is worth to say that, through the lamp holder detection frame of each lamp holder, different types of lamp holders are selected to form the signal lamp combination, so that the analysis of the same type of lamp holders can be avoided, the analysis efficiency is improved, the noise interference during the analysis is avoided, and the technical effect of conveniently, quickly and effectively determining the signal lamp combination is realized.
In some embodiments, selecting a plurality of bases constituting the signal lamp according to the base detection frame of each base of each image to obtain a signal lamp combination may include the following steps:
step 1: and determining the difference information between any two lamp holder detection frames.
Illustratively, the differencing information is used to characterize the difference between any two lighthead detection boxes.
Step 2: and filtering each lamp cap according to each piece of differential information, and selecting a plurality of lamp caps from each lamp cap after filtering.
In this embodiment, the operation of filtering processing is added, and may be understood as the operation of preprocessing. In contrast, if a difference between two lamphead detection frames represented by certain differentiation information is large, it indicates that the two lampheads may be different types of detection frames; on the contrary, if a certain piece of difference information represents that the difference between two certain lamp holder detection frames is small, it indicates that the two lamp holders may be detection frames of the same type, and each lamp holder may be filtered based on the detection frames of the same type and the detection frames of different types, for example, the lamp holders corresponding to the detection frames of the same type are filtered, and a plurality of lamp holders (three lamp holders in the above embodiment) are selected from the filtered lamp holders.
It is worth to say that, by adding the operation of filtering processing, noise interference when selecting a plurality of lamp holders can be reduced, the efficiency of selecting a plurality of lamp holders is improved, and the technical effects of accuracy and reliability of selecting a plurality of lamp holders are improved.
In some embodiments, step 1 (determining the difference information between any two lighthead detection boxes) may comprise the following sub-steps:
substep 1: and determining the original detection frame corresponding to each lamp holder in the initial detection frame.
Specifically, substep 1 may comprise: the method comprises the steps of obtaining an original image, determining an initial detection frame of a signal lamp in the original image according to labeling information of the original image, and determining an original detection frame corresponding to each lamp holder according to the initial detection frame and the number of the lamp holders in the initial detection frame.
The original image can be understood as an image acquired when the positions of the camera and the signal lamp are not changed, the initial detection frame can be determined in a manual marking or machine marking mode, and then the original detection frame corresponding to each lamp holder is determined according to the number of the initial detection frames and the number of the lamp holders.
For example, as can be seen from the above embodiment and fig. 4, if the number of the burners is three, the original detection frame may be determined based on the initial detection frame and the number three, and the original detection frame corresponding to each burner.
Based on the above description of the embodiment, it can be known that the original detection frame corresponding to each lamp cap is determined according to the number of the initial detection frames and the number of each lamp cap, so that the efficiency of determining the original detection frame corresponding to each lamp cap can be improved, and the technical effect of reducing the identification cost can be achieved.
Substep 2: and calculating the ratio of the coverage range of the lamphead detection frame of each lamphead to the coverage range of the original detection frame.
In some embodiments, the lamphead detection frame is a minimum bounding rectangle of the lamphead, and sub-step 2 may specifically include: determining the range coverage relation between the lamp holder detection frame of each lamp holder and the original detection frame; and if the lamp holder detection frame of any lamp holder comprises the range covered by the original detection frame of any lamp holder, calculating the ratio between the lamp holder detection frame of any lamp holder and the original detection frame.
For example, for a certain lamp holder, the coverage relation between the lamp holder detection frame of the lamp holder and the original detection frame is different, and the lamp holder detection frame of the lamp holder includes a range outside the coverage of the original detection frame, it indicates that the position between the camera or the signal lamp changes, and if the signal lamp is extracted from the image to be detected by using the original detection frame, the signal lamp cannot be completely extracted, that is, the signal lamp used for identifying the color of the lamp is an incomplete signal lamp, so that the accuracy of identifying the color of the lamp is possibly low, and the technical effects of accuracy and reliability of subsequently determining the undetermined detection frame and adjusting the original detection frame can be improved.
Substep 3: and calculating differentiation information between the lamp holder detection frame with the maximum ratio and other lamp holder detection frames in sequence.
Illustratively, the roadside device may sort the lightheads in an ascending order or a descending order based on the ratios, and if the lightheads are sorted in the descending order, may sequentially calculate the differentiation information between the largest lighthead detection frame and the other lighthead detection frames from the beginning to the end based on the sorting; on the contrary, if the order is ascending, the differentiation information between the largest lamp holder detection frame and other lamp holder detection frames can be calculated in sequence from the tail to the head based on the order.
It should be noted that, in this embodiment, by determining the ratio and sequentially determining each piece of difference information based on the maximum ratio, repeated calculation can be avoided, and the technical effect of improving the efficiency of determining the difference information can be improved.
S305: and if the undetermined detection frame is different from the preset initial detection frame of the signal lamp, adjusting the initial detection frame to obtain a target detection frame.
The target detection frame is used for detecting a signal lamp in an image to be detected.
Exemplarily, the description about S305 may refer to the description about S203, which is not repeated herein.
In some embodiments, the method for determining whether the frame to be detected is the same as the preset initial detection frame of the signal lamp may include the following steps:
step 1: the distance value between the two lightheads which are the farthest away in the signal lamp combination is determined.
With reference to the above embodiment, if the signal lamp assembly includes the red lamp head, the green lamp head, and the yellow lamp head, and the green lamp head is located between the red lamp head and the yellow lamp head, the distance value between the two lamp heads with the farthest distance is the distance value between the red lamp head and the yellow lamp head.
Step 2: and determining the length of the signal lamp according to the initial detection frame, and determining the difference value between the distance value and the length.
Correspondingly, the initial detection frame comprises a signal lamp, a red lamp holder, a green lamp holder and a yellow lamp holder. The roadside apparatus may determine a difference between the determined distance value and the determined length.
And step 3: and if the difference value is smaller than the preset difference value threshold value, determining that the frame to be detected is different from the preset initial detection frame of the signal lamp.
For example, (difference in distance and length) × 2/3 is less than the difference threshold, it is determined that the frame to be detected is different from the preset initial frame of the signal lamp.
It should be noted that, in this embodiment, by determining the difference between the distance between the two lamp caps farthest away and the length, and determining whether the undetermined detection frame is the same as the initial detection frame based on the magnitude relationship between the difference and the difference threshold, it may be achieved that whether the undetermined detection frame is the same as the initial detection frame is obtained conveniently and quickly, and the conclusion has higher accuracy and reliability.
In other embodiments, the method for determining whether the frame to be detected is the same as the preset initial detection frame of the signal lamp may include the following steps:
step 1: and determining the coverage range of the frame to be detected and determining the coverage range of the initial detection frame.
For example, the coverage area (also understood as the coverage area) of the frame to be detected may be determined based on the coordinate attribute of the frame to be detected, or the coverage area (also understood as the coverage area) of the initial detection frame may be determined based on the coordinate attribute of the initial detection frame.
Step 2: if at least part of the coverage range of the frame to be detected (which may be referred to as a first coverage range for distinguishing from the coverage range of the initial detection frame) is not included in the coverage range of the initial detection frame (which may be referred to as a second coverage range for distinguishing from the coverage range of the frame to be detected, in the same way), it is determined that the frame to be detected is different from the preset initial detection frame of the signal lamp.
For example, the roadside device may determine whether the second coverage includes the first coverage, that is, whether the first coverage is included in the second coverage, if the second coverage includes the first coverage, even if the second coverage is not completely the same as the first coverage, since the second coverage includes all the first coverage, when extracting a signal lamp from an image to be detected based on the initial detection frame, integrity and comprehensiveness of the extracted signal lamp may be ensured, and the roadside device may determine that the undetermined detection frame is the same as the initial detection frame; on the contrary, if the partial range in the first coverage range is not included in the second coverage range, when the signal lamp is extracted from the image to be detected based on the initial detection frame, the extracted signal lamp may be incomplete, and the roadside device may determine that the frame to be detected is different from the initial detection frame.
That is to say, can confirm whether the pending frame that detects is the same with the initial frame that detects through the mode of difference to realize flexibility and variety, and through confirming whether the pending frame that detects is the same with the initial frame that detects based on coverage, can satisfy the technical effect to the accuracy and the reliability demand of the lamp colour discernment of signal lamp.
In some embodiments, the method for adjusting the initial detection frame to obtain the target detection frame may include the following steps:
step 1: and determining a distance value between two lamp holders which are farthest away in the signal lamp combination, and determining the center position of the signal lamp in the signal lamp combination according to the distance value.
For the method for determining the distance value, reference may be made to the description in the above embodiments, and details are not repeated here.
In this step, the center position may be calculated on the basis of the distance value. For example, the center point of the distance value is the center point of the signal lamp in the signal lamp assembly, and accordingly, the position of the center point of the distance value is the position (i.e., the center position) of the center point of the signal lamp in the signal lamp assembly.
Step 2: and adjusting the position of the initial detection frame in the image according to the central position to obtain a target detection frame.
It should be noted that, in this embodiment, the center position is determined based on the distance value, and the target detection frame is obtained based on the center position adjustment, generally speaking, the signal lamp takes the center position as the center point, and the distances between the center point and the two end points of the signal lamp are equal, so that the technical effect of obtaining the target detection frame based on the center position can be achieved, and the reliability and the accuracy of the target detection frame can be improved.
S306: acquiring an image to be detected, detecting a signal lamp in the image to be detected according to a target detection frame, generating and outputting a detection result to an access vehicle; or outputting the target detection frame to the access vehicle.
In one example, the roadside apparatus may detect a signal lamp in an image to be detected after obtaining the target detection frame, and may generate and output a detection result to the vehicle.
For example, in combination with the application scenario shown in fig. 1, the roadside device may receive an image to be detected collected by a camera, extract a signal lamp from the image to be detected based on the target detection frame, detect the signal lamp (i.e., identify the color of the lamp), and generate a detection result, where the detection result may include: the red light lamp holder is turned on, the green light lamp holder is turned on, and the yellow light lamp holder is turned on, and the detection result can be transmitted to a vehicle connected to roadside equipment, such as a vehicle running on a road, so that the vehicle can execute a corresponding running strategy based on the detection result, if the detection result is that the green light lamp holder is turned on, the vehicle can continue to run based on the detection result, and the like, which are not listed one by one.
In another example, the roadside device may output the target detection frame to the access vehicle after obtaining the target detection frame, and similarly, the vehicle may extract a signal lamp from the image to be detected based on the target detection frame, detect the signal lamp (i.e., identify the color of the lamp), and generate a detection result, where the detection result may include: a red light, a green light, and a yellow light. If the green light is turned on, the vehicle can continue to run based on the detection result, and so on, which are not listed here.
It should be noted that, in this embodiment, the roadside device detects the signal lamp in the image to be detected by using the target detection frame, and since the target detection frame is an adjusted detection frame including complete and comprehensive signal lamps, the detection result has a technical effect of high accuracy and reliability, and when the vehicle runs based on the detection result, the technical effect of improving the safety of the vehicle running can be achieved; similarly, if the roadside device transmits the target detection frame to the vehicle, when the vehicle detects the signal lamp based on the target detection frame, the detection result has the technical effects of higher accuracy and reliability, and therefore the technical effect of the safety of the vehicle based on the driving of the detection result can be improved.
Fig. 5 is a schematic diagram of a third embodiment of the present application, and as shown in fig. 5, a detection frame adjusting apparatus 500 for signal lamp detection includes:
the first obtaining unit 501 is configured to obtain signal light detection information of each image in the image sequence, where the signal light detection information includes a light head detection frame of each light head.
The first determining unit 502 is configured to determine a signal lamp combination to be analyzed according to signal lamp detection information of each image.
A second determining unit 503, configured to determine a frame to be detected of the signal lamp combination, where each lamp head in the signal lamp combination is a different type of lamp head.
An adjusting unit 504, configured to adjust the initial detection frame to obtain a target detection frame if the undetermined detection frame is different from a preset initial detection frame of the signal lamp, where the target detection frame is used to detect the signal lamp in the image to be detected.
Fig. 6 is a schematic diagram of a fourth embodiment of the present application, and as shown in fig. 6, a detection frame adjusting apparatus 600 for signal lamp detection includes:
the first obtaining unit 601 is configured to obtain signal light detection information of each image in the image sequence, where the signal light detection information includes a light head detection frame of each light head.
As shown in fig. 6, in some embodiments, the first obtaining unit 601 includes:
an acquisition subunit 6011 configured to acquire the sequence of images.
A third determining subunit 6012, configured to determine a foreground image of each image in the image sequence.
The detecting unit 6013 detects the foreground image of each image to obtain an initial frame of the signal lamp of each image.
And a splitting subunit 6014, configured to split the signal lamp initial frame of each image, so as to obtain a lamp head detection frame of each lamp head of each image.
In some embodiments, third determining subunit 6012, includes:
an acquisition module for acquiring at least one sample image including a signal light.
And the second determining module is used for determining foreground pixel distribution information of each foreground pixel point and background pixel distribution information of each background pixel point in at least one sample image according to at least one sample image.
And the construction module is used for constructing the background identification model according to the distribution information of each foreground pixel and the distribution information of each background pixel.
And the third determining module is used for determining the foreground image of each image in the image sequence according to the background recognition model.
A first determining unit 602, configured to determine a signal lamp combination to be analyzed according to signal lamp detection information of each image.
In some embodiments, the first determining unit 602 is configured to select a plurality of bases constituting the signal lamp according to the base detection frame of each base of each image to obtain a signal lamp combination.
As shown in fig. 6, in some embodiments, the first determining unit 602 includes:
a first determining subunit 6021 configured to determine difference information between any two burner detection blocks.
In some embodiments, the first determining subunit 6021 comprises:
and the first determining module is used for determining the original detection frame corresponding to each lamp holder in the initial detection frame.
In some embodiments, the first determining module comprises:
and the acquisition sub-module is used for acquiring the original image.
And the second determining submodule is used for determining an initial detection frame of the signal lamp in the original image according to the labeling information of the original image.
And the third determining submodule is used for determining the original detection frame corresponding to each lamp holder according to the initial detection frame and the number of each lamp holder in the initial detection frame.
And the first calculation module is used for calculating the ratio of the coverage range of the lamp holder detection frame of each lamp holder to the coverage range of the original detection frame.
In some embodiments, the first computing module comprises:
and the first determining submodule is used for determining the range coverage relation between the lamp holder detection frame of each lamp holder and the original detection frame.
And the calculation submodule is used for calculating the ratio between the lamp holder detection frame of any lamp holder and the original detection frame of any lamp holder if the lamp holder detection frame of any lamp holder comprises the range covered by the original detection frame of any lamp holder.
And the second calculation module is used for sequentially calculating the differential information between the lamp holder detection frame with the maximum ratio and other lamp holder detection frames.
And the selecting subunit 6022 is configured to filter each lamp cap according to each piece of difference information, and select a plurality of lamp caps from each lamp cap after the filtering.
A second determining unit 603, configured to determine a frame to be detected of the signal lamp combination, where each lamp head in the signal lamp combination is a different type of lamp head.
A third determining unit 604 for determining a distance value between the two lightheads that are the farthest away in the signal light combination.
A fourth determining unit 605, configured to determine the length of the signal lamp according to the initial detection frame, and determine a difference between the distance value and the length.
A fifth determining unit 606, configured to determine that the frame to be detected is different from the preset initial detection frame of the signal lamp if the difference is smaller than the preset difference threshold.
And an adjusting unit 607, configured to adjust the initial detection frame to obtain a target detection frame if the undetermined detection frame is different from the preset initial detection frame of the signal lamp, where the target detection frame is used to detect the signal lamp in the image to be detected.
As shown in fig. 6, in some embodiments, the adjusting unit 607 includes:
a second determining subunit 6071, configured to determine a distance value between two bases of the signal lamp combination that are farthest away, and determine a center position of the signal lamp in the signal lamp combination according to the distance value.
And an adjusting subunit 6072, configured to adjust the position of the initial detection frame in the image according to the center position, to obtain a target detection frame.
A second obtaining unit 608, configured to obtain an image to be detected.
And the detection unit 609 is configured to detect a signal lamp in the image to be detected according to the target detection frame, and generate a detection result.
A first output unit 610, configured to output the detection result to the access vehicle.
Fig. 7 is a schematic diagram of a fifth embodiment of the present application, and as shown in fig. 7, a detection frame adjusting apparatus 700 applied to signal lamp detection includes:
the first obtaining unit 701 is configured to obtain signal light detection information of each image in the image sequence, where the signal light detection information includes a light head detection frame of each light head.
As shown in fig. 7, in some embodiments, the first obtaining unit 701 includes:
an acquiring subunit 7011 is configured to acquire the image sequence.
A third determining subunit 7012 is configured to determine a foreground image of each image in the sequence of images.
The detecting unit 7013 detects the foreground image of each image to obtain the signal lamp initial frame of each image.
The splitting subunit 7014 is configured to split the signal lamp initial frame of each image, so as to obtain a lamp holder detection frame of each lamp holder of each image.
In some embodiments, the third determining subunit 7012 includes:
an acquisition module for acquiring at least one sample image including a signal light.
And the second determining module is used for determining foreground pixel distribution information of each foreground pixel point and background pixel distribution information of each background pixel point in at least one sample image according to at least one sample image.
And the construction module is used for constructing the background identification model according to the distribution information of each foreground pixel and the distribution information of each background pixel.
And the third determining module is used for determining the foreground image of each image in the image sequence according to the background recognition model.
A first determining unit 702, configured to determine a signal lamp combination to be analyzed according to signal lamp detection information of each image.
In some embodiments, the first determining unit 702 is configured to select a plurality of bases constituting the signal lamp according to the base detection frame of each base of each image to obtain the signal lamp combination.
As shown in fig. 7, in some embodiments, the first determining unit 702 includes:
the first determining subunit 7021 is configured to determine differentiation information between any two lighthead detection frames.
In some embodiments, the first determining subunit 7021 includes:
and the first determining module is used for determining the original detection frame corresponding to each lamp holder in the initial detection frame.
In some embodiments, the first determining module comprises:
and the acquisition sub-module is used for acquiring the original image.
And the second determining submodule is used for determining an initial detection frame of the signal lamp in the original image according to the labeling information of the original image.
And the third determining submodule is used for determining the original detection frame corresponding to each lamp holder according to the initial detection frame and the number of each lamp holder in the initial detection frame.
And the first calculation module is used for calculating the ratio of the coverage range of the lamp holder detection frame of each lamp holder to the coverage range of the original detection frame.
In some embodiments, the first computing module comprises:
and the first determining submodule is used for determining the range coverage relation between the lamp holder detection frame of each lamp holder and the original detection frame.
And the calculation submodule is used for calculating the ratio between the lamp holder detection frame of any lamp holder and the original detection frame of any lamp holder if the lamp holder detection frame of any lamp holder comprises the range covered by the original detection frame of any lamp holder.
And the second calculation module is used for sequentially calculating the differential information between the lamp holder detection frame with the maximum ratio and other lamp holder detection frames.
The selecting subunit 7022 is configured to perform filtering processing on each lamp holder according to each piece of difference information, and select a plurality of lamp holders from the filtered lamp holders.
A second determining unit 703, configured to determine a frame to be detected of the signal lamp combination, where each lamp head in the signal lamp combination is a different type of lamp head.
A sixth determining unit 704, configured to determine a coverage of the frame to be detected, and determine a coverage of the initial detecting frame.
A seventh determining unit 705, configured to determine that the frame to be detected is different from the preset initial detection frame of the signal lamp if at least a part of the coverage of the frame to be detected is not included in the coverage of the initial detection frame.
And an adjusting unit 706, configured to adjust the initial detection frame to obtain a target detection frame if the undetermined detection frame is different from the preset initial detection frame of the signal lamp, where the target detection frame is used to detect the signal lamp in the image to be detected.
As shown in fig. 7, in some embodiments, the adjusting unit 706 includes:
a second determining subunit 7061, configured to determine a distance value between two lamp bases that are farthest from each other in the signal lamp combination, and determine a center position of the signal lamp in the signal lamp combination according to the distance value.
And an adjusting subunit 7062, configured to adjust the position of the initial detection frame in the image according to the central position, to obtain a target detection frame.
And a second output unit 707 for outputting the target detection frame to the incoming vehicle.
According to an embodiment of the present application, an electronic device and a readable storage medium are also provided.
There is also provided, in accordance with an embodiment of the present application, a computer program product, including: a computer program, stored in a readable storage medium, from which at least one processor of the electronic device can read the computer program, the at least one processor executing the computer program causing the electronic device to perform the solution provided by any of the embodiments described above.
FIG. 8 shows a schematic block diagram of an example electronic device 800 that may be used to implement embodiments of the present application. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 8, the electronic device 800 includes a computing unit 801 that can perform various appropriate actions and processes according to a computer program stored in a Read Only Memory (ROM)802 or a computer program loaded from a storage unit 808 into a Random Access Memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the device 800 can also be stored. The calculation unit 801, the ROM 802, and the RAM 803 are connected to each other by a bus 804. An input/output (I/O) interface 805 is also connected to bus 804.
A number of components in the device 800 are connected to the I/O interface 805, including: an input unit 806, such as a keyboard, a mouse, or the like; an output unit 807 such as various types of displays, speakers, and the like; a storage unit 808, such as a magnetic disk, optical disk, or the like; and a communication unit 809 such as a network card, modem, wireless communication transceiver, etc. The communication unit 809 allows the device 800 to exchange information/data with other devices via a computer network such as the internet and/or various telecommunication networks.
Computing unit 801 may be a variety of general and/or special purpose processing components with processing and computing capabilities. Some examples of the computing unit 801 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various dedicated Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, and the like. The calculation unit 801 executes the respective methods and processes described above, for example, the detection frame adjustment method applied to the signal light detection. For example, in some embodiments, the detection frame adjustment method applied to signal light detection may be implemented as a computer software program tangibly embodied in a machine-readable medium, such as the storage unit 808. In some embodiments, part or all of the computer program can be loaded and/or installed onto device 800 via ROM 802 and/or communications unit 809. When the computer program is loaded into the RAM 803 and executed by the computing unit 801, one or more steps of the detection frame adjustment method applied to the signal light detection described above may be performed. Alternatively, in other embodiments, the computing unit 801 may be configured by any other suitable means (e.g., by means of firmware) to perform the detection frame adjustment method applied to signal light detection.
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuitry, Field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), system on a chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for implementing the methods of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the program codes, when executed by the processor or controller, cause the functions/operations specified in the flowchart and/or block diagram to be performed. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), Wide Area Networks (WANs), and the Internet.
The computer system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The Server can be a cloud Server, also called a cloud computing Server or a cloud host, and is a host product in a cloud computing service system, so as to solve the defects of high management difficulty and weak service expansibility in the traditional physical host and VPS service ("Virtual Private Server", or simply "VPS"). The server may also be a server of a distributed system, or a server incorporating a blockchain.
According to another aspect of the embodiments of the present application, there is also provided a roadside device including the electronic device according to the above embodiments.
According to another aspect of the embodiment of the present application, an embodiment of the present application further provides a cloud control platform, including the electronic device according to the above embodiment.
According to another aspect of the embodiments of the present application, there is also provided a detection frame adjusting system for signal lamp detection, including:
an apparatus as in any of the embodiments above, such as the apparatus shown in any of the embodiments of fig. 5, 6, and 7;
and the image acquisition device is used for acquiring the image sequence and transmitting the image sequence to the device.
In some embodiments, the device may be a roadside apparatus as described in the above embodiments.
It should be understood that various forms of the flows shown above may be used, with steps reordered, added, or deleted. For example, the steps described in the present application may be executed in parallel, sequentially, or in different orders, and the present invention is not limited thereto as long as the desired results of the technical solutions disclosed in the present application can be achieved.
The above-described embodiments should not be construed as limiting the scope of the present application. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made in accordance with design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims (30)

1. A detection frame adjusting method applied to signal lamp detection comprises the following steps:
acquiring signal lamp detection information of each image in an image sequence, wherein the signal lamp detection information comprises a lamp head detection frame of each lamp head;
determining a signal lamp combination to be analyzed according to signal lamp detection information of each image, and determining a frame to be detected of the signal lamp combination, wherein each lamp holder in the signal lamp combination is a lamp holder of different types;
and if the frame to be detected is different from the preset initial detection frame of the signal lamp, adjusting the initial detection frame to obtain a target detection frame, wherein the target detection frame is used for detecting the signal lamp in the image to be detected.
2. The method of claim 1, wherein determining a signal light combination to be analyzed from the signal light detection information of each of the images comprises:
and selecting a plurality of lamp caps forming the signal lamp according to the lamp cap detection frame of each lamp cap of each image so as to obtain the signal lamp combination.
3. The method of claim 2, wherein selecting a plurality of lightheads that make up the signal light based on the lighthead detection box for each lighthead of the respective images comprises:
determining differential information between any two lamp holder detection frames;
and filtering each lamp cap according to each piece of differential information, and selecting the plurality of lamp caps from each lamp cap after filtering.
4. The method of claim 3, wherein determining the difference information between any two lighthead detection boxes comprises:
determining an original detection frame corresponding to each lamp holder in the initial detection frame;
calculating the ratio of the coverage range of the lamp holder detection frame of each lamp holder to the coverage range of the original detection frame;
and calculating differentiation information between the lamp holder detection frame with the maximum ratio and other lamp holder detection frames in sequence.
5. The method of claim 4, wherein the lighthead detection box is a minimum bounding rectangle of the lighthead; calculating the ratio between the coverage of the lamphead detection frame of each lamphead and the coverage of the original detection frame, wherein the ratio comprises the following steps:
determining the range coverage relation between the lamp holder detection frame of each lamp holder and the original detection frame;
and if the lamp holder detection frame of any lamp holder comprises a range covered by the original detection frame of any lamp holder, calculating the ratio between the lamp holder detection frame of any lamp holder and the original detection frame.
6. The method of claim 4, wherein determining the original detection box corresponding to each lighthead in the initial detection box comprises:
acquiring an original image, and determining an initial detection frame of a signal lamp in the original image according to the labeling information of the original image;
and determining the original detection frame corresponding to each lamp holder according to the initial detection frame and the number of each lamp holder in the initial detection frame.
7. The method of claim 1, further comprising:
determining a distance value between two lamp holders with the farthest distance in the signal lamp combination;
determining the length of the signal lamp according to the initial detection frame, and determining the difference value between the distance value and the length;
and if the difference is smaller than a preset difference threshold value, determining that the frame to be detected is different from a preset initial detection frame of the signal lamp.
8. The method of claim 1, further comprising:
determining the coverage range of the frame to be detected, and determining the coverage range of the initial detection frame;
and if at least part of the coverage range of the frame to be detected is not included in the coverage range of the initial detection frame, determining that the frame to be detected is different from the preset initial detection frame of the signal lamp.
9. The method of any of claims 1 to 8, wherein adjusting the initial detection frame to obtain a target detection frame comprises:
determining a distance value between two lamp holders with the farthest distance in the signal lamp combination, and determining the center position of a signal lamp in the signal lamp combination according to the distance value;
and adjusting the position of the initial detection frame in the image according to the central position to obtain the target detection frame.
10. The method of any of claims 1 to 8, wherein the acquiring signal light detection information for each image in the sequence of images comprises:
acquiring the image sequence, and determining a foreground image of each image in the image sequence;
detecting the foreground image of each image to obtain a signal lamp initial frame of each image;
and splitting the signal lamp initial frame of each image to obtain the lamp holder detection frame of each lamp holder of each image.
11. The method of claim 10, wherein determining a foreground image for each image in the sequence of images comprises:
acquiring at least one sample image including a signal lamp;
determining foreground pixel distribution information of each foreground pixel point and background pixel distribution information of each background pixel point in the at least one sample image according to the at least one sample image;
and constructing the background identification model according to the distribution information of each foreground pixel and the distribution information of each background pixel, and determining the foreground image of each image in the image sequence according to the background identification model.
12. The method of any of claims 1 to 8, further comprising:
acquiring an image to be detected, detecting a signal lamp in the image to be detected according to the target detection frame, generating and outputting a detection result to an access vehicle;
or outputting the target detection frame to the access vehicle.
13. A detection frame adjusting device applied to signal lamp detection comprises:
the system comprises a first acquisition unit, a second acquisition unit and a processing unit, wherein the first acquisition unit is used for acquiring signal lamp detection information of each image in an image sequence, and the signal lamp detection information comprises a lamp holder detection frame of each lamp holder;
the first determining unit is used for determining a signal lamp combination to be analyzed according to the signal lamp detection information of each image;
the second determination unit is used for determining the undetermined detection frame of the signal lamp combination, wherein each lamp holder in the signal lamp combination is a lamp holder of different types;
and the adjusting unit is used for adjusting the initial detection frame to obtain a target detection frame if the undetermined detection frame is different from the preset initial detection frame of the signal lamp, wherein the target detection frame is used for detecting the signal lamp in the image to be detected.
14. The apparatus according to claim 13, wherein the first determining unit is configured to select a plurality of bases constituting a signal lamp according to the base detection frame of each base of each image to obtain the signal lamp combination.
15. The apparatus of claim 14, wherein the first determining unit comprises:
the first determining subunit is used for determining the difference information between any two lamp holder detection frames;
and the selecting subunit is used for filtering each lamp cap according to each piece of differential information and selecting the plurality of lamp caps from the filtered lamp caps.
16. The apparatus of claim 15, wherein the first determining subunit comprises:
the first determining module is used for determining the original detection frames corresponding to the lamp holders in the initial detection frames;
the first calculation module is used for calculating the ratio of the coverage range of the lamp holder detection frame of each lamp holder to the coverage range of the original detection frame;
and the second calculation module is used for sequentially calculating the differential information between the lamp holder detection frame with the maximum ratio and other lamp holder detection frames.
17. The apparatus of claim 16, wherein the lighthead detection box is a minimum bounding rectangle of the lighthead; the first computing module, comprising:
the first determining submodule is used for determining the range coverage relation between the lamp holder detection frame of each lamp holder and the original detection frame;
and the calculation submodule is used for calculating the ratio between the lamp holder detection frame of any lamp holder and the original detection frame of any lamp holder if the lamp holder detection frame of any lamp holder comprises the range covered by the original detection frame of any lamp holder.
18. The apparatus of claim 16, wherein the first determining means comprises:
the acquisition submodule is used for acquiring an original image;
the second determining submodule is used for determining an initial detection frame of a signal lamp in the original image according to the labeling information of the original image;
and the third determining submodule is used for determining the original detection frame corresponding to each lamp holder according to the initial detection frame and the number of each lamp holder in the initial detection frame.
19. The apparatus of claim 13, further comprising:
the third determining unit is used for determining a distance value between two lamp holders with the farthest distances in the signal lamp combination;
the fourth determining unit is used for determining the length of the signal lamp according to the initial detection frame and determining the difference value between the distance value and the length;
and the fifth determining unit is used for determining that the frame to be detected is different from the preset initial detection frame of the signal lamp if the difference value is smaller than a preset difference value threshold value.
20. The apparatus of claim 13, further comprising:
a sixth determining unit, configured to determine a coverage area of the frame to be detected, and determine a coverage area of the initial detection frame;
a seventh determining unit, configured to determine that the frame to be detected is different from the preset initial detection frame of the signal lamp if at least a part of the coverage area of the frame to be detected is not included in the coverage area of the initial detection frame.
21. The apparatus according to any one of claims 13 to 20, wherein the adjusting unit comprises:
the second determining subunit is used for determining a distance value between two lamp holders with the farthest distance in the signal lamp combination and determining the center position of a signal lamp in the signal lamp combination according to the distance value;
and the adjusting subunit is used for adjusting the position of the initial detection frame in the image according to the central position to obtain the target detection frame.
22. The apparatus according to any one of claims 13 to 20, wherein the first obtaining unit comprises:
an acquisition subunit configured to acquire the sequence of images;
a third determining subunit, configured to determine a foreground image of each image in the image sequence;
the detection unit is used for detecting the foreground image of each image to obtain a signal lamp initial frame of each image;
and the splitting subunit is used for splitting the signal lamp initial frame of each image to obtain a lamp holder detection frame of each lamp holder of each image.
23. The apparatus of claim 22, wherein the third determining subunit comprises:
an acquisition module for acquiring at least one sample image including a signal lamp;
the second determining module is used for determining foreground pixel distribution information of each foreground pixel point and background pixel distribution information of each background pixel point in the at least one sample image according to the at least one sample image;
the construction module is used for constructing the background identification model according to the distribution information of each foreground pixel and the distribution information of each background pixel;
a third determining module, configured to determine a foreground image of each image in the image sequence according to the background recognition model.
24. The apparatus of any of claims 13 to 20, further comprising:
the system comprises a first acquisition unit, a detection unit and a first output unit, wherein the first acquisition unit is used for acquiring an image to be detected, the detection unit is used for detecting a signal lamp in the image to be detected according to a target detection frame to generate a detection result, and the first output unit is used for outputting the detection result to an access vehicle; alternatively, the first and second electrodes may be,
and the second output unit is used for outputting the target detection frame to the access vehicle.
25. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-12.
26. A non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method of any one of claims 1-12.
27. A computer program product comprising a computer program which, when executed by a processor, implements the method according to any one of claims 1-12.
28. A roadside apparatus comprising the electronic apparatus of claim 25.
29. A cloud controlled platform comprising the electronic device of claim 25.
30. A detection frame adjusting system applied to signal lamp detection comprises:
the apparatus of any one of claims 13 to 24;
and the image acquisition device is used for acquiring the image sequence and transmitting the image sequence to the device.
CN202110452454.2A 2021-04-26 2021-04-26 Detection frame adjusting method and device applied to signal lamp detection and road side equipment Pending CN113221878A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110452454.2A CN113221878A (en) 2021-04-26 2021-04-26 Detection frame adjusting method and device applied to signal lamp detection and road side equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110452454.2A CN113221878A (en) 2021-04-26 2021-04-26 Detection frame adjusting method and device applied to signal lamp detection and road side equipment

Publications (1)

Publication Number Publication Date
CN113221878A true CN113221878A (en) 2021-08-06

Family

ID=77089051

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110452454.2A Pending CN113221878A (en) 2021-04-26 2021-04-26 Detection frame adjusting method and device applied to signal lamp detection and road side equipment

Country Status (1)

Country Link
CN (1) CN113221878A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114170821A (en) * 2021-12-16 2022-03-11 阿波罗智联(北京)科技有限公司 Signal machine performance detection method and device and traffic signal lamp control system
CN114419579A (en) * 2021-12-27 2022-04-29 阿波罗智联(北京)科技有限公司 Method, device and equipment for marking traffic signal lamp and edge computing equipment
CN114758495A (en) * 2022-03-29 2022-07-15 北京百度网讯科技有限公司 Traffic signal lamp adjusting method and device and electronic equipment

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108229250A (en) * 2016-12-14 2018-06-29 杭州海康威视数字技术股份有限公司 Traffic lights method for relocating and device
WO2018201835A1 (en) * 2017-05-03 2018-11-08 腾讯科技(深圳)有限公司 Signal light state recognition method, device and vehicle-mounted control terminal and motor vehicle
WO2020098506A1 (en) * 2018-11-13 2020-05-22 北京市商汤科技开发有限公司 Intersection state detection method and apparatus, electronic device and vehicle
CN112101272A (en) * 2020-09-23 2020-12-18 北京百度网讯科技有限公司 Traffic light detection method and device, computer storage medium and road side equipment
CN112507956A (en) * 2020-12-21 2021-03-16 北京百度网讯科技有限公司 Signal lamp identification method and device, electronic equipment, road side equipment and cloud control platform
CN112669387A (en) * 2020-12-28 2021-04-16 北京百度网讯科技有限公司 Method and device for determining position of lamp holder, storage medium, program, and road side device
CN112700410A (en) * 2020-12-28 2021-04-23 北京百度网讯科技有限公司 Signal lamp position determination method, signal lamp position determination device, storage medium, program, and road side device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108229250A (en) * 2016-12-14 2018-06-29 杭州海康威视数字技术股份有限公司 Traffic lights method for relocating and device
WO2018201835A1 (en) * 2017-05-03 2018-11-08 腾讯科技(深圳)有限公司 Signal light state recognition method, device and vehicle-mounted control terminal and motor vehicle
WO2020098506A1 (en) * 2018-11-13 2020-05-22 北京市商汤科技开发有限公司 Intersection state detection method and apparatus, electronic device and vehicle
CN112101272A (en) * 2020-09-23 2020-12-18 北京百度网讯科技有限公司 Traffic light detection method and device, computer storage medium and road side equipment
CN112507956A (en) * 2020-12-21 2021-03-16 北京百度网讯科技有限公司 Signal lamp identification method and device, electronic equipment, road side equipment and cloud control platform
CN112669387A (en) * 2020-12-28 2021-04-16 北京百度网讯科技有限公司 Method and device for determining position of lamp holder, storage medium, program, and road side device
CN112700410A (en) * 2020-12-28 2021-04-23 北京百度网讯科技有限公司 Signal lamp position determination method, signal lamp position determination device, storage medium, program, and road side device

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114170821A (en) * 2021-12-16 2022-03-11 阿波罗智联(北京)科技有限公司 Signal machine performance detection method and device and traffic signal lamp control system
CN114419579A (en) * 2021-12-27 2022-04-29 阿波罗智联(北京)科技有限公司 Method, device and equipment for marking traffic signal lamp and edge computing equipment
CN114758495A (en) * 2022-03-29 2022-07-15 北京百度网讯科技有限公司 Traffic signal lamp adjusting method and device and electronic equipment
CN114758495B (en) * 2022-03-29 2024-02-06 北京百度网讯科技有限公司 Traffic signal lamp adjusting method and device and electronic equipment

Similar Documents

Publication Publication Date Title
CN113221878A (en) Detection frame adjusting method and device applied to signal lamp detection and road side equipment
EP3859708B1 (en) Traffic light image processing method and device, and roadside device
US20220130153A1 (en) Vehicle control method, apparatus, electronic device and vehicle
CN112863187B (en) Detection method of perception model, electronic equipment, road side equipment and cloud control platform
US20230049656A1 (en) Method of processing image, electronic device, and medium
JP2022043214A (en) Method and apparatus for determining location of traffic light, storage medium, program, and roadside device
CN111931726A (en) Traffic light detection method and device, computer storage medium and road side equipment
CN115424231B (en) Information processing method and device, electronic equipment, storage medium and product
CN113469109B (en) Traffic light identification result processing method and device, road side equipment and cloud control platform
CN112699754B (en) Signal lamp identification method, device, equipment and storage medium
CN113052047B (en) Traffic event detection method, road side equipment, cloud control platform and system
EP4080479A2 (en) Method for identifying traffic light, device, cloud control platform and vehicle-road coordination system
CN111582278A (en) Portrait segmentation method and device and electronic equipment
CN112307970B (en) Training data acquisition method and device, electronic equipment and storage medium
CN112669387B (en) Lamp holder position determining method, device, storage medium, program, and road side equipment
CN113780178A (en) Road detection method, road detection device, electronic equipment and storage medium
CN114005098A (en) Method and device for detecting lane line information of high-precision map and electronic equipment
CN113591569A (en) Obstacle detection method, obstacle detection device, electronic apparatus, and storage medium
CN113313944A (en) Method, device and system for processing lamp state data
CN112396668A (en) Method and device for identifying abnormal light color in signal lamp and road side equipment
CN110796610A (en) Image defogging method, device and equipment and storage medium
CN113947762A (en) Traffic light color identification method, device and equipment and road side computing equipment
CN115731386A (en) Method and device for identifying lamp cap type of traffic signal lamp and automatic driving vehicle
CN114419579A (en) Method, device and equipment for marking traffic signal lamp and edge computing equipment
CN114627423A (en) Object detection and model training method, device, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination