Prompting method and device, vehicle and storage medium

Through segmentation and color matching of user images, the problem of misjudgment by traditional cameras under the influence of light is solved, and accurate judgment of the driver's seat belt wearing status is achieved.

CN118823978APending Publication Date: 2024-10-22GREAT WALL MOTOR CO LTD

Patent Information

Application Number
CN202410801097.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-20
Publication Date
2024-10-22

AI Technical Summary

Technical Problem

When the traditional control camera determines whether the driver is wearing a seat belt, it is easy to cause misjudgment due to light factors and other effects. Especially when the color of the clothes worn by the user is similar to the color of the seat belt, it is difficult to accurately identify.

Method used

By segmenting the user image, the area images of seat belts and clothes are determined, and then input into the matching judgment model for color matching judgment. If the colors match, prompt information is generated to avoid misjudgment.

Benefits of technology

It effectively reduces the misjudgment rate due to light factors and ensures accurate judgment on whether the driver is wearing a seat belt.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118823978A_ABST
    Figure CN118823978A_ABST
Patent Text Reader

Abstract

The invention provides a prompting method and device, a vehicle and a storage medium, and the method comprises the steps: obtaining a user image of a target user when it is detected that the target user wears a safety belt; performing segmentation processing on the user image to segment a first area image of a safety belt in the user image and a second area image of clothes of a target user in the user image; inputting the first area image and the second area image into a matching judgment model to obtain a target judgment result; and if the target judgment result represents that the clothes of the target user are matched with the color of the safety belt, generating prompt information. And if the color of the clothes worn by the user is close to that of the safety belt, the user is reminded in time, so that the misjudgment probability caused by the influence of light factors and the like on the control camera is avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of vehicle technology, and in particular to a prompting method, device, vehicle and storage medium. Background Art

[0002] With the continuous advancement of science and technology, intelligent transportation systems have gradually become an important part of modern traffic management. The use of seat belts by users is one of the important links in traffic safety management, but traditional control cameras can only determine whether the driver is wearing a seat belt through image recognition technology. If the clothes worn by the user are similar in color to the seat belt, and the control camera is affected by light factors, it is easy to determine that the user is not wearing a seat belt, resulting in misjudgment. Summary of the invention

[0003] The present application provides a prompt method, device, vehicle and storage medium, which can provide timely reminders to users when the color of the clothes worn by the user is similar to that of the seat belts, so as to avoid the possibility of misjudgment caused by the control camera due to the influence of light factors and the like.

[0004] In a first aspect, a prompt method is provided, which is applied to a vehicle, and the method comprises: when it is detected that a target user is wearing a seat belt, obtaining a user image of the target user; performing segmentation processing on the user image to segment a first area image of the seat belt in the user image, and a second area image of the target user's clothes in the user image; inputting the first area image and the second area image into a matching judgment model to obtain a target judgment result; if the target judgment result indicates that the color of the target user's clothes matches the color of the seat belt, generating a prompt message.

[0005] Through the above technical solution, by performing color matching judgment on the first area image corresponding to the clothes in the user image and the second area image corresponding to the seat belt, and when the target judgment result indicates that the clothes of the target user match the color of the seat belt, a prompt message is generated to prompt that the clothes of the target user are the same or similar in color to the seat belt, thereby reducing the need to promptly remind the user when the color of the clothes worn by the user is similar to that of the seat belt, thereby avoiding the probability of misjudgment caused by the control camera being affected by light factors and the like.

[0006] In combination with the first aspect, in certain possible implementations, the user image is segmented to segment a first area image of the seat belt in the user image and a second area image of the target user's clothes in the user image, including: determining an area in a first preset position in the user image as the first area image of the seat belt; and determining an area in a second preset position in the user image as the second area image of the target user's clothes.

[0007] Through the above technical solution, by presetting the first preset position of the seat belt in the image and the second preset position of the user's clothes, after acquiring the user image, the area at the first preset position can be directly determined as the first area image of the seat belt; and the area at the second preset position can be determined as the second area image of the target user's clothes, thereby improving the efficiency of area determination.

[0008] In combination with the first aspect, in some possible implementations, the user image is segmented to segment a first area image of the seat belt in the user image and a second area image of the target user's clothes in the user image, including: performing grayscale processing on the user image to convert the user image into a grayscale image; determining, from the grayscale image, an edge formed by the seat belt and the target user's clothes according to the grayscale value of each pixel in the grayscale image; obtaining an edge constituting area constituted by the edges, and other areas in the grayscale image except the edge constituting area; segmenting an area in the user image that is located at the same position as the edge constituting area to obtain the first area image of the seat belt; and segmenting an area in the user image that is located at the same position as the other areas to obtain the second area image of the target user's clothes.

[0009] Through the above technical solution, the edge formed by the safety belt and the target user's clothes is determined through a grayscale image, so that the first area image of the safety belt and the second area image of the target user's clothes are determined based on the edge, thereby improving the accuracy of area determination.

[0010] In combination with the first aspect, in some possible implementations, the first area image and the second area image are input into a matching judgment model to obtain a target judgment result, including: mapping the color value of each pixel in the first area image and the second area image to a preset interval respectively to obtain a processed first area image and a processed second area image; performing feature extraction on the processed first area image to obtain first area image features; performing feature extraction on the processed second area image to obtain second area image features; performing fusion processing on the first area image features and the second area image features to obtain fusion features; passing the fusion features to a classification layer to obtain the probability of the fusion features being mapped to each preset judgment result; and determining the preset judgment result with the largest probability as the target judgment result.

[0011] Through the above technical solution, by inputting the first area image and the second area image into the matching determination model, the matching determination model is used to determine whether the colors of the two areas match, thereby improving the accuracy of color matching determination.

[0012] In combination with the first aspect, in some possible implementations, the vehicle is equipped with a camera, and when the target user is detected wearing a seat belt, a user image of the target user is obtained, including: when the target user is detected wearing a seat belt, triggering the camera to shoot the interior of the vehicle to obtain an internal image of the interior of the vehicle; identifying a target area where the target user is located in the internal image; and segmenting the target area in the internal image to obtain a user image of the target user.

[0013] Through the above technical solution, the internal image taken by the camera is identified to determine the target area where the target user is located in the internal image, and the target area is segmented from the internal image to achieve the effect of obtaining the user image of the target user.

[0014] In combination with the first aspect, in some possible implementations, the prompt information is used to prompt that the target user's clothes are similar in color to the safety belt.

[0015] Through the above technical solution, when the target judgment result indicates that the color of the target user's clothes matches the color of the seat belt, a prompt message can be used to indicate that the color of the clothes is similar to that of the seat belt, thereby avoiding the problem of the control camera misjudging that the target user is not wearing a seat belt due to the influence of light factors and the like.

[0016] In combination with the first aspect, in some possible implementations, the method further includes: if the target determination result indicates that the color of the target user's clothes does not match the color of the safety belt, prohibiting the generation of prompt information.

[0017] Through the above technical solution, when the target determination result indicates that the color of the target user's clothes does not match the color of the safety belt, it means that the color difference between the target user's clothes and the safety belt is large, and no prompt is needed.

[0018] In a second aspect, a prompting device is provided, which is applied to a vehicle, and the device comprises:

[0019] an acquisition unit, configured to acquire a user image of the target user when it is detected that the target user is wearing a seat belt;

[0020] a segmentation unit, configured to perform segmentation processing on the user image to segment a first region image of the safety belt in the user image and a second region image of the target user's clothes in the user image;

[0021] An input unit, used for inputting the first region image and the second region image into a matching determination model to obtain a target determination result;

[0022] A generating unit is configured to generate prompt information if the target determination result indicates that the target user's clothes match the color of the safety belt.

[0023] In a third aspect, a vehicle is provided, the vehicle comprising:

[0024] A memory for storing executable program codes;

[0025] The processor is used to call and run the executable program code from the memory so that the vehicle executes any of the prompt methods as above.

[0026] In a fourth aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed, any of the prompt methods described above is implemented. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without paying any creative work.

[0028] Figure 1 This is a schematic diagram of a scenario of a prompting method provided in an embodiment of the present application;

[0029] Figure 2 It is a flowchart of a prompting method provided in an embodiment of the present application;

[0030] Figure 3 It is a flowchart of a prompting method provided in an embodiment of the present application;

[0031] Figure 4 It is a flowchart of a prompting method provided in an embodiment of the present application;

[0032] Figure 5 It is a flowchart of a matching determination model in a training process provided by an embodiment of the present application;

[0033] Figure 6 It is a structural schematic diagram of a prompting device provided in an embodiment of the present application;

[0034] Figure 7 is a structural schematic diagram of a vehicle provided in an embodiment of the present application;

[0035] Figure 8 It is a structural schematic diagram of a vehicle provided in an embodiment of the present application. DETAILED DESCRIPTION

[0036] In order to make the features and advantages of the present application more obvious and easy to understand, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present application.

[0037] When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Instead, they are only examples of devices and methods consistent with some aspects of the present application as detailed in the attached claims.

[0038] In the following, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as suggesting or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features.

[0039] Figure 1 It is a scene diagram of a prompt method provided in an embodiment of the present application. Figure 1 A scenario is given in which a camera takes a picture of a user in the vehicle while the vehicle is driving to determine whether the user is wearing a seat belt.

[0040] In the above scenario, a camera is installed on at least one of the two sides of the road, and the camera is used to take pictures of the users in the vehicles traveling on the road to determine whether the users in the vehicles are wearing seat belts. However, since the colors of clothes worn by users vary, it is easy for them to wear clothes of the same or similar color as the seat belts, and the images collected by the camera are easily affected by light factors, etc., resulting in the misjudgment that the user is not wearing a seat belt.

[0041] The present application is aimed at the above-mentioned scenario. It can predict the colors of the first area image corresponding to the clothes in the user image and the second area image corresponding to the seat belt, and when the predicted colors are the same, generate a first prompt information to prompt the target user that the clothes and the seat belt are the same color, thereby reducing the time required to remind the user when the clothes worn by the user are similar in color to the seat belt, so as to avoid the chance of misjudgment caused by the control camera due to the influence of light factors and the like.

[0042] based on Figure 1 The scene diagram shown below will be combined with Figure 2-Figure 5 , the prompt method provided in the embodiment of the present application is introduced in detail.

[0043] See also Figure 2 , Figure 2 : is a flowchart of a prompt method provided by an embodiment of the present application. The execution subject of the method may be a vehicle, and the specific process of the method may be as follows:

[0044] S101, when it is detected that a target user is wearing a seat belt, obtaining a user image of the target user.

[0045] The target user is a user wearing a seat belt in the vehicle. The method of detecting whether the target user is wearing a seat belt can be to detect whether the user is wearing a seat belt through a seat belt detection function. If yes, the user wearing the seat belt is determined as the target user. The user image is an image including a user sitting on a vehicle seat, which at least includes the upper body of the target user, so that the worn seat belt is also recorded in the user image.

[0046] S102, performing segmentation processing on the user image to segment a first region image of a safety belt in the user image and a second region image of clothes of the target user in the user image.

[0047] Since the user image includes the upper body of the target user, the user image includes the area image of the target user's clothes and the area image of the safety belt. Therefore, through segmentation processing, the first area image corresponding to the safety belt and the second area image corresponding to the target user's clothes are segmented from the user image.

[0048] Specifically, the user image is input into the object prediction model to predict the first region image corresponding to the target user's clothes and the second region image corresponding to the safety belt in the user image through the object prediction model. The specific prediction method may be an image segmentation method, which includes dividing different boundaries by the brightness change of each pixel in the user image to divide different objects, and is suitable for segmenting the regions corresponding to the clothes and the safety belt in the user image in the embodiment of the present application to divide the first region image corresponding to the clothes and the second region image corresponding to the safety belt.

[0049] S103: Input the first region image and the second region image into a matching determination model to obtain a target determination result.

[0050] The matching determination model is a network model capable of predicting whether the colors of the regional images match. After the first regional image corresponding to the safety belt and the second regional image corresponding to the clothes are segmented from the user image in step S102, the first regional image and the second regional image are respectively input into the matching determination model to determine whether the first color of the first regional image and the second color of the second regional image match through the matching determination model to obtain a target determination result.

[0051] Specifically, there are two determination results. The first determination result is that the first color of the first area image matches the second color of the second area image; the second determination result is that the first color of the first area image does not match the second color of the second area image.

[0052] S104: If the target determination result indicates that the target user's clothes match the color of the safety belt, a prompt message is generated.

[0053] Among them, the target judgment result indicates that the color of the target user's clothes matches the color of the seat belt, which means that the color of the target user's clothes is similar to or the same as the color of the seat belt, and it is easy for the camera to determine that the seat belt is not worn. Therefore, a prompt message is generated, and the prompt message is used to prompt that the color of the target user's clothes is similar to the color of the seat belt, so as to avoid the possibility of misjudgment caused by the control camera being affected by light factors and the like.

[0054] Specifically, the prompting method may be to prompt the user from a visual perspective through the central control screen, and\or to prompt the user from an auditory perspective through the vehicle's audio system.

[0055] The prompt method provided in the embodiment of the present application is as follows: when it is detected that the target user is wearing a safety belt, the user image of the target user is obtained; the user image is segmented to segment the first area image of the safety belt in the user image and the second area image of the target user's clothes in the user image; the first area image and the second area image are input into the matching judgment model to obtain a target judgment result; if the target judgment result indicates that the target user's clothes match the color of the safety belt, a prompt message is generated. By performing color matching judgment on the first area image corresponding to the clothes in the user image and the second area image corresponding to the safety belt, and when the target judgment result indicates that the target user's clothes match the color of the safety belt, a prompt message is generated to prompt that the target user's clothes are the same or similar in color to the safety belt, and to reduce the user's timely reminder when the user's clothes are similar in color to the safety belt, so as to avoid the probability of misjudgment caused by the control camera due to the influence of light factors.

[0056] See also Figure 3 , Figure 3 : is a flowchart of a prompting method provided in an embodiment of the present application. The specific process of the method can be as follows:

[0057] S201, when it is detected that a target user is wearing a seat belt, obtaining a user image of the target user.

[0058] The user image includes the upper body of the target user, that is, the user image includes the area image of the target user's clothes and the area image of the seat belt.

[0059] S202: Determine an area at a first preset position in the user image as a first area image of the seat belt.

[0060] Among them, when determining the first area image of the seat belt in the user image and the second area image of the target user's clothes in the embodiment of the present application, there are two determination methods, the first determination method is shown in steps S202 to S203; the second determination method is shown in steps S204 to S208.

[0061] Specifically, the first determination method pre-sets a first preset position of the seat belt, so that in the actual determination process, the area in the user image at the first preset position is directly determined as the first area image of the seat belt. The first preset position may include multiple position coordinates, and the multiple position coordinates together form an area.

[0062] S203: Determine the area at the second preset position in the user image as the second area image of the target user's clothes.

[0063] By presetting the second preset position of the clothes, in the actual determination process, the area in the user image at the second preset position is directly determined as the second area image of the target user's clothes. The second preset position may include multiple position coordinates, and the multiple position coordinates together form an area.

[0064] S204: grayscale processing is performed on the user image to convert the user image into a grayscale image.

[0065] The second determination method requires converting the user image into a grayscale image, so as to determine the first region image and the second region image through the grayscale image.

[0066] Specifically, the grayscale processing method can be achieved by calculating the average value or weighted average value of each pixel in the user image under the three color channels of red, green and blue, and determining the calculation result as the grayscale value of each pixel, thereby obtaining a grayscale image.

[0067] S205 , determining the edge formed by the safety belt and the clothes of the target user from the grayscale image according to the grayscale value of each pixel in the grayscale image.

[0068] Among them, the grayscale values ​​of the pixels on both sides of the edge will change suddenly. Based on this characteristic, the edge is detected by calculating the grayscale value change or difference of the pixels in the grayscale image, and then the edge formed by the seat belt and the target user's clothes is determined from the grayscale image.

[0069] S206, acquiring an edge constituting region constituted by the edges, and other regions in the grayscale image except the edge constituting region.

[0070] Since the seat belt has at least two edges, namely, an upper edge and a lower edge, an edge constituting region is formed by the edges, and other regions except the edge constituting region in the grayscale image are obtained.

[0071] S207, segmenting the region in the user image that is located at the same position as the edge constituting region to obtain a first region image of the seat belt.

[0072] Among them, since the edge constituting area refers to the area corresponding to the seat belt in the grayscale image, the area in the user image that is at the same position as the edge constituting area is determined as the first area image of the seat belt.

[0073] S208, segmenting the region in the user image that is located at the same position as the other region to obtain a second region image of the target user's clothes.

[0074] Since the other regions refer to the regions corresponding to the target user's clothes in the grayscale image, the region in the user image having the same position as the other regions is determined as the second region image of the target user's clothes.

[0075] S209: Input the first region image and the second region image into a matching determination model to obtain a target determination result.

[0076] The matching determination model is a network model capable of predicting whether the colors of the region images match. The first region image and the second region image are input into the matching determination model to determine the target determination result through the matching determination model.

[0077] S210: If the target determination result indicates that the target user's clothes match the color of the safety belt, a prompt message is generated.

[0078] Among them, the target judgment result indicates that the color of the target user's clothes matches the color of the seat belt, which means that the color of the target user's clothes is similar to or the same as the color of the seat belt, and it is easy for the camera to judge that the seat belt is not worn. Therefore, a prompt message is generated to avoid the possibility of misjudgment caused by the control camera due to the influence of light factors and the like.

[0079] The prompting method provided in this embodiment pre-sets the first preset position of the safety belt in the image and the second preset position of the user's clothes, so that after acquiring the user image, the area at the first preset position can be directly determined as the first area image of the safety belt; and the area at the second preset position can be determined as the second area image of the target user's clothes, thereby improving the efficiency of area determination. The edge formed by the safety belt and the target user's clothes is determined through a grayscale image, so as to determine the first area image of the safety belt and the second area image of the target user's clothes based on the edge, thereby improving the accuracy of area determination.

[0080] See also Figure 4 , Figure 4 : is a flowchart of a prompting method provided in an embodiment of the present application. The specific process of the method can be as follows:

[0081] S301, when it is detected that the target user is wearing a seat belt, trigger the camera to shoot the interior of the vehicle to obtain an internal image of the interior of the vehicle.

[0082] Among them, the method of detecting whether the target user is wearing a seat belt can be to detect whether the user is wearing a seat belt through the seat belt detection function. If yes, the user wearing the seat belt is determined as the target user. The internal image is an image of the interior of the vehicle captured by a camera installed inside the vehicle. When the camera captures a video, the internal image is a certain frame or several frames in the video; when the camera captures an image, the internal image is the captured image.

[0083] S302: Identify a target area where a target user is located in the internal image.

[0084] The target area where the target user is located can be identified from the internal image by portrait recognition, and the target area can be a rectangular frame.

[0085] S303: Segment the target area in the internal image to obtain a user image of the target user.

[0086] The target area in the internal image is segmented to obtain a user image of the target user.

[0087] Specifically, when the target area may be a rectangular frame, the rectangular frame in the internal image is segmented to segment out a user image of the target user framed by the rectangular frame.

[0088] S304 , performing segmentation processing on the user image to segment a first region image of the safety belt in the user image and a second region image of the target user's clothes in the user image.

[0089] The user image includes the upper body of the target user, so the user image includes the area image of the target user's clothes and the area image of the safety belt. Therefore, through segmentation processing, the first area image corresponding to the safety belt and the second area image corresponding to the target user's clothes are segmented from the user image.

[0090] S305 , mapping the color value of each pixel in the first region image and the second region image to a preset interval respectively, to obtain a processed first region image and a processed second region image.

[0091] The first region image and the second region image are respectively adjusted to an input size that meets the requirements of the network model (e.g., 224x224 pixels). A normalization process is performed to adjust the pixel values ​​to the interval [0, 1] or [-1, 1] to meet the input requirements of the network model.

[0092] S306, extracting features from the processed first region image to obtain first region image features.

[0093] The processed first region image is input into a convolutional neural network (such as MobileNet, ResNet, etc.), and image features are extracted through multiple convolutional layers and pooling layers. The convolutional layer is responsible for identifying local patterns and features in the image, such as color, texture, edges, etc. The convolutional layer outputs a high-dimensional feature vector, which represents an abstract representation of the input image. The high-dimensional feature vector output by the convolutional layer is input into the fully connected layer for further feature processing and compression. The fully connected layer learns the nonlinear relationship of the data through the neural network, and gradually maps the high-dimensional feature vector to a low-dimensional representation.

[0094] S307, extracting features from the processed second region image to obtain second region image features.

[0095] The processed second region image is input into a convolutional neural network (such as MobileNet, ResNet, etc.), and image features are extracted through multiple convolutional layers and pooling layers. The convolutional layer is responsible for identifying local patterns and features in the image, such as color, texture, edges, etc. So that the convolutional layer outputs a high-dimensional feature vector, which represents an abstract representation of the input image. The high-dimensional feature vector output by the convolutional layer is input into the fully connected layer for further feature processing and compression. The fully connected layer learns the nonlinear relationship of the data through the neural network, and gradually maps the high-dimensional feature vector to a low-dimensional representation.

[0096] S308: Fusing the first region image feature and the second region image feature to obtain a fused feature.

[0097] Among them, in the fully connected layer, the neural network can further fuse and compress features to better perform classification tasks.

[0098] S309, passing the fused features to the classification layer to obtain the probability of mapping the fused features to each preset judgment result.

[0099] The classification layer is usually a classifier that uses the Softmax activation function to output the probability of each category. In this scenario, the network outputs a binary classification result, indicating whether the color of the clothes and the color of the seat belt match, that is, whether they are similar. Based on the two pre-defined categories (matching and mismatching, or similar and dissimilar), the network outputs a probability distribution, indicating the probability that the input data belongs to similarity or dissimilarity.

[0100] S310, determining the preset determination result with the highest probability as the target determination result.

[0101] Among the probabilities of matching or not matching, the preset determination result with the highest probability is determined as the target determination result.

[0102] For example, the probability of a match is 0.7, and the probability of a mismatch is 0.3, so the match corresponding to the largest probability of 0.7 is determined as the target determination result.

[0103] S311: If the target determination result indicates that the target user's clothes match the color of the safety belt, a prompt message is generated.

[0104] If the target determination result indicates that the target user's clothes and the seat belt match in color, it means that the clothes and the seat belt are the same or similar in color, and prompt information is generated to prompt that the target user's clothes and the seat belt are similar in color.

[0105] S312: If the target determination result indicates that the target user's clothes do not match the color of the seat belt, it is prohibited to generate prompt information.

[0106] If the target determination result indicates that the target user's clothes and the seat belt do not match in color, it means that the colors of the clothes and the seat belt are quite different and not similar, so no prompt information is generated.

[0107] The prompt method provided in the embodiment of the present application inputs the first area image and the second area image into the matching judgment model to determine whether the colors of the two areas match through the matching judgment model, so as to improve the accuracy of the color matching judgment. The internal image taken by the camera is identified to determine the target area where the target user is located in the internal image, and the target area is segmented from the internal image to achieve the effect of obtaining the user image of the target user. When the target judgment result indicates that the target user's clothes match the color of the safety belt, the prompt information can be used to indicate that the color of the clothes is similar to that of the safety belt, so as to avoid the problem of the control camera misjudging that the target user is not wearing a safety belt due to the influence of light factors, etc. When the target judgment result indicates that the target user's clothes do not match the color of the safety belt, it can indicate that the color difference between the target user's clothes and the safety belt is large, and no prompt is required.

[0108] See also Figure 5 , Figure 5 This is a flow chart of a matching judgment model in the training process provided by an embodiment of the present application. The specific process of the method can be as follows:

[0109] S401, obtaining a sample area image group, wherein the sample area image group includes a sample seat belt area image, a sample clothing area image, and an identification indicating whether the sample area image group is matched;

[0110] The sample area image group includes a sample seat belt area image, a sample clothing area image, and an identification indicating whether the sample area image group is matched.

[0111] S402: Input the sample region image group into the matching determination model to be trained to obtain a matching result determined for the sample region image group.

[0112] The sample area image group is input into the matching determination model to be trained to trigger the matching determination model to be trained to determine whether the sample seat belt area image and the sample clothing area image in the sample area image group match, and obtain a matching result.

[0113] Specifically, the matching determination model to be trained may be based on the real-time object detection model Yolov4 (You Only LookOnce version 4).

[0114] S403, training the matching determination model to be trained based on the identifier of the sample region image group and the matching result and iteratively updating the model parameters of the matching determination model to be trained until the matching determination model to be trained converges to obtain a trained matching determination model.

[0115] By comparing the identification and matching results of the sample area image group, the matching determination model to be trained is trained and the model parameters of the matching determination model to be trained are iteratively updated until the matching determination model to be trained converges to obtain a trained matching determination model.

[0116] The prompt method provided in this embodiment pre-trains a matching determination model so that during use, the matching determination model can be used to determine whether the colors of clothes and safety belts match, so as to determine the accuracy.

[0117] based on Figure 1 The scene diagram shown below will be combined with Figure 6 , the prompt device provided in the embodiment of the present application is introduced in detail. It should be noted that, Figure 6 The prompt device in the embodiment is used to execute the present application Figure 2-Figure 5 For the convenience of explanation, only the part related to the embodiment of the present application is shown. For the specific technical details not disclosed, please refer to the present application. Figure 2-Figure 5 The embodiment shown.

[0118] See also Figure 6 , Figure 6 900 is a schematic diagram of a prompt device provided in an embodiment of the present application. The prompt device 900 can be applied to a vehicle, wherein the prompt device 900 can include an acquisition unit 901, a segmentation unit 902, an input unit 903 and a generation unit 904, as follows:

[0119] An acquisition unit 901 is used to acquire a user image of the target user when it is detected that the target user is wearing a seat belt;

[0120] A segmentation unit 902 is used to perform segmentation processing on the user image to segment a first area image of the safety belt in the user image and a second area image of the target user's clothes in the user image;

[0121] An input unit 903, used for inputting the first region image and the second region image into a matching determination model to obtain a target determination result;

[0122] The generating unit 904 is configured to generate prompt information if the target determination result indicates that the target user's clothes match the color of the safety belt.

[0123] In some implementations, the segmentation unit 902 is specifically configured to:

[0124] Determine an area at a first preset position in the user image as a first area image of the seat belt;

[0125] An area at a second preset position in the user image is determined as a second area image of the target user's clothes.

[0126] In some embodiments, the segmentation unit 902 is specifically configured to:

[0127] Performing grayscale processing on the user image to convert the user image into a grayscale image;

[0128] Determining an edge formed by the safety belt and the clothes of the target user from the grayscale image according to the grayscale value of each pixel in the grayscale image;

[0129] Acquire an edge constituting region constituted by the edge, and other regions in the grayscale image except the edge constituting region;

[0130] Segmenting the region in the user image that is located at the same position as the edge constituting region to obtain a first region image of the safety belt;

[0131] The region in the user image having the same position as the other regions is segmented to obtain a second region image of the target user's clothes.

[0132] In some embodiments, the input unit 903 is specifically used to:

[0133] Respectively mapping the color value of each pixel in the first region image and the second region image to a preset interval to obtain a processed first region image and a processed second region image;

[0134] Extracting features from the processed first region image to obtain first region image features;

[0135] Extracting features from the processed second region image to obtain second region image features;

[0136] Performing fusion processing on the first region image features and the second region image features to obtain fusion features;

[0137] Passing the fused features to the classification layer to obtain the probability of mapping the fused features to each preset judgment result;

[0138] The preset judgment result with the highest probability is determined as the target judgment result.

[0139] In some embodiments, the vehicle is equipped with a camera, and the acquisition unit 901 is specifically used to:

[0140] When it is detected that the target user is wearing a seat belt, the camera is triggered to shoot the interior of the vehicle to obtain an internal image of the interior of the vehicle;

[0141] Identifying a target area where the target user is located in the internal image;

[0142] The target area in the internal image is segmented to obtain a user image of the target user.

[0143] In some embodiments, the prompt information is used to prompt that the target user's clothes are similar in color to the safety belt.

[0144] In some embodiments, the device is further specifically used for:

[0145] If the target determination result indicates that the target user's clothes do not match the color of the safety belt, it is prohibited to generate prompt information.

[0146] The prompt method provided in the embodiment of the present application performs color matching judgment on the first area image corresponding to the clothes in the user image and the second area image corresponding to the safety belt, and generates prompt information when the target judgment result indicates that the clothes of the target user match the color of the safety belt, so as to prompt the target user's clothes to be the same or similar in color as the safety belt, and reduce the possibility of misjudgment of the control camera due to the influence of light factors, etc. by presetting the first preset position of the safety belt in the image and the second preset position of the user's clothes, so that after the user image is acquired, the area at the first preset position can be directly determined as the first area image of the safety belt; the area at the second preset position can be determined as the second area image of the target user's clothes, thereby improving the efficiency of area determination. The edge formed by the safety belt and the target user's clothes is determined by the grayscale image, so as to determine the first area image of the safety belt and the second area image of the target user's clothes based on the edge, thereby improving the accuracy of area determination. By inputting the first area image and the second area image into the matching judgment model, the matching judgment model is used to determine whether the colors of the two areas match, so as to improve the accuracy of color matching judgment. The internal image captured by the camera is identified to determine the target area where the target user is located in the internal image, and the target area is segmented from the internal image to achieve the effect of obtaining the user image of the target user. When the target determination result indicates that the target user's clothes match the color of the safety belt, a prompt message can be used to indicate that the color of the clothes is similar to that of the safety belt, thereby avoiding the problem of the control camera misjudging that the target user is not wearing a safety belt due to the influence of light factors, etc. When the target determination result indicates that the target user's clothes do not match the color of the safety belt, it can indicate that the color difference between the target user's clothes and the safety belt is large, and no prompt is required.

[0147] See also Figure 7 , Figure 71 is a schematic diagram of a vehicle structure provided by an embodiment of the present application. The vehicle 1000 includes a processor 1001 and a memory 1002. The processor 1001 is electrically connected to the memory 1002.

[0148] The processor 1001 is the control center of the vehicle 1000 and may include one or more processing cores. The processor 1001 uses various interfaces and lines to connect various parts of the entire vehicle 1000, and executes various functions and processes data of the vehicle 1000 by running or calling computer programs stored in the memory 1002, and calling data stored in the memory 1002, so as to control the vehicle 1000 as a whole. Optionally, the processor 1001 may be implemented in at least one hardware form of digital signal processing (DSP), field programmable gate array (FPGA), and programmable logic array (PLA). The processor 1001 may integrate one or a combination of CPU, graphics processing unit (GPU), modem, etc. Among them, the CPU mainly processes the operating system, user pages, and applications; the GPU is responsible for rendering and drawing display content; and the modem is used to process wireless communications. It is understandable that the above-mentioned modem may not be integrated into the processor 1001, but may be implemented separately through a communication chip.

[0149] The memory 1002 can be used to store software programs and modules, and the processor 1001 executes various functional applications and data processing by running the computer programs and modules stored in the memory 1002. The memory 1002 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, a computer program required for at least one function, etc.; the data storage area can store data created according to the use of the vehicle 1000, etc.

[0150] In addition, the memory 1002 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage device. Accordingly, the memory 1002 may also include a memory controller to provide the processor 1001 with access to the memory 1002.

[0151] In the embodiment of the present application, the processor 1001 in the vehicle 1000 will load instructions corresponding to the processes of one or more computer programs into the memory 1002 according to the following steps, and the processor 1001 will run the computer program stored in the memory 1002 to implement various functions, as follows:

[0152] When it is detected that a target user is wearing a seat belt, obtaining a user image of the target user;

[0153] Performing segmentation processing on the user image to segment a first region image of the safety belt in the user image and a second region image of the target user's clothes in the user image;

[0154] Inputting the first region image and the second region image into a matching determination model to obtain a target determination result;

[0155] If the target determination result indicates that the target user's clothes match the color of the safety belt, a prompt message is generated.

[0156] Optionally, when the processor 1001 performs segmentation processing on the user image to segment a first area image of the safety belt in the user image and a second area image of the clothes of the target user in the user image, the processor 1001 further specifically performs:

[0157] Determine an area at a first preset position in the user image as a first area image of the seat belt;

[0158] An area at a second preset position in the user image is determined as a second area image of the target user's clothes.

[0159] Optionally, when the processor 1001 performs segmentation processing on the user image to segment a first area image of the safety belt in the user image and a second area image of the clothes of the target user in the user image, the processor 1001 further specifically performs:

[0160] Performing grayscale processing on the user image to convert the user image into a grayscale image;

[0161] Determining an edge formed by the safety belt and the clothes of the target user from the grayscale image according to the grayscale value of each pixel in the grayscale image;

[0162] Acquire an edge constituting region constituted by the edge, and other regions in the grayscale image except the edge constituting region;

[0163] Segmenting the region in the user image that is located at the same position as the edge constituting region to obtain a first region image of the safety belt;

[0164] The region in the user image having the same position as the other regions is segmented to obtain a second region image of the target user's clothes.

[0165] Optionally, when the processor 1001 inputs the first region image and the second region image into the matching determination model to obtain the target determination result, the processor 1001 further specifically executes:

[0166] Respectively mapping the color value of each pixel in the first region image and the second region image to a preset interval to obtain a processed first region image and a processed second region image;

[0167] Extracting features from the processed first region image to obtain first region image features;

[0168] Extracting features from the processed second region image to obtain second region image features;

[0169] Performing fusion processing on the first region image features and the second region image features to obtain fusion features;

[0170] Passing the fused features to the classification layer to obtain the probability of mapping the fused features to each preset judgment result;

[0171] The preset judgment result with the highest probability is determined as the target judgment result.

[0172] Optionally, the vehicle is equipped with a camera, and when the processor 1001 detects that a target user is wearing a seat belt and obtains a user image of the target user, it further specifically executes:

[0173] When it is detected that the target user is wearing a seat belt, the camera is triggered to shoot the interior of the vehicle to obtain an internal image of the interior of the vehicle;

[0174] Identifying a target area where the target user is located in the internal image;

[0175] The target area in the internal image is segmented to obtain a user image of the target user.

[0176] The optional prompt information is used to prompt that the target user's clothes are similar in color to the safety belt.

[0177] Optionally, the processor 1001 further specifically performs:

[0178] If the target determination result indicates that the target user's clothes do not match the color of the safety belt, it is prohibited to generate prompt information.

[0179] The embodiment of the present application acquires the user image of the target user when it is detected that the target user is wearing a safety belt; performs segmentation processing on the user image to segment the first area image of the safety belt in the user image and the second area image of the target user's clothes in the user image; inputs the first area image and the second area image into the matching judgment model to obtain a target judgment result; if the target judgment result indicates that the target user's clothes match the color of the safety belt, a prompt message is generated. By performing color matching judgment on the first area image corresponding to the clothes in the user image and the second area image corresponding to the safety belt, and when the target judgment result indicates that the target user's clothes match the color of the safety belt, a prompt message is generated to prompt that the target user's clothes are the same or similar in color to the safety belt, and to reduce the user's timely reminder when the user's clothes are similar in color to the safety belt, so as to avoid the probability of misjudgment caused by the control camera due to the influence of light factors.

[0180] See also Figure 8 , Figure 8 1 is a schematic diagram of a vehicle structure provided by an embodiment of the present application. The vehicle 1000 may include: a processor 1001, a memory 1002, a sensor 1003 and a power supply 1004. The processor 1001 is electrically connected to the sensor 1003 and the power supply 1004 respectively.

[0181] The sensor 1003 is used to collect information of the vehicle 1000 itself, the user's information, or the external environment information. For example, the sensor 1003 may include one or more sensors such as a vibration sensor, a temperature sensor, a distance sensor, a magnetic field sensor, a light sensor, an acceleration sensor, a fingerprint sensor, a Hall sensor, a position sensor, a gyroscope, an inertial sensor, a posture sensor, a barometer, and a heart rate sensor.

[0182] The power supply 1004 is used to supply power to various components of the vehicle 1000. In some embodiments, the power supply 1004 may be logically connected to the processor 1001 through a power management system, so that the power management system can manage charging, discharging, power consumption, and other functions.

[0183] It should be understood that the device provided in the embodiment of the present application is used to execute the above-mentioned prompt method, and thus can achieve the same effect as the above-mentioned implementation method.

[0184] In the case of an integrated unit, the device may include a processing module and a storage module. When the device is applied to a vehicle, the processing module may be used to control and manage the actions of the vehicle. The storage module may be used to support the vehicle in executing mutual program codes, etc.

[0185] The processing module may be a processor or a controller, which may implement or execute various exemplary logic blocks, modules and circuits disclosed in the present application. The processor may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of digital signal processing (DSP) and a microprocessor, etc. The storage module may be a memory.

[0186] In addition, the device provided in the embodiment of the present application can specifically be a chip, component or module, and the chip may include a connected processor and memory; wherein the memory is used to store instructions, and when the processor calls and executes the instructions, the chip can execute a prompt method provided in the above embodiment.

[0187] An embodiment of the present application also provides a computer-readable storage medium, in which a computer program code is stored. When the computer program code is executed on a computer, the computer executes the above-mentioned related method steps to implement a prompt method provided in the above-mentioned embodiment.

[0188] This embodiment also provides a computer program product. When the computer program product is run on a computer, the computer is enabled to execute the above-mentioned related steps to implement a prompt method provided by the above-mentioned embodiment.

[0189] Among them, the device, computer-readable storage medium, computer program product or chip provided in this embodiment is used to execute the corresponding method provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding method provided above, and will not be repeated here.

[0190] Through the description of the above implementation methods, technical personnel in the relevant field can understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0191] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of modules or units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0192] The above contents are only specific implementation methods of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A prompting method, characterized in that: Applied to a vehicle, the method comprises: When it is detected that a target user is wearing a seat belt, obtaining a user image of the target user; Performing segmentation processing on the user image to segment a first region image of the safety belt in the user image and a second region image of the target user's clothes in the user image; Inputting the first region image and the second region image into a matching determination model to obtain a target determination result; If the target determination result indicates that the target user's clothes match the color of the safety belt, a prompt message is generated.

2. The method according to claim 1, characterized in that The segmenting process of the user image to segment a first region image of the safety belt in the user image and a second region image of the clothes of the target user in the user image includes: Determine an area at a first preset position in the user image as a first area image of the seat belt; An area at a second preset position in the user image is determined as a second area image of the target user's clothes.

3. The method according to claim 1, characterized in that: The segmenting process of the user image to segment a first region image of the safety belt in the user image and a second region image of the clothes of the target user in the user image includes: Performing grayscale processing on the user image to convert the user image into a grayscale image; Determining an edge formed by the safety belt and the clothes of the target user from the grayscale image according to the grayscale value of each pixel in the grayscale image; Acquire an edge constituting region constituted by the edge, and other regions in the grayscale image except the edge constituting region; Segmenting the region in the user image that is located at the same position as the edge constituting region to obtain a first region image of the safety belt; The region in the user image having the same position as the other regions is segmented to obtain a second region image of the target user's clothes.

4. The method according to any one of claims 1 to 3, characterized in that: The step of inputting the first region image and the second region image into a matching determination model to obtain a target determination result includes: Respectively mapping the color value of each pixel in the first region image and the second region image to a preset interval to obtain a processed first region image and a processed second region image; Extracting features from the processed first region image to obtain first region image features; Extracting features from the processed second region image to obtain second region image features; Performing fusion processing on the first region image features and the second region image features to obtain fusion features; Passing the fused features to the classification layer to obtain the probability of mapping the fused features to each preset judgment result; The preset judgment result with the highest probability is determined as the target judgment result.

5. The method according to claim 1, characterized in that: The vehicle is equipped with a camera, and when it is detected that a target user is wearing a seat belt, obtaining a user image of the target user includes: When it is detected that the target user is wearing a seat belt, the camera is triggered to shoot the interior of the vehicle to obtain an internal image of the interior of the vehicle; Identifying a target area where the target user is located in the internal image; The target area in the internal image is segmented to obtain a user image of the target user.

6. The method according to claim 1, characterized in that The prompt information is used to prompt that the target user's clothes are similar in color to the safety belt.

7. The method according to claim 1, characterized in that The method further comprises: If the target determination result indicates that the target user's clothes do not match the color of the safety belt, it is prohibited to generate prompt information.

8. A prompting device, characterized in that: Applied to a vehicle, the device comprises: an acquisition unit, configured to acquire a user image of the target user when it is detected that the target user is wearing a seat belt; a segmentation unit, configured to perform segmentation processing on the user image to segment a first region image of the safety belt in the user image and a second region image of the target user's clothes in the user image; An input unit, used for inputting the first region image and the second region image into a matching determination model to obtain a target determination result; A generating unit is configured to generate prompt information if the target determination result indicates that the target user's clothes match the color of the safety belt.

9. A vehicle, characterized in that: The vehicle comprises: A memory for storing executable program codes; A processor, configured to call and run the executable program code from the memory, so that the vehicle executes the method as claimed in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program code, and when the computer program code is executed, the method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Vehicle control method, device and equipment based on target recognition, and vehicle

    CN111783604A

  • Wearing state recognition method and device for safety belt, electronic equipment and storage medium

    CN111950348A

  • Safety belt control method and device and safety belt

    CN115257625A

  • Automobile safety belt with reflective stripe

    CN203344890U

  • Image processing apparatus, image processing method, and image processing program

    US20130076733A1

Cited By

  • Wearing monitoring method of safety belt, electronic equipment and vehicle

    CN121572914A