Image segmentation method and device
By combining feature extraction with relatively complex networks in image segmentation and relatively simplified networks for feature extraction, combined with semantic feature fusion technology, the problems of high computing overhead and operation time-consuming in image segmentation are solved, and efficient image segmentation is achieved.
Patent Information
- Application Number
- CN202210239600.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-11
- Publication Date
- 2025-04-29
- Estimated Expiration
- 2042-03-11
AI Technical Summary
In the prior art, image segmentation often results in very large computing overhead and operational time.
Feature extraction is performed by using a more complex network to obtain the first image features with rich semantics, and a relatively simplified network to extract the second image features to ensure the segmentation speed. Then, the first image semantic features and the second image semantic features extracted based on the first image feature are fused with the second image feature to obtain a relatively accurate mask.
While ensuring the segmentation speed, the accurate segmentation result can be obtained based on the obtained mask, solving the problems of computational overhead and operation time-consuming.
Smart Images

Figure CN114565768B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of image processing, and in particular to an image segmentation method and device. Background Art
[0002] Image segmentation technology is a very important computer vision task, which has many applications in image retrieval, image editing and film and television production. Interactive segmentation, as a specific segmentation method in the field of image segmentation, aims to distinguish objects of interest from backgrounds with minimal user input and inference time, and achieve the best segmentation accuracy. Due to the diversity of user input information (such as clicks, smears, bounding boxes, etc.), interactive segmentation provides users with great flexibility and can effectively adjust the current segmentation results according to user guidance.
[0003] Interactive segmentation can be specifically divided into two subtasks: feature extraction (Feature Encoding) of input images and user interaction (User Interaction) processing. At present, interactive segmentation usually strongly couples the two subtasks and combines feature extraction of input images and user interaction processing in an end-to-end manner to obtain the target mask. In this process, multiple iterations are required, that is, multiple repetitions of the entire network to obtain the segmentation result. However, in order to obtain better segmentation results, a more complex network is generally used for interactive segmentation, that is, a more complex network is used for feature extraction and user interaction processing, which will bring very large computational overhead and running time. Summary of the invention
[0004] The present disclosure provides an image segmentation method and device to at least solve the problem in the related art that image segmentation often leads to very large computational overhead and time-consuming operation.
[0005] According to a first aspect of an embodiment of the present disclosure, an image segmentation method is provided, the image segmentation method comprising: inputting an image to be processed into a first image feature extraction network to obtain a first image feature; based on the first image feature, extracting a first image semantic feature and a second image semantic feature, wherein the first image semantic feature and the second image semantic feature respectively contain information of an object to be segmented in the image to be processed and are different from each other; inputting the image to be processed and image segmentation information for the image to be processed into a second image feature extraction network to obtain a second image feature, wherein the amount of information of the image features extracted from the image by the second image feature extraction network is less than the amount of information of the image features extracted from the image by the first image feature extraction network, and the image segmentation information is used to indicate the position information of the object to be segmented in the image to be processed; based on the first image semantic feature, the second image semantic feature and the second image feature, obtaining a target mask for the object to be segmented; performing segmentation processing on the image to be processed based on the target mask to obtain an image segmentation result for the object to be segmented.
[0006] Optionally, the image segmentation information is obtained in the following manner: obtaining the user's instructions for this image segmentation, the interactive information of the object to be segmented in the image to be processed, and the target mask of the object to be segmented obtained in the last image segmentation; and using the interactive information and the target mask of the object to be segmented obtained in the last image segmentation as the image segmentation information for this image segmentation.
[0007] Optionally, the step of obtaining a target mask for the object to be segmented based on the first image semantic feature, the second image semantic feature and the second image feature includes: obtaining a similarity feature between the first image semantic feature and the second image semantic feature based on the first image semantic feature and the second image semantic feature; fusing the similarity feature with the second image feature to obtain a fused image feature; and obtaining the target mask based on the fused image feature.
[0008] Optionally, the step of fusing the similarity feature with the second image feature to obtain a fused image feature includes: fusing the similarity feature with the second image feature to obtain an initial fused image feature; splicing the initial fused image feature with the second image feature to obtain a spliced feature; and inputting the spliced feature into a residual network to obtain the fused image feature.
[0009] Optionally, based on the first image semantic feature and the second image semantic feature, the step of obtaining a similarity feature between the first image semantic feature and the second image semantic feature includes: performing regional marking on the first image semantic feature and the second image semantic feature respectively according to a region of interest preset for the image to be processed including the object to be segmented; and obtaining the similarity feature based on the similarity between the first image semantic feature and the second image semantic feature after region marking.
[0010] Optionally, the second image feature extraction network extracts multiple second image features based on the image to be processed and the image segmentation information, wherein the step of fusing the similarity feature with the second image feature to obtain the fused image feature includes: fusing the similarity feature with the second image feature with the smallest resolution among the multiple second image features to obtain the fused image feature, wherein based on the fused image feature, the step of obtaining the target mask includes: inputting the fused image feature and the second image features among the multiple second image features except the second image feature with the smallest resolution into the image mask extraction network to obtain the target mask for the object to be segmented.
[0011] Optionally, the second image feature extraction network and the image mask extraction network are trained in the following manner: obtaining a training sample image and image annotation information, wherein the training sample image includes one or more sample objects, and the image annotation information indicates the position of each sample object in the training sample image; dynamically cropping different parts of the training sample image according to a predetermined scale to crop a plurality of different cropped images from the training sample image; inputting the cropped image into the second image feature extraction network, and extracting cropped image features for the cropped image from the second image feature extraction network; inputting the cropped image features into the image mask extraction network, and extracting a cropped image mask for the cropped image from the image mask extraction network; and training the second image feature extraction network and the image mask extraction network based on the cropped image mask and the image annotation information.
[0012] Optionally, the interaction information includes forward interaction information and / or reverse interaction information, wherein the forward interaction information is used to indicate an area in the image to be processed where the object to be segmented is located, and the reverse interaction information is used to indicate an area outside the area in the image to be processed where the object to be segmented is located.
[0013] According to a second aspect of an embodiment of the present disclosure, an image segmentation device is provided, the image segmentation device comprising: a first image feature acquisition unit, configured to input an image to be processed into a first image feature extraction network to obtain a first image feature; an image semantic feature acquisition unit, configured to extract a first image semantic feature and a second image semantic feature based on the first image feature, wherein the first image semantic feature and the second image semantic feature respectively contain information of an object to be segmented in the image to be processed and are different from each other; a second image feature acquisition unit, configured to input the image to be processed and image segmentation information for the image to be processed into a second image feature extraction network to obtain a second image feature, wherein the amount of information of the image features extracted from the image by the second image feature extraction network is less than the amount of information of the image features extracted from the image by the first image feature extraction network, and the image segmentation information is used to indicate the position information of the object to be segmented in the image to be processed; a mask acquisition unit, configured to obtain a target mask for the object to be segmented based on the first image semantic feature, the second image semantic feature and the second image feature; a segmentation unit, configured to perform segmentation processing on the image to be processed based on the target mask to obtain an image segmentation result for the object to be segmented.
[0014] Optionally, the image segmentation information is obtained in the following manner: obtaining the user's instructions for this image segmentation, the interactive information of the object to be segmented in the image to be processed, and the target mask of the object to be segmented obtained in the last image segmentation; and using the interactive information and the target mask of the object to be segmented obtained in the last image segmentation as the image segmentation information for this image segmentation.
[0015] Optionally, the mask acquisition unit is further configured to: obtain a similarity feature between the first image semantic feature and the second image semantic feature based on the first image semantic feature and the second image semantic feature; fuse the similarity feature with the second image feature to obtain a fused image feature; and obtain the target mask based on the fused image feature.
[0016] Optionally, the mask acquisition unit is further configured to: fuse the similarity feature with the second image feature to obtain an initial fused image feature; splice the initial fused image feature with the second image feature to obtain a spliced feature; and input the spliced feature into a residual network to obtain the fused image feature.
[0017] Optionally, the mask acquisition unit is further configured to: perform region marking on the first image semantic feature and the second image semantic feature respectively according to a region of interest preset for the image to be processed including the object to be segmented; and obtain the similarity feature based on the similarity between the first image semantic feature and the second image semantic feature after region marking.
[0018] Optionally, the second image feature extraction network extracts multiple second image features based on the image to be processed and the image segmentation information, wherein the mask acquisition unit is further configured to: fuse the similarity feature with the second image feature with the smallest resolution among the multiple second image features to obtain a fused image feature; wherein the mask acquisition unit is further configured to: input the fused image feature and the second image features among the multiple second image features except the second image feature with the smallest resolution into the image mask extraction network to obtain a target mask for the object to be segmented.
[0019] Optionally, the image segmentation device also includes a training unit, which trains the second image feature extraction network and the image mask extraction network in the following manner: obtaining a training sample image and image annotation information, wherein the training sample image includes one or more sample objects, and the image annotation information indicates the position of each sample object in the training sample image; dynamically cropping different parts of the training sample image according to a predetermined scale to crop a plurality of different cropped images from the training sample image; inputting the cropped image into the second image feature extraction network, and extracting cropped image features for the cropped image from the second image feature extraction network; inputting the cropped image features into the image mask extraction network, and extracting a cropped image mask for the cropped image from the image mask extraction network; and training the second image feature extraction network and the image mask extraction network based on the cropped image mask and the image annotation information.
[0020] Optionally, the interaction information includes forward interaction information and / or reverse interaction information, wherein the forward interaction information is used to indicate an area of the object to be segmented in the image to be processed, and the reverse interaction information is used to indicate an area of the background where the object to be segmented is located in the image to be processed.
[0021] According to a third aspect of an embodiment of the present disclosure, an electronic device is provided, comprising: a processor; and a memory for storing instructions executable by the processor; wherein the processor is configured to execute the instructions to implement the image segmentation method as described in the present disclosure.
[0022] According to a fourth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided. When instructions in the computer-readable storage medium are executed by at least one processor, the at least one processor is prompted to execute the image segmentation method as described in the present disclosure.
[0023] According to a fifth aspect of an embodiment of the present disclosure, a computer program product is provided, comprising computer instructions, which, when executed by a processor, implement the image segmentation method as described in the present disclosure.
[0024] The technical solution provided by the embodiments of the present disclosure brings at least the following beneficial effects:
[0025] According to the image segmentation method and device disclosed in the present invention, a more complex network is used for feature extraction to obtain a first image feature with richer semantics, a relatively simplified network is used to extract a second image feature to ensure the segmentation speed, and then the first image semantic features extracted based on the first image features and the second image semantic features are fused with the second image features. A relatively accurate mask can be obtained based on the fusion result, so that an accurate segmentation result can be obtained based on the obtained mask while ensuring the segmentation speed.
[0026] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] The drawings herein are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the description are used to explain the principles of the present disclosure, and do not constitute improper limitations on the present disclosure.
[0028] Figure 1 is a schematic diagram showing an implementation scenario of an image segmentation method according to an exemplary embodiment of the present disclosure;
[0029] Figure 2 is a flow chart of an image segmentation method according to an exemplary embodiment;
[0030] Figure 3 is a flow chart of obtaining a target mask according to an image segmentation method shown in an exemplary embodiment;
[0031] Figure 4 is a schematic diagram of a network structure used in an image segmentation method according to an exemplary embodiment;
[0032] Figure 5 is a flowchart of training a second image feature extraction network and an image mask extraction network of an image segmentation method according to an exemplary embodiment;
[0033] FIG. 6A to FIG. 6Cis a schematic diagram of a segmentation result of an image segmentation method according to an exemplary embodiment;
[0034] Figure 7 is a block diagram of an image segmentation device according to an exemplary embodiment;
[0035] Figure 8 is a block diagram of an electronic device according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0036] In order to enable ordinary persons in the art to better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings.
[0037] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0038] It should be noted that the phrase "at least one of the items" in the present disclosure includes three types of parallel situations: "any one of the items", "a combination of any number of the items", and "all of the items". For example, "including at least one of A and B" includes the following three types of parallel situations: (1) including A; (2) including B; (3) including A and B. Another example is "executing at least one of step 1 and step 2" which means the following three types of parallel situations: (1) executing step 1; (2) executing step 2; (3) executing step 1 and step 2.
[0039] The present disclosure provides an image segmentation method, which can obtain accurate segmentation results based on the obtained mask while ensuring the segmentation speed. The following is an example of a scene of person segmentation in image segmentation.
[0040] Figure 1 is a schematic diagram showing an implementation scenario of an image segmentation method according to an exemplary embodiment of the present disclosure, such as Figure 1The implementation scenario includes a server 100, a user terminal 110 and a user terminal 120, wherein the user terminals are not limited to two, and include but are not limited to mobile phones, personal computers and other devices. The user terminal can be equipped with a camera for acquiring images. The server can be a single server, or a server cluster composed of several servers, or a cloud computing platform or a virtualization center.
[0041] The user terminal 110 or the user terminal 120 obtains an image containing a person through a camera, and uploads the image as an image to be processed to the server 100. The server 100 inputs the image to be processed into the first image feature extraction network to obtain the first image feature, and based on the first image feature, extracts the first image semantic feature and the second image semantic feature, wherein the first image semantic feature and the second image semantic feature respectively contain information of the object to be segmented in the image to be processed and are different from each other and symmetrical with respect to the object to be segmented in the image to be processed. In addition, the image to be processed and the image segmentation information for the image to be processed are input into the second image feature extraction network to obtain the second image feature, wherein the number of parameters in the second image feature extraction network is less than the number of parameters in the first image feature extraction network, and the interactive information is used to indicate the position information of the object to be segmented in the image to be processed. Then, based on the first image semantic feature, the second image semantic feature and the second image feature, a target mask for the object to be segmented is obtained, and the image to be processed can be segmented based on the target mask to obtain an image segmentation result for the object to be segmented.
[0042] Hereinafter, an image segmentation method and apparatus according to exemplary embodiments of the present disclosure will be described in detail with reference to the accompanying drawings.
[0043] Figure 2 is a flowchart of an image segmentation method according to an exemplary embodiment. Figure 2 As shown, the image segmentation method includes the following steps:
[0044] In step S201, the image to be processed is input into a first image feature extraction network to obtain a first image feature.
[0045] The above-mentioned first image feature extraction network can be implemented by an encoder in an image processing network with an encoder-decoder structure. For example, in this step, unlike the related art in which feature extraction and user interaction processing are treated as a whole and integrated into a weight-sharing network, this step uses an independent and more complex network to extract the semantic information of the image. For example, part of the structure of HRNet (such as the encoder) is used as a feature extraction network to extract low-resolution-semantic information-rich high-order features from the image to be processed.
[0046] In this step, the basic reason for using an independent and more complex network to extract the semantic information of the image is that, on the one hand, image semantic information is more difficult to extract than user interaction, so a large network is needed to model it; on the other hand, there is self-affinity information between pixel pairs, which is conducive to the long-distance propagation of sparse user interaction information. Therefore, the semantic features of the image are regarded as the inherent attributes of the image itself, which are independent of the interaction representation provided by the user.
[0047] For a better understanding, the following Figure 4 For detailed explanation, Figure 4 is a schematic diagram of a network structure used in an image segmentation method according to an exemplary embodiment. Figure 4 As shown in FIG, the network framework of the image segmentation method can be divided into two stages, Stage I: Feature Extraction and Stage II: Iterative Interactive Refinement.
[0048] Figure 4 The stage I shown in the figure is an optional feature extraction method of step S201, where i is the current interactive segmentation round, M i is the target mask for interactive segmentation in the i-th round, I RGB is the RGB information of the image to be processed, F a is the first image feature mentioned above. In the feature extraction stage, I RGB Input into a larger network, and extract better semantic features through the partial structure of the larger network (such as the encoder). For example, a partial structure of HRNet (such as the encoder) is used as a feature extraction network to extract the first image feature F from the image to be processed. a , the first image feature F a In subsequent image iterative processing, it can be used to extract the first image semantic feature and the second image semantic feature.
[0049] This embodiment uses an independent larger network to extract the semantic information of the image, which can extract general features of high-resolution semantic information and high-order features rich in low-resolution semantic information. In this embodiment, low-resolution-semantic information-rich high-order features are used as first image features, so that first image semantic features and second image semantic features can be extracted based on such first image features in subsequent processing, so that they can be reused in subsequent interactions to improve the accuracy of image segmentation.
[0050] In step S202, a first image semantic feature and a second image semantic feature are extracted based on the first image feature, wherein the first image semantic feature and the second image semantic feature respectively contain information of the object to be segmented in the image to be processed and are different from each other.
[0051] In this step, the first image semantic feature and the second image semantic feature may be features that are spatially symmetrical with respect to the object to be segmented in the image to be processed. For example, the first image features such as low-resolution-semantic information-rich high-order features extracted from the image to be processed may be respectively passed through two 3×3 convolutional layers, so that the first image features are mapped into symmetrical first image semantic features and second image semantic features for subsequent self-affinity matrix operations, which will be described in detail below.
[0052] For a better understanding, the following Figure 4 Take this as an example to explain in detail. Figure 4 As shown, the first image feature F a The first image semantic feature F can be obtained through two 3×3 convolutional layers a,1 and the second image semantic feature F a,2 , the first image semantic feature F a,1 and the second image semantic feature F a,2 It can be reused in subsequent user interaction processing, thereby improving the accuracy of image segmentation.
[0053] In step S203, the image to be processed and the image segmentation information for the image to be processed are input into a second image feature extraction network to obtain a second image feature, wherein the number of parameters in the second image feature extraction network is less than the number of parameters in the first image feature extraction network, and the image segmentation information is used to indicate the position of the object to be segmented in the image to be processed.
[0054] The second image feature extraction network can be implemented by an encoder in an image processing network with an encoder-decoder structure. For example, in this step, an independent and simple network can be used to extract the image to be processed based on image segmentation information. In this way, the calculation speed of the second image feature extraction network can be higher than that of the first image feature extraction network, and the calculation accuracy of the first image feature extraction network can be higher than that of the second image feature extraction network. It should be noted that the amount of information of the image features extracted from the image by the second image feature extraction network is less than the amount of information of the image features extracted from the image by the first image feature extraction network, which indicates that for the same image, the second image feature extraction network has a weak representation ability for the image, and the first image feature extraction network has a strong representation ability for the image. In general, the strength and weakness of the representation ability can be distinguished by the number of parameters in the network. If the number of parameters in the network is greater than the first preset value, it represents that the network has a strong representation ability to a certain extent. If the number of parameters in the network is less than the second preset value, it represents that the network has a weak representation ability to a certain extent. Applied to the present disclosure, that is, the number of parameters in the second image feature extraction network is less than the second preset value, and the number of parameters in the first image feature extraction network is greater than the second preset value. The first preset value and the second preset value can be defined as needed.
[0055] In an exemplary embodiment of the present disclosure, iterative interactive adjustment of image segmentation can be performed through a second image feature extraction network. In the iterative interactive adjustment of the image segmentation result, in order to enhance the stability of the iterative adjustment, the segmentation mask result of the previous round can be used as the input of the current round with reference to the RITM algorithm.
[0056] In this case, when the image to be processed and the image segmentation information for the image to be processed are first input into the second image feature extraction network, the image segmentation information may include a blank mask and information pre-specified for the image to be processed indicating the position of the object to be segmented in the image to be processed.
[0057] When it is not the first time that the image to be processed and the image segmentation information are input into the second image feature extraction network, the above-mentioned image segmentation information can be obtained in the following manner: obtaining the interactive information of the object to be segmented in the image to be processed indicated by the user for this image segmentation and the target mask of the object to be segmented obtained by the previous image segmentation; using the interactive information and the target mask of the object to be segmented obtained by the previous image segmentation as the image segmentation information for this image segmentation.
[0058] For example, the interaction information may include forward interaction information and / or reverse interaction information, wherein the forward interaction information is used to indicate the area where the object to be segmented is located in the image to be processed, and the reverse interaction information is used to indicate the area outside the area where the object to be segmented is located in the image to be processed.
[0059] Specifically, the second image feature output by the second image feature extraction network can be input into the image mask extraction network to obtain a target mask for the object to be segmented. For example, the image mask extraction network can be implemented by a decoder in an image processing network having an encoder-decoder structure, and the second image feature extraction network and the image mask extraction network can belong to the same image processing network, that is, both belong to a smaller network.
[0060] After the target mask is obtained after passing through the second image feature extraction network and the image mask extraction network once, an image segmentation result can be obtained based on the target mask. The user can evaluate the image segmentation result to evaluate whether the current image segmentation result meets the requirements. If it does, the image segmentation can be terminated and the current image segmentation result can be used as the final image segmentation result. If it does not meet the requirements, the user can input interactive information to indicate the correction of the current image segmentation result, and input the interactive information and the target mask obtained this time into the second image feature extraction network and the image mask extraction network again to re-segment the image and obtain a new image segmentation result. The user can perform the above interactive process multiple times until the image segmentation result meets the requirements.
[0061] Interaction information can be obtained by identifying user input information (such as clicks, smears, bounding boxes, etc.). Taking smearing as an example, assuming that the user smears the object to be segmented, the interaction information identified at this time is positive interaction information, that is, information indicating the area of the object to be segmented in the image to be processed. If the user smears the background of the object to be segmented, the interaction information identified at this time is reverse interaction information, that is, information indicating the area of the background where the object to be segmented is located in the image to be processed. For a better understanding, we still take Figure 4 The structural diagram is described in detail, such as Figure 4 Phase II shown: iterative interactive adjustment, where is the positive interaction information of the i-th round, The reverse interaction information of the i-th round, M i-1 is the target mask used for interactive segmentation in the previous interactive segmentation round i-1, F d is the second image feature. It should be noted that the M i-1 When i is 1, that is, the current interactive segmentation round is the first round, there is no previous interactive segmentation round, so M i-1 It can be set to 0 or other preset values, such as a blank mask, as long as it does not increase the amount of calculation.
[0062] In the iterative interactive adjustment phase, such as Figure 4As shown in the figure, in order to enhance the stability of iterative adjustment, according to the interactive information given by the current user, the lightweight network iteratively adjusts the current target mask to obtain a good segmentation result. Specifically, the target mask M of the previous interactive segmentation round i-1 is i-1 , positive interaction information input by the user and negative mutual information Input into the lightweight network, and obtain the second image feature F through the partial structure of the lightweight network (such as the encoder) d For each interactive segmentation, the first image semantic feature F in stage I a,1 and the second image semantic feature F a,2 will be reused and combined with the second image feature F in stage II d Feature fusion is performed to achieve a highly accurate segmentation effect. Specifically, the second image feature F d , the first image semantic feature F a,1 and the second image semantic feature F a,2 Fusion can be performed in the Adaptive Feature Fusion module to achieve the fusion of semantic features and interactive information.
[0063] In this embodiment, an independent smaller network (i.e., a lightweight network) is used to extract the semantic information of the image with interactive information, and the second image features carrying the interactive information are extracted from the interactive information and the image to be processed, and the interactive segmentation processing can be performed together with the first image semantic features and the second image semantic features extracted previously to ensure the speed of the interactive segmentation processing. The specific combination of the first image semantic features, the second image semantic features, and the second image features is discussed in detail in the following steps and will not be discussed here.
[0064] In step S204, a target mask for the object to be segmented is obtained based on the first image semantic feature, the second image semantic feature and the second image feature.
[0065] like Figure 3 As shown, the step of obtaining a target mask for the object to be segmented may include:
[0066] In step S301, based on the first image semantic feature and the second image semantic feature, a similarity feature between the first image semantic feature and the second image semantic feature is obtained.
[0067] Here, the first image semantic feature and the second image semantic feature can be region-marked according to the region of interest preset for the image to be processed including the object to be segmented, and then the similarity feature can be obtained based on the similarity between the first image semantic feature and the second image semantic feature after region marking.
[0068] by Figure 4 As an example of the exemplary embodiment shown in FIG. a,1 and the second image semantic feature F a,2 The crop region obtained by the dynamic-scale training strategy described below can be used to perform a region of interest alignment (ROI Align) operation to obtain the first image semantic features after region labeling. and the second image semantic feature Then, an autocorrelation operation is performed on the semantic features of the two images after the region marking to provide pixel-wise related information, and a self-affinity matrix is obtained as a similarity feature.
[0069] As an example, the autocorrelation operation is represented by the following expression:
[0070]
[0071]
[0072] Among them, C is the first image semantic feature after region marking and the second image semantic feature The result of matrix multiplication, T represents matrix transpose, A jk is a self-affine matrix, C jk is the first image semantic feature after region labeling and the second image semantic feature The element in the j-th row and k-th column of the result of the matrix multiplication of , where n ranges from 1 to N, and N is the total number of rows of C.
[0073] In step S302, the similarity feature is fused with the second image feature to obtain a fused image feature.
[0074] In this step, for example, the similarity feature can be first fused with the second image feature to obtain an initial fused image feature; however, the initial fused image feature can be spliced with the second image feature to obtain a spliced feature; finally, the spliced feature is input into the residual network to obtain a fused image feature.
[0075] by Figure 4 Taking the exemplary embodiment shown in FIG. 1 as an example, the similarity feature obtained in step S301 can be compared with the second image feature F d Through matrix multiplication, the fusion is performed. Before fusion, the second image feature F dThe convolutional layer is used to match the dimension of the similarity feature. For example, when the first image feature is obtained by two 3×3 convolutional layers to obtain the first image semantic feature and the second image semantic feature, the second image feature F d It can also be passed through a 3×3 convolutional layer, and the first image semantic feature F a,1 and the second image semantic feature F a,2 And the first image semantic features after region labeling and the second image semantic feature The dimension is the same as that of the first image semantic feature and the second image semantic feature The obtained similarity features are matrix multiplied to obtain the initial fused image features.
[0076] The initial fused image features can be further combined with the second image features F d Concatenation: The concatenated features can be input into the residual network to obtain fused image features. According to this embodiment, the initial fused image features and the second image features can be conveniently and quickly fused through the concatenation operation and the residual network. It should be noted that the above-mentioned residual network can adopt ResBlock, which can design networks of different structures and different complexities, as long as it can help fuse the two features, and this disclosure is not limited to this.
[0077] In step S303, a target mask is obtained based on the fused image features.
[0078] As described above, the second image feature extraction network can extract the second image feature based on the image to be processed and the image segmentation information. Here, the second image feature can be multiple (such as Figure 4 The second image feature F shown d 、F d1 and F d2 ), according to an exemplary embodiment of the present disclosure, in the above step S302, the similarity feature can be fused with the second image feature with the smallest resolution among multiple second image features to obtain a fused image feature.
[0079] In this case, in step S303, the fused image feature and the second image features except the second image feature with the smallest resolution among the plurality of second image features may be input into the image mask extraction network to obtain a target mask for the object to be segmented.
[0080] For a better understanding, Figure 4 The structural diagram of the adaptive feature fusion module ( Figure 4 In the autocorrelation fusion module shown in FIG, the first image semantic feature F a,1and the second image semantic feature F a,2 The first image semantic features marked by the region of interest can be obtained through the ROI Align operation and the second image semantic feature Then, the semantic features of the first image after labeling are and the second image semantic feature Multiply them together to get the similarity feature, and then add the similarity feature to the second image feature F after one convolution layer. d By multiplying and fusion, the initial fused image features are obtained, and then the initial fused image features are combined with the second image features F d The images are spliced and fused, and the dimensionality is reduced through the residual network (ResBlock) to obtain the final fused image features. After the fused image features are obtained, they are input into the network behind the encoder of the lightweight network to obtain the target mask, which is used to segment the image to be processed.
[0081] In this embodiment, the similarity feature obtained based on the first image feature obtained by the first image feature extraction network can be fused with the second image feature with the smallest resolution extracted by the second image feature extraction network to supplement and correct the semantic information of the second image feature, thereby improving the accuracy of the semantic information of the second image feature. Even when a simpler second image feature extraction network is used to obtain the target mask in order to increase the calculation speed, the accuracy of image segmentation can be improved by fusing the first image feature.
[0082] Return to reference Figure 2 In step S205, the image to be processed is segmented based on the target mask to obtain an image segmentation result for the object to be segmented.
[0083] In this step, for example, the target mask and the image to be processed may be multiplied to obtain a first segmentation result.
[0084] The above describes an image segmentation method according to an exemplary embodiment of the present disclosure, wherein a relatively complex network is used for feature extraction to obtain a first image feature with richer semantics, a relatively simplified network is used to extract a second image feature to ensure segmentation speed, and then the first image semantic feature extracted based on the first image feature and the second image semantic feature are fused with the second image feature, and a relatively accurate mask can be obtained based on the fusion result, so that an accurate segmentation result can be obtained based on the obtained mask while ensuring the segmentation speed. Therefore, the present disclosure solves the problem in the related art that interactive segmentation often leads to very large computational overhead and time-consuming operation.
[0085] The dynamic scale training strategy mentioned in step S301 is described in detail below. Specifically, Figure 5 As shown, according to an exemplary embodiment of the present disclosure, the second image feature extraction network and the image mask extraction network can be trained in the following manner:
[0086] In step S601, a training sample image and image annotation information are obtained.
[0087] In this step, the training sample image may include one or more sample objects, and the image annotation information may indicate the position of each sample object in the training sample image. Here, the sample object may be any part of the training sample image.
[0088] In step S602, different parts of the training sample image are dynamically cropped according to a predetermined scale to crop a plurality of different cropped images from the training sample image.
[0089] The predetermined scale can be determined according to the scale of the first image semantic feature and the second image semantic feature after being marked, for example, the scale of the cropped image input to the second image feature extraction network is the same as the scale of the first image semantic feature and the second image semantic feature after being marked. Here, the predetermined scale can be the crop area size in the ROI Align operation.
[0090] In step S603, the cropped image is input into the second image feature extraction network, and cropped image features for the cropped image are extracted from the second image feature extraction network.
[0091] In step S604, the cropped image features are input into the image mask extraction network, and a cropped image mask for the cropped image is extracted from the image mask extraction network.
[0092] In step S605, a second image feature extraction network and an image mask extraction network are trained based on the cropped image mask and the image annotation information.
[0093] In this step, the training sample image can be segmented based on the cropped image mask, and then the image segmentation result is compared with the image annotation information, so as to adjust the parameters of the second image feature extraction network and the image mask extraction network according to the comparison result, thereby realizing the training of the second image feature extraction network and the image mask extraction network.
[0094] In the related art, the Zoom-In strategy can be used to train the second image feature extraction network and the image mask extraction network. However, since the mapping size of the ROI Align operation in training is mostly fixed, and the dynamic size adopted by the Zoom-In strategy in the test phase is different, the size mismatch between the training phase and the test phase is caused. Therefore, the present disclosure proposes the above-mentioned dynamic scale training strategy. This strategy randomly crops the input training sample image according to a predefined scale (for example, aspect ratio and area ratio), so that the ROI Align mapping size changes dynamically during the training process, so that it can adapt to objects to be segmented of any scale in the test phase.
[0095] In the above embodiment, in the feature extraction stage, the input image is used to extract low-resolution semantic information-rich high-order features, which are reused in subsequent user interactions. In the iterative interaction adjustment stage, according to the interaction information given by the current user, the lightweight network iteratively adjusts the current segmentation mask to obtain a good segmentation result. For each interaction, the features in stage I are reused, and semantic features are fused through the autocorrelation fusion module in stage II to achieve better segmentation performance.
[0096] According to the lightweight interactive segmentation method based on the autocorrelation fusion module proposed in the exemplary embodiment of the present disclosure, only a single feature extraction operation can be performed on each image to be processed, and a lightweight processing network is used in the interactive stage to achieve real-time interaction. This method can not only improve the efficiency of image segmentation, but also significantly improve the segmentation accuracy when compared with various existing interactive segmentation methods, and has demonstrated the best performance on multiple benchmark data sets.
[0097] The following will combine Table 1 and FIG. 6A to FIG. 6C The segmentation performance of the image segmentation method according to the exemplary embodiment of the present disclosure is described.
[0098] Table 1 shows the comparison results of the image segmentation method according to the present invention with the existing interactive segmentation methods on GrabCut, Berkeley, DAVIS and SBD datasets. As shown in Table 1 below, the image segmentation method according to the present invention outperforms the optimal RITM model in the existing interactive segmentation methods in almost all quantitative results under different precisions (NoC). In addition, when the number of parameters is similar or even less, the image segmentation method according to the present invention can provide results that match or even better than the SOTA method.
[0099] Table 1
[0100]
[0101] FIG. 6A to FIG. 6CThe comparison between the segmentation results of the image segmentation method according to the exemplary embodiment of the present disclosure and the existing image segmentation method is shown. Fig. 6A , Figure 6B and Figure 6C For different input images shown in the figure, when the mask types are the same (i.e., all are GT masks), the image segmentation method according to the present invention has a higher intersection-over-union (IoU) ratio characterizing the accuracy of the image segmentation results in the results of 1 interaction, 3 interactions, 5 interactions, and 10 interactions than the existing image segmentation method based on the RITM model.
[0102] Figure 7 is a block diagram of an image segmentation device according to an exemplary embodiment. Figure 8 , the device comprises:
[0103] The first image feature acquisition unit 81 is configured to input the image to be processed into the first image feature extraction network to obtain the first image feature; the image semantic feature acquisition unit 82 is configured to extract the first image semantic feature and the second image semantic feature based on the first image feature, wherein the first image semantic feature and the second image semantic feature respectively contain information of the object to be segmented in the image to be processed and are different from each other; the second image feature acquisition unit 83 is configured to input the image to be processed and the image segmentation information for the image to be processed into the second image feature extraction network to obtain the second image feature, wherein the number of parameters in the second image feature extraction network is less than the number of parameters in the first image feature extraction network, and the image segmentation information is used to indicate the position information of the object to be segmented in the image to be processed; the mask acquisition unit 84 is configured to obtain the target mask for the object to be segmented based on the first image semantic feature, the second image semantic feature and the second image feature; the segmentation unit 85 is configured to perform segmentation processing on the image to be processed based on the target mask to obtain the image segmentation result for the object to be segmented.
[0104] According to an exemplary embodiment of the present disclosure, image segmentation information is obtained in the following manner: obtaining the user's interactive information on the image segmentation result of this image segmentation; using the target mask for the object to be segmented in this image segmentation and the interactive information for this image segmentation as the interactive information for the next image segmentation.
[0105] According to an exemplary embodiment of the present disclosure, the mask acquisition unit 84 is also configured to: obtain a similarity feature between the first image semantic feature and the second image semantic feature based on the first image semantic feature and the second image semantic feature; fuse the similarity feature with the second image feature to obtain a fused image feature; and obtain a target mask based on the fused image feature.
[0106] According to an exemplary embodiment of the present disclosure, the mask acquisition unit 84 is also configured to: fuse the similarity feature with the second image feature to obtain an initial fused image feature; splice the initial fused image feature with the second image feature to obtain a spliced feature; and input the spliced feature into the residual network to obtain a fused image feature.
[0107] According to an exemplary embodiment of the present disclosure, the mask acquisition unit 84 is also configured to: perform region marking on the first image semantic features and the second image semantic features respectively according to a region of interest preset for the image to be processed including the object to be segmented; and obtain a similarity feature based on the similarity between the first image semantic features and the second image semantic features after region marking.
[0108] According to an exemplary embodiment of the present disclosure, the second image feature extraction network extracts multiple second image features based on the image to be processed and the image segmentation information, wherein the mask acquisition unit 84 is further configured to: fuse the similarity feature with the second image feature with the smallest resolution among the multiple second image features to obtain a fused image feature; wherein the mask acquisition unit 84 is further configured to: input the fused image feature and the second image features among the multiple second image features except the second image feature with the smallest resolution into the image mask extraction network to obtain a target mask for the object to be segmented.
[0109] According to an exemplary embodiment of the present disclosure, the image segmentation device also includes a training unit, which trains the second image feature extraction network and the image mask extraction network in the following manner: obtaining a training sample image and image annotation information, wherein the training sample image includes one or more sample objects, and the image annotation information indicates the position of each sample object in the training sample image; dynamically cropping different parts of the training sample image according to a predetermined scale to crop a plurality of different cropped images from the training sample image; inputting the cropped image into the second image feature extraction network, and extracting cropped image features for the cropped image from the second image feature extraction network; inputting the cropped image features into the image mask extraction network, and extracting a cropped image mask for the cropped image from the image mask extraction network; and training the second image feature extraction network and the image mask extraction network based on the cropped image mask and the image annotation information.
[0110] According to an exemplary embodiment of the present disclosure, the interaction information includes forward interaction information and / or reverse interaction information, wherein the forward interaction information is used to indicate an area in the image to be processed where the object to be segmented is located, and the reverse interaction information is used to indicate an area outside the area in the image to be processed where the object to be segmented is located.
[0111] According to an embodiment of the present disclosure, an electronic device may be provided. Figure 8It is a block diagram of an electronic device 900 according to an embodiment of the present disclosure, and the electronic device includes at least one memory 901 and at least one processor 902, wherein a set of computer executable instructions is stored in the at least one memory, and when the computer executable instruction set is executed by the at least one processor, an image segmentation method according to an embodiment of the present disclosure is executed.
[0112] As an example, the electronic device 900 may be a PC, a tablet device, a personal digital assistant, a smart phone, or other device capable of executing the above-mentioned instruction set. Here, the electronic device 900 is not necessarily a single electronic device, but may also be any device or circuit capable of executing the above-mentioned instructions (or instruction sets) individually or in combination. The electronic device 900 may also be part of an integrated control system or system manager, or may be configured as a portable electronic device interconnected with a local or remote (e.g., via wireless transmission) interface.
[0113] In the electronic device 900, the processor 902 may include a central processing unit (CPU), a graphics processing unit (GPU), a programmable logic device, a dedicated processor system, a microcontroller or a microprocessor. As an example and not limitation, the processor 502 may also include an analog processor, a digital processor, a microprocessor, a multi-core processor, a processor array, a network processor, etc.
[0114] The processor 902 may execute instructions or codes stored in the memory, wherein the memory 901 may also store data. Instructions and data may also be sent and received over a network via a network interface device, wherein the network interface device may employ any known transmission protocol.
[0115] The memory 901 may be integrated with the processor 902, for example, by placing RAM or flash memory within an integrated circuit microprocessor or the like. In addition, the memory 901 may include a separate device, such as an external disk drive, a storage array, or any other storage device that can be used by a database system. The memory 901 and the processor 902 may be operationally coupled, or may communicate with each other, such as through an I / O port, a network connection, etc., so that the processor 902 can read files stored in the memory 501.
[0116] In addition, the electronic device 900 may further include a video display (such as a liquid crystal display) and a user interaction interface (such as a keyboard, a mouse, a touch input device, etc.) All components of the electronic device may be connected to each other via a bus and / or a network.
[0117] According to an embodiment of the present disclosure, a computer-readable storage medium may also be provided, wherein when the instructions in the computer-readable storage medium are executed by at least one processor, the at least one processor is prompted to perform the image segmentation method of the embodiment of the present disclosure. Examples of computer-readable storage media here include: read-only memory (ROM), random access programmable read-only memory (PROM), electrically erasable programmable read-only memory (EEPROM), random access memory (RAM), dynamic random access memory (DRAM), static random access memory (SRAM), flash memory, non-volatile memory, CD-ROM, CD-R, CD+R, CD-RW, CD+RW, DVD-ROM, DVD-R, DVD+R, DVD-RW, DVD+RW, DVD-RAM, BD-ROM, BD-R, BD-R LTH, BD-RE, Blu-ray or optical disk storage, hard disk drive (HDD), solid state drive (SSD), card storage (such as, multimedia card, secure digital (SD) card or extreme digital (XD) card), magnetic tape, floppy disk, magneto-optical data storage device, optical data storage device, hard disk, solid state disk and any other device, any other device is configured to store computer programs and any associated data, data files and data structures in a non-transitory manner and provide the computer programs and any associated data, data files and data structures to a processor or computer so that the processor or computer can execute the computer program. The computer program in the above-mentioned computer-readable storage medium can be run in an environment deployed in a computer device such as a client, a host, an agent device, a server, etc. In addition, in one example, the computer program and any associated data, data files and data structures are distributed on a networked computer system, so that the computer program and any associated data, data files and data structures are stored, accessed and executed in a distributed manner by one or more processors or computers.
[0118] According to an embodiment of the present disclosure, a computer program product is provided, including computer instructions, and when the computer instructions are executed by a processor, the image segmentation method of the embodiment of the present disclosure is implemented.
[0119] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. The present disclosure is intended to cover any variations, uses or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are to be considered exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.
[0120] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. An image segmentation method, characterized in that: The image segmentation method comprises: Inputting the image to be processed into a first image feature extraction network to obtain a first image feature; Based on the first image feature, extracting a first image semantic feature and a second image semantic feature, wherein the first image semantic feature and the second image semantic feature respectively contain information of the object to be segmented in the image to be processed and are different from each other; Inputting the image to be processed and image segmentation information for the image to be processed into a second image feature extraction network to obtain a second image feature, wherein the amount of information of the image feature extracted from the image by the second image feature extraction network is less than the amount of information of the image feature extracted from the image by the first image feature extraction network, and the image segmentation information is used to indicate the position information of the object to be segmented in the image to be processed; Obtaining a target mask for the object to be segmented based on the first image semantic feature, the second image semantic feature, and the second image feature; The image to be processed is segmented based on the target mask to obtain an image segmentation result for the object to be segmented. The step of obtaining a target mask for the object to be segmented based on the first image semantic feature, the second image semantic feature and the second image feature comprises: Based on the first image semantic feature and the second image semantic feature, obtaining a similarity feature between the first image semantic feature and the second image semantic feature; fusing the similarity feature with the second image feature to obtain a fused image feature; Based on the fused image features, the target mask is obtained.
2. The image segmentation method according to claim 1, characterized in that: The image segmentation information is obtained by: Obtaining the interactive information of the object to be segmented in the image to be processed indicated by the user for the current image segmentation and the target mask of the object to be segmented obtained by the previous image segmentation; The interactive information and the target mask of the object to be segmented obtained in the previous image segmentation are used as image segmentation information for this image segmentation.
3. The image segmentation method according to claim 1, characterized in that: The step of fusing the similarity feature with the second image feature to obtain a fused image feature comprises: fusing the similarity feature with the second image feature to obtain an initial fused image feature; Splicing the initial fused image feature with the second image feature to obtain a spliced feature; The spliced features are input into the residual network to obtain the fused image features.
4. The image segmentation method according to claim 1, characterized in that: The step of obtaining a similarity feature between the first image semantic feature and the second image semantic feature based on the first image semantic feature and the second image semantic feature comprises: According to a region of interest preset for the image to be processed and including the object to be segmented, respectively marking the first image semantic feature and the second image semantic feature; The similarity feature is obtained based on the similarity between the first image semantic feature and the second image semantic feature after region labeling.
5. The image segmentation method according to claim 1, characterized in that: The second image feature extraction network extracts a plurality of second image features based on the image to be processed and the image segmentation information. The step of fusing the similarity feature with the second image feature to obtain a fused image feature comprises: The similarity feature is fused with the second image feature with the smallest resolution among the plurality of second image features to obtain a fused image feature, Wherein, the step of obtaining the target mask based on the fused image features comprises: The fused image feature and the second image features among the plurality of second image features except the second image feature with the smallest resolution are input into an image mask extraction network to obtain a target mask for the object to be segmented.
6. The image segmentation method according to claim 5, characterized in that: The second image feature extraction network and the image mask extraction network are trained in the following manner: Acquire a training sample image and image annotation information, wherein the training sample image includes one or more sample objects, and the image annotation information indicates the position of each sample object in the training sample image; Dynamically cropping different parts of the training sample image according to a predetermined scale to crop a plurality of different cropped images from the training sample image; Inputting the cropped image into the second image feature extraction network, and extracting cropped image features for the cropped image from the second image feature extraction network; Inputting the cropped image features into the image mask extraction network, and extracting a cropped image mask for the cropped image from the image mask extraction network; Based on the cropped image mask and the image annotation information, the second image feature extraction network and the image mask extraction network are trained.
7. The image segmentation method according to claim 2, characterized in that: The interaction information includes forward interaction information and / or reverse interaction information, wherein the forward interaction information is used to indicate an area in the image to be processed where the object to be segmented is located, and the reverse interaction information is used to indicate an area outside the area in the image to be processed where the object to be segmented is located.
8. An image segmentation device, characterized in that: The image segmentation device comprises: A first image feature acquisition unit is configured to input the image to be processed into a first image feature extraction network to obtain a first image feature; An image semantic feature acquisition unit is configured to extract a first image semantic feature and a second image semantic feature based on the first image feature, wherein the first image semantic feature and the second image semantic feature respectively contain information of the object to be segmented in the image to be processed and are different from each other; A second image feature acquisition unit is configured to input the image to be processed and the image segmentation information for the image to be processed into a second image feature extraction network to obtain a second image feature, wherein the amount of information of the image feature extracted from the image by the second image feature extraction network is less than the amount of information of the image feature extracted from the image by the first image feature extraction network, and the image segmentation information is used to indicate the position information of the object to be segmented in the image to be processed; a mask acquisition unit, configured to obtain a target mask for the object to be segmented based on the first image semantic feature, the second image semantic feature and the second image feature; a segmentation unit, configured to perform segmentation processing on the image to be processed based on the target mask to obtain an image segmentation result for the object to be segmented, Wherein, the mask acquisition unit is further configured to: Based on the first image semantic feature and the second image semantic feature, obtaining a similarity feature between the first image semantic feature and the second image semantic feature; fusing the similarity feature with the second image feature to obtain a fused image feature; Based on the fused image features, the target mask is obtained.
9. The image segmentation device according to claim 8, characterized in that: The image segmentation information is obtained by: Obtaining the interactive information of the object to be segmented in the image to be processed indicated by the user for the current image segmentation and the target mask of the object to be segmented obtained by the previous image segmentation; The interactive information and the target mask of the object to be segmented obtained in the previous image segmentation are used as image segmentation information for this image segmentation.
10. The image segmentation device according to claim 8, characterized in that: The mask acquisition unit is further configured to: fusing the similarity feature with the second image feature to obtain an initial fused image feature; Splicing the initial fused image feature with the second image feature to obtain a spliced feature; The spliced features are input into the residual network to obtain the fused image features.
11. The image segmentation device according to claim 8, characterized in that: The mask acquisition unit is further configured to: According to a region of interest preset for the image to be processed and including the object to be segmented, respectively marking the first image semantic feature and the second image semantic feature; The similarity feature is obtained based on the similarity between the first image semantic feature and the second image semantic feature after region labeling.
12. The image segmentation device according to claim 8, characterized in that: The second image feature extraction network extracts a plurality of second image features based on the image to be processed and the image segmentation information. Wherein, the mask acquisition unit is further configured to: fuse the similarity feature with the second image feature with the smallest resolution among the plurality of second image features to obtain a fused image feature; The mask acquisition unit is further configured to: input the fused image feature and the second image features among the multiple second image features except the second image feature with the smallest resolution into an image mask extraction network to obtain a target mask for the object to be segmented.
13. The image segmentation device according to claim 12, characterized in that: The image segmentation device further includes a training unit, and the training unit trains the second image feature extraction network and the image mask extraction network in the following manner: Acquire a training sample image and image annotation information, wherein the training sample image includes one or more sample objects, and the image annotation information indicates the position of each sample object in the training sample image; Dynamically cropping different parts of the training sample image according to a predetermined scale to crop a plurality of different cropped images from the training sample image; Inputting the cropped image into the second image feature extraction network, and extracting cropped image features for the cropped image from the second image feature extraction network; Inputting the cropped image features into the image mask extraction network, and extracting a cropped image mask for the cropped image from the image mask extraction network; Based on the cropped image mask and the image annotation information, the second image feature extraction network and the image mask extraction network are trained.
14. The image segmentation device according to claim 9, characterized in that: The interaction information includes forward interaction information and / or reverse interaction information, wherein the forward interaction information is used to indicate an area in the image to be processed where the object to be segmented is located, and the reverse interaction information is used to indicate an area outside the area in the image to be processed where the object to be segmented is located.
15. An electronic device, characterized in that: include: processor; a memory for storing instructions executable by the processor; The processor is configured to execute the instructions to implement the image segmentation method according to any one of claims 1 to 7.
16. A computer-readable storage medium, characterized in that: When the instructions in the computer-readable storage medium are executed by at least one processor, the at least one processor is prompted to perform the image segmentation method according to any one of claims 1 to 7.
17. A computer program product comprising computer instructions, characterized in that When the computer instructions are executed by a processor, the image segmentation method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Semantic segmentation network training method, image semantic segmentation method and devices
CN108537292A
Image semantic segmentation network training method, device and equipment and storage medium
CN109978893A