Image segmentation method and device, equipment, storage medium and product

In wheel hub defect detection, features are determined based on wheel hub image information and category text, and feature matching is performed to solve the problem of difficulty in combining depth information and semantic information, and achieve accurate segmentation of wheel hub RGB images.

CN119339077APending Publication Date: 2025-01-21CHINA MOBILE ZIJIN INNOVATION INST CO LTD +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411388446.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-30
Publication Date
2025-01-21

AI Technical Summary

Technical Problem

During the wheel hub defect detection process, it is difficult to explicitly combine the depth information with semantic information in the process of hub defect detection, resulting in error matching or acquisition of unnecessary depth information, which in turn leads to segmentation errors.

Method used

By determining the image category features based on the image information corresponding to the wheel hub, and determining the target text category features based on the category text and the RGB image in the image information, feature matching is performed, and finally the RGB image is accurately segmented.

Benefits of technology

It achieves the combination of image category features and target text category features, and accurately segments the RGB image corresponding to the wheel hub according to the feature matching results, solving the problem of difficulty in combining depth information and semantic information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119339077A_ABST
    Figure CN119339077A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of image processing, and discloses an image segmentation method and device, equipment, a storage medium and a product. According to the method, the image category feature is determined according to the image information corresponding to the hub, then the target text category feature is determined according to the category text and the RGB image in the image information, feature matching is performed on the image category feature and the target text category feature, and image segmentation is performed on the RGB image according to the matching result. According to the method, the image category feature is determined according to the image information corresponding to the hub, then the target text category feature is determined according to the category text and the RGB image in the image information, and feature matching is performed on the image category feature and the target text category feature. According to the method, the image category features and the target text category features can be combined, and the RGB image corresponding to the hub is accurately segmented according to the feature matching result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image processing technology, and in particular to an image segmentation method, device, equipment, storage medium and product. Background Art

[0002] In the process of wheel defect detection, the distance of objects relative to the camera is regular in most scenes, and the distance of different objects relative to the camera is different. Therefore, depth information is helpful for obtaining semantic segmentation features. Semantic segmentation combined with depth information is suitable for the field of domain adaptation segmentation. However, it is difficult to explicitly combine depth information with semantic information by only using the depth estimation task to obtain depth information, which is not convenient for the association and fusion of the key features of the two. It may cause segmentation errors due to mismatching of depth information and semantic information or obtaining unnecessary depth information. Therefore, how to accurately segment wheel images by combining depth information and semantic information has become a problem that needs to be solved urgently. Summary of the invention

[0003] The main purpose of this application is to provide an image segmentation method, device, equipment, storage medium and product, aiming to solve the technical problem of how to accurately segment the wheel hub image by combining depth information and semantic information.

[0004] To achieve the above object, the present application provides an image segmentation method, which comprises the following steps:

[0005] Determine image category features according to image information corresponding to the wheel hub;

[0006] Determine the target text category feature according to the category text and the RGB image in the image information;

[0007] The image category feature and the target text category feature are feature matched, and the RGB image is segmented according to the matching result.

[0008] Optionally, the step of determining the image category feature according to the image information corresponding to the wheel hub specifically includes:

[0009] Determine a first fusion feature according to a depth map and an edge map in the image information corresponding to the wheel hub;

[0010] Determine a second fusion feature according to the edge map and the RGB image in the image information;

[0011] Determine a final fusion feature according to the first fusion feature and the second fusion feature;

[0012] Feature extraction is performed on the final fusion features to obtain image category features.

[0013] Optionally, the step of determining a second fusion feature according to the edge map and the RGB image in the image information specifically includes:

[0014] Extracting features from the edge map and the RGB image in the image information to obtain edge features and RGB features;

[0015] Encoding the edge features into a key-value vector, and encoding the RGB features into a query vector and a value vector;

[0016] splicing the key-value vector, the query vector, and the value vector, and performing global feature extraction on the spliced ​​vectors to obtain global features;

[0017] Determine a row fusion feature and a column fusion feature according to the key value vector, the query vector, and the value vector;

[0018] A second fusion feature is determined according to the global feature, the row fusion feature, and the column fusion feature.

[0019] Optionally, the step of determining row fusion features and column fusion features according to the key-value vector, the query vector, and the value vector specifically includes:

[0020] Performing row compression and column compression on the key-value vector, the query vector, and the value vector, respectively, to obtain key-value vector features after row compression, key-value vector features after column compression, query vector features after row compression, query vector features after column compression, value vector features after row compression, and value vector features after column compression;

[0021] Determine a row fusion feature according to the key value vector feature after the row is compressed, the query vector feature after the row is compressed, and the value vector feature after the row is compressed;

[0022] The column fusion feature is determined according to the key-value vector feature after the column compression, the query vector feature after the column compression, and the value vector feature after the column compression.

[0023] Optionally, the step of determining the target text category feature according to the category text and the RGB image in the image information specifically includes:

[0024] Determining text category-related features and text category-specific features according to the category text, and determining initial category text features according to the text category-related features and the text category-specific features;

[0025] Extracting features from the RGB image in the image information to obtain viewing angle features;

[0026] The initial category text feature is subjected to a perspective transformation according to the perspective feature to obtain a target text category feature at a current perspective.

[0027] Optionally, the step of determining text category-related features and text category-specific features according to the category text, and determining initial category text features according to the text category-related features and the text category-specific features specifically includes:

[0028] Extracting features from the category text, and determining text category-related features based on the extracted category features and preset category information;

[0029] Performing high-dimensional encoding on the category text to obtain text category-specific features;

[0030] The text category associated features and the text category specific features are concatenated, and the concatenated features are extracted to obtain initial category text features.

[0031] In addition, to achieve the above-mentioned purpose, the present application also provides an image segmentation device, the image segmentation device comprising:

[0032] An image category feature determination module, used to determine the image category feature according to the image information corresponding to the wheel hub;

[0033] A text category feature determination module, used to determine the target text category feature according to the category text and the RGB image in the image information;

[0034] The image segmentation module is used to perform feature matching on the image category feature and the target text category feature, and perform image segmentation on the RGB image according to the matching result.

[0035] In addition, to achieve the above-mentioned purpose, the present application also proposes an image segmentation device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the image segmentation method described above.

[0036] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the image segmentation method described above are implemented.

[0037] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the steps of the image segmentation method described above are implemented.

[0038] The present application determines the image category features according to the image information corresponding to the wheel hub, and then determines the target text category features according to the category text and the RGB image in the image information, and then feature matches the image category features with the target text category features, and performs image segmentation on the RGB image according to the matching results. The present application determines the image category features according to the image information corresponding to the wheel hub, and then determines the target text category features according to the category text and the RGB image in the image information, and then feature matches the image category features with the target text category features. Compared with the existing methods that are difficult to combine depth information with semantic information, the present application can combine image category features with target text category features, and accurately segment the RGB image corresponding to the wheel hub according to the feature matching results. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0040] 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, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0041] Figure 1 This is a flowchart of the first embodiment of the image segmentation method of the present application;

[0042] Figure 2 This is a flow chart of the second embodiment of the image segmentation method of the present application;

[0043] Figure 3 This is a flowchart of a third embodiment of the image segmentation method of the present application;

[0044] Figure 4 This is a schematic diagram of the overall process of an embodiment of the image segmentation method of the present application;

[0045] Figure 5 A schematic diagram of a flow chart of an embodiment of the image segmentation method of the present application;

[0046] Figure 6 This is a structural block diagram of the first embodiment of the image segmentation device of the present application;

[0047] Figure 7 It is a structural diagram of an image segmentation device in a hardware operating environment involved in an embodiment of the present application.

[0048] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0049] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.

[0050] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.

[0051] The main solution of the embodiment of the present application is: determine the image category features according to the image information corresponding to the wheel hub; determine the target text category features according to the category text and the RGB image in the image information; perform feature matching on the image category features and the target text category features, and perform image segmentation on the RGB image according to the matching results.

[0052] In the process of wheel defect detection, the distance of objects relative to the camera is regular in most scenes, and the distance of different objects relative to the camera is different. Therefore, depth information is helpful for obtaining semantic segmentation features. Semantic segmentation combined with depth information is suitable for domain adaptation segmentation. However, it is difficult to explicitly combine depth information with semantic information by only using depth estimation tasks, which is not convenient for associating and fusing the key features of the two. It may cause segmentation errors due to mismatching of depth information and semantic information or obtaining unnecessary depth information.

[0053] The present application determines the image category features according to the image information corresponding to the wheel hub, and then determines the target text category features according to the category text and the RGB image in the image information, and then feature matches the image category features with the target text category features, and performs image segmentation on the RGB image according to the matching results. The present application determines the image category features according to the image information corresponding to the wheel hub, and then determines the target text category features according to the category text and the RGB image in the image information, and then feature matches the image category features with the target text category features. Compared with the existing methods that are difficult to combine depth information with semantic information, the present application can combine image category features with target text category features, and accurately segment the RGB image corresponding to the wheel hub according to the feature matching results.

[0054] It should be noted that the execution subject of the present application may be a computing service device with data processing, network communication and program running functions, such as a computer, or an electronic device capable of realizing the above functions, an image segmentation device, etc. The following takes the image segmentation device as an example to illustrate this embodiment and the following embodiments.

[0055] Based on this, the present application embodiment provides an image segmentation method, referring to Figure 1 , Figure 1 This is a flowchart of the first embodiment of the image segmentation method of the present application.

[0056] In this embodiment, the image segmentation method includes the following steps:

[0057] Step S10: determining image category features according to image information corresponding to the wheel hub.

[0058] It is understandable that this embodiment can collect image information corresponding to the wheel hub, and the image information may include RGB image, depth map and edge map. Specifically, the RGB image corresponding to the wheel hub can be collected by a camera, and the depth map corresponding to the wheel hub can be collected by a depth camera.

[0059] It should be understood that the edge map can be determined according to the RGB image. Specifically, the edge map can be determined using the sobel operator edge detection method. The calculation process is as follows:

[0060]

[0061]

[0062] E x =G x *I

[0063] E y =G y *I

[0064]

[0065] Among them, G x and G y is the sobel operator, I is the grayscale image of the RGB image transformation, * is the convolution, E x and E y is the gradient value of the grayscale image in the x and y directions obtained by Sobel calculation, E is the edge map, and δ is the preset threshold.

[0066] Step S20: determining the target text category feature according to the category text and the RGB image in the image information.

[0067] It is understandable that the category text refers to all the pre-set categories of text related to the wheel hub, such as rim, spoke, offset, flange, groove bottom, etc. The target text category feature is determined according to the category text and the RGB image corresponding to the wheel hub, and the target text category feature refers to the feature related to the category text.

[0068] Step S30: performing feature matching on the image category feature and the target text category feature, and performing image segmentation on the RGB image according to the matching result.

[0069] It should be understood that the image category features and the target text category features can be matched to obtain a matching result, and the matching result can include the category to which each pixel in the RGB image corresponding to the wheel hub belongs. Therefore, the RGB image can be segmented to obtain the wheel hub components in the RGB image.

[0070] In the specific implementation, the CLIP loss function can be used for feature matching to reduce the feature distance between the image category feature and the target text category feature that represents the same segmentation category, and increase the feature distance representing different equal categories. The parameters of the entire network are updated by this loss function combined with the Adam gradient descent method, and feature matching is performed through feature distance, and pixels with a smaller feature distance are segmented into one category.

[0071] This embodiment determines the image category features according to the image information corresponding to the wheel hub, and then determines the target text category features according to the category text and the RGB image in the image information, then feature matches the image category features with the target text category features, and performs image segmentation on the RGB image according to the matching results. This embodiment determines the image category features according to the image information corresponding to the wheel hub, and then determines the target text category features according to the category text and the RGB image in the image information, and then feature matches the image category features with the target text category features. Compared with the existing difficulty in combining depth information with semantic information, this application can combine image category features with target text category features, and accurately segment the RGB image corresponding to the wheel hub according to the feature matching results.

[0072] refer to Figure 2 , Figure 2 This is a flowchart diagram of the second embodiment of the image segmentation method of the present application.

[0073] Based on the above first embodiment, in this embodiment, step S10 includes:

[0074] Step S101: determining a first fusion feature according to a depth map and an edge map in image information corresponding to the wheel hub.

[0075] It is understandable that this embodiment can determine the first fusion feature according to the depth map and edge map corresponding to the wheel hub. Specifically, feature extraction can be performed on the depth map and edge map respectively, and the first fusion feature can be determined according to the depth feature and the edge feature.

[0076] Step S102: determining a second fusion feature according to the edge map and the RGB image in the image information.

[0077] Furthermore, in order to accurately determine the second fusion feature, in this embodiment, the step S102 includes: performing feature extraction on the edge map and the RGB image in the image information respectively to obtain edge features and RGB features; encoding the edge features into a key-value vector, and encoding the RGB features into a query vector and a value vector; splicing the key-value vector, the query vector and the value vector, and performing global feature extraction on the spliced ​​vector to obtain a global feature; determining a row fusion feature and a column fusion feature based on the key-value vector, the query vector and the value vector; determining the second fusion feature based on the global feature, the row fusion feature and the column fusion feature.

[0078] It should be understood that different feature extractors can be used to extract features from edge maps and RGB images respectively to obtain edge features and RGB features. The feature extractors are composed of CNNs with the same structure combined with pooling and activation functions. e Encoded as a key-value vector K, and the RGB feature f rgb Encoded into query vector Q and value vector V, the key-value vector K, query vector Q and value vector V are then concatenated, and a global feature extractor is used to extract global features from the concatenated vectors to obtain the global feature f global , where the global feature extractor is composed of CNN, batchnorm, and activation function.

[0079] It is understandable that the row fusion feature f can be determined based on the key value vector K, the query vector Q and the value vector V. row And column fusion feature f col , and then according to the global feature f global , row fusion feature f row And the column fusion feature f col Determine the second fusion feature f rgb_e , the calculation formula is: rgb_e =f global (f row +f col ).

[0080] Furthermore, in order to accurately determine the row fusion features and the column fusion features, in the present embodiment, the step of determining the row fusion features and the column fusion features according to the key-value vector, the query vector and the value vector specifically includes: performing row compression and column compression on the key-value vector, the query vector and the value vector respectively to obtain the key-value vector features after row compression, the key-value vector features after column compression, the query vector features after row compression, the query vector features after column compression, the value vector features after row compression, and the value vector features after column compression; determining the row fusion features according to the key-value vector features after row compression, the query vector features after row compression and the value vector features after row compression; determining the column fusion features according to the key-value vector features after column compression, the query vector features after column compression and the value vector features after column compression.

[0081] It should be understood that the key-value vector K, the query vector Q, and the value vector V can be compressed by row and column respectively to obtain the key-value vector feature K after row compression. row , the key value vector feature K after column compression col , query vector feature Q after row compression row , query vector feature Q after column compression col , the value vector feature V after row compression row , the value vector feature V after column compression col Specifically, taking the compressed query vector Q as an example, the key value vector K and the value vector V are compressed in the same way, and the query vector Q is row compressed to obtain the query vector feature Q after row compression. row , first calculate the numerical sum of each column in Q, that is:

[0082]

[0083] Where Q .j is the sum of the values ​​in the jth column of Q, h is the number of rows of Q, and Q ij is the value of the i-th row and j-th column in Q. Then calculate the mean of each column in Q, that is:

[0084]

[0085] in Q row The jth column value of . You can also perform column compression on Q to obtain the query vector feature Q after column compression col , first calculate the numerical sum of each row in Q, that is:

[0086]

[0087] Where Q i. is the sum of the values ​​of the i-th row of Q, w is the number of columns of Q, and then the mean of each row in Q is calculated, that is:

[0088]

[0089] in Q col The value of the i-th row of .

[0090] It should be understood that the key value vector feature K after row compression can be row , query vector feature Q after row compression row And the value vector feature V after row compression row Determine the row fusion feature f row , the calculation process is:

[0091]

[0092] in It's Q row The position code, It's K row The position code.

[0093] Similarly, we can use the key-value vector feature K after column compression col , query vector feature Q after column compression col And the value vector feature V after column compression col Determine the column fusion feature f col , the calculation process is:

[0094]

[0095] in It's Q col The position code, It's K col The position code.

[0096] In a specific implementation, the first fusion feature f is determined according to the depth map and edge map corresponding to the hub. d_e The method can refer to the above-mentioned method of determining the second fusion feature based on the edge image and the RGB image corresponding to the hub, which will not be described in detail in this embodiment.

[0097] Step S103: determining a final fusion feature according to the first fusion feature and the second fusion feature.

[0098] It can be understood that the final fusion feature f is determined based on the first fusion feature and the second fusion feature. rgb_d_e The method can refer to the above-mentioned method of determining the second fusion feature based on the edge image and the RGB image corresponding to the hub, which will not be described in detail in this embodiment.

[0099] Step S104: extracting features from the final fusion features to obtain image category features.

[0100] It should be understood that the final fusion feature f rgb_d_e Perform feature extraction to obtain image category features f img .

[0101] This embodiment determines a first fusion feature based on a depth map and an edge map in the image information corresponding to the wheel hub, and then determines a second fusion feature based on the edge map and the RGB image in the image information, and then determines a final fusion feature based on the first fusion feature and the second fusion feature, and then performs feature extraction on the final fusion feature to obtain image category features. This embodiment first determines a first fusion feature based on a depth map and an edge map corresponding to the wheel hub, and then determines a second fusion feature based on the edge map and the RGB image, and then performs feature extraction on the final fusion feature obtained from the first fusion feature and the second fusion feature to obtain accurate image category features.

[0102] refer to Figure 3 , Figure 3 This is a flowchart diagram of the third embodiment of the image segmentation method of the present application.

[0103] Based on the above embodiments, in this embodiment, step S20 includes:

[0104] Step S201: determining text category-related features and text category-specific features according to the category text, and determining initial category text features according to the text category-related features and the text category-specific features.

[0105] Understandably, referring to Figure 4 , Figure 4 FIG. 1 is a schematic diagram of the overall flow of an embodiment of the image segmentation method of the present application. Figure 4 As shown, the image segmentation method proposed in this embodiment may include three modules, namely, an image feature fusion module, a text feature extraction module and a text image feature comparison module. The image feature fusion module can obtain image category features according to the depth map, the edge map and the RGB image. The text feature extraction module can obtain the target text category features under the current viewing angle according to the category text and the RGB image. The text image feature comparison module can compare the image category features and the target text category features with learning loss, that is, feature matching, to perform image segmentation on the RGB image.

[0106] It should be understood that the specific implementation method of the image feature fusion module can refer to the above-mentioned second embodiment. Specifically, different feature extractors can be used to perform feature extraction on the depth map, edge map, and RGB image respectively to obtain depth features, edge features, and RGB features, and the final fusion features can be obtained through seaformer cross attention, and then the final fusion features can be extracted through the feature extractor to obtain image category features.

[0107] In a specific implementation, for the text feature extraction module, the feature extractor can first be used to extract features from the category text, and the text category-related features can be determined based on the extracted category features and prior category knowledge, that is, the preset category knowledge. The category text can also be high-dimensionally encoded to obtain rare features of the text category, and the feature extractor can be used to extract features from the spliced ​​text category rare features and text category-related features to obtain features of each category text, that is, initial category text features. In addition, the feature extractor can be used to extract features from the RGB image to obtain perspective features, and the perspective of the initial category text can be transformed based on the perspective features to obtain text features of each category under the current perspective, that is, target text features.

[0108] Furthermore, in order to accurately obtain the initial category text features, in this embodiment, the step S201 includes: extracting features from the category text, and determining text category-related features based on the extracted category features and preset category information; performing high-dimensional encoding on the category text to obtain text category-specific features; performing feature splicing on the text category-related features and the text category-specific features, and performing feature extraction on the spliced ​​features to obtain initial category text features.

[0109] It is understandable that the preset category information proposed in this embodiment is composed of an adjacency matrix D, which reflects whether different components of the hub contain common boundaries.

[0110]

[0111] Among them, D ij It is the value of the i-th row and j-th column of the matrix D, where i and j represent different segmentation categories.

[0112] It should be understood that the feature extractor can be used to extract features from the category text, and the text category-related features f can be determined by combining the extracted category features and the preset category information. align , the feature extractor is composed of multiple MLPs (multi-layer perceptrons), and the calculation process is: align =D·MLP(text), where text is the category text.

[0113] In the specific implementation, the category text can be encoded in high dimension to obtain the text category-specific features f sp , high-dimensional encoding is performed using the trigonometric function position encoding method in NERF, and the calculation process is: x = text, f sp =(sin(2 0 πx), cos(2 0 πx),…,sin(2 L πx), cos(2 Lπx)), where L is a manually set hyperparameter, which can be set to 9 in this embodiment. Concatenated text category associated features f align and text category-specific features f sp , the initial text category feature f is obtained through the feature extractor text , the feature extractor is composed of multiple MLPs.

[0114] Step S202: extracting features from the RGB image in the image information to obtain viewing angle features.

[0115] It should be understood that in this embodiment, the feature extractor extracts the RGB image to obtain the viewing angle feature f view , the feature extractor consists of a set of CNNs combined with activation functions, f view Contains rotation information and translation information. The rotation information is represented by a quaternion, and the translation information is represented by a 3D vector.

[0116] Step S203: performing a perspective transformation on the initial category text feature according to the perspective feature to obtain a target text category feature at the current perspective.

[0117] It is understandable that the viewing angle feature f view For the initial category text feature f text Transform the perspective to obtain the target text category features under the current perspective If the perspective transformation is completed by a set of MLPs, splicing f view With f text Then the MLP is used to perform mapping transformation to obtain

[0118] It should be understood that for feature extractors and other neural networks that need to be trained, this embodiment can divide all training data into source domain data and target domain data. If the current input is source domain data, existing labels are used for training. If it is target domain data, the network trained in the source domain training phase is used to output prediction results, and the prediction results are used as pseudo labels for training; the network trained in the target domain uses the EMA method to update the network trained in the source domain, so that the quality of pseudo labels is gradually improved.

[0119] In the specific implementation, except for the different label processing due to different data sources, the entire neural network training process is consistent with the source domain training stage. In particular, the text category feature extraction module does not update parameters at this time, and only updates the parameters of the image feature fusion module and the image-text feature comparison module.

[0120] In addition, the steps of the image feature fusion module are consistent with those in the training phase. However, since the text describing the segmentation category is fixed once it is determined, the text category features can be stored as pre-trained features and directly read during inference, which can speed up the inference process. During inference, the image category features are compared with the text category features under the current perspective for similarity, and the most similar category is used as the segmentation category for each pixel in the image. Figure 5 , Figure 5 A schematic diagram of a flow chart of an embodiment of the image segmentation method of the present application is shown as follows: Figure 5 As shown, since the text features of each category remain unchanged after confirmation, this embodiment can directly obtain the pre-trained text features of each category without going through Figure 4 The text feature extraction module in the image segmentation module obtains the text features of each category, thereby improving the processing speed of image segmentation.

[0121] This embodiment determines text category-related features and text category-specific features based on the category text, and determines initial category text features based on the text category-related features and the text category-specific features, then performs feature extraction on the RGB image in the image information to obtain viewing angle features, and then performs viewing angle transformation on the initial category text features based on the viewing angle features to obtain target text category features at the current viewing angle. This embodiment determines initial category text features based on text category-related features and text category-specific features, and then performs viewing angle transformation on the initial category text features based on the viewing angle features to obtain target text category features at the current viewing angle, and can effectively perform viewing angle transformation on the initial category text features, so that after continuous viewing angle transformation, the target text category features at the current viewing angle can be accurately obtained.

[0122] Reference Figure 6 , Figure 6 This is a structural block diagram of the first embodiment of the image segmentation device of the present application.

[0123] like Figure 6 As shown, the image segmentation device proposed in the embodiment of the present application includes:

[0124] An image category feature determination module 10, used to determine image category features according to image information corresponding to the wheel hub;

[0125] A text category feature determination module 20, used to determine the target text category feature according to the category text and the RGB image in the image information;

[0126] The image segmentation module 30 is used to perform feature matching between the image category feature and the target text category feature, and perform image segmentation on the RGB image according to the matching result.

[0127] This embodiment determines the image category features according to the image information corresponding to the wheel hub, and then determines the target text category features according to the category text and the RGB image in the image information, then feature matches the image category features with the target text category features, and performs image segmentation on the RGB image according to the matching results. This embodiment determines the image category features according to the image information corresponding to the wheel hub, and then determines the target text category features according to the category text and the RGB image in the image information, and then feature matches the image category features with the target text category features. Compared with the existing difficulty in combining depth information with semantic information, this application can combine image category features with target text category features, and accurately segment the RGB image corresponding to the wheel hub according to the feature matching results.

[0128] It should be noted that the workflow described above is merely illustrative and does not limit the scope of protection of the present application. In practical applications, technicians in this field can select part or all of it according to actual needs to achieve the purpose of the present embodiment, and no limitation is made here.

[0129] In addition, for technical details not fully described in this embodiment, please refer to the image segmentation method provided in any embodiment of the present application, and will not be repeated here.

[0130] Based on the above-mentioned first embodiment of the image segmentation device of the present application, a second embodiment of the image segmentation device of the present application is proposed.

[0131] In this embodiment, the image category feature determination module 10 is also used to determine a first fusion feature based on a depth map and an edge map in the image information corresponding to the wheel hub; determine a second fusion feature based on the edge map and the RGB image in the image information; determine a final fusion feature based on the first fusion feature and the second fusion feature; and perform feature extraction on the final fusion feature to obtain an image category feature.

[0132] Furthermore, the image category feature determination module 10 is also used to perform feature extraction on the edge map and the RGB image in the image information respectively to obtain edge features and RGB features; encode the edge features into a key-value vector, and encode the RGB features into a query vector and a value vector; splice the key-value vector, the query vector and the value vector, and perform global feature extraction on the spliced ​​vector to obtain a global feature; determine a row fusion feature and a column fusion feature based on the key-value vector, the query vector and the value vector; determine a second fusion feature based on the global feature, the row fusion feature and the column fusion feature.

[0133] Furthermore, the image category feature determination module 10 is also used to perform row compression and column compression on the key-value vector, the query vector and the value vector, respectively, to obtain the key-value vector features after row compression, the key-value vector features after column compression, the query vector features after row compression, the query vector features after column compression, the value vector features after row compression, and the value vector features after column compression; determine the row fusion features according to the key-value vector features after row compression, the query vector features after row compression and the value vector features after row compression; determine the column fusion features according to the key-value vector features after column compression, the query vector features after column compression and the value vector features after column compression.

[0134] Furthermore, the text category feature determination module 20 is also used to determine text category associated features and text category specific features based on the category text, and determine initial category text features based on the text category associated features and the text category specific features; perform feature extraction on the RGB image in the image information to obtain perspective features; perform perspective transformation on the initial category text features based on the perspective features to obtain target text category features under the current perspective.

[0135] Furthermore, the text category feature determination module 20 is also used to extract features from the category text, and determine text category-related features based on the extracted category features and preset category information; perform high-dimensional encoding on the category text to obtain text category-specific features; perform feature splicing on the text category-related features and the text category-specific features, and perform feature extraction on the spliced ​​features to obtain initial category text features.

[0136] Other embodiments or specific implementations of the image segmentation device of the present application can refer to the above-mentioned method embodiments and will not be described in detail here.

[0137] The present application provides an image segmentation device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the image segmentation method in the above-mentioned embodiment 1.

[0138] Reference below Figure 7, which shows a schematic diagram of the structure of an image segmentation device suitable for implementing an embodiment of the present application. The image segmentation device in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 7 The image segmentation device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0139] like Figure 7 As shown, the image segmentation device may include a processing device 1001 (e.g., a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the image segmentation device are also stored. The processing device 1001, ROM1002, and RAM1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the image segmentation device to communicate with other devices wirelessly or by wire to exchange data. Although the image segmentation device with various systems is shown in the figure, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or have alternatively.

[0140] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.

[0141] The image segmentation device provided by the present application adopts the image segmentation method in the above embodiment, which can solve the technical problem of how to accurately segment the wheel hub image by combining depth information and semantic information. Compared with the prior art, the beneficial effects of the image segmentation device provided by the present application are the same as the beneficial effects of the image segmentation method provided by the above embodiment, and the other technical features in the image segmentation device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.

[0142] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.

[0143] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present 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.

[0144] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, wherein the computer-readable program instructions are used to execute the image segmentation method in the above-mentioned embodiment.

[0145] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.

[0146] The computer-readable storage medium may be included in the image segmentation device; or may exist independently without being assembled into the image segmentation device.

[0147] The above-mentioned computer-readable storage medium carries one or more programs. When the above-mentioned one or more programs are executed by the image segmentation device, the image segmentation device: determines the image category features according to the RGB image, depth map and edge map corresponding to the hub; determines the target text category features according to the category text and the RGB image; performs feature matching between the image category features and the target text category features, and performs image segmentation on the RGB image according to the matching results.

[0148] Computer program code for performing the operations of the present application may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0149] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0150] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.

[0151] The readable storage medium provided in the present application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned image segmentation method, and can solve the technical problem of how to accurately segment the wheel hub image by combining depth information and semantic information. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in the present application are the same as the beneficial effects of the image segmentation method provided in the above-mentioned embodiment, and will not be elaborated here.

[0152] The present application also provides a computer program product, including a computer program, which implements the steps of the above-mentioned image segmentation method when executed by a processor.

[0153] The computer program product provided by the present application can solve the technical problem of how to accurately segment the wheel hub image by combining depth information and semantic information. Compared with the prior art, the beneficial effects of the computer program product provided by the present application are the same as the beneficial effects of the image segmentation method provided by the above embodiment, which will not be repeated here.

[0154] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.

Claims

1. An image segmentation method, characterized in that: The image segmentation method comprises the following steps: Determine image category features according to image information corresponding to the wheel hub; Determine the target text category feature according to the category text and the RGB image in the image information; The image category feature and the target text category feature are feature matched, and the RGB image is segmented according to the matching result.

2. The image segmentation method according to claim 1, characterized in that: The step of determining the image category feature according to the image information corresponding to the wheel hub specifically includes: Determine a first fusion feature according to a depth map and an edge map in the image information corresponding to the wheel hub; Determine a second fusion feature according to the edge map and the RGB image in the image information; Determine a final fusion feature according to the first fusion feature and the second fusion feature; Feature extraction is performed on the final fusion features to obtain image category features.

3. The image segmentation method according to claim 2, characterized in that: The step of determining the second fusion feature according to the edge map and the RGB image in the image information specifically includes: Extracting features from the edge map and the RGB image in the image information to obtain edge features and RGB features; Encoding the edge features into a key-value vector, and encoding the RGB features into a query vector and a value vector; splicing the key-value vector, the query vector, and the value vector, and performing global feature extraction on the spliced ​​vectors to obtain global features; Determine a row fusion feature and a column fusion feature according to the key value vector, the query vector, and the value vector; A second fusion feature is determined according to the global feature, the row fusion feature, and the column fusion feature.

4. The image segmentation method according to claim 3, characterized in that: The step of determining the row fusion feature and the column fusion feature according to the key value vector, the query vector and the value vector specifically includes: Performing row compression and column compression on the key-value vector, the query vector, and the value vector, respectively, to obtain key-value vector features after row compression, key-value vector features after column compression, query vector features after row compression, query vector features after column compression, value vector features after row compression, and value vector features after column compression; Determine a row fusion feature according to the key value vector feature after the row is compressed, the query vector feature after the row is compressed, and the value vector feature after the row is compressed; The column fusion feature is determined according to the key-value vector feature after the column compression, the query vector feature after the column compression, and the value vector feature after the column compression.

5. The image segmentation method according to any one of claims 1 to 4, characterized in that: The step of determining the target text category feature according to the category text and the RGB image in the image information specifically includes: Determining text category-related features and text category-specific features according to the category text, and determining initial category text features according to the text category-related features and the text category-specific features; Extracting features from the RGB image in the image information to obtain viewing angle features; The initial category text feature is subjected to a perspective transformation according to the perspective feature to obtain a target text category feature at a current perspective.

6. The image segmentation method according to claim 5, characterized in that: The step of determining text category-related features and text category-specific features according to the category text, and determining initial category text features according to the text category-related features and the text category-specific features, specifically includes: Extracting features from the category text, and determining text category-related features based on the extracted category features and preset category information; Performing high-dimensional encoding on the category text to obtain text category-specific features; The text category associated features and the text category specific features are concatenated, and the concatenated features are extracted to obtain initial category text features.

7. An image segmentation device, characterized in that: The image segmentation device comprises: An image category feature determination module, used to determine the image category feature according to the image information corresponding to the wheel hub; A text category feature determination module, used to determine the target text category feature according to the category text and the RGB image in the image information; The image segmentation module is used to perform feature matching on the image category feature and the target text category feature, and perform image segmentation on the RGB image according to the matching result.

8. An image segmentation device, characterized in that: The device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the image segmentation method according to any one of claims 1 to 6.

9. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the image segmentation method according to any one of claims 1 to 6 are implemented.

10. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the steps of the image segmentation method according to any one of claims 1 to 6 are implemented.