Search

CN-121999445-A - Secure ribbon identification method, electronic device, and computer-readable storage medium

CN121999445ACN 121999445 ACN121999445 ACN 121999445ACN-121999445-A

Abstract

The application discloses a safety belt identification method, electronic equipment and a computer readable storage medium, wherein the method comprises the steps of extracting a seat characteristic diagram corresponding to a seat area from a target image, wherein the seat characteristic diagram comprises a reference area for representing the position of a preset safety belt and an expansion area which is expanded outwards from the reference area; and carrying out safety belt state identification by utilizing the target feature map to obtain a state identification result corresponding to the seat area, wherein the state identification result comprises whether a target in the seat area is fastened with the safety belt or not. By the mode, the safety belt identification method and the safety belt identification device can improve accuracy of safety belt identification.

Inventors

  • SHEN KONGHUAI
  • WANG KEYANG
  • LI KAIDE
  • LI HAORAN
  • Lv Cuiwen
  • GUO JIAN
  • SHAO MING

Assignees

  • 浙江大华技术股份有限公司

Dates

Publication Date
20260508
Application Date
20251211

Claims (13)

  1. 1. A security zone identification method, the method comprising: Extracting a seat characteristic diagram corresponding to a seat area from a target image, wherein the seat characteristic diagram comprises a reference area for representing the position of a preset safety belt and an expansion area which is expanded outwards by the reference area; enhancing at least part of the features in the expansion area in the seat feature map to obtain a target feature map; And carrying out safety belt state identification by using the target feature map to obtain a state identification result corresponding to the seat area, wherein the state identification result comprises whether a target in the seat area is fastened with a safety belt or not.
  2. 2. The method of claim 1, wherein after the extracting the seat feature map corresponding to the seat region from the target image, the method further comprises: Acquiring a first weight map corresponding to the seat feature map, wherein the first weight map comprises first weights corresponding to position points in a key area of the seat feature map, and the key area comprises the reference area and the expansion area; The enhancing at least part of the features in the expansion area in the seat feature map to obtain a target feature map comprises the following steps: Adjusting the first weight map, wherein the characteristics of the corresponding position points can be enhanced by the adjusted first weight of at least one position point of the expansion area; and fusing the adjusted first weight map with the seat feature map or the local feature map to obtain a target feature map, wherein the local feature map is a feature map corresponding to a key region in the seat feature map.
  3. 3. The method of claim 2, wherein the first weight in the first weight map before adjustment satisfies at least one condition that a maximum weight value and a minimum weight value in the first weight map before adjustment are a reference maximum weight value and a reference minimum weight value, respectively, the first weight of each position point of the reference area is the reference maximum weight value, the first weight of each position point in the expansion area decreases with the distance from the reference area, and the first weight of each position point in the expansion area decreases with the distance from the reference area according to a Gaussian distribution; And/or, in the first weight map before adjustment, the first weight is the position point of the attention weight value, which is located between the reference maximum weight value and the reference minimum weight value, and in the first weight map after adjustment, the first weight of the attention weight point is the largest, and the position point, which is closer to the attention weight value, is larger; And/or, the first weight of each position point in the adjusted first weight map is greater than or equal to the reference maximum weight value.
  4. 4. The method of claim 1, wherein the step of enhancing at least some of the features in the extended region in the seat feature map to obtain a target feature map is performed when the seat feature map is used to preliminarily determine that the target of the seat region is belted, and wherein before the step of performing safety belt identification using the target feature map to obtain a state identification result corresponding to the seat region, the method further comprises: And under the condition that the seat area does not have the target or the target non-safety belt of the seat area is preliminarily judged by utilizing the seat feature map, the seat feature map or a local feature map is taken as a target feature map, the local feature map is a feature map corresponding to a key area in the seat feature map, and the key area comprises the reference area and the expansion area.
  5. 5. The method of claim 4, wherein after the extracting the seat feature map corresponding to the seat region from the target image, the method further comprises: performing preliminary discrimination by using the seat characteristic map; Under the condition that whether the target of the seat area is fastened with a safety belt is judged preliminarily, a first weight map corresponding to the seat feature map is generated, wherein the first weight map comprises first weights corresponding to all position points in a key area of the seat feature map, the key area comprises the reference area and the expansion area, the first weights of all position points of the reference area are all reference maximum weight values, and the first weights of all position points in the expansion area decrease along with the distance between the first weights and the reference area; Under the condition that the seat area is not provided with the target or the target non-safety belt of the seat area is preliminarily judged, generating a second weight map corresponding to the seat feature map as a weight map corresponding to the seat feature map, wherein the second weight map comprises second weights corresponding to all position points in a key area of the seat feature map, the second weights of all position points in the key area are reference minimum weight values, and enhancing at least part of features in the expansion area in the seat feature map to obtain a target feature map, and the method comprises the following steps: Adjusting the first weight map, wherein the characteristics of the corresponding position points can be enhanced by the adjusted first weight of at least one position point of the expansion area; Fusing the adjusted first weight map with the seat feature map or the local feature map to obtain a target feature map, wherein the local feature map is a feature map corresponding to a key region in the seat feature map; The step of taking the seat feature map or the local feature map as a target feature map comprises the following steps: Adjusting the second weight map, wherein the characteristics of the corresponding position points can be unchanged after fusion by the adjusted second weight of each position point in the key region; And fusing the adjusted second weight map with the seat feature map or the local feature map to obtain a target feature map.
  6. 6. The method according to claim 2 to 5, wherein, The adjusting the first weight map or the adjusting the second weight map includes: for each position point in the key area, acquiring a first difference between a first weight/second weight of the position point before adjustment and a concerned weight value, and subtracting a second difference obtained by squaring the first difference from a target upper limit weight value to be used as the first weight/second weight of the position point after adjustment; and/or, the fusing the adjusted first weight map with the seat feature map or the local feature map, or fusing the adjusted second weight map with the seat feature map or the local feature map, including: multiplying the adjusted first/second weight map with the seat or local feature map.
  7. 7. The method of claim 1, wherein prior to said utilizing said target profile for security zone identification to obtain a status identification result corresponding to said seating area, said method further comprises: and performing cross attention processing on the target feature map and the seat feature map as a new target feature map for identifying the safety belt state.
  8. 8. The method of claim 1, wherein the extracting the seat feature map corresponding to the seat area from the target image includes: Acquiring an initial feature map of a target image; Extracting features in a preset area from the initial feature map to serve as an area feature map; And taking the regional characteristic map as the regional characteristic map corresponding to the seat region, or carrying out cross attention processing on the regional characteristic map and the initial characteristic map to obtain the regional characteristic map corresponding to the seat region.
  9. 9. The method of claim 7 or 8, wherein the cross-attention processing of the target feature map and the seat feature map or the cross-attention processing of the region feature map and the initial feature map comprises: Performing feature transformation on the first feature map to obtain query features, and performing feature transformation on the second feature map to obtain key features and value features; Performing cross attention processing by utilizing the query feature, the key feature and the value feature; The first feature map is a target feature map, the second feature map is a seat feature map, or the first feature map is a region feature map, and the second feature map is an initial feature map.
  10. 10. The method of claim 1, wherein the step of performing security zone identification using the target feature map to obtain a status identification result corresponding to the seating area is performed by a large language model; And/or before the state recognition result corresponding to the seat area is obtained by utilizing the target feature map, the method further comprises the steps of utilizing the initial feature map of the target image to recognize the position relationship between the preset part of the main driving target in the target image and the steering wheel, and utilizing the target feature map to perform the state recognition to obtain the state recognition result corresponding to the seat area, wherein the step of utilizing the position relationship and the target feature map corresponding to each seat area in the target image to perform the state recognition to obtain the state recognition result corresponding to each seat area in the target image.
  11. 11. The method of claim 10, wherein the performing the security zone identification using the positional relationship and the target feature map corresponding to each seat area in the target image to obtain the status identification result corresponding to each seat area in the target image includes: Splicing the position relation, the corresponding features of each seat area in the target image and the prompt words to obtain spliced features, wherein the corresponding features of the seat areas are target feature images corresponding to the seat areas or sequence features obtained by serializing the target feature images corresponding to the seat areas; and predicting the splicing characteristics by using the large language model to obtain a state recognition result corresponding to each seat area in the target image.
  12. 12. An electronic device comprising a memory for storing program instructions and a processor for executing the program instructions to implement the seat belt state identification method of any one of claims 1-11.
  13. 13. A computer readable storage medium, characterized in that the computer readable storage medium is for storing program instructions, the program instructions being executable to implement the seat belt state identification method of any one of claims 1 to 11.

Description

Secure ribbon identification method, electronic device, and computer-readable storage medium Technical Field The present application relates to the field of image processing technologies, and in particular, to a security zone identification method, an electronic device, and a computer readable storage medium. Background Along with the continuous improvement and upgrade of technology and calculation, the intelligent promotion of road monitoring equipment is obvious, and the effective rate of monitoring and recording traffic illegal behaviors is greatly improved. The driver is not wearing the safety belt, which is one of the interesting illegal behaviors, but the imaging effect of the scene inside the vehicle window is challenged greatly due to various factors such as the visual degree, illumination and weather, night illumination, snapshot angle and the like of the vehicle window, and meanwhile, the safety belt state judgment of the driver is more difficult due to the influence of the action posture of the driver. Disclosure of Invention The application mainly solves the technical problem of providing a safety belt state identification method, electronic equipment and a computer readable storage medium, which can improve the accuracy of safety belt state identification. In order to solve the technical problems, the first aspect of the application provides a safety belt state identification method, which comprises the steps of extracting a seat characteristic diagram corresponding to a seat area from a target image, wherein the seat characteristic diagram comprises a reference area for representing the position of a preset safety belt and an expansion area which is expanded outwards by the reference area, enhancing at least part of features in the expansion area in the seat characteristic diagram to obtain a target characteristic diagram, and carrying out safety belt state identification by utilizing the target characteristic diagram to obtain a state identification result corresponding to the seat area, wherein the state identification result comprises whether a target in the seat area is fastened with the safety belt. The safety belt state identification method comprises the steps of obtaining a first weight map corresponding to a seat feature map after the seat feature map corresponding to a seat region is extracted from a target image, wherein the first weight map comprises first weights corresponding to position points in a key region of the seat feature map, the key region comprises the reference region and the expansion region, at least part of features in the expansion region in the seat feature map are enhanced to obtain the target feature map, the method comprises the steps of adjusting the first weight map, wherein the features of the corresponding position points can be enhanced by at least one position point of the expansion region after adjustment of the first weight map, and the target feature map is obtained by fusing the adjusted first weight map with the seat feature map or the local feature map, and the local feature map is the feature map corresponding to the key region in the seat feature map. The first weight of each position point in the expansion area is decreased along with the distance from the reference area, the first weight of each position point in the expansion area is decreased along with the distance from the reference area according to Gaussian distribution, and/or the first weight of each position point in the first weight image before adjustment is a position point of interest, the position point of interest is positioned between the reference maximum weight value and the reference minimum weight value, the first weight of each position point in the first weight image after adjustment is the maximum weight value, the first weight of each position point in the expansion area is decreased along with the distance from the reference area according to Gaussian distribution, and/or the first weight of each position point before adjustment is the position point of interest, the position point of interest is positioned between the reference maximum weight value and the reference minimum weight value, and the first weight of each position point of interest is positioned at the position point of interest or more after the first weight image after adjustment. The method for identifying the safety belt state further comprises the step of using the seat feature map to preliminarily judge that the seat feature map or a local feature map is used as a target feature map when the seat region does not exist or the target safety belt of the seat region is not located, wherein the step of using the seat feature map to preliminarily judge that the seat region is provided with the safety belt, the step of using the seat feature map is carried out when the seat feature map is used to preliminarily judge that the seat region is provided with the safety belt, and the key region comprises the refere