A data matrix processing method, device, electronic device and storage medium

By converting the driving position image in the vehicle image into a complex-dimensional data matrix and inputting it into a matching detection model, the existing seat belt detection methods have been solved, and higher detection accuracy and robustness are achieved, and manual review costs are reduced.

CN119360326BActive Publication Date: 2025-04-25JINAN BOGUAN INTELLIGENT TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411919486.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-25
Publication Date
2025-04-25
Estimated Expiration
2044-12-25

AI Technical Summary

Technical Problem

The existing seat belt detection methods have low accuracy and high misjudgment rates, resulting in large workload, low efficiency and high labor costs.

Method used

By extracting the driving position image in the vehicle image, converting it into a data matrix including at least a complex dimension, and inputting it into a detection model matching the dimension of the data matrix, the seat belt detection processing results are obtained.

Benefits of technology

It improves the accuracy of seat belt detection, reduces the misjudgment rate, reduces the cost of manual review, and enhances the robustness of the detection and adaptability to the scene.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119360326B_ABST
    Figure CN119360326B_ABST
Patent Text Reader

Abstract

The present invention discloses a data matrix processing method, device, electronic device and storage medium, the method comprising: determining a vehicle image, and determining a driving position image in the vehicle image; converting the driving position image of the color dimension into a data matrix including at least a complex dimension; wherein the complex dimension comprises a real dimension and an imaginary dimension, the real dimension indicates that the elements in the data matrix correspond to the real part of the complex number, and the imaginary dimension indicates that the elements in the data matrix correspond to the imaginary part of the complex number; inputting the data matrix into a detection model matching the dimension of the data matrix, and obtaining a seat belt detection processing result output by the detection model matching the data matrix. The present invention can improve the accuracy of seat belt detection and reduce labor costs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image processing technology, and in particular to a data matrix processing method, device, electronic equipment and storage medium. Background Art

[0002] With the rapid development of the transportation sector and the increase in the number of cars, traffic safety has become an important issue. Among them, the correct wearing and use of seat belts is an important guarantee for driver safety.

[0003] Existing seat belt detection usually uses image recognition to detect whether the driver is wearing a seat belt. However, due to environmental factors such as vehicle posture, ambient lighting, environmental occlusion, and interference from human factors such as the color of the driver's clothing being close to the seat belt and hair accessories occluding the seat belt, the existing seat belt detection algorithm has low accuracy and high misjudgment rate, resulting in a large workload of manual review, low efficiency and high labor costs. Summary of the invention

[0004] The present invention provides a data matrix processing method, device, electronic equipment and storage medium to improve the accuracy of seat belt detection and reduce labor costs.

[0005] In a first aspect, an embodiment of the present invention provides a data matrix processing method, the method comprising:

[0006] determining a vehicle image and determining a driving position image in the vehicle image;

[0007] converting the driving position image in color dimension into a data matrix including at least a complex dimension;

[0008] The complex dimension includes a real dimension and an imaginary dimension. The real dimension indicates that the elements in the data matrix correspond to the real part of the complex number, and the imaginary dimension indicates that the elements in the data matrix correspond to the imaginary part of the complex number.

[0009] The data matrix is ​​input into a detection model that matches the dimension of the data matrix, and a seat belt detection processing result that matches the data matrix is ​​obtained, which is output by the detection model.

[0010] In a second aspect, an embodiment of the present invention further provides a data matrix processing device, the device comprising:

[0011] a driving position image determination module, configured to determine a vehicle image and determine a driving position image in the vehicle image;

[0012] An image dimension conversion module, used to convert the driving position image of the color dimension into a data matrix including at least a complex dimension;

[0013] The complex dimension includes a real dimension and an imaginary dimension. The real dimension indicates that the elements in the data matrix correspond to the real part of the complex number, and the imaginary dimension indicates that the elements in the data matrix correspond to the imaginary part of the complex number.

[0014] The data matrix processing module is used to input the data matrix into a detection model that matches the dimension of the data matrix, and obtain a seat belt detection processing result output by the detection model that matches the data matrix.

[0015] In a third aspect, an embodiment of the present invention further provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, a data matrix processing method as described in any one of the embodiments of the present invention is implemented.

[0016] In a fourth aspect, an embodiment of the present invention further provides a storage medium storing computer executable instructions, wherein the computer executable instructions, when executed by a computer processor, are used to execute the data matrix processing method as described in any one of the embodiments of the present invention.

[0017] The technical solution of the embodiment of the present invention obtains the seat belt detection processing result output by the detection model by extracting the driving position image in the vehicle image, converting the driving position image in the color dimension into a data matrix including at least a complex dimension, and inputting the data matrix into a detection model that matches the dimension of the data matrix. The problem of low accuracy, high false detection rate and high labor cost of the seat belt detection method in the prior art is solved. By converting the driving position image in the color dimension into a data matrix of complex dimensions, the original data is divided into key parts and non-key parts, which makes it easier to capture the key parts required for seat belt detection, thereby improving the accuracy of seat belt detection. At the same time, through the detection model of complex dimensions, the adaptability to the scene is improved and the robustness of seat belt detection is enhanced.

[0018] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0020] Figure 1 is a flow chart of a data matrix processing method provided by an embodiment of the present invention;

[0021] Figure 2 is a flow chart of another data matrix processing method provided by an embodiment of the present invention;

[0022] Figure 3 is a partial schematic diagram of a grayscale image provided by an embodiment of the present invention;

[0023] Figure 4 It is a partial schematic diagram of a line segment information dimension data matrix provided by an embodiment of the present invention;

[0024] Figure 5 is a schematic diagram of a line segment detection result and a line segment information dimension data matrix of a driving position image provided by an embodiment of the present invention;

[0025] Figure 6 is a structural schematic diagram of a data matrix processing device provided by an embodiment of the present invention;

[0026] Figure 7 is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention;

[0027] In the figure: 310, driving position image determination module, 320, image dimension conversion module, 330, data matrix processing module;

[0028] 10. Electronic device, 11. Processor, 12. Read-only memory, 13. Random access memory, 14. Bus, 15. Input / output interface, 16. Input unit, 17. Output unit, 18. Storage unit, 19. Communication unit. DETAILED DESCRIPTION

[0029] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0030] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices. In the embodiments of the present application, some existing solutions in the industry such as certain software, components, models, etc. may be mentioned, and they should be considered as exemplary, and their purpose is only to illustrate the feasibility of the implementation of the technical solution of the present application, but it does not mean that the applicant has or must use the solution.

[0031] The acquisition, transmission, storage, use, and processing of data in the technical solution of this application comply with the relevant provisions of national laws and regulations.

[0032] Figure 1 A flow chart of a data matrix processing method is provided for an embodiment of the present invention. This embodiment is applicable to situations where data matrix processing is performed. The method can be executed by a data matrix processing device. The data matrix processing device can be implemented in the form of hardware and / or software. The data matrix processing device can be configured in a server and used in conjunction with a shooting device.

[0033] like Figure 1 As shown, the method includes:

[0034] S110: Determine a vehicle image, and determine a driving position image in the vehicle image.

[0035] Among them, the vehicle image is the image that needs to be tested for seat belts, and can be an image captured by capturing the vehicle. When at least two vehicle images are captured, the vehicle image with the largest vehicle area size or the best image quality can be selected for subsequent seat belt testing.

[0036] The driving position image refers to an image corresponding to the driver position area in the vehicle, and the driving position image can be obtained by cropping the driver position area in the vehicle image. The driving position image can be a predetermined shape and size, or the shape and size can be flexibly set according to the actual needs of seat belt detection.

[0037] In an optional embodiment, the driving position image is determined in the vehicle image, and the human body region in the vehicle image may be detected by a human body detection algorithm or a pre-trained human body detection model. When only one human body region is detected, the human body region in the vehicle image is cropped to obtain the driving position image; when at least two human body regions are detected, a target human body region is determined according to the positional relationship between each human body region and the vehicle region, and the target human body region in the vehicle image is cropped to obtain the driving position image.

[0038] In another optional embodiment, the driving position image is determined in the vehicle image, and the positional relationship and size ratio between the driving position area and the vehicle area may be pre-set, and the vehicle image may be cropped according to the positional relationship and size ratio to obtain the driving position image.

[0039] In this embodiment, subsequent seat belt detection is performed based on the driving position image in the vehicle image, which can eliminate the interference of other positions in the vehicle and other factors on the seat belt detection.

[0040] S120: Convert the driving position image in color dimension into a data matrix including at least a complex dimension.

[0041] The color dimension refers to the color mode of the driving position image, which is RGB (Red, Green, Blue). That is, the pixel value of the pixel of the driving position image is composed of the values ​​of the three color channels of red, green, and blue. In the driving position image, each pixel is composed of different intensities of the above three colors. The values ​​of the three color channels of red, green, and blue are different, and the final mixed colors are different.

[0042] The complex dimension includes the real dimension and the imaginary dimension. The real dimension indicates that the elements in the data matrix correspond to the real part of the complex number, and the imaginary dimension indicates that the elements in the data matrix correspond to the imaginary part of the complex number. The complex dimension means that the elements in the data matrix are in complex form. Complex numbers refer to A number of the form, where i is the imaginary unit, , a is the real part of the complex number, and b is the imaginary part of the complex number. The real part and the imaginary part represent different physical properties or characteristics. Correspondingly, the real dimension refers to the elements in the data matrix being the real part of the complex number, and the imaginary dimension refers to the elements in the data matrix being the imaginary part of the complex number.

[0043] The data matrix is ​​the data matrix obtained by converting the pixel values ​​of the pixels of the driving position image from the RGB three-channel values ​​into complex form as the values ​​of the elements in the matrix. The size of the data matrix matches the size of the driving position image. For example, if the size of the driving position image is 300×100 pixels, the data matrix is ​​a 300×100 matrix.

[0044] The data matrix must at least include a complex dimension, that is, the data matrix may also include other dimensions. For example, it may also include a feature information dimension, which is used to represent the feature information of the pixel points of the driving position image corresponding to the elements in the data matrix, such as color features, texture features, etc. In a specific example, taking color features as an example, based on the RGB three-channel values ​​of the pixel points of the driving position image, the average value or weighted average value of each channel value is calculated as the color feature value corresponding to the pixel point.

[0045] In another specific example, taking texture features as an example, the driving position image of the color dimension is converted into a grayscale image. Specifically, the RGB three-channel values ​​of each pixel are weighted and summed, and the calculated value is used as the grayscale value of each pixel. Determine the direction and distance of calculating the grayscale co-occurrence matrix. For example, the direction can be horizontal (0°), vertical (90°), diagonal (45° and 135°), etc. The distance can be determined according to the image size and texture scale, and generally a distance of several pixels is taken. For each pixel in the grayscale image, for the current pixel, according to the direction and distance of the grayscale co-occurrence matrix, determine the pixel with the same grayscale value as the current pixel as a pixel pair. Count the number of times the pixel pairs corresponding to different grayscale value combinations appear in the direction and distance of the grayscale co-occurrence matrix to obtain the grayscale co-occurrence matrix. The rows and columns of the grayscale co-occurrence matrix represent the grayscale values, respectively, and the elements in the grayscale co-occurrence matrix represent the number of times the corresponding grayscale value combination appears. Texture features are extracted based on the gray-level co-occurrence matrix, such as energy (ASM, Angular Second Moment), contrast (Contrast), correlation (Correlation) and entropy (Entropy), etc. One of the above items can be used as the texture feature value of the pixel point, or the value obtained by the weighted sum of several items can be used as the texture feature value of the pixel point.

[0046] For a driving position image in color dimension, after dimensional conversion, different dimensions can be merged into a multidimensional data matrix, or each dimension can correspond to a data matrix. For a W×H×3 driving position image, W×H represents the image size, and 3 represents the three image channels of RGB. In a specific example, taking the conversion of the driving position image in color dimension into a data matrix of complex dimension as an example, after dimensional conversion, a W×H×2 complex dimensional data matrix can be obtained, where the elements in the complex dimensional data matrix are complex numbers, and the complex dimensional data matrix can also be called a complex matrix data matrix; or a W×H real dimensional data matrix and a W×H imaginary dimensional data matrix can be obtained.

[0047] In another specific example, taking the conversion of the driving position image of the color dimension into the real dimension, the imaginary dimension and the color feature dimension as an example, after the dimension conversion, a three-dimensional data matrix of W×H×3 can be obtained, where 3 represents the real dimension, the imaginary dimension and the color feature dimension; or a W×H real dimension data matrix, a W×H imaginary dimension data matrix, and a W×H color feature dimension data matrix can be obtained respectively. This embodiment does not limit the number and specific form of the data matrices.

[0048] In an optional embodiment, the driving position image of the color dimension is converted into a data matrix including at least a complex dimension. It can be understood that since the present embodiment is to detect the seat belt, the seat belt is usually black, therefore, the present embodiment can use the black area as the focus area when performing the seat belt detection. And because the real part of the complex number represents the key part and the imaginary part represents the non-key part, the real part can be defined according to the characteristics of the black area, and the imaginary part can be defined according to other areas, so as to achieve distinction.

[0049] In this embodiment, the weighted sum of the RGB three-channel values ​​of the pixel point can be used as the real part of the complex number. Since in the RGB color dimension, the RGB value (0,0,0) represents black, therefore, in this embodiment, the closer the pixel point is to black, the smaller the real part of the complex number is, and the farther away from black, the larger the real part of the complex number is. Furthermore, when performing weighted summation on the RGB three-channel values ​​of the pixel point, a higher weight can be given to the green channel and / or the blue channel, for example, it can be set to 0.2R+0.4G+0.4B. At the same time, the distance between the three-channel value of the pixel point and the three-channel value of black can be used as the imaginary part of the complex number, for example, it can be set to .

[0050] The advantage of such a setting is that after the image is converted from the color dimension to the complex dimension, the black area can have a more unique representation in the complex space, so that the black area can be more easily identified and processed.

[0051] In another optional embodiment, further, S120 may include:

[0052] A1. For each pixel of the driving position image, determine the color channel intensity value of the current pixel, and determine the hue, saturation and brightness according to the color channel intensity value;

[0053] A2. Determine the complex number corresponding to the current element according to hue, saturation and brightness;

[0054] A3. Determine the data matrix of complex dimension according to the complex numbers corresponding to each element.

[0055] Among them, the color channel intensity value is the value of the three color channels of red, green and blue. Hue, saturation and brightness are the three basic properties of color. Hue is the primary characteristic of color and the most accurate standard for distinguishing different colors. Hue is the name of the color, such as red, yellow, blue, etc. Saturation refers to the vividness of the color. Saturation depends on the ratio of pure color components to gray components in the color. The higher the pure color component, the higher the saturation and the brighter the color; the higher the gray component, the lower the saturation and the darker the color. Brightness refers to the brightness of the color. Brightness reflects the intensity of light in the color, ranging from black (lowest brightness) to white (highest brightness). Brightness depends on the amount of reflected or transmitted light in the color. The more reflected or transmitted light, the higher the brightness; conversely, the lower the brightness.

[0056] According to the color channel intensity value, the hue, saturation and brightness are determined. Specifically, this can be achieved by the following steps:

[0057] A11. Convert the intensity values ​​of the three color channels, red, green, and blue, from the range of 0-255 to the range of 0-1. Specifically, this can be achieved by the following formula: , , .

[0058] A12. The maximum value of the converted color channel intensity value is used as the brightness. Specifically, it can be expressed by the following formula: , where V is the brightness.

[0059] A13. Calculate the saturation using the following formula: , where S is the saturation.

[0060] A14, if V= = = , that is, the color is gray, then the hue H=0, otherwise, calculate , if V= ,but , if H<0, then H=H+6; if V= ,but ; If V = ,but .

[0061] Similar to the above embodiment, in this embodiment, to define the real part of a complex number, it is necessary to consider the characteristics of the black area, and then define the imaginary part based on other areas to achieve distinction. Since the RGB value of the pixel point is converted to the HSV value in this embodiment, the real part of the complex number is defined according to the HSV representation of the black area in the image.

[0062] Specifically, on the one hand, for the values ​​of H, S, and V, the hue H value range of 210-240 can be defined as black or close to black, the saturation S value range of 0-30 can be defined as black or close to black, and the brightness V value range of 0-50 can be defined as black or close to black. On the other hand, brightness V is more sensitive to black areas, saturation S can assist in the judgment of black areas, and hue H has no correlation with color attributes.

[0063] Therefore, based on the above principle, in an optional embodiment, the real part of the complex number can be defined according to the brightness V, and the imaginary part of the complex number can be defined according to the saturation S and the hue H. Specifically, the brightness V can be directly used as the real part of the complex number, and the weighted sum of the saturation S and the hue H can be used as the imaginary part of the complex number.

[0064] Furthermore, the complex number corresponding to the current element can be determined by the following formula: ; Where Z represents the complex number corresponding to the current pixel, V represents brightness, which is the real part of the complex number, S represents saturation, and H represents hue. is the imaginary part of a complex number.

[0065] In this embodiment, since the value range of H related to the definition of the black area is 210-240, which is much larger than the value range of the saturation S, a very small weight can be set for H to prevent the value of H from affecting the accuracy of the seat belt detection. However, this embodiment does not limit the specific value of the divisor of H. This embodiment takes 10 as an example, and it can also be 15, 20, etc.

[0066] In another optional embodiment, the real part of the complex number may be defined according to the brightness V and the saturation S, and the imaginary part of the complex number may be defined according to the hue H. Specifically, a weighted sum of the brightness V and the saturation S is taken as the real part of the complex number, wherein the weight of the brightness V is higher than that of the saturation S. The hue H is divided by a preset divisor as the imaginary part of the complex number, such as 8, 10, 12, etc.

[0067] In this embodiment, the RGB value of each pixel is converted into a complex number, so as to obtain a data matrix of complex dimension.

[0068] It should be noted that, in this embodiment, the black area of ​​the image is paid more attention to when performing seat belt detection. It can be understood that the seat belt can be dark gray in addition to black. In order to improve the accuracy and applicability of seat belt detection, the seat belt colors corresponding to different vehicle models can be counted. For different seat belt colors, different complex conversion methods are designed using the technical solution of this embodiment, and the corresponding seat belt detection model is pre-trained using sample images of the corresponding seat belt colors. After determining that the vehicle image is obtained, the vehicle model is identified, the corresponding complex conversion form is used, the driving position image is converted into a data matrix, and a seat belt detection model matching the seat belt color corresponding to the vehicle model is determined, and the seat belt detection model is used to perform seat belt detection on the data matrix.

[0069] In this embodiment, by converting the driving position image into a data matrix of complex dimensions, the original data of the pixel points are divided into a critical part and a non-critical part, so that the seat belt is easier to detect, thereby improving the accuracy of seat belt detection.

[0070] S130, inputting the data matrix into a detection model that matches the dimension of the data matrix, and obtaining a seat belt detection processing result output by the detection model that matches the data matrix.

[0071] In this embodiment, since the complex dimension can be divided into a real dimension and an imaginary dimension, and other dimensions besides the complex dimension can also be included, the detection model needs to match the dimension of the data matrix.

[0072] The seat belt detection processing result matched with the data matrix refers to whether the seat belt is detected according to the data matrix. If the seat belt is detected, it means that the driver has worn and used the seat belt correctly. Otherwise, it means that the driver has not worn and used the seat belt correctly, and there are certain safety hazards. The seat belt detection processing result can be used as a basis for sentencing the driver.

[0073] In an optional embodiment, S130 may further include: inputting a complex-dimensional data matrix into a detection model obtained by training a pre-set complex neural network model, and obtaining a seat belt detection processing result output by the detection model that matches the data matrix.

[0074] Specifically, if after the dimension conversion, a complex dimensional data matrix of W×H×2 is obtained, and the elements in the data matrix are in complex form, then the detection model that matches the dimension of the data matrix is ​​a model pre-trained based on a complex neural network. The complex neural network model is a special type of neural network model. The input, output, and weight of the neurons in the complex neural network model are in complex form. The operation needs to follow the complex operation rules, and the activation function also needs to be a complex version, such as the Sigmoid function, the Tanh function, etc.

[0075] In another optional embodiment, S130 may further include: inputting the data matrix of real dimension into a first detection model obtained by training a preset real neural network model to obtain a first seat belt detection result output by the first detection model, and inputting the data matrix of imaginary dimension into a second detection model obtained by training a preset imaginary neural network model to obtain a second seat belt detection result output by the second detection model; determining the target seat belt detection processing result based on the first seat belt detection result and the second seat belt detection result.

[0076] Specifically, if after the dimension conversion, a W×H real dimension data matrix and a W×H imaginary dimension data matrix are obtained, then the detection models that match the dimensions of the data matrix are respectively the first detection model obtained by training based on the real neural network model and the second detection model obtained by training based on the imaginary neural network model. The real neural network model only uses the real part of the complex number for model calculation and training. In the real neural network model, the input, output, weight, operation rules and activation function of the neuron are all matched with the real part of the complex number. The imaginary neural network model focuses on processing the imaginary information in the complex data. The input, output, weight, operation rules and activation function of the neuron are all matched with the imaginary part of the complex number.

[0077] According to the first seat belt detection result and the second seat belt detection result, the target seat belt detection processing result is determined. Specifically, as long as at least one seat belt detection result is that the seat belt is not detected, the target seat belt detection processing result can be determined as that the seat belt is not detected. It is also possible to provide a detection abnormality prompt when the first seat belt detection result and the second seat belt detection result are different seat belt detection results, and determine the final target seat belt detection processing result in response to the selection of the seat belt detection result on the user interaction interface.

[0078] Furthermore, the neural network model with detection errors can be determined based on the final target seat belt detection processing result, and the neural network model with detection errors can be retrained based on the sample image with the final correct target seat belt detection processing result marked. The advantage of this setting is that it can achieve iterative optimization of the model, thereby continuously improving the accuracy of seat belt detection.

[0079] In another optional embodiment, if the data matrix also includes other dimensions, the color feature dimension is used as an example for explanation, and this embodiment does not limit the number and specific content of other dimensions. If after the dimension conversion, a three-dimensional data matrix of W×H×3 is obtained, the three-dimensional data matrix can be input into the detection model obtained by training the preset neural network model to obtain the seat belt detection processing result output by the detection model.

[0080] If after the dimensional conversion, a W×H real dimension data matrix, a W×H imaginary dimension data matrix, and a W×H color feature dimension data matrix are obtained, then the three different dimensional data matrices are respectively input into the detection model obtained by training the corresponding neural network model in a manner similar to the above embodiment, and three seat belt detection results are obtained, and then the final target seat belt detection processing result is obtained. The process of separately detecting and then merging the detection results is similar to the above embodiment, and this embodiment will not be repeated here.

[0081] It should be noted that, in the detection model in this embodiment that matches the dimension of the data matrix, when training the model, the sample image adopts the same method as in this embodiment to determine the driving position image and convert the complex dimension.

[0082] In this embodiment, the accuracy of neural network classification is improved through a data matrix of composite dimensions and a detection model matching the composite dimensions. The neural network model based on composite dimensions has stronger scene adaptability and higher robustness.

[0083] The technical solution of the embodiment of the present invention obtains the seat belt detection processing result output by the detection model by extracting the driving position image in the vehicle image, converting the driving position image in the color dimension into a data matrix including at least a complex dimension, and inputting the data matrix into a detection model that matches the dimension of the data matrix. The problem of low accuracy, high false detection rate and high labor cost of the seat belt detection method in the prior art is solved. By converting the driving position image in the color dimension into a data matrix of complex dimensions, the original data is divided into key parts and non-key parts, which makes it easier to capture the key parts required for seat belt detection, thereby improving the accuracy of seat belt detection. At the same time, through the detection model of complex dimensions, the adaptability to the scene is improved and the robustness of seat belt detection is enhanced.

[0084] Figure 2 A flow chart of another data matrix processing method provided for an embodiment of the present invention. Based on the above embodiment, the embodiment of the present invention adds a step of converting a driving position image of a color dimension into a data matrix of a line segment information dimension, and further specifies the specific process of obtaining the data matrix processing result.

[0085] like Figure 2 As shown, the method includes:

[0086] S210: Determine a vehicle image, and determine a driving position image in the vehicle image.

[0087] The specific process of determining the driving position image has been described in the above embodiment, and will not be repeated in this embodiment.

[0088] S220, converting the driving position image in color dimension into a data matrix in real dimension, imaginary dimension and line segment information dimension.

[0089] The process of converting the driving position image of the color dimension into the data matrix of the real dimension and the data matrix of the imaginary dimension has been described in the above embodiments. In this embodiment, the process of converting the driving position image of the color dimension into the data matrix of the line segment information dimension is described.

[0090] The line segment information dimension represents an element in the data matrix, corresponding to the matching degree between the pixel point at the corresponding position in the driving position image and the line segment. Specifically, the higher the matching degree between the pixel point and the line segment, the higher the confidence that the pixel point is on the line segment, and the lower the matching degree between the pixel point and the line segment, the farther the distance between the pixel point and the line segment. For each pixel point corresponding to the line segment, its matching degree can be set to 1.

[0091] In an optional embodiment, further converting the driving position image in color dimension into a data matrix in line segment information dimension may include:

[0092] B1. Convert the color channel intensity value of each pixel of the driving position image into a grayscale value to obtain a grayscale image;

[0093] B2, performing line segment detection on the grayscale image, and setting the matching degree of the pixel points corresponding to the detected line segments to 1;

[0094] B3. For other pixel points except the pixel points corresponding to the line segments, determine the matching degree of the other pixel points according to the distance between the other pixel points and at least one line segment;

[0095] B4. Determine the data matrix of the line segment information dimension according to the matching degree corresponding to each pixel point.

[0096] In this embodiment, after converting the intensity values ​​of the three color channels of red, green and blue of each pixel into grayscale values, a grayscale image is obtained. Specifically, the grayscale value can be the average value of the intensity values ​​of the three color channels of red, green and blue, or a value obtained by weighted summation. This embodiment does not limit the grayscale conversion method.

[0097] After conversion to a grayscale image, line segment detection is performed on the grayscale image. Exemplarily, a line segment detection algorithm, such as a Hough Transform algorithm, LSD (Line Segment Detector) or a phase grouping method, etc., can be used to implement line segment detection in a grayscale image. This embodiment does not limit the use of a line segment detection algorithm.

[0098] Specifically, the Hough transform algorithm performs edge detection on the grayscale image to obtain the edge image, performs Hough transform on each pixel in the edge image, and maps it to the parameter space, detects the peak in the parameter space, and draws a line segment in the image according to the pixel corresponding to the detected peak. The LSD algorithm calculates the gradient amplitude and direction of the grayscale image, divides the grayscale image into multiple small areas, and fits the line segments in each small area by the least squares method. The fitted line segments are screened and merged to obtain the final line segment detection result. The phase grouping method performs Fourier transform on the grayscale image to obtain the grayscale image spectrum, calculates the phase information of the grayscale image spectrum, and groups the pixels according to the phase information. The line segments are fitted in each group of pixels by the least squares method, and the fitted line segments are screened and merged to obtain the final line segment detection result.

[0099] After detecting the line segments in the grayscale image, it can be understood that the matching degree of the pixels on the line segments can be directly set to 1. For other pixels, the matching degree is measured according to the distance between them and the line segments. After the matching degree of each pixel is determined, the matching degree of each pixel can be used as the value of the element at the corresponding position to obtain a data matrix of the line segment information dimension.

[0100] In a specific example, the matching degree of other pixels can be determined based on the distance between other pixels and the line segment closest to them. The closer the distance, the greater the matching degree, and the farther the distance, the smaller the matching degree or even 0. Specifically, the corresponding matching degree can be set for different pixel distance intervals. If the pixel distance is greater than or equal to the preset distance threshold, the matching degree is 0. For example, the corresponding matching degree is set to 0.9 for the pixel distance 1-2, and the corresponding matching degree is set to 0.8 for the pixel distance 3-5, and so on. The matching degree is set to 0 if the pixel distance is greater than 10. The relationship between the pixel distance and the matching degree can also be defined by a mathematical formula. This embodiment does not limit the form of the formula. It only needs to satisfy that the closer the distance, the greater the matching degree, and the farther the distance, the smaller the matching degree.

[0101] In another specific example, the matching degree of other pixel points may also be determined based on the distances between other pixel points and the closest line segments in four directions of up, down, left, and right. Figure 3 A local schematic diagram of a grayscale image is provided, such as Figure 3 As shown in the figure, the red grayscale value indicates that the corresponding pixel is a line segment. The matching degree of the pixel points in the red line segment is set to 1, and the matching degree of other pixels is determined according to the following formula: , where L represents the matching degree, Indicates the distance between the pixel point and the upper line segment. Indicates the distance between the pixel point and the line segment below. Indicates the distance between the pixel and the left line segment. Indicates the distance between the pixel and the upper line segment. Figure 4 A local schematic diagram of the line segment information dimension data matrix is ​​provided. Figure 4 That is Figure 3 The local area of ​​the grayscale image in is converted into the line segment information dimension, that is, the data matrix after the matching degree corresponding to each pixel point is obtained.

[0102] Figure 5 A schematic diagram of the line segment detection result and line segment information dimension data matrix of a driving position image is provided, such as Figure 5As shown, the leftmost image is the driving position image, the middle image is the result of converting the driving position image into a grayscale image and performing line segment detection, and the rightmost image is a line segment information dimension image obtained by converting the matching degree of each pixel point into the element value at the corresponding position after determining the matching degree of each pixel point according to the line segment detection result.

[0103] In this embodiment, after determining the line segment in the grayscale image, the pixel points are assigned values ​​according to the distance from the line segment. The area enclosed by the line segment can be assigned values ​​according to the distance from the line segment, and the area without a line segment can even be assigned a value of 0. The advantage of this setting is that the line segment information can be used as the focus to participate in the training and detection of the detection model, so that the detection model can learn more key information and improve the accuracy of seat belt detection.

[0104] In another optional embodiment, the driving position image of the color dimension is converted into a data matrix of the line segment information dimension. After the color channel intensity value of each pixel of the driving position image is converted into a grayscale value to obtain a grayscale image, a connected domain detection algorithm, such as a four-neighborhood connected domain detection algorithm, an eight-neighborhood connected domain detection algorithm, etc., is used to perform connected domain detection on the grayscale image. After the connected domain is detected, edge detection is performed on the connected domain by an edge detection algorithm, such as a Canny edge detection algorithm. Then, a line segment detection algorithm, such as the line segment detection algorithm described in the above embodiment, is used to perform line segment detection on the edge. After the line segment is detected, the matching degree of each pixel is determined by the matching degree determination method described in the above embodiment, and the matching degree is converted into the element value at the corresponding position to obtain a data matrix of the line segment information dimension.

[0105] In this embodiment, by converting the driving position image into a data matrix of a composite dimension, the role of the original data of the driving position image can be maximized, thereby improving the accuracy of seat belt detection. At the same time, the seat belt detection is more adaptable to the scene, and the influence of environmental interference or human interference on the seat belt detection can be effectively avoided, thereby improving the robustness of the seat belt detection.

[0106] S230, inputting the data matrix into a detection model that matches the dimension of the data matrix, and obtaining a seat belt detection processing result output by the detection model that matches the data matrix.

[0107] The above-mentioned embodiments have described the structure of the neural network model under the composite dimension. This embodiment further specifically describes the structure of the neural network model under the real dimension, the imaginary dimension and the line segment information dimension.

[0108] In an optional embodiment, S130 may further include:

[0109] C1. Combining the data matrices of the real part dimension, the imaginary part dimension and the line segment information dimension into a three-dimensional data matrix;

[0110] C2. Inputting the three-dimensional data matrix into a detection model obtained by training a preset neural network model, and obtaining a seat belt detection processing result output by the detection model that matches the data matrix.

[0111] In this embodiment, the real part dimension, the imaginary part dimension and the line segment information dimension are integrated into a three-dimensional data matrix, that is, in the three-dimensional data matrix, each element corresponds to data of three dimensions: the real part of the complex number, the imaginary part of the complex number and the matching degree.

[0112] When the input data is a three-dimensional data matrix, the sample image is determined in the same way, and the conventional neural network model is trained by the sample image to obtain a detection model. The detection model performs model calculation according to the three-dimensional data matrix to obtain the seat belt detection processing result.

[0113] In another optional embodiment, S130 may further include:

[0114] S1, inputting the data matrix of the real part dimension into a first detection model obtained by training a preset real part neural network model, obtaining a first seat belt detection result output by the first detection model, and inputting the data matrix of the imaginary part dimension into a second detection model obtained by training a preset imaginary part neural network model, obtaining a second seat belt detection result output by the second detection model, and inputting the data matrix of the line segment information dimension into a third detection model obtained by training a preset neural network model, obtaining a third seat belt detection result output by the third detection model;

[0115] S2. Determine a target seat belt detection processing result that matches the data matrix according to the first seat belt detection result, the second seat belt detection result and the third seat belt detection result.

[0116] In this embodiment, the data matrix of each dimension may be subjected to seat belt detection through the corresponding detection model, and then the seat belt detection results are combined to obtain the final target seat belt detection processing result.

[0117] The process of obtaining a first detection model based on real neural network model training, and performing seat belt detection on the real dimension data matrix through the first detection model to obtain a first seat belt detection result, and the process of obtaining a second detection model based on imaginary neural network model training, and performing seat belt detection on the imaginary dimension data matrix through the second detection model to obtain a second seat belt detection result have been described in the above embodiments and will not be repeated in this embodiment.

[0118] For the data matrix of the line segment information dimension, the sample image is determined in the same way, and the feature information neural network is trained by the sample image to obtain the third detection model. The third detection model performs model calculation according to the data matrix of the line segment information dimension to obtain the third seat belt detection result. Among them, the feature information neural network is a neural network architecture specially used for processing and extracting feature information, which has a strong feature extraction capability and can automatically learn useful feature representations from the data matrix.

[0119] According to each seat belt detection result, the final target seat belt detection processing result is obtained, which can be represented by 0 / 1, 0 means that the seat belt is not detected, and 1 means that the seat belt is detected. Different weights are assigned to each seat belt detection result. For example, a higher weight can be set for the first seat belt detection result and the third seat belt detection result. For example, the weights of the first seat belt detection result, the second seat belt detection result and the third seat belt detection result are 0.4, 0.2 and 0.4 respectively. A higher weight can also be set for the first seat belt detection result. For example, the weights of the first seat belt detection result, the second seat belt detection result and the third seat belt detection result are 0.4, 0.3 and 0.3 respectively. This embodiment does not limit this. Weighted summation is performed on each seat belt detection result. If the obtained value is greater than or equal to a preset threshold, such as 0.8, the target seat belt detection result is considered to be 1, that is, the seat belt is considered to be detected, otherwise it is considered that the seat belt is not detected.

[0120] In this embodiment, by extracting the driving position image in the vehicle image, the driving position image of the color dimension is converted into a data matrix of the real part dimension and a data matrix of the imaginary part dimension of the complex number, and the original data is divided into a key part and a non-key part. At the same time, the driving position image of the color dimension is converted into a data matrix of the line segment information dimension, so that the neural network can learn more key feature information and assist in the judgment of the seat belt. The sample data matrix of the composite dimension obtained by the sample image is used to train the neural network model of the corresponding dimension in advance, which improves the accuracy of the detection model on the one hand, and improves the scene adaptability of the neural network model on the other hand, and enhances the robustness of the detection model obtained by training. The data matrix of the real part dimension, the imaginary part dimension and the line segment information dimension is sent to the trained detection model to obtain the seat belt detection processing result. The seat belt detection processing result obtained by adopting this embodiment can avoid the interference of environmental factors and human factors on the detection result, and improve the accuracy of seat belt detection.

[0121] Figure 6 Schematic diagram of the structure of a data matrix processing device provided by an embodiment of the present invention. Figure 6As shown, the device comprises:

[0122] A driving position image determination module 310, configured to determine a vehicle image and determine a driving position image in the vehicle image;

[0123] An image dimension conversion module 320, for converting the driving position image in color dimension into a data matrix including at least a complex dimension;

[0124] The complex dimension includes a real dimension and an imaginary dimension. The real dimension indicates that the elements in the data matrix correspond to the real part of the complex number, and the imaginary dimension indicates that the elements in the data matrix correspond to the imaginary part of the complex number.

[0125] The data matrix processing module 330 is used to input the data matrix into a detection model that matches the dimension of the data matrix, and obtain a seat belt detection processing result output by the detection model that matches the data matrix.

[0126] The technical solution of the embodiment of the present invention obtains the seat belt detection result output by the detection model by extracting the driving position image in the vehicle image, converting the driving position image in the color dimension into a data matrix including at least a complex dimension, and inputting the data matrix into a detection model that matches the dimension of the data matrix. The problem of low accuracy, high false detection rate and high labor cost of the seat belt detection method in the prior art is solved. By converting the driving position image in the color dimension into a data matrix of complex dimensions, the original data is divided into key parts and non-key parts, which makes it easier to capture the key parts required for seat belt detection, thereby improving the accuracy of seat belt detection. At the same time, through the detection model of complex dimensions, the adaptability to the scene is improved and the robustness of seat belt detection is enhanced.

[0127] Based on the above embodiment, optionally, the image dimension conversion module 320 includes:

[0128] A color channel intensity value conversion unit, for determining a color channel intensity value of a current pixel point for each pixel point of the driving position image, and determining a hue, saturation and brightness according to the color channel intensity value;

[0129] A complex number determination unit, used to determine the complex number corresponding to the current element according to hue, saturation and brightness;

[0130] The complex dimension data matrix determination unit is used to determine the complex dimension data matrix according to the complex numbers corresponding to each element.

[0131] Based on the above embodiment, optionally, the complex number corresponding to the current element is determined by the following formula:

[0132] ;

[0133] Among them, Z represents the complex number corresponding to the current element, V represents brightness, which is the real part of the complex number, S represents saturation, and H represents hue. is the imaginary part of a complex number.

[0134] Based on the above embodiment, optionally, the data matrix processing module 330 includes:

[0135] A complex dimensional data matrix detection unit, used for inputting a complex dimensional data matrix into a detection model obtained by training a preset complex neural network model, and obtaining a seat belt detection processing result output by the detection model that matches the data matrix;

[0136] A real and imaginary dimension data matrix detection unit, which inputs the data matrix of the real dimension into a first detection model obtained by training a preset real neural network model to obtain a first seat belt detection result output by the first detection model, and inputs the data matrix of the imaginary dimension into a second detection model obtained by training a preset imaginary neural network model to obtain a second seat belt detection result output by the second detection model;

[0137] The first target seat belt detection result determining unit is used to determine a target seat belt detection processing result matching the data matrix according to the first seat belt detection result and the second seat belt detection result.

[0138] Based on the above embodiment, optionally, the image dimension conversion module 320 includes:

[0139] A three-dimensional conversion unit, used for converting the driving position image of the color dimension into a data matrix of the real dimension, the imaginary dimension and the line segment information dimension;

[0140] The line segment information dimension represents the degree of match between the pixel points in the driving position image corresponding to the elements in the data matrix and the line segments.

[0141] Based on the above embodiment, optionally, the three-dimensional conversion unit is specifically used for:

[0142] Convert the color channel intensity value of each pixel of the driving position image into a grayscale value to obtain a grayscale image;

[0143] Performing line segment detection on the grayscale image, and setting the matching degree of the pixel points corresponding to the detected line segments to 1;

[0144] For other pixel points except the pixel points corresponding to the line segment, determining the matching degree of the other pixel points according to the distance between the other pixel points and at least one line segment;

[0145] According to the matching degree corresponding to each pixel point, the data matrix of the line segment information dimension is determined.

[0146] Based on the above embodiment, optionally, the data matrix processing module 330 includes:

[0147] A three-dimensional data matrix determination unit, used for combining the data matrices of the real part dimension, the imaginary part dimension and the line segment information dimension into a three-dimensional data matrix;

[0148] A three-dimensional data matrix detection unit, used for inputting the three-dimensional data matrix into a detection model obtained by training a preset neural network model, and obtaining a seat belt detection processing result output by the detection model that matches the data matrix;

[0149] A multi-dimensional data matrix detection unit, used for inputting the data matrix of the real part dimension into a first detection model obtained by training a preset real part neural network model to obtain a first seat belt detection result output by the first detection model, and inputting the data matrix of the imaginary part dimension into a second detection model obtained by training a preset imaginary part neural network model to obtain a second seat belt detection result output by the second detection model, and inputting the data matrix of the line segment information dimension into a third detection model obtained by training a preset neural network model to obtain a third seat belt detection result output by the third detection model;

[0150] The second target seat belt detection result determining unit is used to determine a target seat belt detection processing result matching the data matrix according to the first seat belt detection result, the second seat belt detection result and the third seat belt detection result.

[0151] The data matrix processing device provided in the embodiment of the present invention can execute the data matrix processing method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0152] Figure 7 is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0153] like Figure 7 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory 12, a random access memory 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory 12 or the computer program loaded from the storage unit 18 to the random access memory 13. Various programs and data required for the operation of the electronic device 10 can also be stored in the random access memory 13. The processor 11, the read-only memory 12, and the random access memory 13 are connected to each other via a bus 14. The input / output interface 15 is also connected to the bus 14.

[0154] A number of components in the electronic device 10 are connected to the input / output interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0155] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 performs the various methods and processes described above, such as a data matrix processing method.

[0156] In some embodiments, the data matrix processing method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the read-only memory 12 and / or the communication unit 19. When the computer program is loaded into the random access memory 13 and executed by the processor 11, one or more steps of the data matrix processing method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the data matrix processing method in any other appropriate manner (e.g., by means of firmware).

[0157] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0158] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0159] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, device, or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, 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 disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0160] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may 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 input, voice input, or tactile input).

[0161] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0162] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.

[0163] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0164] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A data matrix processing method, characterized in that: include: determining a vehicle image and determining a driving position image in the vehicle image; Converting the driving position image of the color dimension into a data matrix including at least a complex dimension comprises: Converting the driving position image in color dimension into a data matrix in real dimension, imaginary dimension and line segment information dimension; Among them, the line segment information dimension represents the matching degree between the pixel points in the driving position image corresponding to the elements in the data matrix and the line segments; The complex dimension includes a real dimension and an imaginary dimension. The real dimension indicates that the elements in the data matrix correspond to the real part of the complex number, and the imaginary dimension indicates that the elements in the data matrix correspond to the imaginary part of the complex number. The step of converting the driving position image in the color dimension into a data matrix in the line segment information dimension includes: Convert the color channel intensity value of each pixel of the driving position image into a grayscale value to obtain a grayscale image; Performing line segment detection on the grayscale image, and setting the matching degree of the pixel points corresponding to the detected line segments to 1; For other pixel points except the pixel points corresponding to the line segment, determining the matching degree of the other pixel points according to the distance between the other pixel points and at least one line segment; According to the matching degree corresponding to each pixel point, a data matrix of the line segment information dimension is determined; The data matrix is ​​input into a detection model that matches the dimension of the data matrix, and a seat belt detection processing result that matches the data matrix is ​​obtained, which is output by the detection model.

2. The method according to claim 1, characterized in that Converting the driving position image of the color dimension into a data matrix including at least a complex dimension comprises: For each pixel of the driving position image, determine the color channel intensity value of the current pixel, and determine the hue, saturation and brightness according to the color channel intensity value; According to the hue, saturation and brightness, the complex number corresponding to the current element is determined. According to the complex numbers corresponding to each element, the data matrix of the complex number dimension is determined.

3. The method according to claim 2, characterized in that Determine the complex number corresponding to the current element using the following formula: ; Among them, Z represents the complex number corresponding to the current element, V represents brightness, which is the real part of the complex number, S represents saturation, and H represents hue. is the imaginary part of a complex number.

4. The method according to claim 2, characterized in that: Inputting the data matrix into a detection model that matches the dimension of the data matrix, and obtaining a seat belt detection processing result output by the detection model that matches the data matrix, including: Inputting a complex-dimensional data matrix into a detection model obtained by training a preset complex neural network model, and obtaining a seat belt detection processing result output by the detection model that matches the data matrix; Alternatively, the data matrix of the real part dimension is input into a first detection model obtained by training a preset real part neural network model, and a first seat belt detection result output by the first detection model is obtained; and the data matrix of the imaginary part dimension is input into a second detection model obtained by training a preset imaginary part neural network model, and a second seat belt detection result output by the second detection model is obtained; According to the first seat belt detection result and the second seat belt detection result, a target seat belt detection processing result matching the data matrix is ​​determined.

5. The method according to claim 1, characterized in that Inputting the data matrix into a detection model that matches the dimension of the data matrix, and obtaining a seat belt detection processing result output by the detection model that matches the data matrix, including: Combining the data matrices of the real part dimension, the imaginary part dimension and the line segment information dimension into a three-dimensional data matrix; Inputting the three-dimensional data matrix into a detection model obtained by training a preset neural network model, and obtaining a seat belt detection processing result output by the detection model that matches the data matrix; Alternatively, the data matrix of the real part dimension is input into a first detection model obtained by training a preset real part neural network model to obtain a first seat belt detection result output by the first detection model, and the data matrix of the imaginary part dimension is input into a second detection model obtained by training a preset imaginary part neural network model to obtain a second seat belt detection result output by the second detection model, and the data matrix of the line segment information dimension is input into a third detection model obtained by training a preset neural network model to obtain a third seat belt detection result output by the third detection model; According to the first seat belt detection result, the second seat belt detection result and the third seat belt detection result, a target seat belt detection processing result matching the data matrix is ​​determined.

6. A data matrix processing device, characterized in that: include: a driving position image determination module, configured to determine a vehicle image and determine a driving position image in the vehicle image; An image dimension conversion module, used to convert the driving position image of the color dimension into a data matrix including at least a complex dimension; The complex dimension includes a real dimension and an imaginary dimension. The real dimension indicates that the elements in the data matrix correspond to the real part of the complex number, and the imaginary dimension indicates that the elements in the data matrix correspond to the imaginary part of the complex number. Image dimension conversion module, including: A three-dimensional conversion unit, used for converting the driving position image of the color dimension into a data matrix of the real dimension, the imaginary dimension and the line segment information dimension; Among them, the line segment information dimension represents the matching degree between the pixel points in the driving position image corresponding to the elements in the data matrix and the line segments; Three-dimensional conversion unit, specifically used for: Convert the color channel intensity value of each pixel of the driving position image into a grayscale value to obtain a grayscale image; Performing line segment detection on the grayscale image, and setting the matching degree of the pixel points corresponding to the detected line segments to 1; For other pixel points except the pixel points corresponding to the line segment, determining the matching degree of the other pixel points according to the distance between the other pixel points and at least one line segment; According to the matching degree corresponding to each pixel point, a data matrix of the line segment information dimension is determined; The data matrix processing module is used to input the data matrix into a detection model that matches the dimension of the data matrix, and obtain a seat belt detection processing result output by the detection model that matches the data matrix.

7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the data matrix processing method as described in any one of claims 1 to 5 is implemented.

8. A storage medium storing computer executable instructions, characterized in that: When the computer executable instructions are executed by a computer processor, they are used to perform the data matrix processing method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Driving violation behavior detection method and device

    CN115482520A