Image processing method, related equipment, storage medium and program product
By performing pixel sampling and feature generation on the image, and using correlation vectors and enhanced features for image segmentation, the problem of insufficient image segmentation accuracy in traditional image processing methods is solved, and higher image segmentation accuracy is achieved.
Patent Information
- Application Number
- CN202210308758.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-25
- Publication Date
- 2024-10-22
- Estimated Expiration
- 2042-03-25
AI Technical Summary
When traditional image processing methods perform image segmentation, due to insufficient image features, the accuracy of the segmentation results is less than ideal.
By sampling multiple pixels of the target image, correlation vectors and enhanced features are generated, including first enhanced features and second enhanced features, and these features are used for image segmentation processing to improve the accuracy of the segmentation results.
The accuracy of image segmentation processing is improved. By using enhanced features, individual instances and semantic correlations in images can be more accurately identified, thereby improving the quality of image segmentation results.
Smart Images

Figure CN115294333B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to an image processing method, related equipment, storage medium and program product. Background Art
[0002] The rapid development of computer technology has given rise to artificial intelligence technology. Now, artificial intelligence technology has penetrated into all aspects of daily life, and with the application of artificial intelligence technology in daily life, people's quality of life has also been significantly improved. Taking the application of artificial intelligence technology in the field of image processing as an example, in the process of image processing, artificial intelligence technology can be used to complete tasks such as image segmentation, image recognition and image synthesis. This method can not only save labor costs, but also improve the accuracy of image processing. However, the image features used by traditional image processing methods when segmenting images usually only have basic image features (such as image texture features, image color features, image shape features, etc.). In this case, when traditional image processing methods are used in image segmentation processing scenarios, the accuracy of the segmentation results is usually not ideal because the image features are not comprehensive enough. Summary of the invention
[0003] The embodiments of the present application provide an image processing method, related equipment, storage medium and program product, which can improve the accuracy of image segmentation results obtained after image segmentation processing.
[0004] On the one hand, an embodiment of the present application provides an image processing method, including:
[0005] Sampling a plurality of pixels contained in the target image to obtain at least one reference pixel;
[0006] Obtaining a correlation vector for each pixel according to the position information and image features of each pixel in the plurality of pixels and the position information of the at least one reference pixel, wherein the correlation vector includes an instance correlation between an instance individual to which each pixel belongs and an instance individual to which each reference pixel belongs;
[0007] Traversing the plurality of pixels, and generating a first enhanced feature of the target pixel according to a correlation vector of the plurality of pixels and an image feature of a currently traversed target pixel;
[0008] Generate a second enhanced feature of the target pixel according to the image features of the multiple pixels, the position information of the target pixel and the position information of the associated pixels of the target pixel; the associated pixels include a plurality of first associated pixels included in the row where the target pixel is located, and a plurality of second associated pixels included in the column where the target pixel is located, and the second enhanced feature is used to indicate the probability of a predicted instance category obtained by predicting the target pixel;
[0009] After the traversal is completed, image segmentation processing is performed on the target image according to the first enhanced feature and the second enhanced feature of each pixel point in the multiple pixels to obtain an image segmentation result of the target image.
[0010] On the other hand, an embodiment of the present application provides an image processing device, including:
[0011] A sampling unit, used for sampling a plurality of pixel points included in the target image to obtain at least one reference pixel point;
[0012] a correlation calculation unit, configured to obtain a correlation vector of each pixel point according to the position information and image features of each pixel point in the plurality of pixels and the position information of the at least one reference pixel point, wherein the correlation vector includes an instance correlation between an instance individual to which each pixel point belongs and an instance individual to which each reference pixel point belongs;
[0013] A first feature enhancement unit, configured to traverse the plurality of pixels and generate a first enhanced feature of the target pixel according to a correlation vector of the plurality of pixels and an image feature of a currently traversed target pixel;
[0014] A second feature enhancement unit is used to generate a second enhanced feature of the target pixel according to the image features of the multiple pixels, the position information of the target pixel and the position information of the associated pixels of the target pixel; the associated pixels include a plurality of first associated pixels included in the row where the target pixel is located, and a plurality of second associated pixels included in the column where the target pixel is located, and the second enhanced feature is used to indicate the probability of a predicted instance category obtained by predicting the target pixel;
[0015] The image segmentation unit is used to perform image segmentation processing on the target image according to the first enhancement feature and the second enhancement feature of each pixel point in the multiple pixels after the traversal is completed, so as to obtain the image segmentation result of the target image.
[0016] On the other hand, an embodiment of the present application provides a computer device, including:
[0017] A processor configured to execute one or more computer programs;
[0018] A computer storage medium storing one or more computer programs, wherein the one or more computer programs are suitable for being loaded by the processor and executing the image processing method as described in the first aspect.
[0019] On the other hand, an embodiment of the present application further provides a computer storage medium, wherein the computer storage medium stores one or more computer programs, and the one or more computer programs are suitable for being loaded by the processor and executing the image processing method as described in the first aspect.
[0020] On the other hand, an embodiment of the present application provides a computer product, which includes a computer program, and the computer program is suitable for being loaded by a processor and executing the image processing method as described in the first aspect.
[0021] In the embodiment of the present application, the computer device determines the instance correlation between each pixel and the reference pixel (i.e., the probability that the two pixels belong to the same instance individual) according to the position information of the reference pixel, the position information of each pixel, and the graphic features. Further, the computer device generates the first enhanced feature of the corresponding pixel using the instance correlation between each pixel and the reference pixel and the image features of each pixel. Since the computer device refers to the position information of the corresponding two pixels when determining the instance correlation of any two pixels, the first enhanced feature of each pixel can contain the instance correlation between each pixel and each pixel in the target image in the spatial position, thereby improving the expression ability of the feature corresponding to each pixel. Similarly, when the computer device generates the second enhanced feature of the pixel according to the image features and position information of each pixel, and the position information of the associated pixels of the pixel, the computer device also refers to the position information of the corresponding pixel, so the second enhanced feature also has a stronger expression ability. Therefore, when the computer device uses the first enhanced feature and the second enhanced feature of each pixel in the target image to perform image segmentation processing on the target image, a high-accuracy image segmentation result can be obtained. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0023] Figure 1is a schematic diagram of a target image provided in an embodiment of the present application;
[0024] Figure 2 is a schematic flow chart of an image processing method provided in an embodiment of the present application;
[0025] Figure 3 This is a schematic diagram of the result of semantic correlation between associated pixels and related pixels of a pixel provided in an embodiment of the present application;
[0026] Figure 4 is a schematic flow chart of another image processing method provided in an embodiment of the present application;
[0027] Figure 5a is a structural schematic diagram of a panoptic segmentation model provided in an embodiment of the present application;
[0028] Figure 5b is a schematic diagram of the structure of an instance segmentation network provided in an embodiment of the present application;
[0029] Figure 5c It is a structural diagram of a semantic segmentation network provided in an embodiment of the present application;
[0030] Figure 6 is a structural schematic diagram of an image processing device provided in an embodiment of the present application;
[0031] Figure 7 It is a structural diagram of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0032] In order to enable those skilled in the art to better understand the method provided in the embodiments of the present application, the technical method in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. It should be noted that the various specific embodiments described in the embodiments of the present application are only a part of the embodiments of the present application, rather than all of the embodiments. Based on the various embodiments in the present application, all other embodiments obtained by ordinary technicians of the art without making creative work are within the scope of protection of this application.
[0033] The embodiment of the present application is based on artificial intelligence (AI) technology, and proposes an image processing method. The image processing method is used to perform image segmentation processing on the image, and an image segmentation result with high accuracy can be obtained. The image segmentation processing mentioned here may include but is not limited to any one or more of the following: image semantic segmentation processing, image instance segmentation processing, and image panoramic segmentation processing. It can be understood that since the image segmentation result obtained based on the image processing method has a high accuracy, it can be understood that the image processing method provided in the embodiment of the present application can be used for image processing in a variety of application scenarios, including but not limited to any one or more of the following: cloud technology, artificial intelligence, smart transportation, etc.
[0034] In order to facilitate a clearer understanding of the implementation principle of the embodiment of the present application, the following is a general description of the relevant definitions and principles of artificial intelligence technology. Specifically, artificial intelligence technology is a theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, so that related equipment has the ability to perceive the environment, acquire knowledge and use knowledge to obtain the best results. In other words, artificial intelligence technology is a comprehensive technology in computer science, which attempts to understand the essence of intelligence and produce a new intelligent machine that can respond in a similar way to human intelligence. In practical applications, artificial intelligence is to study the design principles and implementation methods of various intelligent machines, so that the machine has the functions of perception, reasoning and decision-making. It can be understood that artificial intelligence technology is a comprehensive discipline that involves a wide range of fields, including both hardware-level technology and software-level technology. Basic artificial intelligence technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, large training sample processing technology, operation / interaction system, mechatronics, etc. Artificial intelligence software technology mainly includes several major directions such as computer vision technology, speech processing technology, natural language processing technology, and machine learning / deep learning. In the embodiment of the present application, computer vision technology and machine learning / deep learning technology in artificial intelligence technology are mainly used.
[0035] In a specific embodiment, a computer device can be used to execute the image processing method provided in the embodiment of the present application. Among them, the computer device may include but is not limited to a terminal device and a server, that is, the computer device may be a terminal device or a server, and of course it may also be a computing system composed of a terminal device and a server, and the embodiment of the present application does not limit this. Specifically, in the embodiment of the present application, the terminal device may include but is not limited to: a smart phone, a tablet computer, a laptop computer, a desktop computer, a vehicle terminal, an intelligent voice interaction device, a smart home appliance, an aircraft, etc. In a specific embodiment, a variety of applications (Application, APP) and / or clients can also be run in the terminal device, such as: a multimedia playback client, a social client, a browser client, an information stream client, an education client, and an image processing client, etc. The above-mentioned server may include but is not limited to: an independent physical server, a server cluster or a distributed system composed of multiple physical servers, a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network, content distribution network), and basic cloud computing services such as big data and artificial intelligence platforms, etc. It can be understood that the embodiments of the present application do not impose specific restrictions on the computer equipment used to execute the image processing method. In specific applications, the above-mentioned related equipment can be flexibly combined and used according to the actual application scenario.
[0036] The following is a general description of the principles of the image processing method provided in the embodiment of the present application based on the above-mentioned related technologies and computer equipment, so that relevant personnel can more clearly understand the relevant implementation methods of the embodiment of the present application.
[0037] In an embodiment of the present application, the computer device may first sample at least one reference pixel from a plurality of pixels included in the target image, so that the computer device may generate a correlation vector for each pixel based on the position information of each reference pixel, and the position information and image features of each pixel in the plurality of pixels, and the correlation vector may be used to reflect the instance correlation between the instance individual to which each pixel belongs and the instance individual to which each reference pixel belongs. Further, the computer device may generate a first enhanced feature of the pixel based on the correlation vector and the image features of any pixel. In addition, the computer device may also generate a second enhanced feature of any pixel based on the position information of any pixel, the position information of each associated pixel in the column where the any pixel is located, the position information of each associated pixel in the row where the any pixel is located, and the image features of each pixel in the plurality of pixels included in the target image, and the second enhanced feature may be used to indicate the semantic correlation between the any pixel and each pixel in the plurality of pixels included in the target image, and the higher the semantic correlation between the two pixels, the higher the probability that the instance individuals to which they belong are the same instance category (such as: the instance category indicated by the semantics). It is not difficult to understand that in the embodiment of the present application, the second enhanced feature can be used to indicate the probability of the predicted instance category obtained by the computer device when predicting the any pixel point, such as: the probability of predicting that the instance category to which the any pixel point belongs is a person, and / or the probability of predicting that the instance category to which the any pixel point belongs is a flower, etc. After the computer device determines the first enhanced feature and the second enhanced feature of each pixel point among the multiple pixels contained in the target image, the computer device can perform image segmentation processing on the target image according to all the determined first enhanced features and second enhanced features, thereby obtaining the image segmentation result of the target image.
[0038] Among them, the target image can be obtained after image preprocessing of the image to be segmented. Exemplarily, the computer device can first normalize the image size of the image to be segmented to 512*512, and then normalize the pixel values of the pixels in the image after the image size is normalized to [-1,1] to obtain the target image corresponding to the image to be segmented. In addition, based on the above description, it is not difficult to see that in the embodiment of the present application, since the image features of the pixels are usually used to reflect the basic image information such as texture information, shape information, color information, etc. corresponding to the pixels, and the computer device generates the first enhanced feature based on the image features of the pixels and the correlation vector, it can be understood that the first enhanced feature includes more comprehensive image information than the image feature. Exemplarily, the first enhanced feature can be used to reflect the degree of correlation between instance individuals to which pixels at different positions belong, and the farther the two pixels are located, the lower the correlation between their corresponding instance individuals may be. In other words, for two pixels that are farther apart in position, the possibility that the two pixels belong to the same instance individual is lower. An instance individual can be understood as an object in the target image, such as in Figure 1 In the target image shown, the giraffe marked by 101 can be an instance individual, the giraffe marked by 102 can also be an instance individual, and the vehicle marked by 103 can still be an instance individual. Similarly, the computer device uses the position information and image features of the associated pixel points of the pixel point to generate a second enhanced feature that can reflect the probability of the predicted instance category of the instance to which the pixel point belongs. The predicted instance category is the instance category that the instance individual to which the pixel point belongs may correspond to. For example: the probability that the predicted instance category of pixel point A is a person is 20%, which means that the probability that the instance individual to which pixel point A belongs is a person is 20%. Based on this, it can be understood that the image information that can be reflected by the second enhanced feature is also enriched compared to the image feature. Therefore, the computer device uses the first enhanced feature and the second enhanced feature of the relevant pixel points in the target image to perform image segmentation processing on the target image, and can obtain an image segmentation result with higher accuracy.
[0039] Based on the above principles, it can be seen that the embodiment of the present application focuses on providing a feature enhancement idea. Applying this feature enhancement idea to the image segmentation scene is only to facilitate understanding of the principle of feature enhancement in the embodiment of the present application, and cannot be regarded as a limitation on the application field of the embodiment of the present application. In practical applications, based on this feature enhancement idea, the computer device can apply the first enhancement feature and the second enhancement feature to any image processing scene, including but not limited to image segmentation scenes, image super-resolution processing scenes, image classification scenes, etc., which are not described in detail in the embodiment of the present application. So, that is to say, the focus of the embodiment of the present application is that before the computer device performs image processing on the target image, it can first obtain the correlation between different pixel points (such as: instance correlation, semantic correlation, etc.), so that the computer device can use the obtained correlation to perform feature enhancement processing on the original basic features of the target image, so that when processing the target image, the corresponding image processing can be performed based on the image features with stronger expression ability, which can effectively improve the accuracy of the image processing results. It should be noted that the embodiments of the present application only elaborate on the principle of enhancing the image features of corresponding pixels by utilizing the correlation between different pixels in spatial positions. In practical applications, computer devices can also utilize this feature enhancement idea when processing videos. For example, when performing super-resolution processing and video interpolation processing on videos, computer devices can utilize the correlation between different video frames in the time dimension to enhance the image features of each video frame, thereby improving the expressive power of each video frame, which also helps to improve the accuracy of computer devices in performing video processing tasks.
[0040] Based on the above description of the principle of the image processing method, the present application embodiment provides the following Figure 2 The image processing method shown in FIG. 1 is performed by the computer device mentioned above. Figure 2 The image processing method shown in FIG. Figure 2 As shown, the image processing method may include steps S201-S205:
[0041] S201, sampling a plurality of pixel points included in a target image to obtain at least one reference pixel point.
[0042] Among them, the multiple pixels contained in the target image can be all the pixels in the target image. For example, when the image size of the target image is 512*512, the multiple pixels contained in the target image can be 512*512 pixels. In a specific implementation, the way in which the computer device obtains at least one reference pixel can be: the computer device uses the anchor point mechanism to uniformly sample on the target image to obtain multiple anchor points, and further, the computer device can use each anchor point as a reference pixel in the embodiment of the present application. Exemplarily, in the embodiment of the present application, the computer device can sample 16*16 anchor points. It can be understood that once these 16*16 anchor points are determined, they can be fixed. In other words, once these 16*16 anchor points are sampled, when the subsequent computer device performs feature enhancement on any pixel in the target image, the anchor points (ie, reference pixels) used by the computer device are the same, all of which are 16*16. Of course, in other embodiments, the computer device may also use different reference pixels when performing feature enhancement on different pixels. These different reference pixels may be resampled by the computer device, or one or more reference pixels may be selected by the computer device from at least one sampled reference pixel. The present application does not limit the comparison to the embodiments.
[0043] It should be noted that, unless otherwise specified, the following description is given by taking the example that a computer device uniformly samples reference pixels from a target image and the entire image processing process does not re-determine new reference pixels.
[0044] S202, obtaining a correlation vector of each pixel point according to the position information and image features of each pixel point among a plurality of pixel points and the position information of at least one reference pixel point.
[0045] In an embodiment of the present application, the target image may include H*W pixels. Specifically, the target image may be composed of H rows of pixels, and the number of pixels in each row is W, that is, the target image can be regarded as being presented by a matrix of H rows and W columns, and each matrix element in the matrix is a pixel. Then, the position information of the pixel may be the coordinates of the pixel in the target image. For example, if pixel A is located in the i-th row and j-th column in the target image, the position of pixel A may be exemplarily (i, j). The image features of the pixel may be the deep convolution features obtained after the computer device uses the image feature extraction network to extract features from the target image. Exemplarily, the image feature extraction network used by the computer device may be a residual network plus a feature pyramid network. The image features of each pixel may be used to reflect the image information contained in the pixel, and the image information includes but is not limited to color information, texture information, and shape information. It should be noted that, in practical applications, the image feature of each pixel can be represented by an N-dimensional feature vector (N is a positive integer), and each vector element in the feature vector can represent a meaning (such as an instance individual). The larger the element value of the vector element, the greater the possibility that the pixel is used to represent the corresponding meaning. For example, assume that the image feature of the pixel is a feature vector, and the feature vector includes 3 vector elements (a, b, c), where vector element a indicates that the pixel belongs to person 1, vector element b indicates that the pixel belongs to person 2, and vector element c indicates that the pixel belongs to an animal. In this case, if a=0, b=0.2, and c=0.8, it means that the probability of the pixel belonging to person 1 is 0, the probability of belonging to person 2 is 0.2, and the probability of belonging to an animal is 0.8.
[0046] Based on the above description, it is not difficult to understand that since the target image includes H*W pixels, the target image features of the target image may include image features of H*W pixels. In addition, in actual image processing scenarios, a computer device may extract features of a target image in multiple channels (such as R channel, G channel, and B channel), so the target image features corresponding to the target image may be C*H*W dimensional, where C represents the number of channels, H represents the height of the target image, which is the height of H pixels, and W represents the width of the target image, which is the width of W pixels.
[0047] In addition, in the embodiment of the present application, the correlation vector of any pixel point includes the instance correlation between the instance individual to which the pixel point belongs and the instance individual to which each reference pixel point belongs. For example, assuming that there are two reference pixel points sampled by the computer device (reference pixel point 1 and reference pixel point 2), then for pixel point A in the target image, the correlation vector of pixel point A may include the instance correlation between the instance individual to which pixel point A belongs and the instance individual to which reference pixel point 1 belongs, and also include the instance correlation between the instance individual to which pixel point A belongs and the instance individual to which reference pixel point 2 belongs.
[0048] S203, traversing a plurality of pixel points, and generating a first enhanced feature of a target pixel point according to a correlation vector of the plurality of pixel points and an image feature of a currently traversed target pixel point.
[0049] Among them, the first enhanced feature can be used to reflect the degree of correlation between instance individuals to which pixels at different positions belong. Specifically, the first enhanced feature of the target pixel can reflect the degree of correlation between the instance individual to which the pixel belongs and the instance individual to which each pixel in the target image belongs. In practical applications, the higher the eigenvalue of the first enhanced feature, the higher the degree of correlation between the instance individuals corresponding to the two pixels (or: the higher the possibility of being the same instance individual). Based on the foregoing, it can be seen that the image feature of each pixel can be a feature vector. Then, it is not difficult to understand that the first enhanced feature generated after the image feature is enhanced can also be a feature vector. Then, the eigenvalue of the first enhanced feature can include the element value of any vector element in the feature vector, and the dimension of the feature vector corresponding to the first enhanced feature can be the same as the dimension of the feature vector corresponding to the image feature, and of course it can also be different. The embodiment of the present application does not limit this.
[0050] In this case, it should be noted that the values of the vector elements in the feature vector corresponding to the first enhanced feature can be obtained by the computer device after adaptively adjusting the values of the vector elements in the image feature. Specifically, the values of the vector elements in the first enhanced feature of any pixel point can be obtained by the computer device after adjusting the values of the vector elements in the image feature of any pixel point after referring to the position information and image features of other pixel points in the target image. In this case, the first enhanced feature can be used to reflect more individual information of the instance, so that the computer device can obtain more accurate image segmentation results when performing image segmentation processing based on the first enhanced feature of the pixel point.
[0051] S204, generating a second enhanced feature of the target pixel according to the image features of the plurality of pixels, the position information of the target pixel, and the position information of the pixels associated with the target pixel.
[0052] Based on the above, it can be seen that the target image can be regarded as a matrix including H*W pixels. Then, the associated pixels of any pixel may include: ① a plurality of first associated pixels included in the column where the target pixel is located, ② a plurality of second associated pixels included in the row where the target pixel is located. Figure 3 And specific examples are provided to illustrate the associated pixel points in the embodiments of the present application. Figure 3 In the figure, the rectangular long box marked by 301 is used to identify a row of pixels in the target image, the rectangular long box marked by 302 is used to identify a column of pixels in the target image, and the small rectangular box marked by 3011 is used to identify a pixel in the target image. Figure 3 In the figure, if pixel 3011 is the target pixel, since the row where pixel 3011 is located is the row indicated by the rectangular frame 301, all the pixels in the rectangular frame 301 are the second associated pixels of pixel 3011; similarly, all the pixels in the rectangular frame 302 are the first associated pixels of pixel 3011.
[0053] The second enhanced feature is used to indicate the probability of the predicted instance category obtained by the computer device predicting the target pixel point. Among them, the second enhanced feature can indicate multiple predicted instance categories of the target pixel point and the probability of each predicted instance category. In the embodiment of the present application, the second enhanced feature of the pixel point is also generated by the computer device after relevant processing based on the image feature of the pixel point. Then, based on the aforementioned description of the first enhanced feature, it is not difficult to understand that the second enhanced feature in the embodiment of the present application can also be a feature vector, and specifically, the value of the vector element in the second enhanced feature can represent the probability that the instance individual to which the corresponding pixel point belongs is the instance category indicated by the vector element. Exemplarily, the instance category indicated by the vector element whose element value is not 0 in the second enhanced feature can be used as the predicted instance category of the pixel point by the computer device, and the element value of the vector element is the probability corresponding to the corresponding predicted instance category.
[0054] In a specific implementation, the second enhanced feature of the target pixel can also be used to reflect the semantic relevance between the target pixel and each of the multiple pixels contained in the target image. The semantic relevance can be understood as the degree of association between the instance categories to which the pixel belongs. The greater the semantic relevance, the higher the degree of association, which means that the probability that the corresponding two pixels belong to the same instance category is higher. Please continue to refer to Figure 3 , Figure 3 The line graph on the right is used to represent the semantic correlation between pixel 3011 and each associated pixel in rectangular frame 301. It is not difficult to see that the instance category to which pixel 3011 belongs is giraffe, so Figure 3It can be seen from the line graph in that if the instance category to which the associated pixel point belongs is also a giraffe, the semantic correlation between the associated pixel point and the pixel point 3011 is relatively large; if the instance category to which the associated pixel point belongs is not a giraffe, the semantic correlation between the associated pixel point and the pixel point 3011 is relatively small.
[0055] S205, after the traversal is completed, performing image segmentation processing on the target image according to the first enhanced feature and the second enhanced feature of each pixel point in the plurality of pixels, to obtain an image segmentation result of the target image.
[0056] In an embodiment of the present application, the computer device may determine the first enhancement feature and the second enhancement feature of each pixel by traversing the multiple pixels contained in the target image. After the computer device determines the first enhancement feature and the second enhancement feature of each pixel, the computer device may perform image segmentation processing on the target image based on these enhancement features. In a specific implementation, the computer device may first determine the first enhanced image feature of the target image based on all the determined first enhancement features, and determine the second enhanced image feature of the target image based on all the determined second enhancement features. Then, the computer device directly uses the first enhanced image feature and the second enhanced image feature to perform image segmentation processing on the target image.
[0057] In the embodiment of the present application, the computer device determines the instance correlation between each pixel and the reference pixel (i.e., the probability that the two pixels belong to the same instance individual) according to the position information of the reference pixel, the position information of each pixel, and the graphic features. Further, the computer device generates the first enhanced feature of the corresponding pixel using the instance correlation between each pixel and the reference pixel and the image features of each pixel. Since the computer device refers to the position information of the corresponding two pixels when determining the instance correlation of any two pixels, the first enhanced feature of each pixel can contain the instance correlation between each pixel and each pixel in the target image in the spatial position, thereby improving the expression ability of the feature corresponding to each pixel. Similarly, when the computer device generates the second enhanced feature of the pixel according to the image features and position information of each pixel, and the position information of the associated pixels of the pixel, the computer device also refers to the position information of the corresponding pixel, so the second enhanced feature also has a stronger expression ability. Therefore, when the computer device uses the first enhanced feature and the second enhanced feature of each pixel in the target image to perform image segmentation processing on the target image, a high-accuracy image segmentation result can be obtained.
[0058] Based on the above description of the principle of the image processing method and Figure 2 The related embodiments of the image processing method shown in the figure, the embodiment of the present application proposes the following Figure 4 The image processing method shown in the figure can still be executed by using a computer device. Figure 4 As shown, the image processing method may include steps S401-S407:
[0059] S401, sampling a plurality of pixels included in a target image to obtain at least one reference pixel.
[0060] In one embodiment, the specific implementation of step S401 can refer to the relevant embodiment of the above-mentioned step S201, and the embodiment of the present application will not be described in detail here.
[0061] S402, predicting an instance correlation parameter of each pixel according to the position information and image features of each pixel.
[0062] In a specific implementation, when determining the instance relevance of any pixel, the computer device may first determine the instance relevance parameter corresponding to the pixel, so as to calculate the instance relevance based on the instance relevance parameter. Exemplarily, in an embodiment of the present application, a pixel may correspond to a set of instance relevance parameters, and each set of instance relevance parameters includes at least one instance relevance parameter. Based on the foregoing, it can be known that the computer device can calculate multiple instance relevances for each pixel, and for any pixel, the instance relevance between it and the pixels at different positions may be different. For example, the instance relevance between any pixel and the pixel closer to it may be stronger, and the instance relevance between any pixel and the pixel farther from it may be lower. It can be seen that the instance relevance between the pixels and the position information of the corresponding two pixels have an association relationship. Then, in order to obtain a more accurate instance relevance, the computer device can fit the accurate instance relevance between each pixel and the pixels at different positions. Fitting can be understood as connecting a series of points on a plane with a smooth curve. Because this curve has countless possibilities, various fitting methods can be used. That is to say, the computer device can fit the instance correlation between each pixel and multiple pixels at different positions so that the computer device can calculate the accurate instance correlation based on the position information of the pixel.
[0063] In a specific embodiment, the computer device in the embodiment of the present application can use a powerful Fourier transform to realize the fitting of multiple instance correlations. The Fourier transform can enable the computer device to express a function that satisfies certain conditions as a linear combination of trigonometric functions (sine and / or cosine functions) or their integrals, thereby realizing the fitting of multiple instance correlations. In this case, the instance correlation parameters determined by the computer device can be parameters related to the phase, amplitude, and phase shift in the Fourier expansion. Since the Fourier transform and the Fourier expansion are relatively mature technical means in the prior art, the Fourier transform and the Fourier expansion are not described in detail in the embodiment of the present application. And it can be understood that the embodiment of the present application only provides an exemplary fitting method, and other fitting methods can also be used in practical applications to achieve the same purpose, and the embodiment of the present application does not specifically limit this.
[0064] Based on the above description, it can be understood that since the computer device in the embodiment of the present application can fit the instance correlation between each pixel point and pixel points at different positions, the computer device can obtain a more accurate impact of the position information on the instance correlation when subsequently determining the instance correlation between any two pixel points, thereby enabling the computer device to determine a more accurate first enhanced feature.
[0065] S403, obtaining the associated pixel points of any pixel point from multiple pixel points, and using the correlation function to perform correlation calculation on the instance correlation parameter of any pixel point and the position information of the associated pixel points of any pixel point, so as to obtain the instance correlation between any pixel point and each pixel point in the multiple pixel points.
[0066] In a specific implementation, the way in which a computer device obtains the associated pixel points of any pixel point from a plurality of pixel points can be referred to the way in which the computer device determines the associated pixel points of a target pixel point in step S204, which will not be described in detail in the embodiments of the present application. In other words, the associated pixel points of any pixel point include the pixel points in the same column as the pixel point, and the pixel points in the same row as the pixel point. Based on this, the following describes in detail the correlation function used by the computer device and the way in which the correlation function is used to calculate the correlation of the instance correlation parameters of any pixel point and the position information of the associated pixel points of any pixel point.
[0067] The computer device in the embodiment of the present application can use the correlation function to fit multiple instance correlations, and use the correlation function to calculate the instance correlation between any pixel point and the corresponding associated pixel point. Exemplarily, the correlation function used in the embodiment of the present application can be shown as Formula 1:
[0068]
[0069] Wherein, i represents the i-th pixel point among the multiple pixel points contained in the target image (it can be any one of the multiple pixel points), and j represents the position information of the associated pixel point. For example, the position information can be the horizontal coordinate or vertical coordinate of the associated pixel point, or the distance value between the associated pixel point and the i-th pixel point. N is the number of trigonometric functions that need to be fitted, which is set by relevant personnel or computer equipment based on experience values. For example, N = 16 or 32. T′ i (j) represents the instance correlation between the i-th pixel and the associated pixel with position information j. nω′ and are all instance correlation parameters that the computer device needs to use when calculating the instance correlation of the i-th pixel based on the correlation function. These instance correlation parameters are predicted by the computer device based on the position information of the i-th pixel and the image features of the i-th pixel. It can be understood that for different pixels, the computer device can predict different instance correlation parameters. nω′ and These four instance correlation parameters are represented by the parameter group θ i To express, that is, the computer device predicts nω′ and It can be regarded as a computer equipment prediction parameter set θ i Since Formula 1 is obtained by fitting multiple instance correlations, the instance correlation calculated by the computer device using such a correlation function is continuous and smooth, that is, the instance correlation between any pixel and two adjacent pixels (such as the jth pixel and the j+1th pixel) is approximate.
[0070] Exemplarily, the computer sets the prediction parameter set θ i The method may be as follows: the computer device uses the optimized instance correlation prediction network to predict the instance correlation parameters based on the image features and position information of the i-th pixel point, so as to obtain the predicted parameter group θ corresponding to the i-th pixel point i Then, the computer device sets the parameter group θ i Substituting each instance correlation parameter in and the position information j of any associated pixel into the correlation function shown in the above formula 1, the instance correlation between the ith pixel and the associated pixel can be calculated. Based on this method, the computer device can calculate the instance correlation between the ith pixel and each associated pixel of the ith pixel, so that the computer device can determine the instance correlation between the ith pixel and each of the multiple pixels included in the target image based on all the calculated instance correlations.
[0071] It should be noted that in the embodiment of the present application, since any pixel has two types of associated pixels, namely: ① each pixel in the same row as the pixel; ② each pixel in the same column as the pixel. Then, when the computer device uses the optimized instance relevance prediction network to predict the instance relevance parameter of the i-th pixel, different parameter groups θ can be predicted for these two types of associated pixels. i , so that the computer equipment can be based on different parameter groups θ i The instance correlation between the corresponding two pixels is calculated. Specifically, the principle of the computer device determining the instance correlation between the i-th pixel and each pixel is similar to the implementation principle of the computer device determining the target semantic correlation between the i-th pixel and each pixel in the subsequent step S406, and the embodiments of the present application are not repeated here.
[0072] The computer device can optimize the instance correlation prediction network in the following manner: after obtaining the image features of the pixel sample, the computer device inputs the image features of the pixel sample into the instance correlation prediction network, and uses the instance correlation prediction network to predict the instance correlation between the pixel sample and the associated pixel of the pixel sample based on the instance correlation parameters in the current network and the input image features, so as to obtain the predicted instance correlation; further, the computer device can obtain the standard instance correlation between the pixel sample and the corresponding associated pixel, so that the computer device can calculate the loss function value of the instance correlation prediction network based on the standard instance correlation and the predicted instance correlation. After the computer device determines the loss function value, the computer device can adjust the instance correlation parameters in the instance correlation prediction network according to the optimization goal to obtain the optimized instance correlation prediction network. The optimization goal of optimizing the instance correlation prediction network can be: the instance correlation between the pixels belonging to the same instance individual predicted by the instance correlation prediction network is close to 1, and the instance correlation between the pixels belonging to different instance individuals predicted by the instance correlation prediction network is close to 0.
[0073] In the embodiment of the present application, there is no specific limitation on the loss function used by the computer device when calculating the loss function value of the instance relevance prediction network. For example, the computer device may use the loss function shown in Formula 2 to calculate the loss function value.
[0074] L=L cate +λL mask Formula 2
[0075] Among them, L represents the loss function value of the instance relevance prediction network, L cate represents the loss value of the instance category determination module (used to determine the instance category of the instance individual to which the pixel belongs) in the instance relevance prediction network, L mask represents the loss value of the mask prediction module (used to determine the instance to which the pixel belongs) in the instance correlation prediction network; λ is a hyperparameter that can be set according to the actual application scenario. The embodiment of the present application does not impose any specific restrictions on the value of λ. mask It can be calculated as shown in Formula 3:
[0076]
[0077] In formula 3, N pos Indicates the number of positive samples used in the optimization process; In mathematics, an indicator function is a function defined on a set X, which is used to indicate which elements in the set X belong to a subset A. In the embodiment of the present application, is the predicted label of the instance category of the (i, j)th pixel (i.e., the pixel with coordinates (i, j)). If but otherwise In addition, i=[k / S], and j is equal to the remainder obtained after the computer device divides k by S. * represents the predicted target of the instance category, m * Represents the mask prediction target, S represents the number of channels, and k represents the channel in the S channels used to predict the instance category of the (i, j)th pixel.
[0078] S404 , determining the instance correlation corresponding to the position information of each reference pixel from all instance correlations obtained for any pixel, to generate a correlation vector for any pixel.
[0079] Based on the foregoing, it can be known that the reference pixel is sampled from a plurality of pixels contained in the target image, that is, the reference pixel exists in a plurality of pixels. Then, since the computer device calculates the instance correlation between any pixel and each of the plurality of pixels, it can be understood that among all the instance correlations calculated by the computer device for any pixel, there is an instance correlation between the any pixel and the reference pixel. In a specific implementation, the instance correlation can have a corresponding relationship with the position information of the corresponding pixel, so the computer device can determine the instance correlation between the any pixel and the reference pixel from all the instance correlations related to the any pixel according to the position information of the reference pixel. Further, the computer device can splice the acquired instance correlations to obtain the correlation vector of the any pixel. Therefore, it can be understood that the correlation vector includes the instance correlation between the any pixel and each reference pixel. It is not difficult to understand that based on this method, the computer device can generate a correlation vector for each of the plurality of pixels contained in the target image, thereby obtaining a correlation vector for a plurality of pixels.
[0080] S405 , traversing a plurality of pixel points, and generating a first enhanced feature of a target pixel point according to a correlation vector of the plurality of pixel points and an image feature of a currently traversed target pixel point.
[0081] In a specific embodiment, when the computer device generates the first enhanced feature of the target pixel, the computer device can perform image convolution processing on the correlation vector of the multiple pixels contained in the target image after determining the correlation vector of the multiple pixels to obtain the instance expression feature of the target pixel, and the instance expression feature contains the instance correlation between the target pixel and each pixel. Therefore, the computer device can generate the first enhanced feature of the target pixel by performing feature fusion processing on the instance expression feature and the image feature of the target pixel. Exemplarily, the feature fusion processing can be the addition or feature splicing between features, and the embodiment of the present application does not specifically limit the feature fusion method. Since the instance correlation can be used to represent the probability that the corresponding two pixels belong to the same instance individual, and the first enhanced feature is generated by the computer device based on the instance correlation, it is not difficult to understand that in the process of generating the first enhanced feature by the computer device, the similarity between the pixels of the same instance individual expressed by the first enhanced feature can be improved, and the similarity between the pixels of non-same instance individuals can be reduced, so that the first enhanced feature can have a stronger expression ability.
[0082] Based on the above description, it can be understood that in the embodiment of the present application, the first enhanced feature can be used to express the instance correlation between the target pixel and the pixels at different positions. Therefore, using the first enhanced feature to segment the target image helps the computer device to accurately determine the instance individual to which the corresponding pixel belongs, thereby helping the computer device to obtain more accurate image segmentation results.
[0083] S406, generating a second enhanced feature of the target pixel according to the image features of the plurality of pixels, the position information of the target pixel, and the position information of the pixels associated with the target pixel.
[0084] In an embodiment of the present application, the associated pixel points of the target pixel point may include a first associated pixel point and a second associated pixel point. Among them, the first associated pixel point is all the pixel points in the column where the target pixel point is located; the second associated pixel point is all the pixel points in the row where the target pixel point is located. Then, when the computer device determines the target semantic correlation between the target pixel point and any associated pixel point, it can first determine the reference semantic correlation between the target pixel point and any associated pixel point. Among them, the target semantic correlation is the semantic correlation adopted when the computer device generates the second enhanced feature of the target pixel point, and the reference semantic correlation is the semantic correlation that the computer device needs to refer to when determining the target semantic correlation between the target pixel point and each pixel point. In practical applications, when determining the reference semantic correlation, the computer device can also use the correlation function shown in the above formula 1. Therefore, in the same way, the computer device can also first predict the semantic correlation parameters corresponding to the target pixel point, so that the computer device can use the correlation function to calculate the reference semantic correlation between the corresponding two pixels based on the semantic correlation parameters and the position information of the corresponding associated pixels.
[0085] In the embodiment of the present application, the way in which the computer device predicts the semantic relevance parameter can refer to the way in which the computer device predicts the instance relevance parameter in the above step S403, and the embodiment of the present application will not be described in detail. In general, when predicting the semantic relevance parameter, the embodiment of the present application can respectively predict the semantic relevance parameter used to calculate the target pixel and the first associated pixel, and predict the semantic relevance parameter used to calculate the target pixel and the second associated pixel, so that the computer device can respectively use the corresponding semantic relevance parameter to calculate the corresponding reference semantic relevance. It should be noted that when predicting the semantic relevance parameter in the embodiment of the present application, the computer device can use an optimized semantic relevance prediction network. The optimized semantic relevance prediction network can be obtained by adjusting the semantic relevance prediction parameters in the semantic relevance prediction network based on the loss value calculated by the computer device based on the cross entropy loss function. Among them, the optimization goal for the semantic relevance prediction network can be: the reference semantic relevance between pixels belonging to the same instance category predicted by the semantic relevance prediction network is close to 1, and the reference semantic relevance between pixels belonging to different instance categories predicted by the semantic relevance prediction network is close to 0. The specific optimization principle can be found in the optimization principle of the above-mentioned computer device for the instance correlation prediction network, which will not be elaborated in the embodiments of the present application.
[0086] Based on the above description, the computer device can calculate the reference semantic correlation between the target pixel and each first associated pixel. The reference semantic correlation between the target pixel and all first associated pixels can be expressed as the correlation sequence C i 1 For example, C i 1 It can be specifically expressed by formula 4:
[0087] C i 1 =[cor(i,0),cor(i,1),..,cor(i,h-1)] T Formula 4
[0088] Wherein, cor(i,0) represents the reference semantic correlation between the i-th pixel (e.g., target pixel) and the first associated pixel whose position information is represented by 0; similarly, cor(i,h-1) can represent the reference semantic correlation between the i-th pixel and the first associated pixel whose position information is represented by h-1. In the embodiment of the present application, the first associated pixel is a pixel located in the same column as the target pixel. Then, the correlation sequence C generated by the computer device based on the reference semantic correlation between the target pixel and all the first associated pixels is i 1It can be regarded as a column vector, which includes multiple vector elements, and a vector element represents the reference semantic correlation between the target pixel and a first associated pixel. In the embodiment of the present application, this column vector can be called the feature enhancement column vector of the target pixel.
[0089] Correspondingly, after the computer device calculates the reference semantic features of the target pixel and each second associated pixel, the computer device can use the correlation sequence C to represent the reference semantic correlation between the target pixel and all the second associated pixels. i 2 For example, C i 2 It can be specifically expressed by formula 5:
[0090] C i 2 =[cor(i,0),cor(i,1),..,cor(i,L-1)] Formula 5
[0091] Wherein, cor(i,0) represents the reference semantic correlation between the i-th pixel and the second associated pixel whose position information is represented by 0; similarly, cor(i,L-1) can represent the reference semantic correlation between the i-th pixel and the second associated pixel whose position information is represented by L-1. i 2 It can be regarded as a row vector, in which a vector element represents the reference semantic correlation between the target pixel and a second associated pixel. Exemplarily, the row vector can be called a feature enhancement row vector of the target pixel.
[0092] Then, based on the above description, the computer device can generate the second enhanced feature of the target pixel in the following manner: the computer device generates a feature enhancement column vector based on the position information and image features of the target pixel, as well as the position information of multiple first associated pixels, and the feature enhancement column vector includes the reference semantic correlation between the target pixel and each first associated pixel. In addition, the computer device can also generate a feature enhancement row vector based on the position information and image features of the target pixel, as well as the position information of multiple second associated pixels, and the feature enhancement row vector includes the reference semantic correlation between the target pixel and each second associated pixel. Further, the computer device can generate the semantic expression feature of the target pixel based on the feature enhancement column vector, the feature enhancement row vector, and the image features of multiple pixels, so that the computer device can obtain the second enhanced feature of the target pixel by performing feature fusion processing on the semantic expression feature and the image features of the target pixel. Exemplarily, the feature fusion processing here can also be feature addition or feature splicing.
[0093] Among them, the computer device generates the semantic expression features of the target pixel point according to the feature enhancement column vector, the feature enhancement row vector, and the image features of multiple pixels. The method can be specifically as follows: the computer device performs an outer product operation on the feature enhancement column vector and the feature enhancement row vector to obtain a feature enhancement matrix, wherein if the feature enhancement column vector is H-dimensional and the feature enhancement row vector is W-dimensional, then the feature enhancement matrix is a matrix of H*W dimensions, then the feature enhancement matrix can be used to indicate the target semantic relevance between the target pixel point and each pixel point in the multiple pixels. Specifically, the matrix element located in the i-th row and j-th column of the feature matrix can be used to represent the target semantic relevance between the target pixel point and the pixel point located in the i-th row and j-th column in the target image. After the computer device determines the feature enhancement matrix, the computer device can perform a weighted average operation based on the feature enhancement matrix and the image features of multiple pixels to obtain the semantic expression features of the target pixel point. Among them, the weight corresponding to the image feature of each pixel point can be determined by the computer device using an attention mechanism based on the target semantic relevance between the pixel point and the target pixel point. Exemplarily, the greater the target semantic correlation between a pixel point and the target pixel point, the greater the weight corresponding to the relevant image feature determined by the computer device.
[0094] S407, after the traversal is completed, image segmentation processing is performed on the target image according to the first enhanced feature and the second enhanced feature of each pixel point in the plurality of pixels to obtain an image segmentation result of the target image.
[0095] In a specific implementation, the image segmentation processing performed by the computer device on the target image may include panoramic segmentation processing. Panoramic segmentation combines semantic segmentation and instance segmentation. When performing panoramic segmentation, the computer device predicts an instance category label and an instance individual label for each pixel in the target image. For pixels corresponding to uncountable semantic categories, such as pixels used to indicate the sky, their instance individual labels are unified into one. Semantic segmentation in panoramic segmentation means that the computer device predicts an instance category label, such as sky, ground, human body, etc., for each pixel in the target image; and instance segmentation in panoramic segmentation means that the computer device predicts an instance category label and an instance individual label for an object of a specific instance category in the target image, where the instance individual label can be understood as a different number of objects of the same type, which can be mainly used to distinguish different instance individuals of the same instance category. The application scenarios of panoramic segmentation are very wide. For example, in some online meetings or video transmission scenarios, participants or video objects often use the virtual background function to protect the privacy of their environment. This function refers to replacing the background with a picture specified by the relevant object, such as a study, a solid color background, etc. The image segmentation technology used by the computer device to implement this function is the panoramic segmentation technology. In addition, panoramic segmentation can also be applied to some Internet products with background replacement functions to replace the original background in the target image with tourist attractions or other scenic spots. It is not difficult to understand that these background replacement application scenarios all require computer equipment to first segment the foreground (such as people) in the picture, and then fuse the foreground and the specific picture background to achieve background replacement.
[0096] Then, when the computer device performs panoramic segmentation processing on the target image, the computer device can first perform instance segmentation processing on the target image according to the first enhanced feature of each pixel in the multiple pixels to obtain the instance segmentation result of the target image, and the instance segmentation result can include the first instance category label and the instance individual label corresponding to each pixel. At the same time, the computer device can also perform semantic segmentation processing on the target image according to the second enhanced feature of each pixel in the multiple pixels to obtain the semantic segmentation result of the target image, and the semantic segmentation result can include the second instance category label corresponding to each pixel. Then, the computer device can perform fusion processing on the instance segmentation result and the semantic segmentation result to obtain the image segmentation result of the target image, and the image segmentation result includes the target instance category label and the instance individual label of each pixel; wherein the target instance category label is selected from the first instance category label and the second instance category label during the process of the computer device performing the fusion processing.
[0097] Specifically, the computer device may select the target instance category label from the first instance category label and the second instance category label as follows: when the first instance category label and the second instance category label of a pixel are the same, the computer device may use any one of the first instance category label and the second instance category label as the target instance category label of the pixel. When the first instance category label and the second instance category label of a pixel are different, the computer device may obtain the probability that the pixel is the first instance category label, and obtain the probability that the pixel is the second instance category label, and use the instance category label with a higher probability in the first instance category label and the second instance category label as the target instance category label of the pixel. Of course, the computer device may also use other methods to determine the target instance category label, such as directly using the second instance category label as the target instance category label.
[0098] It should be noted that, in practical applications, the computer device may use a panoramic segmentation model to perform image segmentation processing on the target image. When using the panoramic segmentation model to perform image segmentation processing on the target image, the computer device may first train the panoramic segmentation model in an end-to-end manner. Specifically, the computer device may use a mini-batch (batch gradient descent method) method to perform forward calculations based on the segmentation results of the panoramic segmentation model to determine the instance segmentation error and semantic segmentation error of the panoramic segmentation model. Furthermore, the computer device may use the Adam algorithm (an optimization algorithm) to optimize and adjust the model parameters of the panoramic segmentation model based on the determined errors, until the panoramic segmentation model achieves the expected optimization effect, and then use the panoramic segmentation model to perform image segmentation processing on the target image.
[0099] Based on the above Figure 2 and Figure 4 The following is a complete description of the process of using the image processing method provided by the embodiment of the present application to perform panoramic segmentation processing on the target image by a computer device in combination with specific examples, model structures, and network structures. Among them, the structure of the panoramic segmentation model can be found in Figure 5a As shown, the structure of the instance segmentation network in the panoramic segmentation model can be found in Figure 5b As shown, the structure of the semantic segmentation network in the panoramic segmentation model can be found in Figure 5c As shown. Among them, Figure 5b and Figure 5c In the above, C represents the number of channels used for feature extraction of the target image, H represents the number of pixels used to form the height of the target image, and W represents the number of pixels used to form the width of the target image. In order to facilitate clear explanation, the following process of image segmentation of the target image by the computer device is divided into three parts, namely: ① The computer device is based on Figure 5bThe example segmentation network shown in the figure determines the first enhanced feature of each pixel; ② The computer device is based on Figure 5c The semantic segmentation network shown in the figure determines the second enhanced feature of each pixel; ③ The computer device uses Figure 5a The panoramic segmentation model shown performs a panoramic segmentation process based on the first enhanced feature and the second enhanced feature.
[0100] (1) Computer equipment based on Figure 5b The process of determining the first enhanced feature of each pixel by the instance segmentation network shown is as follows:
[0101] After acquiring the target image to be subjected to panoptic segmentation processing, the computer device may first sample the pixels in the target image to determine at least one reference pixel (e.g. Figure 5b Then, the computer device can determine two sets of instance correlation parameters (such as ) required for the computer device to calculate the instance correlation between the pixel and its associated pixel based on the image features and position information of each pixel. Figure 5b θ hor and θ ver ), a set of instance-related parameters (e.g., θ ver ) is used to calculate the instance correlation between the pixel and the first associated pixel of the pixel (that is, all the pixels on the column where the pixel is located), and another set of instance correlation parameters (such as: θ hor) is used to calculate the instance correlation between the pixel and the second associated pixel of the pixel (that is, all the pixels on the column where the pixel is located). After the computer device determines all the instance correlations between the pixel and the related first associated pixel, an instance correlation column vector can be obtained; correspondingly, the computer device can also obtain an instance correlation row vector based on all the instance correlations between the pixel and the related second associated pixel. Then, in this case, the computer device can determine the instance correlation between the pixel and each pixel in the target image by performing a vector outer product of the instance correlation column vector and the instance correlation row vector. After the computer device determines all the instance correlations of the pixel, the computer device can determine the instance correlation between the pixel and at least one reference pixel from all the instance correlations, and use the determined instance correlations to generate a correlation vector for the pixel. Based on this method, the computer device can determine the correlation vector of each pixel point. Then, after the computer device obtains the correlation vector of each pixel point, the computer device can perform image convolution operations based on these correlation vectors to determine the instance expression features of each pixel point. Then, the computer device can perform feature fusion processing on the instance expression features and the image features of the corresponding pixels to generate the first enhanced features of each pixel point.
[0102] (2) Computer equipment based on Figure 5c The process of determining the second enhanced feature of each pixel by the semantic segmentation network shown can be as follows:
[0103] The computer device can determine two sets of semantic correlation parameters (such as ) required for the computer device to calculate the reference semantic correlation between the pixel and its associated pixel based on the image features and position information of each pixel. Figure 5c θ hor and θ ver ), a set of semantic relevance parameters (such as: θ ver ) is used to calculate the reference semantic correlation between the pixel and the first associated pixel of the pixel (i.e., all pixels on the column where the pixel is located), and another set of semantic correlation parameters (such as: θ hor) is used to calculate the reference semantic correlation between the pixel and the second associated pixel of the pixel (i.e., all the pixels on the column where the pixel is located). Similarly, the computer device can determine the target semantic correlation between the pixel and each pixel in the target image by performing vector outer product on the column vector composed of the reference semantic correlation between the pixel and the first associated pixel, and the row vector composed of the reference semantic correlation between the pixel and the second associated pixel. Then, after the computer device determines the target semantic correlation between the pixel and each pixel in the target image, the computer device can use the attention mechanism to determine the weight corresponding to the image feature of the corresponding pixel according to each target semantic correlation. Then, the computer device can also perform weighted averaging on the image features of each pixel in the target image to obtain the semantic expression features of the corresponding pixel, so that the computer device can use the features obtained after feature fusion of the semantic expression features and the image features as the second enhanced features of the pixel. Based on this method, the computer device can also determine the second enhanced features of each pixel.
[0104] (3) Computer equipment adoption Figure 5a The process of performing panoramic segmentation processing based on the first enhanced feature and the second enhanced feature by the panoramic segmentation model shown can be as follows:
[0105] After the computer device determines the first enhanced feature of each pixel, the computer device may use the mask branch in the instance segmentation network to predict the instance individual label of each pixel, and the computer device may use the classification branch in the instance segmentation network to predict the first instance category label of each pixel. Further, the computer device may generate an instance segmentation result based on the first instance category label and the instance individual label of each pixel. After the computer device determines the second enhanced feature of each pixel, the computer device may use the semantic branch in the semantic segmentation network to predict the second instance category label of each pixel, and generate a semantic segmentation result based on the second instance category label of each pixel. After the computer device obtains the instance segmentation result and the semantic segmentation result, the computer device may fuse the instance segmentation result and the semantic segmentation result to obtain a panoramic segmentation result of the target image, wherein the panoramic segmentation result may include at least two segmentation sub-graphs, which may be obtained by the computer device after segmenting the object contained in the target image based on the instance individual label of each pixel and the target instance category label determined from the first instance category label and the second instance category label.
[0106] In an embodiment of the present application, a computer device uses a deep convolutional neural network and a Fourier transform-based correlation function when implementing image processing. Specifically, an embodiment of the present application uses a deep convolutional neural network to extract the image features of each pixel in the multiple pixels contained in the target image, and further uses a Fourier transform-based correlation function to determine the semantic correlation between different pixels (the degree of correlation between instance categories to which different pixels belong) and instance correlation (the degree of correlation between instance individuals to which different pixels belong). Then, the computer device can use an instance segmentation network to stack the learned instance correlations for performing a first enhancement process on the image features of each pixel, thereby obtaining a first enhanced feature of each pixel, so as to provide a more suitable image feature for the instance segmentation task. Similarly, the computer device can also use a semantic segmentation network to aggregate the learned semantic correlations for performing a second enhancement process on the image features of each pixel, thereby obtaining a second enhanced feature of each pixel, so as to provide a more suitable feature for the semantic segmentation task. Then, it can be understood that when the computer device uses the first enhanced feature and the second enhanced feature of each pixel in the target image to perform panoramic segmentation processing (including instance segmentation processing and semantic segmentation processing) on the target image, the computer device can obtain an image segmentation result with higher accuracy.
[0107] Based on the above description of the embodiment of the image processing method, the embodiment of the present application further discloses an image processing device, which may be a computer program (including program code) running in the above-mentioned computer device. In a specific embodiment, the image processing device may be used to perform the following steps: Figure 2 or Figure 4 See the image processing method shown in Figure 6 The image processing device includes a sampling unit 601, a correlation calculation unit 602, a first feature enhancement unit 603, a second feature enhancement unit 604 and an image segmentation unit 605.
[0108] The sampling unit 601 is used to sample a plurality of pixels included in the target image to obtain at least one reference pixel;
[0109] A correlation calculation unit 602 is used to obtain a correlation vector of each pixel point according to the position information and image features of each pixel point in the multiple pixels and the position information of the at least one reference pixel point, wherein the correlation vector includes an instance correlation between an instance individual to which each pixel point belongs and an instance individual to which each reference pixel point belongs;
[0110] A first feature enhancement unit 603 is used to traverse the multiple pixel points and generate a first enhanced feature of the target pixel point according to the correlation vector of the multiple pixel points and the image feature of the currently traversed target pixel point;
[0111] A second feature enhancement unit 604 is used to generate a second enhanced feature of the target pixel according to the image features of the multiple pixels, the position information of the target pixel and the position information of the associated pixels of the target pixel; the associated pixels include a plurality of first associated pixels included in the row where the target pixel is located, and a plurality of second associated pixels included in the column where the target pixel is located, and the second enhanced feature is used to indicate the probability of a predicted instance category obtained by predicting the target pixel;
[0112] The image segmentation unit 605 is used to perform image segmentation processing on the target image according to the first enhancement feature and the second enhancement feature of each pixel point in the multiple pixels after the traversal is completed, so as to obtain an image segmentation result of the target image.
[0113] In one implementation, the correlation calculation unit 602 may be configured to perform:
[0114] Predicting an instance correlation parameter of any pixel point according to the position information and image features of any pixel point;
[0115] Obtaining an associated pixel point of any pixel point from the multiple pixel points, and using a correlation function to perform correlation calculation on an instance correlation parameter of any pixel point and position information of an associated pixel point of any pixel point, so as to obtain an instance correlation between any pixel point and each pixel point in the multiple pixel points, where one instance correlation corresponds to position information of one pixel point in the multiple pixel points;
[0116] From all instance correlations obtained for any pixel point, the instance correlation corresponding to the position information of each reference pixel point is determined respectively to generate a correlation vector for any pixel point.
[0117] In yet another embodiment, the first feature enhancement unit 603 may be configured to perform:
[0118] Performing image convolution processing on the correlation vectors of the multiple pixel points to obtain instance expression features of the target pixel point;
[0119] The instance expression feature of the target pixel point and the image feature of the target pixel point are subjected to feature fusion processing to obtain a first enhanced feature of the target pixel point.
[0120] In yet another embodiment, the second feature enhancement unit 604 may be configured to perform:
[0121] Generate a feature enhancement column vector according to the position information and image features of the target pixel and the position information of the plurality of first associated pixels; the feature enhancement column vector includes a reference semantic correlation between the target pixel and each first associated pixel;
[0122] Generate a feature enhancement row vector according to the position information and image features of the target pixel and the position information of the plurality of second associated pixel points, wherein the feature enhancement row vector includes a reference semantic correlation between the target pixel and each second associated pixel point;
[0123] Generate a semantic expression feature of the target pixel point according to the feature enhancement column vector, the feature enhancement row vector, and the image features of the plurality of pixels;
[0124] The semantic expression feature and the image feature of the target pixel are subjected to feature fusion processing to obtain a second enhanced feature of the target pixel.
[0125] In yet another embodiment, the second feature enhancement unit 604 may also be configured to perform:
[0126] Performing an outer product operation on the feature enhancement column vector and the feature enhancement row vector to obtain a feature enhancement matrix, wherein the feature enhancement matrix is used to indicate the target semantic relevance between the target pixel and each pixel in the multiple pixels;
[0127] A weighted average operation is performed based on the feature enhancement matrix and the image features of the multiple pixels to obtain the semantic expression features of the target pixel.
[0128] In yet another embodiment, the image segmentation unit 605 may be configured to perform:
[0129] According to the first enhanced feature of each pixel point in the multiple pixels, the target image is subjected to instance segmentation processing to obtain an instance segmentation result of the target image, wherein the instance segmentation result includes a first instance category label and an instance individual label corresponding to each pixel point;
[0130] Performing semantic segmentation processing on the target image according to the second enhanced feature of each pixel in the multiple pixels to obtain a semantic segmentation result of the target image, wherein the semantic segmentation result includes a second instance category label corresponding to each pixel;
[0131] The instance segmentation result and the semantic segmentation result are fused to obtain an image segmentation result of the target image, wherein the image segmentation result includes a target instance category label and an instance individual label for each pixel; the target instance category label is selected from the first instance category label and the second instance category label during the fusion process.
[0132] According to one embodiment of the present application, Figure 2 and Figure 4 The various steps shown in the method shown can be performed by Figure 6 The image processing apparatus shown in the figure is executed by each unit. For example, Figure 2 In the image processing method shown in FIG. 1 , step S201 may be performed by Figure 6 The sampling unit 601 in the image processing apparatus shown in FIG. 1 is used to perform step S202. Figure 6 The correlation calculation unit 602 in the image processing apparatus shown in FIG. 1 is used to perform step S203, and step S204 can be performed by Figure 6 The first feature enhancement unit 603 in the image processing apparatus shown in FIG. 1 is used to perform step S204. Figure 6 The second feature enhancement unit 604 in the image processing device shown in FIG. 1 is used to perform step S205. Figure 6 The image segmentation unit 605 in the image processing device shown in FIG. Figure 4 In the image processing method shown in FIG. 1 , step S401 may be performed by Figure 6 The sampling unit 601 in the image processing device shown in FIG. 1 is used to perform the above operation. Steps S402 to S404 can be performed by Figure 6 The correlation calculation unit 602 in the image processing apparatus shown in FIG. 1 is used to perform step S405. Figure 6 The first feature enhancement unit 603 in the image processing apparatus shown in FIG. 1 is used to perform step S406. Figure 6 The second feature enhancement unit 604 in the image processing device shown in FIG. 1 is used to perform step S407. Figure 6 The image processing device shown in the figure is used for execution by the image segmentation unit 605.
[0133] According to another embodiment of the present application, Figure 6The various units in the image processing device shown are divided based on logical functions, and the above-mentioned various units can be separately or completely combined into one or several other units to constitute, or one (some) of the units can be further divided into multiple functionally smaller units to constitute, which can achieve the same operation without affecting the realization of the technical effects of the embodiments of the present application. In other embodiments of the present application, the above-mentioned image processing device may also include other units, and in actual applications, these functions can also be implemented with the assistance of other units, and can be implemented with the assistance of multiple units.
[0134] According to another embodiment of the present application, a general computing device such as a domain name management device including a central processing unit (CPU), a random access storage medium (RAM), a read-only storage medium (ROM) and other processing elements and storage elements can be executed by running a program capable of executing the following steps: Figure 2 and Figure 4 A computer program (including program code) for each step of the method shown in FIG. Figure 6 The image processing apparatus shown in the figure is used to implement the image processing method of the embodiment of the present application. The computer program can be recorded on a computer storage medium, for example, and loaded into the above-mentioned computing device through the computer storage medium and run therein.
[0135] In an embodiment of the present application, the image processing device uses a deep convolutional neural network and a Fourier transform-based correlation function when implementing image processing. Specifically, the embodiment of the present application uses a deep convolutional neural network to extract the image features of each pixel in the multiple pixels contained in the target image, and further uses a Fourier transform-based correlation function to determine the semantic correlation between different pixels (the degree of correlation between the instance categories to which different pixels belong) and the instance correlation (the degree of correlation between the instance individuals to which different pixels belong). Then, the image processing device can use an instance segmentation network to stack the learned instance correlations, which is used to perform a first enhancement process on the image features of each pixel, and then obtain the first enhanced features of each pixel, so as to provide more suitable image features for the instance segmentation task. Similarly, the image processing device can also use a semantic segmentation network to aggregate the learned semantic correlations, which is used to perform a second enhancement process on the image features of each pixel, and then obtain the second enhanced features of each pixel, so as to provide more suitable features for the semantic segmentation task. Then, it can be understood that when the image processing device uses the first enhancement feature and the second enhancement feature of each pixel in the target image to perform panoramic segmentation processing (including instance segmentation processing and semantic segmentation processing) on the target image, the image processing device can obtain an image segmentation result with higher accuracy.
[0136] Based on the relevant description of the above method embodiment and the device embodiment, the present application embodiment also provides a computer device, see Figure 7 . The computer device at least includes a processor 701 and a computer storage medium 702, and the processor 701 and the computer storage medium 702 of the computer device can be connected via a bus or other means. Among them, the computer storage medium 702 mentioned above is a memory device in the computer device, which is used to store programs and data. It can be understood that the computer storage medium 702 here can include both the built-in storage medium in the computer device and the extended storage medium supported by the computer device. The computer storage medium 702 provides a storage space, which stores the operating system of the computer device. In addition, one or more computer programs suitable for being loaded and executed by the processor 701 are also stored in the storage space, and these computer programs can be one or more program codes. It should be noted that the computer storage medium here can be a high-speed RAM memory, or a non-volatile memory (non-volatile memory), such as at least one disk storage; optionally, it can also be at least one storage medium located away from the aforementioned processor. The processor 701 (or CPU (Central Processing Unit)) is the computing core and control core of the computer device, which is suitable for implementing one or more computer programs, and is specifically suitable for loading and executing one or more computer programs to implement corresponding method flows or corresponding functions.
[0137] In one implementation, the processor 701 may be configured to load and execute:
[0138] Predicting an instance correlation parameter of any pixel point according to the position information and image features of any pixel point;
[0139] Obtaining an associated pixel point of any pixel point from the multiple pixel points, and using a correlation function to perform correlation calculation on an instance correlation parameter of any pixel point and position information of an associated pixel point of any pixel point, so as to obtain an instance correlation between any pixel point and each pixel point in the multiple pixel points, where one instance correlation corresponds to position information of one pixel point in the multiple pixel points;
[0140] From all instance correlations obtained for any pixel point, the instance correlation corresponding to the position information of each reference pixel point is determined respectively to generate a correlation vector for any pixel point.
[0141] In yet another implementation, the processor 701 may be configured to load and execute:
[0142] Performing image convolution processing on the correlation vectors of the multiple pixel points to obtain instance expression features of the target pixel point;
[0143] The instance expression feature of the target pixel point and the image feature of the target pixel point are subjected to feature fusion processing to obtain a first enhanced feature of the target pixel point.
[0144] In yet another implementation, the processor 701 may be configured to load and execute:
[0145] Generate a feature enhancement column vector according to the position information and image features of the target pixel and the position information of the plurality of first associated pixels; the feature enhancement column vector includes a reference semantic correlation between the target pixel and each first associated pixel;
[0146] Generate a feature enhancement row vector according to the position information and image features of the target pixel and the position information of the plurality of second associated pixel points, wherein the feature enhancement row vector includes a reference semantic correlation between the target pixel and each second associated pixel point;
[0147] Generate a semantic expression feature of the target pixel point according to the feature enhancement column vector, the feature enhancement row vector, and the image features of the plurality of pixels;
[0148] The semantic expression feature and the image feature of the target pixel are subjected to feature fusion processing to obtain a second enhanced feature of the target pixel.
[0149] In yet another implementation, the processor 701 may be configured to load and execute:
[0150] Performing an outer product operation on the feature enhancement column vector and the feature enhancement row vector to obtain a feature enhancement matrix, wherein the feature enhancement matrix is used to indicate the target semantic relevance between the target pixel and each pixel in the multiple pixels;
[0151] A weighted average operation is performed based on the feature enhancement matrix and the image features of the multiple pixels to obtain the semantic expression features of the target pixel.
[0152] In yet another implementation, the processor 701 may be configured to load and execute:
[0153] According to the first enhanced feature of each pixel point in the multiple pixels, the target image is subjected to instance segmentation processing to obtain an instance segmentation result of the target image, wherein the instance segmentation result includes a first instance category label and an instance individual label corresponding to each pixel point;
[0154] Performing semantic segmentation processing on the target image according to the second enhanced feature of each pixel in the multiple pixels to obtain a semantic segmentation result of the target image, wherein the semantic segmentation result includes a second instance category label corresponding to each pixel;
[0155] The instance segmentation result and the semantic segmentation result are fused to obtain an image segmentation result of the target image, wherein the image segmentation result includes a target instance category label and an instance individual label for each pixel; the target instance category label is selected from the first instance category label and the second instance category label during the fusion process.
[0156] In an embodiment of the present application, a computer device uses a deep convolutional neural network and a Fourier transform-based correlation function when implementing image processing. Specifically, an embodiment of the present application uses a deep convolutional neural network to extract the image features of each pixel in the multiple pixels contained in the target image, and further uses a Fourier transform-based correlation function to determine the semantic correlation between different pixels (the degree of correlation between instance categories to which different pixels belong) and instance correlation (the degree of correlation between instance individuals to which different pixels belong). Then, the computer device can use an instance segmentation network to stack the learned instance correlations for performing a first enhancement process on the image features of each pixel, thereby obtaining a first enhanced feature of each pixel, so as to provide a more suitable image feature for the instance segmentation task. Similarly, the computer device can also use a semantic segmentation network to aggregate the learned semantic correlations for performing a second enhancement process on the image features of each pixel, thereby obtaining a second enhanced feature of each pixel, so as to provide a more suitable feature for the semantic segmentation task. Then, it can be understood that when the computer device uses the first enhanced feature and the second enhanced feature of each pixel in the target image to perform panoramic segmentation processing (including instance segmentation processing and semantic segmentation processing) on the target image, the computer device can obtain an image segmentation result with higher accuracy.
[0157] The present application also provides a computer storage medium, in which one or more computer programs corresponding to the above-mentioned image processing method are stored. When one or more processors load and execute the one or more computer programs, the description of the image processing method in the embodiment can be implemented, which will not be repeated here. The description of the beneficial effects of adopting the same method will not be repeated here. It is understood that the computer program can be deployed on one or more devices that can communicate with each other for execution.
[0158] It should be noted that according to one aspect of the present application, a computer program product or a computer program is also provided, the computer program product includes a computer program, and the computer program is stored in a computer storage medium. A processor in a computer device reads the computer program from the computer storage medium and then executes the computer program, thereby enabling the computer device to perform the above Figure 2 as well as Figure 4 The method provided in various optional manners of the image processing method embodiment shown.
[0159] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment method can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a computer storage medium. When the computer program is executed, it can include the processes of the above-mentioned embodiment of the image processing method. Among them, the computer storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.
[0160] It is understandable that what is disclosed above is only a partial embodiment of the present application, and it certainly cannot be used to limit the scope of rights of the present application. A person of ordinary skill in the art can understand that the entire or partial process of implementing the above-mentioned embodiment and the equivalent changes made according to the claims of the present application still fall within the scope of the invention.
Claims
1. An image processing method, characterized in that: include: Sampling a plurality of pixels contained in the target image to obtain at least one reference pixel; Obtaining a correlation vector for each pixel according to the position information and image features of each pixel in the plurality of pixels and the position information of the at least one reference pixel, wherein the correlation vector includes an instance correlation between an instance individual to which each pixel belongs and an instance individual to which each reference pixel belongs; Traversing the plurality of pixels, and generating a first enhanced feature of the target pixel according to a correlation vector of the plurality of pixels and an image feature of a currently traversed target pixel; Generate a second enhanced feature of the target pixel according to the image features of the plurality of pixels, the position information of the target pixel, and the position information of pixels associated with the target pixel; The associated pixels of the target pixel include a plurality of first associated pixels contained in a column where the target pixel is located, and a plurality of second associated pixels contained in a row where the target pixel is located, and the second enhanced feature is used to indicate a probability of a predicted instance category obtained by predicting the target pixel; After the traversal is completed, image segmentation processing is performed on the target image according to the first enhanced feature and the second enhanced feature of each pixel point in the multiple pixels to obtain an image segmentation result of the target image.
2. The method according to claim 1, characterized in that The methods for determining the correlation vector of any pixel point include: Predicting an instance correlation parameter of any pixel point according to the position information and image features of any pixel point; Obtaining an associated pixel point of any pixel point from the multiple pixel points, and using a correlation function to perform correlation calculation on an instance correlation parameter of any pixel point and position information of an associated pixel point of any pixel point, so as to obtain an instance correlation between any pixel point and each pixel point in the multiple pixel points, where one instance correlation corresponds to position information of one pixel point in the multiple pixel points; From all instance correlations obtained for any pixel point, the instance correlation corresponding to the position information of each reference pixel point is determined respectively to generate a correlation vector for any pixel point.
3. The method according to claim 2, characterized in that The step of generating a first enhanced feature of the target pixel point according to the correlation vector of the plurality of pixel points and the image feature of the currently traversed target pixel point comprises: Performing image convolution processing on the correlation vectors of the multiple pixel points to obtain instance expression features of the target pixel point; The instance expression feature of the target pixel point and the image feature of the target pixel point are subjected to feature fusion processing to obtain a first enhanced feature of the target pixel point.
4. The method according to claim 1, characterized in that: The step of generating a second enhanced feature of the target pixel according to the image features of the plurality of pixels, the position information of the target pixel, and the position information of the associated pixel comprises: Generate a feature enhancement column vector according to the position information and image features of the target pixel and the position information of the plurality of first associated pixels; the feature enhancement column vector includes a reference semantic correlation between the target pixel and each first associated pixel; Generate a feature enhancement row vector according to the position information and image features of the target pixel and the position information of the plurality of second associated pixel points, wherein the feature enhancement row vector includes a reference semantic correlation between the target pixel and each second associated pixel point; Generate a semantic expression feature of the target pixel point according to the feature enhancement column vector, the feature enhancement row vector, and the image features of the plurality of pixels; The semantic expression feature and the image feature of the target pixel are subjected to feature fusion processing to obtain a second enhanced feature of the target pixel.
5. The method according to claim 4, characterized in that The generating the semantic expression feature of the target pixel point according to the feature enhancement column vector, the feature enhancement row vector, and the image features of the plurality of pixels includes: Performing an outer product operation on the feature enhancement column vector and the feature enhancement row vector to obtain a feature enhancement matrix, wherein the feature enhancement matrix is used to indicate the target semantic relevance between the target pixel and each pixel in the multiple pixels; A weighted average operation is performed based on the feature enhancement matrix and the image features of the multiple pixels to obtain the semantic expression features of the target pixel.
6. The method according to claim 1, characterized in that The performing image segmentation processing on the target image according to the first enhancement feature and the second enhancement feature of each pixel point in the plurality of pixels to obtain an image segmentation result of the target image includes: According to the first enhanced feature of each pixel point in the multiple pixels, the target image is subjected to instance segmentation processing to obtain an instance segmentation result of the target image, wherein the instance segmentation result includes a first instance category label and an instance individual label corresponding to each pixel point; Performing semantic segmentation processing on the target image according to the second enhanced feature of each pixel in the multiple pixels to obtain a semantic segmentation result of the target image, wherein the semantic segmentation result includes a second instance category label corresponding to each pixel; The instance segmentation result and the semantic segmentation result are fused to obtain an image segmentation result of the target image, wherein the image segmentation result includes a target instance category label and an instance individual label for each pixel; the target instance category label is selected from the first instance category label and the second instance category label during the fusion process.
7. An image processing device, characterized in that: include: A sampling unit, used for sampling a plurality of pixel points included in the target image to obtain at least one reference pixel point; a correlation calculation unit, configured to obtain a correlation vector of each pixel point according to the position information and image features of each pixel point in the plurality of pixels and the position information of the at least one reference pixel point, wherein the correlation vector includes an instance correlation between an instance individual to which each pixel point belongs and an instance individual to which each reference pixel point belongs; A first feature enhancement unit, configured to traverse the plurality of pixels and generate a first enhanced feature of the target pixel according to a correlation vector of the plurality of pixels and an image feature of a currently traversed target pixel; A second feature enhancement unit, configured to generate a second enhanced feature of the target pixel according to the image features of the plurality of pixels, the position information of the target pixel, and the position information of pixels associated with the target pixel; The associated pixel points include a plurality of first associated pixel points included in the row where the target pixel point is located, and a plurality of second associated pixel points included in the column where the target pixel point is located, and the second enhanced feature is used to indicate the probability of a predicted instance category obtained by predicting the target pixel point; The image segmentation unit is used to perform image segmentation processing on the target image according to the first enhancement feature and the second enhancement feature of each pixel point in the multiple pixels after the traversal is completed, so as to obtain the image segmentation result of the target image.
8. A computer device, characterized in that: include: A processor configured to execute one or more computer programs; A computer storage medium storing one or more computer programs, wherein the one or more computer programs are suitable for being loaded by the processor and executing the image processing method according to any one of claims 1 to 6.
9. A computer storage medium, characterized in that The computer storage medium stores one or more computer programs, and the one or more computer programs are suitable for being loaded by a processor and executing the image processing method according to any one of claims 1 to 6.
10. A computer product, characterized in that: The computer product comprises a computer program, and the computer program is suitable for being loaded by a processor and executing the image processing method according to any one of claims 1 to 6.
