Water tank identification method and device, electronic equipment and vehicle

Through wavelet transformation and bilateral filtering technology denoising combined with color attention mechanism and curve fitting text detection model, the problems of low efficiency and insufficient accuracy of existing water tank specification detection methods are solved, and efficient and accurate water tank specification recognition is achieved.

CN119741710APending Publication Date: 2025-04-01CHONGQING JINKANG NEW ENERGY VEHICLE CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411954673.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-27
Publication Date
2025-04-01

AI Technical Summary

Technical Problem

The existing water tank specification detection method is based on manual naked eye recognition, with low efficiency and low accuracy only for the appearance of the water tank.

Method used

Wavelet transformation and bilateral filtering technology are used to denoise the identification image, combined with the preset detection algorithm of the color attention mechanism to segment the vehicle water tank image, and the text features in the water tank are extracted through curve fitting text detection model, and finally the target specifications of the water tank are determined by the confidence weighting of multiple sources.

Benefits of technology

Improves the efficiency and accuracy of tank recognition, can effectively remove high-frequency noise, retain tiny text features on the tank, enhance image quality, and perform better when detecting targets with strong color contrast.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119741710A_ABST
    Figure CN119741710A_ABST
Patent Text Reader

Abstract

The invention provides a water tank recognition method and device, electronic equipment and a vehicle, and the method comprises the steps: obtaining a to-be-recognized image which comprises a vehicle water tank, carrying out the wavelet transformation and bilateral filtering operation of the to-be-recognized image, obtaining a denoised image of the to-be-recognized image, and carrying out the recognition of the vehicle water tank. Processing the de-noised image through a preset detection algorithm fused with a color attention mechanism, obtaining a vehicle water tank image in the de-noised image, obtaining a target text image and a first water tank specification judgment result about the vehicle water tank through the vehicle water tank image, and obtaining a target water tank specification judgment result through a preset curve fitting text detection model. And obtaining text features in the target text image, decoding the text features to obtain a second water tank specification identification result, and determining a target specification identification result of the vehicle water tank through the first water tank specification judgment result and the second water tank specification identification result. The water tank identification efficiency and accuracy are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image recognition technology, and in particular to a water tank recognition method, device, electronic equipment and vehicle. Background Art

[0002] The vehicle water tank, commonly known as the radiator or cooler, is a key component in the engine cooling system and is used to maintain the temperature for normal engine operation. The water tank absorbs the heat generated by the engine operation by circulating coolant (usually a mixture of water and antifreeze) and cools it at the radiator, thereby preventing the engine from overheating. Different models of vehicles need to be equipped with water tanks of different specifications. The existing water tank specification detection methods are all based on the detection method of manual naked eye recognition, which is inefficient, and the existing water tank specification detection schemes are often based on the recognition of the appearance of the water tank, which has low accuracy. Summary of the invention

[0003] In view of this, the present application aims to propose a water tank identification method, device, electronic device and vehicle to solve the problem that the current water tank specification detection method based on artificial naked eye identification is inefficient and only identifies the appearance of the water tank, with low accuracy. The specific technical solution is as follows:

[0004] According to a first aspect of the present application, a water tank identification method is provided, the method comprising:

[0005] Acquire an image to be identified, wherein the image to be identified includes a vehicle water tank;

[0006] Performing wavelet transform and bilateral filtering operations on the image to be identified to obtain a denoised image of the image to be identified;

[0007] Processing the denoised image by a preset detection algorithm integrating a color attention mechanism to obtain a vehicle water tank image in the denoised image;

[0008] Acquire a target text image and a first water tank specification determination result about the vehicle water tank through the vehicle water tank image;

[0009] Acquire text features in the target text image by using a preset curve fitting text detection model;

[0010] Decoding the text feature to obtain a second water tank specification recognition result;

[0011] A target specification recognition result of the vehicle water tank is determined through the first water tank specification determination result and the second water tank specification recognition result.

[0012] Optionally, performing wavelet transform and bilateral filtering operations on the image to be identified to obtain a denoised image of the image to be identified includes:

[0013] Acquire a first pixel value of the image to be recognized;

[0014] Performing wavelet decomposition on the image to be recognized to obtain wavelet coefficients corresponding to the first pixel value;

[0015] If the wavelet coefficient is greater than a preset threshold, threshold denoising is performed on the wavelet coefficient;

[0016] Perform wavelet reconstruction on the wavelet coefficients after threshold denoising to obtain a second pixel value;

[0017] A bilateral filtering operation is performed on the second pixel value and the unchanged first pixel value to obtain a denoised image of the image to be recognized.

[0018] Optionally, after performing wavelet transform and bilateral filtering operations on the image to be identified to obtain a denoised image of the image to be identified, the method further includes:

[0019] Acquire the original color space and the target color space of the denoised image;

[0020] Convert the denoised image to a target color space to obtain a color converted image;

[0021] Performing information separation on the color conversion image to obtain first brightness information and color information;

[0022] Performing histogram equalization processing and gamma correction on the first brightness information to obtain second brightness information;

[0023] Integrate the second brightness information and the color information to obtain an updated color conversion image;

[0024] The updated color conversion image is converted back to the original color space to obtain a denoised image after light balance.

[0025] Optionally, the denoised image is processed by a preset detection algorithm integrating a color attention mechanism to obtain a vehicle water tank image in the denoised image, including:

[0026] Convert the denoised image after illumination balance from the original color space to the target color space and then perform feature extraction to obtain an image feature map, wherein the image feature map includes color features;

[0027] Dividing the image feature map to obtain a number of divided areas;

[0028] Determine, by using the color feature, a target area whose color contrast meets a preset condition from among the plurality of divided areas;

[0029] Adding weights to the divided areas respectively through a color attention mechanism, wherein the weight of the target area is greater than the weight of the non-target area;

[0030] Determining a bounding box of a vehicle water tank by adding the weighted image feature map;

[0031] A vehicle water tank image is segmented from the denoised image using a boundary box of the vehicle water tank.

[0032] Optionally, the acquiring of a target text image and a first water tank specification determination result about the vehicle water tank through the vehicle water tank image further includes:

[0033] Obtaining shape features, color features, and texture features of the vehicle water tank through the vehicle water tank image;

[0034] The shape feature, the color feature and the texture feature are integrated to obtain a first water tank specification determination result about the vehicle water tank;

[0035] A target text image is extracted from the vehicle water tank image using a preset text extraction model.

[0036] Optionally, after obtaining the text features in the target text image by fitting the text detection model with a preset curve, the method further includes:

[0037] Acquire text local features from the text features;

[0038] Obtain the correlation between the local features of the text through a multi-head attention mechanism;

[0039] Obtaining the sequential features and overall semantic features of the text in the target text image through the correlation relationship;

[0040] The sequential feature and the overall semantic feature are added to the text feature.

[0041] Optionally, determining the target specification recognition result of the vehicle water tank through the first water tank specification determination result and the second water tank specification recognition result includes:

[0042] Acquire a first water tank specification type and a first confidence level of the first water tank specification type from the first water tank specification determination result;

[0043] Acquire a second water tank specification type and a second confidence level of the second water tank specification type from the second water tank specification determination result;

[0044] Weighting the confidence scores of the first confidence scores and the second confidence scores that belong to the same water tank specification type;

[0045] According to the weighted result, a target specification recognition result of the vehicle water tank is determined.

[0046] According to a second aspect of the present application, a water tank identification device is provided, the device comprising:

[0047] A first acquisition module, used for acquiring an image to be identified, wherein the image to be identified includes a vehicle water tank;

[0048] A denoising module, used for performing wavelet transform and bilateral filtering operations on the image to be identified to obtain a denoised image of the image to be identified;

[0049] A second acquisition module is used to process the denoised image by using a preset detection algorithm that integrates a color attention mechanism to acquire a vehicle water tank image in the denoised image;

[0050] A third acquisition module is used to acquire a target text image and a first water tank specification determination result about the vehicle water tank through the vehicle water tank image;

[0051] A fourth acquisition module, used to acquire text features in the target text image by using a preset curve fitting text detection model;

[0052] A fifth acquisition module, used for decoding the text feature to obtain a second water tank specification recognition result;

[0053] The first determination module is used to determine a target specification recognition result of the vehicle water tank according to the first water tank specification determination result and the second water tank specification recognition result.

[0054] According to another aspect of the present application, there is also provided an electronic device, including:

[0055] processor;

[0056] a memory for storing instructions executable by the processor;

[0057] Wherein, the processor is configured to execute the instructions to implement the water tank identification method as described above.

[0058] According to another aspect of the present application, a readable storage medium is further provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the water tank identification method as described above are implemented.

[0059] According to another aspect of the present application, a vehicle is provided, comprising: the above-mentioned water tank identification device.

[0060] The water tank recognition method provided by the present application obtains an image to be recognized, wherein the image to be recognized includes a vehicle water tank, performs wavelet transform and bilateral filtering operations on the image to be recognized, and obtains a denoised image of the image to be recognized, so that the obtained denoised image can remove high-frequency noise, avoid image transition smoothing, enhance dark details of the image, retain tiny text features on the water tank, and improve image quality; the denoised image is processed by a preset detection algorithm integrating a color attention mechanism to obtain a vehicle water tank image in the denoised image, so that it performs better when detecting targets with strong color contrast (such as vehicle water tanks with obvious color differences), thereby improving the recognition efficiency of the vehicle water tank; through the vehicle water tank image, a target text image and a first water tank specification determination result about the vehicle water tank are obtained; through a preset curve fitting text detection model, text features in the target text image are obtained, so that the influence of text deformity caused by reasons such as water tank structure or shooting angle on text recognition can be avoided, and the accuracy of text recognition can be improved; the text features are decoded to obtain a second water tank specification recognition result; and a target specification recognition result of the vehicle water tank is determined through the first water tank specification determination result and the second water tank specification recognition result. The present application performs image denoising through wavelet transform and bilateral filtering operations, which can remove high-frequency noise, avoid image transition smoothing, enhance dark details of the image, retain tiny text features on the water tank, and improve image quality. By combining the color attention mechanism to achieve segmentation of vehicle water tank images, it can perform better when detecting targets with strong color contrast (such as vehicle water tanks with obvious color differences), thereby improving the recognition efficiency of vehicle water tanks. By extracting text features in vehicle water tanks through curve fitting, it can avoid the influence of text deformity caused by water tank structure or shooting angle on text recognition, thereby improving the accuracy of text recognition. The above operations solve the problems of low efficiency of water tank specification detection method based on artificial naked eye recognition and low accuracy of only recognizing the appearance of the water tank.

[0061] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0062] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present application. Also, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:

[0063] Figure 1 It is a flow chart of steps of a water tank identification method provided by the present application;

[0064] Figure 2 yes Figure 1 A flowchart of step 102 in a water tank identification method provided by the present application;

[0065] Figure 3 yes Figure 1 A flowchart of step 103 in a water tank identification method provided by the present application;

[0066] Figure 4 yes Figure 1 A flowchart of step 104 in a water tank identification method provided by the present application;

[0067] Figure 5 yes Figure 1 A flowchart of step 107 in a water tank identification method provided by the present application;

[0068] Figure 6 It is a structural schematic diagram of a water tank identification device provided by the present application;

[0069] Figure 7 It is a structural schematic diagram of an electronic device provided by this application. DETAILED DESCRIPTION

[0070] In order to make the purpose, technical scheme and advantages of the present application clearer, each embodiment of the present application will be described in detail below in conjunction with the accompanying drawings. However, it will be appreciated by those skilled in the art that in each embodiment of the present application, many technical details are proposed in order to enable the reader to better understand the present application. However, even without these technical details and various changes and modifications based on the following embodiments, the technical scheme claimed in the present application can also be implemented. The division of the following embodiments is for the convenience of description, and should not constitute any limitation on the specific implementation of the present application. The various embodiments can be combined with each other and referenced to each other without contradiction.

[0071] The vehicle water tank is used to maintain the temperature for the normal operation of the engine. Different models of vehicles need to be equipped with water tanks of different specifications. The existing water tank specification detection methods are all based on the detection method of manually identifying the appearance of the water tank with the naked eye. Not only is the efficiency low, but also because the existing vehicle water tanks are similar in appearance due to the limitations of the vehicle's built-in space, simple appearance recognition leads to poor recognition effect and low accuracy. In order to solve this problem, machine vision can be used to detect the specifications of the water tank. However, the existing image denoising method is too single, which makes it difficult to retain the detailed features of the image, and it is easy to lose the text details in the vehicle water tank image. Based on the above considerations, this application proposes a water tank recognition method.

[0072] Reference Figure 1, shows a flow chart of steps of a water tank identification method provided by the present application, the method may include:

[0073] Step 101: Obtain an image to be recognized.

[0074] The images to be identified in this application include vehicle water tanks. The vehicle water tank is usually called a radiator or cooler. It is a key component in the engine cooling system. Its main function is to absorb and dissipate the heat generated by the engine through circulating coolant, thereby keeping the engine within the normal operating temperature range. Because the vehicle water tank is usually installed inside the vehicle, close to the engine. It cannot be obtained through the vehicle's camera, so it can be photographed through external devices such as cameras, mobile phones and 3D scanners. When shooting, the vehicle needs to be adjusted to a safe state, such as the engine has been cooled, the vehicle has been turned off, etc.

[0075] Step 102: performing wavelet transform and bilateral filtering operations on the image to be identified to obtain a denoised image of the image to be identified.

[0076] When taking pictures of a vehicle's water tank, the image may have more noise points due to factors such as lighting during shooting. Simple bilateral filtering can easily cause a smoothing effect on the denoised image, resulting in limited detail recovery capabilities. Simple wavelet transform has limited effect on high-intensity noise. Using wavelet transform denoising to remove high-frequency noise first, and then using bilateral filtering to further denoise the image can avoid image transition smoothing and improve image quality. Therefore, this application uses a wavelet transform combined with bilateral filtering to perform image denoising. Specifically, step 102, such as Figure 2 As shown:

[0077] Step 1021, obtaining a first pixel value of the image to be identified.

[0078] Step 1022: performing wavelet decomposition on the image to be identified to obtain the wavelet coefficient corresponding to the first pixel value.

[0079] Step 1023: If the wavelet coefficient is greater than a preset threshold, threshold denoising is performed on the wavelet coefficient.

[0080] Step 1024: Perform wavelet reconstruction on the wavelet coefficients after threshold denoising to obtain a second pixel value.

[0081] Step 1025 , performing a bilateral filtering operation on the second pixel value and the unchanged first pixel value to obtain a denoised image of the image to be identified.

[0082] It should be noted that when performing wavelet decomposition on the image to be identified, the wavelet decomposition formula used is as follows:

[0083] W j,k (x,y)= <I(x,y),ψ j,k(x,y)>

[0084] Where I(x,y) is the first pixel value of the image to be identified at the (x,y) coordinate before filtering, ψ j,k (x, y) is the wavelet basis function corresponding to the k-th direction of the j-th layer corresponding to the first pixel value of the image to be identified at the (x, y) coordinate, <, > are the inner product operation symbols, W j,k (x, y) is the wavelet coefficient corresponding to the k-th direction of the j-th layer corresponding to the first pixel value of the image to be identified at the (x, y) coordinate.

[0085] After that, the wavelet coefficients of the high-frequency part after wavelet decomposition are subjected to threshold denoising. The threshold denoising formula used is as follows:

[0086]

[0087] in, is the denoised wavelet coefficient corresponding to the first pixel value of the image at the (x, y) coordinate in the jth layer k direction, sign() is the sign function, W j,k (x,y) is the wavelet coefficient corresponding to the k-th direction of the j-th layer corresponding to the first pixel value of the image at the (x,y) coordinate, · is the dot product symbol, max(,) is the maximum value symbol, || is the absolute value symbol, and T is the preset threshold.

[0088] The wavelet coefficients after denoising are reconstructed by wavelet, and the wavelet reconstruction formula used is as follows:

[0089]

[0090] in, is the second pixel value of the image at (x,y) coordinates after wavelet filtering, is the denoised wavelet coefficient corresponding to the first pixel value of the image at the (x, y) coordinate in the jth layer k direction, ψ j,k (x, y) is the wavelet basis function corresponding to the k-th direction of the j-th layer corresponding to the first pixel value of the image to be identified at the (x, y) coordinate.

[0091] Then, bilateral filtering is used for further noise removal. The bilateral filtering formula used is as follows:

[0092]

[0093] Where O(p) refers to the pixel value of the pixel with coordinates (x, y) in the bilateral filtered image, (x1, y1) is any pixel in the neighborhood of (x, y), Ω is the neighborhood symbol, W is the preset normalized weight coefficient, Ω is the filtering neighborhood of the pixel with coordinates p, is the second pixel value of the image at (x, y) coordinates after wavelet filtering, exp is the exponential function symbol, σ s is the standard deviation of the Gaussian kernel in the spatial domain, ‖‖ is the modulus symbol, || is the absolute value symbol, σ r is the pixel-domain Gaussian kernel standard deviation, It is the second pixel value of the pixel at coordinate (x1, y1) in the image after wavelet filtering.

[0094] It should be noted that the size of the neighborhood is generally determined by the filtering window, for example, a 5x5 window has a neighborhood of 25 pixels, which is not specifically limited in this application. The standard deviation of the spatial domain Gaussian kernel and the standard deviation of the pixel domain Gaussian kernel are generally determined by the resolution of the image and the filtering window. Here, it can be understood that according to experience, the standard deviation of all pixels in the image is consistent.

[0095] In addition, after filtering and denoising, in order to reduce the impact of illumination differences on image detection accuracy, the present application also separates the brightness information of the image through the target color space, and uses histogram equalization and gamma correction methods to perform illumination balance correction on the separated brightness information, wherein the target color space can be Lab color space, HSV color space, HSI color space, etc. The specific steps include:

[0096] Get the original color space and target color space of the denoised image;

[0097] Convert the denoised image to the target color space to obtain a color converted image;

[0098] Performing information separation on the color conversion image to obtain first brightness information and color information;

[0099] Performing histogram equalization processing and gamma correction on the first brightness information to obtain second brightness information;

[0100] Integrate the second brightness information and the color information to obtain an updated color conversion image;

[0101] Convert the updated color-converted image back to the original color space to obtain a denoised image after lighting balance.

[0102] For example, assume that the target color space is the Lab color space, which consists of three channels: L (brightness), a (red-green axis), and b (blue-yellow axis). The L channel represents brightness information, and the a and b channels represent color information. Therefore, the first brightness information is obtained through the L channel of the color conversion image, and the color information is obtained through the a and b channels. The L channel is subjected to histogram equalization. The histogram equalization can make the brightness distribution of the image more uniform, thereby enhancing the contrast and details of the image. The equalized L channel is subjected to gamma correction. Gamma correction can further adjust the brightness and contrast of the image to make it more consistent with the visual characteristics of the human eye. The L channel (containing the second brightness information) after histogram equalization and gamma correction is recombined with the original a and b channels (containing color information) to form a new color conversion image (Lab image). The new color conversion image is converted back to the RGB color space to obtain a denoised image after light balance.

[0103] Step 103, processing the denoised image by using a preset detection algorithm that integrates a color attention mechanism to obtain a vehicle water tank image in the denoised image.

[0104] There are other redundant contents in the image to be identified that contains the vehicle water tank obtained by direct shooting. In order to improve the detection efficiency, this application uses a preset detection algorithm to realize the positioning and segmentation of the vehicle water tank and reduce the number of calculations. Among them, the preset detection algorithm can be a YOLOv8 network. The structure of YOLOv8 is divided into three main parts: Backbone: used for feature extraction. Neck: used for multi-scale feature fusion. Head: used for target classification and bounding box regression.

[0105] Since the color of a vehicle's water tank is generally brighter than the rest of the image, this application first uses a color space conversion method to convert the image into the rest of the color space, and then performs feature extraction to improve the representation of the color features. A color attention mechanism is also introduced in the multi-scale feature fusion layer to assign larger attention weights to areas with significant color contrast, so that the features of the areas with significant color features are enhanced. Then, the target classification and bounding box regression functions are used to detect the bounding box of the vehicle's water tank on the weighted feature map, and the vehicle's water tank image is segmented from the denoised image based on the detected bounding box.

[0106] Further, step 103, such as Figure 3 As shown:

[0107] Step 1031, converting the denoised image after illumination balance from the original color space to the target color space and then performing feature extraction to obtain an image feature map, which includes color features.

[0108] Step 1032, dividing the image feature map into several divided areas.

[0109] Step 1033, determining a target area whose color contrast meets a preset condition from among the plurality of divided areas by using color features.

[0110] Step 1034, weights are added to the divided areas respectively through the color attention mechanism, wherein the weight of the target area is greater than the weight of the non-target area.

[0111] Step 1035, determine the bounding box of the vehicle water tank by adding the weighted image feature map.

[0112] Step 1036 , segmenting the vehicle water tank image from the denoised image using the bounding box of the vehicle water tank.

[0113] Among them, after determining the bounding box of the vehicle water tank, the edge detection operator can be used to detect the outline of the water tank, and then a segmentation mask is generated, and then the vehicle water tank image is segmented from the denoised image.

[0114] By converting the color space and introducing the color attention mechanism, it can perform better when detecting vehicle water tank images with strong color contrast, thereby improving the recognition efficiency of vehicle water tanks.

[0115] Step 104 , obtaining a target text image and a first water tank specification determination result about the vehicle water tank through the vehicle water tank image.

[0116] The present application can extract the shape features, color features and texture features of the water tank from the vehicle water tank image. The texture features can be extracted using a convolutional neural network, and then the shape features, color features and texture features are fused using a fully connected layer or a multimodal fusion method to obtain primary specification features, and the water tank is determined by the classification models such as XGBoost and SVM to obtain the first water tank specification determination result for the vehicle water tank. Among them, the specifications of the vehicle water tank can be 140kPa, 70kPa, etc. In addition, the surface of the water tank is generally printed or cast with text showing the specifications and models. In order to further improve the accuracy of specification detection, the present application recognizes the text in the vehicle water tank image. Therefore, a target text image will also be extracted from the vehicle water tank image, and the target text image is the text image on the water tank.

[0117] Further, step 104, such as Figure 4 As shown:

[0118] Step 1041, obtaining shape features, color features and texture features of the vehicle water tank through the vehicle water tank image.

[0119] Step 1042: fuse the shape features, color features, and texture features to obtain a first water tank specification determination result regarding the vehicle water tank.

[0120] Step 1043, extracting a target text image from the vehicle water tank image by using a preset text extraction model.

[0121] The preset text extraction model may be a multi-scale target detection model such as an SSD (Single Shot MultiBox Detector) model or an FPN (Feature Pyramid Network) model. Targets of different sizes can be captured by the preset text extraction model to obtain target text images with large size differences. Because features of different scales have different effects when capturing text, capturing target text images of different sizes can improve the captured feature details, thereby improving the accuracy of subsequent text detection.

[0122] The above steps obtain the water tank specification determination result by combining multiple feature extractions, which can effectively determine the specifications of the vehicle water tank. In addition, by extracting text in the vehicle water tank image, the accuracy of specification detection is further improved.

[0123] Step 105: Acquire text features in the target text image by using a preset curve fitting text detection model.

[0124] After extracting the target text image, considering the effect of deformation caused by shooting angle or irregular surface of water tank on text, it is necessary to realize the recognition of deformed text. This application uses a preset curve fitting text detection model to extract text features. Among them, the preset curve fitting text detection model uses a third-order Bezier curve for fitting, which is defined by four control points P0, P1, P2, and P3, and its formula is:

[0125] B(t)=(1-t) 3 P0+3(1-t) 2 tP1+3(1-t)t 2 P2+t 3 P3

[0126] Among them, B(t) is the fitted curve, P0, P1, P2, P3 are the control points of the curve, and t∈[0,1] is the parameter of the curve.

[0127] It should be noted that before using the Bezier curve, a candidate region (such as a candidate box) is first generated through the network to represent the potential text location. The candidate box can contain a possible curved text. The generated candidate region is usually based on the candidate region generated by the RPN (Region Proposal Network) to preliminarily locate the curved text, and then the control points of the Bezier curve of each candidate region are predicted by regression. For example, a feature extraction network (such as ResNet, ResNeXt) is used to obtain the feature representation of the input image and mark the features of the candidate region on the feature map. The coordinates of a set of control points are predicted for each candidate region using multiple convolutional or fully connected layers. The control points will be used to fit the text boundary in the candidate region. The regression error between the predicted control points and the true control points is calculated, and the network weights are adjusted by back propagation to optimize the position of the control points. Then, points are uniformly sampled on the fitted Bezier curve, so that features are extracted from these points on the feature map. The sampling points on the Bezier curve are used to align the features through interpolation or pooling operations to obtain a feature representation that conforms to the shape of the curved text, that is, the text features in the target text image are obtained.

[0128] It should be noted that after obtaining the text features, in order to further improve the accuracy of text recognition, it is necessary to process the features in combination with the global context information of the characters. The local features of the text, such as the local texture and contour of the characters, are captured through the ConvNeXt layer. The multi-head attention mechanism of the ViT layer is used to calculate the attention scores between different local features and determine the correlation between the local features, thereby obtaining context information to help the model understand the order and overall meaning of the characters. The specific steps include:

[0129] Obtaining text local features from text features;

[0130] The correlation between local features of text is obtained through multi-head attention mechanism;

[0131] Through the correlation relationship, the sequential features and overall semantic features of the text in the target text image are obtained;

[0132] Sequential features and overall semantic features are added to text features.

[0133] Step 106, decode the text features to obtain the second water tank specification recognition result.

[0134] The decoding of the present application can be implemented by a CTC (Connectionist Temporal Classification) decoder, a Transformer decoder, a Beam Search decoder, etc. Through decoding, a character sequence about the water tank specification, that is, the second water tank specification recognition result, can be obtained.

[0135] Step 107 , determining a target specification recognition result of the vehicle water tank through the first water tank specification determination result and the second water tank specification recognition result.

[0136] The first water tank specification determination result of the present application includes different types of water tank specifications, and each type of water tank specification has a corresponding confidence level. Similarly, the second water tank specification determination result also includes different types of water tank specifications, and each type of water tank specification has a corresponding confidence level. The confidence levels of the same water tank specification types are weighted, and the water tank specification type with the largest confidence level in the weighted results is selected as the target specification recognition result.

[0137] Specifically, step 107, such as Figure 5 As shown:

[0138] Step 1071, obtaining the first water tank specification type and the first confidence of the first water tank specification type from the first water tank specification determination result.

[0139] Step 1072, obtaining the second water tank specification type and the second confidence of the second water tank specification type from the second water tank specification determination result.

[0140] Step 1073: weight the confidence scores of the first confidence score and the second confidence score that belong to the same water tank specification type.

[0141] Step 1074, determining the target specification recognition result of the vehicle water tank according to the weighted result.

[0142] For example, the first water tank specification determination result is that the water tank specification is 140kPa, with a confidence of 90%; the water tank specification is 70kPa, with a confidence of 10%, and the second water tank specification determination result is that the water tank specification is 140kPa, with a confidence of 95%; the water tank specification is 70kPa, with a confidence of 5%. The weights are all set to 0.5. According to the two confidences of the same type, the confidence is 0.5×90%+0.5×95%=0.925 when the water tank specification is 140kPa, and the confidence is 0.5×10%+0.5×5%=0.075 when the water tank specification is 70kPa. The result corresponding to the confidence with the largest value can be selected as the target specification recognition result. Because 0.925>0.075, the target specification recognition result of the vehicle water tank is that the water tank specification is 140kPa. The weighted results can also be averaged, and then the size of the averaged results can be compared. This application will not be described in detail here.

[0143] Through the above steps, the confidence information from multiple sources can be effectively integrated to improve the accuracy of water tank specification identification.

[0144] The water tank recognition method provided by the present application obtains an image to be recognized, wherein the image to be recognized includes a vehicle water tank, performs wavelet transform and bilateral filtering operations on the image to be recognized, and obtains a denoised image of the image to be recognized, so that the obtained denoised image can remove high-frequency noise, avoid image transition smoothing, enhance dark details of the image, retain tiny text features on the water tank, and improve image quality; the denoised image is processed by a preset detection algorithm integrating a color attention mechanism to obtain a vehicle water tank image in the denoised image, so that it performs better when detecting targets with strong color contrast (such as vehicle water tanks with obvious color differences), thereby improving the recognition efficiency of the vehicle water tank; through the vehicle water tank image, a target text image and a first water tank specification determination result about the vehicle water tank are obtained; through a preset curve fitting text detection model, text features in the target text image are obtained, so that the influence of text deformity caused by reasons such as water tank structure or shooting angle on text recognition can be avoided, and the accuracy of text recognition can be improved; the text features are decoded to obtain a second water tank specification recognition result; and a target specification recognition result of the vehicle water tank is determined through the first water tank specification determination result and the second water tank specification recognition result. The present application performs image denoising through wavelet transform and bilateral filtering operations, which can remove high-frequency noise, avoid image transition smoothing, enhance dark details of the image, retain tiny text features on the water tank, and improve image quality. By combining the color attention mechanism to achieve segmentation of vehicle water tank images, it can perform better when detecting targets with strong color contrast (such as vehicle water tanks with obvious color differences), thereby improving the recognition efficiency of vehicle water tanks. By extracting text features in vehicle water tanks through curve fitting, it can avoid the influence of text deformity caused by water tank structure or shooting angle on text recognition, thereby improving the accuracy of text recognition. The above operations solve the problems of low efficiency of water tank specification detection method based on artificial naked eye recognition and low accuracy of only recognizing the appearance of the water tank.

[0145] Reference Figure 6 , shows a schematic structural diagram of a water tank identification device provided by the present application, the device comprising:

[0146] The first acquisition module 201 is used to acquire an image to be identified, where the image to be identified includes a vehicle water tank.

[0147] The denoising module 202 is used to perform wavelet transform and bilateral filtering operations on the image to be identified to obtain a denoised image of the image to be identified.

[0148] The second acquisition module 203 is used to process the denoised image by using a preset detection algorithm that integrates the color attention mechanism to acquire the vehicle water tank image in the denoised image.

[0149] The third acquisition module 204 is used to acquire a target text image and a first water tank specification determination result about the vehicle water tank through the vehicle water tank image.

[0150] The fourth acquisition module 205 is used to acquire text features in the target text image by using a preset curve fitting text detection model.

[0151] The fifth acquisition module 206 is used to decode the text feature and obtain the second water tank specification recognition result.

[0152] The first determination module 207 is used to determine a target specification recognition result of the vehicle water tank according to the first water tank specification determination result and the second water tank specification recognition result.

[0153] Optionally, the denoising module 202 specifically includes:

[0154] The first acquisition submodule is used to acquire a first pixel value of the image to be recognized.

[0155] The second acquisition submodule is used to perform wavelet decomposition on the image to be identified to obtain the wavelet coefficient corresponding to the first pixel value.

[0156] The threshold denoising submodule is used to perform threshold denoising on the wavelet coefficients if the wavelet coefficients are greater than a preset threshold.

[0157] The third acquisition submodule is used to perform wavelet reconstruction on the wavelet coefficients after threshold denoising to obtain a second pixel value.

[0158] The bilateral filtering submodule is used to perform a bilateral filtering operation on the second pixel value and the unchanged first pixel value to obtain a denoised image of the image to be identified.

[0159] Optionally, the water tank identification device further includes:

[0160] The sixth acquisition module is used to acquire the original color space and the target color space of the denoised image.

[0161] The seventh acquisition module is used to convert the denoised image into a target color space to obtain a color converted image.

[0162] The eighth acquisition module is used to perform information separation on the color conversion image to obtain first brightness information and color information.

[0163] The ninth acquisition module is used to perform histogram equalization processing and gamma correction on the first brightness information to obtain second brightness information.

[0164] The tenth acquisition module is used to integrate the second brightness information and the color information to acquire an updated color conversion image.

[0165] The eleventh acquisition module is used to convert the updated color conversion image back to the original color space to obtain a denoised image after light balance.

[0166] Optionally, the second acquisition module 203 specifically includes:

[0167] The fourth acquisition submodule is used to convert the denoised image after illumination balance from the original color space to the target color space, perform feature extraction, and obtain an image feature map, which includes color features.

[0168] The division submodule is used to divide the image feature map to obtain a number of division areas.

[0169] The first determination submodule is used to determine a target area whose color contrast meets a preset condition from among a plurality of divided areas by using color features.

[0170] The weight adding submodule is used to add weights to the divided areas respectively through the color attention mechanism, wherein the weight of the target area is greater than the weight of the non-target area.

[0171] The second determination submodule is used to determine the bounding box of the vehicle water tank by adding the weighted image feature map.

[0172] The image segmentation submodule is used to segment the vehicle water tank image from the denoised image through the bounding box of the vehicle water tank.

[0173] Optionally, the third acquisition module 204 specifically includes:

[0174] The fifth acquisition submodule is used to acquire shape features, color features and texture features of the vehicle water tank through the vehicle water tank image.

[0175] The sixth acquisition submodule is used to fuse the shape features, color features and texture features to obtain a first water tank specification determination result about the vehicle water tank.

[0176] The extraction submodule is used to extract the target text image from the vehicle water tank image through a preset text extraction model.

[0177] Optionally, the water tank identification device further includes:

[0178] The twelfth acquisition module is used to acquire text local features from text features.

[0179] The thirteenth acquisition module is used to obtain the correlation between local features of the text through a multi-head attention mechanism.

[0180] The fourteenth acquisition module is used to acquire the sequential features and overall semantic features of the text in the target text image through correlation relationships.

[0181] The adding module is used to add sequential features and overall semantic features to text features.

[0182] Optionally, the first determining module 207 specifically includes:

[0183] The seventh acquisition submodule is used to acquire the first water tank specification type and the first confidence of the first water tank specification type from the first water tank specification determination result.

[0184] The eighth acquisition submodule is used to acquire the second water tank specification type and the second confidence of the second water tank specification type from the second water tank specification determination result.

[0185] The weighting submodule is used to weight the confidences of the first confidence and the second confidence that belong to the same water tank specification type.

[0186] The third determination submodule is used to determine the target specification recognition result of the vehicle water tank according to the weighted result.

[0187] The water tank recognition method provided by the present application obtains an image to be recognized, wherein the image to be recognized includes a vehicle water tank, performs wavelet transform and bilateral filtering operations on the image to be recognized, and obtains a denoised image of the image to be recognized, so that the obtained denoised image can remove high-frequency noise, avoid image transition smoothing, enhance dark details of the image, retain tiny text features on the water tank, and improve image quality; the denoised image is processed by a preset detection algorithm integrating a color attention mechanism to obtain a vehicle water tank image in the denoised image, so that it performs better when detecting targets with strong color contrast (such as vehicle water tanks with obvious color differences), thereby improving the recognition efficiency of the vehicle water tank; through the vehicle water tank image, a target text image and a first water tank specification determination result about the vehicle water tank are obtained; through a preset curve fitting text detection model, text features in the target text image are obtained, so that the influence of text deformity caused by reasons such as water tank structure or shooting angle on text recognition can be avoided, and the accuracy of text recognition can be improved; the text features are decoded to obtain a second water tank specification recognition result; and a target specification recognition result of the vehicle water tank is determined through the first water tank specification determination result and the second water tank specification recognition result. The present application performs image denoising through wavelet transform and bilateral filtering operations, which can remove high-frequency noise, avoid image transition smoothing, enhance dark details of the image, retain tiny text features on the water tank, and improve image quality. By combining the color attention mechanism to achieve segmentation of vehicle water tank images, it can perform better when detecting targets with strong color contrast (such as vehicle water tanks with obvious color differences), thereby improving the recognition efficiency of vehicle water tanks. By extracting text features in vehicle water tanks through curve fitting, it can avoid the influence of text deformity caused by water tank structure or shooting angle on text recognition, thereby improving the accuracy of text recognition. The above operations solve the problems of low efficiency of water tank specification detection method based on artificial naked eye recognition and low accuracy of only recognizing the appearance of the water tank.

[0188] Reference Figure 7 , the present application also provides an electronic device, such as Figure 7 As shown, it includes a processor 301, a communication interface 302, a memory 303 and a communication bus 304, wherein the processor 301, the communication interface 302, and the memory 303 communicate with each other through the communication bus 304.

[0189] A processor 301, a memory 303 for storing processor executable instructions;

[0190] The processor 301 is configured to execute the instructions to implement the water tank identification method as described above:

[0191] Acquire an image to be identified, wherein the image to be identified includes a vehicle water tank;

[0192] Performing wavelet transform and bilateral filtering operations on the image to be identified to obtain a denoised image of the image to be identified;

[0193] Processing the denoised image by a preset detection algorithm integrating a color attention mechanism to obtain a vehicle water tank image in the denoised image;

[0194] Acquire a target text image and a first water tank specification determination result about the vehicle water tank through the vehicle water tank image;

[0195] Acquire text features in the target text image by using a preset curve fitting text detection model;

[0196] Decoding the text feature to obtain a second water tank specification recognition result;

[0197] A target specification recognition result of the vehicle water tank is determined through the first water tank specification determination result and the second water tank specification recognition result.

[0198] The communication bus mentioned in the above terminal can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0199] The communication interface is used for communication between the above terminal and other devices.

[0200] The memory may include a random access memory (RAM) or a non-volatile memory, such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.

[0201] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0202] In another embodiment provided in the present application, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the water tank identification method described in any of the above embodiments is implemented.

[0203] In another embodiment provided in the present application, a vehicle is also provided, which may specifically include: the above-mentioned water tank identification device.

[0204] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk SolidState Disk (SSD)), etc.

[0205] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0206] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0207] The above description is only a preferred embodiment of the present application and is not intended to limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application are included in the protection scope of the present application.

Claims

1. A water tank identification method, characterized in that: The method comprises: Acquire an image to be identified, wherein the image to be identified includes a vehicle water tank; Performing wavelet transform and bilateral filtering operations on the image to be identified to obtain a denoised image of the image to be identified; Processing the denoised image by a preset detection algorithm integrating a color attention mechanism to obtain a vehicle water tank image in the denoised image; Acquire a target text image and a first water tank specification determination result about the vehicle water tank through the vehicle water tank image; Acquire text features in the target text image by using a preset curve fitting text detection model; Decoding the text feature to obtain a second water tank specification recognition result; A target specification recognition result of the vehicle water tank is determined through the first water tank specification determination result and the second water tank specification recognition result.

2. The method according to claim 1, characterized in that The step of performing wavelet transform and bilateral filtering operations on the image to be identified to obtain a denoised image of the image to be identified includes: Acquire a first pixel value of the image to be recognized; Performing wavelet decomposition on the image to be recognized to obtain wavelet coefficients corresponding to the first pixel value; If the wavelet coefficient is greater than a preset threshold, threshold denoising is performed on the wavelet coefficient; Perform wavelet reconstruction on the wavelet coefficients after threshold denoising to obtain a second pixel value; A bilateral filtering operation is performed on the second pixel value and the unchanged first pixel value to obtain a denoised image of the image to be recognized.

3. The method according to claim 1, characterized in that After performing wavelet transform and bilateral filtering operations on the image to be identified to obtain a denoised image of the image to be identified, the method further includes: Acquire the original color space and the target color space of the denoised image; Convert the denoised image to a target color space to obtain a color converted image; Performing information separation on the color conversion image to obtain first brightness information and color information; Performing histogram equalization processing and gamma correction on the first brightness information to obtain second brightness information; Integrate the second brightness information and the color information to obtain an updated color conversion image; The updated color conversion image is converted back to the original color space to obtain a denoised image after light balance.

4. The method according to claim 3, characterized in that The denoised image is processed by a preset detection algorithm integrating a color attention mechanism to obtain a vehicle water tank image in the denoised image, including: Convert the denoised image after illumination balance from the original color space to the target color space and then perform feature extraction to obtain an image feature map, wherein the image feature map includes color features; Dividing the image feature map to obtain a number of divided areas; Determine, by using the color feature, a target area whose color contrast meets a preset condition from among the plurality of divided areas; Adding weights to the divided areas respectively through a color attention mechanism, wherein the weight of the target area is greater than the weight of the non-target area; Determining a bounding box of a vehicle water tank by adding the weighted image feature map; A vehicle water tank image is segmented from the denoised image using a boundary box of the vehicle water tank.

5. The method according to claim 1, characterized in that The step of acquiring a target text image and a first water tank specification determination result about the vehicle water tank through the vehicle water tank image further includes: Obtaining shape features, color features, and texture features of the vehicle water tank through the vehicle water tank image; The shape feature, the color feature and the texture feature are integrated to obtain a first water tank specification determination result about the vehicle water tank; A target text image is extracted from the vehicle water tank image using a preset text extraction model.

6. The method according to claim 1, characterized in that After obtaining the text features in the target text image by using the preset curve fitting text detection model, the method further includes: Acquire text local features from the text features; Obtain the correlation between the local features of the text through a multi-head attention mechanism; Obtaining the sequential features and overall semantic features of the text in the target text image through the correlation relationship; The sequential feature and the overall semantic feature are added to the text feature.

7. The method according to claim 1, characterized in that The step of determining a target specification recognition result of the vehicle water tank by using the first water tank specification determination result and the second water tank specification recognition result includes: Acquire a first water tank specification type and a first confidence level of the first water tank specification type from the first water tank specification determination result; Acquire a second water tank specification type and a second confidence level of the second water tank specification type from the second water tank specification determination result; Weighting the confidence scores of the first confidence scores and the second confidence scores that belong to the same water tank specification type; According to the weighted result, a target specification recognition result of the vehicle water tank is determined.

8. A water tank identification device, characterized in that: The device comprises: A first acquisition module, used for acquiring an image to be identified, wherein the image to be identified includes a vehicle water tank; A denoising module, used for performing wavelet transform and bilateral filtering operations on the image to be identified to obtain a denoised image of the image to be identified; A second acquisition module is used to process the denoised image by using a preset detection algorithm that integrates a color attention mechanism to acquire a vehicle water tank image in the denoised image; A third acquisition module is used to acquire a target text image and a first water tank specification determination result about the vehicle water tank through the vehicle water tank image; A fourth acquisition module, used to acquire text features in the target text image by using a preset curve fitting text detection model; A fifth acquisition module, used for decoding the text feature to obtain a second water tank specification recognition result; The first determination module is used to determine a target specification recognition result of the vehicle water tank according to the first water tank specification determination result and the second water tank specification recognition result.

9. An electronic device, characterized in that: include: processor; a memory for storing processor-executable instructions; The processor is configured to execute the instructions to implement the water tank identification method according to any one of claims 1 to 7.

10. A vehicle, characterized in that: include: The water tank identification device as claimed in claim 8.

Citation Information

Cited By

  • Gesture recognition algorithm and system based on color attention in AR operation environment

    CN119356524A

  • Color attention-based gesture recognition algorithm and system in AR surgical environment

    CN119356524B