Image segmentation and model training method, device, medium and electronic equipment

Through the combination of multi-scale downsampling and upsampling attention mechanisms, more accurate feature maps are generated for image segmentation, which solves the problem of inaccurate segmentation in the prior art and improves the accuracy of image segmentation.

CN111080655BActive Publication Date: 2024-11-01TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN201911226263.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-12-04
Publication Date
2024-11-01
Estimated Expiration
2039-12-27

AI Technical Summary

Technical Problem

The existing image segmentation method is prone to inaccurate segmentation problems when the differences in processing features are not obvious, and the features in the original image cannot be effectively retained.

Method used

By performing multi-scale downsampling of the image to be segmented, multiple initial feature maps are generated, and derivative feature maps are generated through upsampling attention mechanism based on the initial feature maps of two adjacent feature levels, fusing the initial features in the lowest feature level Graphs and derivative feature maps generate more accurate feature maps for segmentation processing.

Benefits of technology

The accuracy of image segmentation is improved, and the semantic information of the image to be segmented can be extracted more effectively, ensuring the accuracy of the segmentation result.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111080655B_ABST
    Figure CN111080655B_ABST
Patent Text Reader

Abstract

The embodiments of the present application provide an image segmentation and model training method, device, medium and electronic device. The image segmentation method includes: performing multi-scale downsampling processing on the image to be segmented to obtain the initial feature map corresponding to each feature level, and based on the initial feature maps of two adjacent feature levels, sequentially generating the derivative feature map of the lower feature level of the two feature levels through the upsampling attention mechanism, and finally fusing the initial feature map and the derivative feature map of the lowest feature level in the feature level to obtain the feature map of the image to be segmented, and processing the feature maps of the two adjacent feature levels based on the upsampling attention mechanism to obtain the feature maps of each feature level, fusing the features in multiple feature levels, and thus being able to more effectively extract the semantic information of the image to be segmented, ensuring that a more accurate feature map of the image to be segmented is obtained, which is conducive to improving the accuracy of image segmentation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer and communication technology, and in particular to an image segmentation and model training method, device, medium and electronic device. Background Art

[0002] Image segmentation is a technique and process to divide an image into several specific regions with unique properties and propose objects of interest. Existing image segmentation methods are generally based on threshold segmentation methods, region-based segmentation methods, etc. These methods often fail to retain the features of the original image during processing, especially when the features in the original image are not clearly distinguishable from the features of other regions, it is easy to cause inaccurate image segmentation. Summary of the invention

[0003] The embodiments of the present application provide a method, device, medium and electronic device for image segmentation and its model training, which can effectively extract the semantic information of the image to be segmented, at least to a certain extent, and improve the accuracy of image segmentation.

[0004] Other features and advantages of the present application will become apparent from the following detailed description, or may be learned in part by the practice of the present application.

[0005] According to one aspect of an embodiment of the present application, an image segmentation method is provided, including: performing multi-scale downsampling processing on an image to be segmented to obtain multiple initial feature maps, each initial feature map corresponding to a feature level; based on the initial feature maps of two adjacent feature levels, sequentially generating derivative feature maps of the lower feature level of the two feature levels through an upsampling attention mechanism; fusing the initial feature map and the derivative feature map in the lowest feature level of all feature levels to obtain a feature map of the image to be segmented; and performing segmentation processing on the image to be segmented according to the feature map of the image to be segmented.

[0006] According to one aspect of an embodiment of the present application, an image segmentation device is provided, comprising: a first sampling unit, used to perform multi-scale downsampling processing on an image to be segmented to obtain multiple initial feature maps, each initial feature map corresponding to a feature level; a second sampling unit, used to generate, based on the initial feature maps of two adjacent feature levels, a derivative feature map of a lower feature level in the two feature levels in sequence through an upsampling attention mechanism; a first fusion unit, used to fuse the initial feature map and the derivative feature map in the lowest feature level of all feature levels to obtain a feature map of the image to be segmented; and a segmentation unit, used to perform segmentation processing on the image to be segmented according to the feature map of the image to be segmented.

[0007] In some embodiments of the present application, based on the aforementioned scheme, the second sampling unit includes: a first mixing unit, used to generate a mixed feature map of the i-th feature map of the first feature level and the i-th feature map of the second feature level based on an upsampling attention mechanism for an adjacent first feature level and a second feature level higher than the first feature level, where i is a natural number greater than 1; a second fusion unit, used to fuse all feature maps between the initial feature map of the first feature level and the i-th feature map, as well as the mixed feature map, to obtain the i+1-th feature map corresponding to the first feature level.

[0008] In some embodiments of the present application, based on the aforementioned scheme, the first mixing unit includes: a first updating unit, used to update the i-th feature map of the first feature level based on the i-th feature map of the second feature level, to obtain an updated feature map of the i-th feature map of the first feature level; a second mixing unit, used to generate the mixed feature map based on the updated feature map and the i-th feature map of the second feature level.

[0009] In some embodiments of the present application, based on the aforementioned scheme, the second mixing unit includes: a third sampling unit, used to upsample the i-th feature map of the second feature level to obtain a high-level sampling feature, or perform bilinear interpolation processing on the i-th feature map of the second feature level to obtain a high-level sampling feature, or upsample and perform bilinear interpolation processing on the i-th feature map of the second feature level to obtain the high-level sampling feature; a third mixing unit, used to fuse the updated feature map and the high-level sampling feature to obtain the mixed feature map.

[0010] In some embodiments of the present application, based on the aforementioned scheme, the third mixing unit includes: a fourth mixing unit, used to add the feature element value corresponding to the updated feature map and the feature element value corresponding to the high-level sampling feature to obtain the feature element value corresponding to the mixed feature map; a fifth mixing unit, used to generate the mixed feature map according to the feature element value corresponding to the mixed feature map.

[0011] In some embodiments of the present application, based on the aforementioned scheme, the first update unit includes: a first vector unit, used to perform linear mapping processing on the i-th feature map of the second feature level to obtain a vector operator; a second update unit, used to update the features in the i-th feature map of the first feature level based on the vector operator to obtain the updated feature map.

[0012] In some embodiments of the present application, based on the aforementioned scheme, the second sampling unit is configured to: multiply the vector operator by the feature element value contained in the i-th feature map of the first feature level to obtain an updated feature element value; and generate the updated feature map according to the updated feature element value.

[0013] In some embodiments of the present application, based on the aforementioned solution, the first vector unit is configured to: perform nonlinear activation processing on the result of the linear mapping processing to obtain the vector operator.

[0014] In some embodiments of the present application, based on the aforementioned scheme, the second fusion unit is configured as: based on a residual network, concatenating all feature maps between the initial feature map of the first feature level and the i-th feature map to obtain a concatenated feature map; performing convolution fusion processing on the concatenated feature map and the mixed feature map to obtain the i+1-th feature map corresponding to the first feature level.

[0015] In some embodiments of the present application, based on the aforementioned scheme, the first sampling unit is configured to: preprocess the image to be segmented to obtain a preprocessed image; extract target features corresponding to preset color channels in the preprocessed image; perform multi-scale downsampling processing on the target features to obtain an initial feature map corresponding to each feature level.

[0016] In some embodiments of the present application, based on the aforementioned scheme, the image segmentation device further includes: an image acquisition unit, used to acquire the medical image; and an image processing unit, used to perform segmentation processing on the medical image to obtain an organ segmentation image.

[0017] According to one aspect of an embodiment of the present application, a training method for an image segmentation model is provided, characterized in that it includes: constructing a segmentation network model; inputting a sample image into the segmentation network model to obtain a segmentation result output by the segmentation network model, wherein the segmentation network model performs multi-scale downsampling processing on the sample image to obtain an initial feature map corresponding to each feature level, and generates a derivative feature map of a lower feature level in two adjacent feature levels through an upsampling attention mechanism, so as to generate a segmentation result based on a fused feature map between the initial feature map and the derivative feature map of the lowest feature level in all feature levels; determining the loss information of the segmentation network model according to the segmentation result and the segmentation label corresponding to the sample image; and updating the parameters of the segmentation network model according to the loss information to obtain an image segmentation model.

[0018] According to one aspect of an embodiment of the present application, a training device for an image segmentation model is provided, comprising: a construction unit, for constructing a segmentation network model; a segmentation unit, for inputting a sample image into the segmentation network model to obtain a segmentation result output by the segmentation network model, wherein the segmentation network model performs multi-scale downsampling processing on the sample image to obtain an initial feature map corresponding to each feature level, and generates a derivative feature map of a lower feature level in two adjacent feature levels through an upsampling attention mechanism, so as to generate a segmentation result based on a fused feature map between the initial feature map and the derivative feature map of the lowest feature level in all feature levels; a loss unit, for determining the loss information of the segmentation network model according to the segmentation result and the segmentation label corresponding to the sample image; and a model unit, for updating the parameters of the segmentation network model according to the loss information to obtain an image segmentation model.

[0019] According to one aspect of an embodiment of the present application, a computer-readable medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the image segmentation method described in the above embodiment is implemented, or the training method of the image segmentation model described in the above embodiment is implemented.

[0020] According to one aspect of an embodiment of the present application, an electronic device is provided, comprising: one or more processors; a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the image segmentation method as described in the above embodiments, or implement the image segmentation model training method as described in the above embodiments.

[0021] In the technical solutions provided in some embodiments of the present application, the image to be segmented is subjected to multi-scale downsampling processing to obtain the initial feature map corresponding to each feature level, and based on the initial feature maps of two adjacent feature levels, the derivative feature map of the lower feature level of the two feature levels is generated in sequence through the upsampling attention mechanism, and finally the initial feature map and the derivative feature map of the lowest feature level in the feature levels are fused to obtain the feature map of the image to be segmented, so that the feature maps of the two adjacent feature levels can be processed based on the upsampling attention mechanism to obtain the feature maps of each feature level, and then the multiple feature maps of the lowest feature level are fused to obtain the feature map of the image to be segmented. This processing method integrates the features in multiple feature levels, and can more effectively extract the semantic information of the image to be segmented, ensuring that a more accurate feature map of the image to be segmented is obtained, which is conducive to improving the accuracy of image segmentation.

[0022] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] The drawings herein are incorporated into the specification and constitute a part of the specification, showing embodiments consistent with the present application, and together with the specification, are used to explain the principles of the present application. Obviously, the drawings described below are only some embodiments of the present application, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. In the drawings:

[0024] Figure 1 A schematic diagram showing an exemplary system architecture to which the technical solution of the embodiments of the present application can be applied;

[0025] Figure 2 A schematic diagram showing an exemplary system architecture to which the technical solution of the embodiments of the present application can be applied;

[0026] Figure 3 A schematic diagram schematically shows an exemplary system architecture according to a technical solution of an embodiment of the present application;

[0027] Figure 4 A flowchart of an image segmentation method according to an embodiment of the present application is schematically shown;

[0028] Figure 5 A schematic diagram of performing multi-scale downsampling on an image to be segmented according to an embodiment of the present application is schematically shown;

[0029] Figure 6 A flowchart of generating a derived feature map by an upsampling attention mechanism according to an embodiment of the present application is schematically shown;

[0030] Figure 7 A schematic diagram showing the structure of feature graphs corresponding to each feature level according to an embodiment of the present application is shown;

[0031] Figure 8 Schematically shows a flow chart of generating a mixed feature map according to an embodiment of the present application;

[0032] Fig. 9 A flowchart of updating the i-th feature map of the first feature level according to an embodiment of the present application is schematically shown;

[0033] Fig.10 A schematic diagram of updating a feature map based on a multi-scale upsampling mechanism according to an embodiment of the present application is schematically shown;

[0034] Fig.11 Schematically shows a flow chart of generating a mixed feature map according to an embodiment of the present application;

[0035] Fig.12A schematic diagram schematically shows an upsampling process for a high-level feature map according to an embodiment of the present application;

[0036] Fig.13 A schematic diagram of a series connection of characteristic diagrams according to an embodiment of the present application is schematically shown;

[0037] Fig.14 A schematic diagram of dense feature fusion according to an embodiment of the present application is schematically shown;

[0038] Fig.15 A flowchart of a method for training an image segmentation model according to an embodiment of the present application is schematically shown;

[0039] Fig.16 A schematic diagram of a segmentation network model according to an embodiment of the present application is schematically shown;

[0040] Fig.17 A block diagram of an image segmentation device according to an embodiment of the present application is schematically shown;

[0041] Fig.18 A block diagram of a training device for an image segmentation model according to an embodiment of the present application is schematically shown;

[0042] Fig.19 A schematic diagram of the structure of a computer system suitable for implementing an electronic device of an embodiment of the present application is shown. DETAILED DESCRIPTION

[0043] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this application will be more comprehensive and complete and fully convey the concept of the example embodiments to those skilled in the art.

[0044] In addition, described feature, structure or characteristic can be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present application. However, those skilled in the art will appreciate that the technical scheme of the present application can be put into practice without one or more of the specific details, or other methods, components, devices, steps, etc. can be adopted. In other cases, known methods, devices, realizations or operations are not shown or described in detail to avoid blurring the various aspects of the application.

[0045] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities may be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.

[0046] The flowcharts shown in the accompanying drawings are only exemplary and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps can be decomposed, and some operations / steps can be combined or partially combined, so the actual execution order may change according to actual conditions.

[0047] Figure 1 A schematic diagram of an exemplary system architecture to which the technical solution of the embodiments of the present application can be applied is shown.

[0048] like Figure 1 As shown, the system architecture may include terminal devices (such as Figure 1 The embodiment of the present invention is a schematic diagram of a mobile phone 101, a tablet computer 102, a portable computer 103, a desktop computer, etc., a network 104, and a server 105. The network 104 is used to provide a medium for a communication link between the terminal device and the server 105. The network 104 may include various connection types, such as a wired communication link, a wireless communication link, etc.

[0049] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. According to the implementation requirements, there may be any number of terminal devices, networks and servers. For example, the server 105 may be a server cluster composed of multiple servers.

[0050] The user can use the terminal device to interact with the server 105 through the network 104 to receive or send messages, etc. The server 105 can be a server that provides various services. For example, the user uploads the image to be segmented to the server 105 using the terminal device (which can be a smart phone 101, a tablet computer 102 or a portable computer 103), and the server 105 performs multi-scale downsampling processing on the image to be segmented to obtain multiple initial feature maps, each of which corresponds to a feature level. Based on the initial feature maps of two adjacent feature levels, the derived feature maps of the lower feature level in the two feature levels are sequentially generated through the upsampling attention mechanism, and finally the initial feature map and the derived feature map in the lowest feature level in the feature level are fused to obtain the feature map of the image to be segmented, and the image to be segmented is segmented according to the feature map of the image to be segmented. By sampling and fusing the feature maps of each feature level, the semantic information of the image to be segmented is more effectively extracted, thereby improving the accuracy of image segmentation.

[0051] Figure 2 A schematic diagram of an exemplary system architecture to which the technical solution of the embodiments of the present application can be applied is shown.

[0052] like Figure 2 As shown, the system architecture may include a server 201 and a display device, wherein the display device may include but is not limited to a display 202, a printer 203, and the like.

[0053] exist Figure 2 In the system architecture shown, the image to be segmented is stored in the server 201. The server 201 can perform a single segmentation process on an image to be segmented to obtain a segmented image, and can perform batch processing on multiple images to be segmented stored therein to obtain segmentation results of a batch of images consisting of multiple images to be segmented.

[0054] For example, in the medical field, in order to determine the lesion of a patient, it is often necessary to continuously take a lot of images to combine the segmentation results of multiple images to obtain a more accurate lesion location.

[0055] Specifically, based on the system architecture in this embodiment, in the process of processing the image to be segmented, the server 201 first performs multi-scale downsampling processing on the image to be segmented to obtain multiple initial feature maps, each of which corresponds to a feature level, and based on the initial feature maps of two adjacent feature levels, generates derivative feature maps of the lower feature level in the two feature levels in turn through the upsampling attention mechanism, and finally fuses the initial feature map and the derivative feature map in the lowest feature level in the feature level to obtain the feature map of the image to be segmented, and performs segmentation processing on the image to be segmented according to the feature map of the image to be segmented. After obtaining the segmentation result, the server 201 sends the segmentation result to the display 202 for display, or sends it to the printer 203 for printing, so that the user can view it. By sampling and fusing the feature maps of each feature level, the semantic information of the image to be segmented is more effectively extracted, the accuracy of image segmentation is improved, and the final segmentation result is sent to the display device, which improves the processing efficiency and intuitiveness of the segmentation result.

[0056] It should be noted that the image segmentation method provided in the embodiment of the present application is generally executed by the server 201, and accordingly, the image segmentation device is generally arranged in the server 201. However, in other embodiments of the present application, the terminal device may also have similar functions as the server, so as to execute the image segmentation solution provided in the embodiment of the present application.

[0057] Figure 3 A schematic diagram of an exemplary system architecture to which the technical solution of the embodiments of the present application can be applied is shown.

[0058] like Figure 3 As shown, the system architecture may include an image capturing device 301, a server 302 and a terminal device 303, wherein the terminal device 303 may include but is not limited to: one or more of a smart phone, a tablet computer and a portable computer, and of course may also be a desktop computer, etc. In the system architecture of this embodiment, the image to be segmented is captured by the image capturing device 301, and the image to be segmented is sent to the terminal device 303, or the server 302 may send the image to be segmented stored therein to the terminal device 303. After receiving the image to be segmented, the terminal device 303 performs multi-scale downsampling processing on the image to be segmented to obtain multiple initial feature maps, each of which corresponds to a feature level. Based on the initial feature maps of two adjacent feature levels, a derivative feature map of the lower feature level of the two feature levels is generated in turn through an upsampling attention mechanism, and the initial feature map and the derivative feature map in the lowest feature level of the feature levels are fused to obtain the feature map of the image to be segmented, and the image to be segmented is segmented according to the feature map of the image to be segmented. Finally, the obtained image segmentation image is directly displayed on the display interface for the user to view directly, which not only improves the accuracy of image segmentation, but also improves the efficiency of image segmentation.

[0059] The implementation details of the technical solution of the embodiment of the present application are described in detail below:

[0060] Figure 4 A flowchart of an image segmentation method according to an embodiment of the present application is shown. The image segmentation method can be executed by a server, which can be Figure 1 or Figure 2 The image segmentation method can also be performed by a terminal device, which can be Figure 3 Terminal devices in. Figure 4 As shown, the image segmentation method at least includes steps S410 to S440, which are described in detail as follows:

[0061] In step S410, a multi-scale downsampling process is performed on the image to be segmented to obtain a plurality of initial feature maps, each of which corresponds to a feature level.

[0062] In one embodiment of the present application, after the image to be segmented is acquired, the image to be segmented is first downsampled to obtain a feature map of the image to be segmented. The downsampling process in this embodiment is a multi-scale downsampling process performed on the image to be segmented to obtain initial feature maps of different feature depths, so that each initial feature map corresponds to a feature level, so as to extract multi-level and more comprehensive semantic information from the image to be segmented based on feature maps of multiple levels.

[0063] It should be noted that the term "multiple times" in this embodiment is used to represent at least twice. In this embodiment, at least two initial feature maps are obtained by performing downsampling processing at least twice and at different scales, and the number of initial feature maps is the same as the number of feature levels. Each initial feature map is the first feature map in its corresponding feature level, and is used to obtain the remaining derivative feature maps in each feature level based on the first feature map in the feature level.

[0064] Specifically, in this embodiment, the multi-scale downsampling can also be performed by performing maximum pooling on the segmented image, performing convolution processing on the result of the maximum pooling, and performing activation processing and random inactivation processing on the result obtained by the convolution processing to obtain downsampling results of different scales.

[0065] Exemplarily, during the multi-scale downsampling process, the image to be segmented with a size of M*N is downsampled by different multiples, that is, downsampling results of different scales are obtained. For example, the image to be segmented is downsampled s times to obtain a resolution image with a size of (M / s)*(N / s).

[0066] See also Figure 5 As shown, Figure 5 Schematic diagram of multi-scale downsampling of the image to be segmented in this embodiment. P(501) is used to represent the image to be segmented, and P(501) is downsampled once to obtain the initial feature map P1, and then P(501) is downsampled multi-scale to obtain the initial feature maps P2(502), P i (503)…P n (504). Among them, the initial feature maps P1, P2, P i ,…,P n They correspond to different feature levels and are used to represent the first feature map in each feature level.

[0067] In one embodiment of the present application, a multi-scale downsampling process is performed on the image to be segmented to obtain multiple initial feature maps, each of which corresponds to a feature level, and the process specifically includes the following steps:

[0068] Preprocessing the image to be segmented to obtain a preprocessed image;

[0069] Extracting target features corresponding to preset color channels in the preprocessed image;

[0070] The target features are subjected to multi-scale downsampling processing to obtain an initial feature map corresponding to each feature level.

[0071] Specifically, the method of preprocessing the image to be segmented in this embodiment includes but is not limited to: histogram equalization, image denoising, image enhancement, image sharpening and other processing, which will not be described in detail here. After the image to be segmented is preprocessed to obtain a preprocessed image, the features corresponding to the preset color channels in the preprocessed image are extracted as target features, and the image to be segmented is subjected to multi-scale downsampling processing based on the target features to obtain the initial feature maps corresponding to each feature level.

[0072] In one embodiment of the present application, the preset color channel includes but is not limited to the green channel, the red channel or the blue channel in the red green blue (RGB) image. In this embodiment, the purpose of using the preset channel is to reduce the amount of image processing calculations on the one hand; on the other hand, it can provide better contrast and information to obtain a more accurate segmentation result in the end.

[0073] Exemplarily, the preprocessed image is obtained by performing histogram equalization on the image to be segmented, and a green channel is extracted from the preprocessed image, so as to process the image to be segmented based on the green channel in the image to be segmented.

[0074] In step S420, based on the initial feature maps of two adjacent feature levels, a derivative feature map of the lower feature level of the two feature levels is sequentially generated through an upsampling attention mechanism.

[0075] In one embodiment of the present application, each initial feature map corresponds to a feature level, and in each feature level the initial feature map serves as the first feature map in the feature level. In addition to the initial feature map, each feature level also includes a derived feature map generated based on the initial feature map, so as to extract comprehensive and accurate features based on the initial feature maps and derived feature maps in all feature levels.

[0076] In this embodiment, when generating derived feature maps other than the initial feature map in a feature hierarchy, based on the initial feature maps in two adjacent feature hierarchies, an upsampling attention mechanism is used to sequentially generate derived feature maps of the lower feature level of the two feature hierarchies to obtain derived feature maps other than the initial feature map corresponding to each feature level.

[0077] In one embodiment of the present application, Figure 6 As shown, based on the initial feature maps of two adjacent feature levels, the process of sequentially generating the derived feature map of the lower feature level of the two feature levels through the upsampling attention mechanism specifically includes the following steps S610 to S620, which are described in detail as follows:

[0078] In step S610, for an adjacent first feature level and a second feature level higher than the first feature level, a mixed feature map of the i-th feature map of the first feature level and the i-th feature map of the second feature level is generated based on an upsampling attention mechanism, where i is a natural number greater than 1.

[0079] In one embodiment of the present application, among the feature levels corresponding to the multiple initial feature maps, for the adjacent first feature level and the second feature level higher than the first feature level, the i-th feature map of the first feature level is generated based on the upsampling attention mechanism. A mixed feature map of the i-th feature map of the second feature level Among them, d represents the number of layers of the feature level. The larger the value of d is, the higher the number of layers of the feature level is. i is a natural number greater than 1, indicating the number of feature maps of each feature level.

[0080] For example, Figure 7 As shown, the second feature map of the first feature level is generated based on the upsampling attention mechanism and the second feature map of the second feature level The mixed feature map.

[0081] In particular, for the i-th feature map of the first feature level and the i-th feature map of the second feature level, a mixed feature map of the i-th feature map of the first feature level and the i-th feature map of the second feature level is generated based on the upsampling attention mechanism, so as to fuse the mixed feature map and all feature maps between the initial feature map of the first feature level and the i-th feature map to obtain the i+1-th feature map of the first feature level.

[0082] like Figure 7 As shown, Figure 7 Schematic diagram of the structure of the feature graphs corresponding to each feature level shown in this embodiment. In this embodiment, the initial feature graph of the higher level of two adjacent feature levels corresponds to the second feature graph of the lower level, and the subsequent feature graphs are pushed back in sequence, and the number of feature graphs of the higher feature level is 1 less than the number of feature graphs of the lower level. Figure 7 middle, as well as They are the initial feature maps corresponding to each feature level, and each initial feature map has its corresponding feature level, thus forming a multi-scale hierarchical structure of the feature map.

[0083] Exemplarily, in the first feature level, the feature map In the second layer of feature level, including feature maps By analogy, in the fifth feature level, that is, the highest feature level, the feature map That is, the initial feature map corresponding to the feature level of the fifth layer.

[0084] It should be noted that Figure 7 The feature level in is 5, wherein the number of feature graphs corresponding to the first feature level is 5, which is an example in this embodiment. In other embodiments of the present application, the number of feature levels is not limited, and the number of feature graphs corresponding to each feature level is not limited.

[0085] In one embodiment of the present application, Figure 8 As shown, for an adjacent first feature level and a second feature level higher than the first feature level, a process of generating a mixed feature map of the i-th feature map of the first feature level and the i-th feature map of the second feature level based on an upsampling attention mechanism specifically includes the following steps S810 to S820, which are described in detail as follows:

[0086] In step S810, the i-th feature map of the first feature level is updated based on the i-th feature map of the second feature level to obtain an updated feature map of the i-th feature map of the first feature level.

[0087] In one embodiment of the present application, in the process of obtaining a mixed feature map according to the feature maps of the first feature level and the second feature level, the i-th feature map of the first feature level is first updated based on the i-th feature map of the second feature level to obtain an updated feature map of the i-th feature map of the first feature level. Figure 7 The multi-scale hierarchical structure in the proposed method enables high-level features, i.e., the features of the second feature level, to more effectively guide the learning and updating of low-level features.

[0088] Specifically, Fig. 9 As shown, in the process of updating the i-th feature map of the first feature level based on the i-th feature map of the second feature level, steps S910 to S920 are included, which are described in detail as follows:

[0089] In step S910, a linear mapping process is performed on the i-th feature map of the second feature level to obtain a vector operator.

[0090] Please also read Fig.10 As shown, Fig.10 A schematic diagram of updating a feature map based on a multi-scale upsampling mechanism proposed in an embodiment of the present application.

[0091] In one embodiment of the present application, it is assumed that the i-th feature map of the second feature level and the i-th feature map of the first feature level Among them, H and W represent the width and height of the feature map, C1 and C2 represent the number of channels, and R represents the spatial dimension. It can be understood that Fig.10 middle Represents the product of the corresponding feature element values ​​in the feature map.

[0092] In order to make the best use of the interaction of feature information at different levels, the spatial dependency between the two is described by the attention operator in this embodiment. The i-th feature map of the second feature level is linearly mapped based on the attention mechanism, and the vector operator is obtained by the following formula:

[0093]

[0094] in, H and W represent the width and height of the i-th feature map of the second feature level, that is, Fig.10 The i-th feature map of the second feature level in the middle and bottom i,j represent the coordinates of the pixel.

[0095] In addition, in addition to the method of obtaining the vector operator in step S910, the i-th feature map of the second feature level can also be subjected to linear mapping processing and nonlinear activation processing, that is, the operator vector model is optimized by a nonlinear activation function to obtain a vector operator. Exemplarily, in this embodiment, the i-th feature map of the second feature level can be passed through a linear rectification function (Rectified Linear Unit, ReLU) to overcome the problem of vanishing pixel gradients in the i-th feature map of the second feature level, optimize the operator vector model, and obtain a vector operator.

[0096] In step S920, the features in the i-th feature map of the first feature level are updated based on the vector operator to obtain the updated feature map.

[0097] After obtaining the vector operator, the vector operator is used as a weight operator for updating the i-th feature map of the first feature level, and the weight operator is used to guide the update of the low-level features to obtain the updated feature map The specific formula is as follows:

[0098]

[0099] in, It represents the element-wise product, that is, the multiplication of the feature element values ​​in the feature map. In the specific calculation process, the vector operator is broadcast along the operator space dimension to obtain the updated feature map of the purified low-level features.

[0100] It should be noted that because the feature maps in the high feature level and the feature maps in the low feature level have different representation information, in order to more comprehensively utilize the feature information of the image to be segmented during image segmentation, the two features are combined to restore the spatial information of the image to be segmented as much as possible and allow the segmentation network model to better learn the features.

[0101] In step S820, the mixed feature map is generated according to the updated feature map and the i-th feature map of the second feature level.

[0102] See again Fig.10 As shown, after getting the updated feature map Afterwards, the i-th feature map of the second feature level is convolved and up-sampled, and the processing result is fused with the updated feature map to obtain a mixed feature map.

[0103] In one embodiment of the present application, Fig.11 As shown, the process of generating the mixed feature map according to the updated feature map and the i-th feature map of the second feature level specifically includes the following steps S1110 to S1120, which are described in detail as follows:

[0104] In step S1110, the i-th feature map of the second feature level is upsampled to obtain a high-level sampling feature, or the i-th feature map of the second feature level is bilinearly interpolated to obtain a high-level sampling feature, or the i-th feature map of the second feature level is upsampled and bilinearly interpolated to obtain the high-level sampling feature.

[0105] In one embodiment of the present application, two necessary elements for obtaining a mixed feature map are a low-level updated feature map and a high-level sampled feature corresponding to the high-level. When obtaining the high-level sampled feature, this embodiment can be performed by either upsampling or bilinear interpolation processing, or by a combination of upsampling and bilinear interpolation processing.

[0106] Please also read Fig.12 As shown, Fig.12 A schematic diagram of upsampling a high-level feature map provided in an embodiment of the present application. When upsampling the i-th feature map of the second feature level, first determine the feature value of each feature in the i-th feature map of the second feature level, which may be a pixel value, and then perform convolution on the pixel value, and map each pixel value in the result of the convolution to the corresponding area of ​​the output upsampled feature map, and all of them are filled with the same value.

[0107] For example, if the eigenvalue corresponding to the convolution processing result is Fig.12In the middle left figure, "7, 6, 5, 2" is mapped to the corresponding area of ​​the output upsampled feature map according to the corresponding position of each eigenvalue in the feature map, and all are filled with the same value, resulting in Fig.12 Right picture in .

[0108] In one embodiment of the present application, the bilinear interpolation processing of the i-th feature map of the second feature level is an extension of the linear interpolation on a two-dimensional rectangular grid, that is, linear interpolation is performed once in two directions respectively.

[0109] In one embodiment of the present application, if the present embodiment is performed by combining upsampling and bilinear interpolation processing, some high-level feature maps can be upsampled and other high-level feature maps can be bilinearly interpolated, which is not limited here.

[0110] It should be noted that the upsampling attention mechanism in this embodiment has the same effect as the bilinear difference processing, but experiments have shown that the recall rate will be improved to a certain extent by introducing the attention mechanism. Therefore, a natural number k less than the number of feature maps is introduced here to adjust the number of processing times of upsampling processing and bilinear difference processing. In this embodiment, it is not necessary to replace all bilinear difference processing with upsampling processing of the attention mechanism. By introducing the natural number k, the computing power in the image processing process can be adjusted to improve the efficiency of image processing.

[0111] In step S1120, the updated feature map and the high-level sampling feature are fused to obtain the mixed feature map.

[0112] After obtaining the updated feature map corresponding to the i-th feature map of the first feature level and the high-level sampling features corresponding to the i-th feature map of the second feature level, the updated feature map and the high-level sampling features are fused to obtain a mixed feature map.

[0113] See again Fig.10 As shown, after getting the updated feature map After high-level sampling features, the feature element values ​​corresponding to the updated feature map and the feature element values ​​corresponding to the high-level sampling features are added to obtain the feature element values ​​corresponding to the mixed feature map; and a mixed feature map is generated according to the feature element values ​​corresponding to the mixed feature map.

[0114] In step S620, all feature maps between the initial feature map of the first feature level and the i-th feature map, as well as the mixed feature map, are fused to obtain an i+1-th feature map corresponding to the first feature level.

[0115] In one embodiment of the present application, after obtaining the feature graphs corresponding to each feature level based on the above scheme, all feature graphs between the initial feature graph of the first feature level and the i-th feature graph, as well as the mixed feature graph, are fused to obtain the i+1-th feature graph corresponding to the first feature level. That is, in the feature graphs of the same feature level, a feature graph is obtained by fusing its corresponding mixed feature graph and all feature graphs prior to the feature graph.

[0116] In one embodiment of the present application, the process of fusing all feature maps between the initial feature map of the first feature level and the i-th feature map, and the mixed feature map, to obtain the i+1-th feature map corresponding to the first feature level specifically includes the following steps S6201 to S6202, which are described in detail as follows:

[0117] In step S6201, all feature maps between the initial feature map of the first feature level and the i-th feature map are concatenated based on the residual network to obtain a concatenated feature map.

[0118] In one embodiment of the present application, the accuracy can be improved by increasing the depth. The residual block inside uses skip connections to alleviate the gradient vanishing problem caused by increasing the depth in the deep neural network. Specifically, based on the residual network, all feature maps between the initial feature map of the first feature level and the i-th feature map are concatenated to obtain a concatenated feature map, that is, each feature map is used as the input of the next feature map. The concatenated feature map in this embodiment is expressed by the following formula:

[0119]

[0120] Among them, d represents the number of the feature level to which the feature map belongs, and n is used to represent the number of each feature map obtained by numbering from the initial feature map in a feature level, that is, the column label of the feature map.

[0121] like Fig.13 As shown, Fig.13 is a schematic diagram of the characteristic graph series connection provided by the embodiment of the present application, and d is 1, i.e., the first characteristic level. For example, when n=2, As a concatenated feature map, when n>2, The concatenated feature maps are obtained by fusion. For example, when n = 3, The series fusion is performed to obtain the series feature map 1301; when n=5, as well as The concatenated features are fused to obtain a concatenated feature map 1302.

[0122] In step S6202, convolution fusion processing is performed on the series feature map and the mixed feature map to obtain the i+1th feature map corresponding to the first feature level.

[0123] In one embodiment of the present application, after obtaining the series feature map, a convolution fusion process is performed between the series feature map and the mixed feature map to obtain the i+1th feature map corresponding to the first feature level.

[0124] like Fig.14 As shown, Fig.14 is a schematic diagram of dense feature fusion provided by the embodiment of the present application. Among them, the d feature level includes feature maps as well as The arrow lines between the feature maps are used to represent the fusion processing of the feature maps, and the arrows under the feature maps are used to represent the mixed features obtained by the attention-based upsampling mechanism.

[0125] For example, according to get When , first according to the second feature map of the first feature level And the second feature map of the second feature level Get the mixed features between the two, and then combine the mixed features with Fusion, get In the same way, we can get as well as

[0126] In step S430, the initial feature map and the derived feature map in the lowest feature level in all feature levels are fused to obtain the feature map of the image to be segmented.

[0127] In one embodiment of the present application, after the feature map of the higher feature level is subjected to upsampling processing based on the attention mechanism and the fusion of the feature maps of the same layer, the derived feature map of the lowest feature level is obtained. In the lowest feature level, an initial feature map and a derived feature map other than the initial feature map are included, wherein the number of the derived feature maps is at least one. By fusing the initial feature map and the derived feature map in the lowest feature level of all feature levels, a feature map of the image to be segmented is obtained.

[0128] For example, Figure 7 The top layer in is the lowest feature level, and by fusing the feature maps in this feature level Get the feature map of the image to be segmented.

[0129] In step S440, the image to be segmented is segmented according to the feature map of the image to be segmented.

[0130] After obtaining the feature map of the image to be segmented, the feature map includes multiple feature values. According to the preset feature threshold and the feature values ​​in the feature map, the area whose feature value is higher than the threshold or lower than the threshold is identified, and the image to be segmented is segmented according to the area to obtain the segmentation result.

[0131] In one embodiment of the present application, the image to be segmented may be a medical image, and the medical image is segmented according to the feature map of the image to be segmented and the target organ to be segmented to obtain a segmented image of the target organ. For example, a computed tomography (CT) image is compressed and transmitted to an image segmentation device for organ image segmentation, and the segmentation result is displayed on the front end and a corresponding judgment is made according to the segmentation result, so as to realize efficient image segmentation of human organ CT.

[0132] The above scheme obtains multiple initial feature maps by performing multi-scale downsampling processing on the image to be segmented, so that each initial feature map corresponds to a feature level, and based on the initial feature maps of two adjacent feature levels, generates derivative feature maps of the lower feature level of the two feature levels in sequence through the upsampling attention mechanism, and finally fuses the initial feature map and the derivative feature map in the lowest feature level in the feature level to obtain the feature map of the image to be segmented, and performs segmentation processing on the image to be segmented according to the feature map of the image to be segmented. The technical solution of the embodiment of the present application obtains fused features by upsampling the feature maps of each feature level based on the attention mechanism, and progressively aggregating the upsampling results with the feature maps of the same feature level, thereby more effectively extracting the semantic information of the image to be segmented and improving the accuracy of image segmentation.

[0133] Fig.15 The image segmentation model training method according to an embodiment of the present application is shown. The image segmentation model training method can be executed by a server or a terminal device. Fig.15 As shown, the training method of the image segmentation model includes at least steps S1510 to S1530, which are described in detail as follows:

[0134] In step S1510, the sample image is input into the segmentation network model to obtain a segmentation result output by the segmentation network model, wherein the segmentation network model is pre-constructed, and the segmentation network model performs multi-scale downsampling processing on the sample image to obtain an initial feature map corresponding to each feature level, and generates a derivative feature map of the lower feature level of two adjacent feature levels through an upsampling attention mechanism, so as to generate a segmentation result based on a fused feature map between the initial feature map and the derivative feature map of the lowest feature level among all feature levels.

[0135] Please also read Fig.16 As shown, Fig.16 A schematic diagram of a segmentation network model is provided for an embodiment of the present application. In one embodiment of the present application, the input of the segmentation network model is a sample image 1601, and the output is a segmentation result 1602 obtained after segmenting the sample image 1601, wherein the sample image 1601 and the segmentation result 1602 have the same width and height, such as H×W as shown in the figure.

[0136] In one embodiment of the present application, the image segmentation model is constructed based on an upsampling attention mechanism. In this embodiment, the original interpolation upsampling is replaced by the upsampling attention mechanism, and the spatial and channel attention methods are combined. In a multi-scale layered structure composed of each feature level, high-level features can more effectively guide low-level features to learn and update. At the same time, low-level features can also guide the upsampling 1605 of high-level features, thereby more effectively extracting the semantic information of image samples.

[0137] The sample image 1601 is input into the segmentation network model for processing to obtain the segmentation result output by the segmentation network model. Specifically, in the process of processing the sample image 1601, the sample image 1601 is firstly subjected to convolution processing 1603 to obtain a convolution image; and then the convolution image is subjected to multi-scale downsampling processing 1604 to obtain an initial feature map. Fig.16 In the figure, feature maps are represented by three-dimensional blocks. Fig.16 The initial feature maps in are 1611, 1622, 1633, 1644 and 1655.

[0138] It should be noted that each initial feature map in this embodiment corresponds to a different feature level, and the feature maps in different feature levels include image features of different depths. Moreover, low-level features are relative to high-level features. Fig.16 The relatively lower ones are high-level features. For example, the feature maps in the low-level layers are mainly features such as lines, points or textures, while the feature maps in the high-level layers include semantic features used to detect objects.

[0139] It should be noted that the present embodiment provides Fig.16 This is only an example of a segmentation network model, in which the feature level includes 5 layers. In other embodiments other than this embodiment, the feature level may be other numbers, such as 3 layers, 9 layers, etc. The image accuracy obtained by different feature levels, as well as the computing power and latency required in the calculation process are different. The number of feature levels obtained by downsampling is not limited here.

[0140] After obtaining the initial feature map, the derived feature map of the lower feature level in the two adjacent feature levels is generated through the upsampling attention mechanism 1605, such as Fig.16The derived feature map in is a feature map other than the initial feature map, such as 1612, 1613, 1614, 1623, etc. The specific process of generating the derived feature map of the lower feature level in two adjacent feature levels is described in detail in step S420 of the previous embodiment, which will not be repeated here.

[0141] It should be noted that in addition to generating a derivative feature map of the lower feature level of two adjacent feature levels through the upsampling attention mechanism 1605, other forms of upsampling can also be used, such as the bilinear difference 1606 method, which is not limited here.

[0142] After generating a derived feature map of the lower feature level in two adjacent feature levels through the upsampling attention mechanism, a segmentation result 1602 is generated based on a fused feature map of multiple feature maps of the lowest feature level in all feature levels.

[0143] Specifically, in this embodiment, a dense block 1607 is constructed in the segmentation network model to fuse the feature maps in a feature level. Each feature map in the dense block is used as an input for subsequent feature maps. Finally, multiple feature maps of the lowest feature level are fused to obtain the segmentation result 1602.

[0144] In step S1520, loss information of the segmentation network model is determined according to the segmentation result and the segmentation label corresponding to the sample image.

[0145] In one embodiment of the present application, optionally, when determining the loss information, it can be done by binary cross entropy. Fig.16 As shown, after obtaining the derived feature maps (1612, 1613, 1614 and 1615) in the first feature level except the initial feature map 1611, the loss information corresponding to each derived feature map is calculated according to the feature information of the derived feature map, and the four loss information are summed (1609), i.e., ∑loss, to obtain the loss information of the segmentation network model.

[0146] In step S1530, the parameters of the segmentation network model are updated according to the loss information to obtain an image segmentation model.

[0147] In one embodiment of the present application, after the loss information is calculated, the parameters of the segmentation network model are updated according to the loss information to obtain an image segmentation model. In one embodiment of the present application, the image segmentation model in this embodiment can be used to segment features in an image to obtain a segmented image that only includes the target feature area. For example, the lung CT image 1601 is segmented by the image segmentation model to obtain a segmentation result 1602 that only includes the lung area.

[0148] The above scheme constructs a segmentation network model; inputs the sample image into the segmentation network model to obtain the segmentation result output by the segmentation network model, wherein the segmentation network model performs multi-scale downsampling processing on the sample image to obtain the initial feature map corresponding to each feature level, and generates a derivative feature map of the lower feature level in two adjacent feature levels through an upsampling attention mechanism, so as to generate a segmentation result based on a fused feature map between the initial feature map and the derivative feature map of the lowest feature level in all feature levels, and then determines the loss information of the segmentation network model according to the segmentation result and the segmentation label corresponding to the sample image; finally, updates the parameters of the segmentation network model according to the loss information to obtain an image segmentation model. The technical scheme of the embodiment of the present application upsamples the feature maps of each feature level based on the attention mechanism, and progressively aggregates the upsampled results with the feature maps of the same feature level to obtain fused features, thereby more effectively extracting the semantic information of the sample image and improving the accuracy of image segmentation model training.

[0149] The following describes an apparatus embodiment of the present application, which can be used to execute the image segmentation method and the image segmentation model training method in the above-mentioned embodiments of the present application. For details not disclosed in the apparatus embodiment of the present application, please refer to the above-mentioned embodiments of the image segmentation method and the image segmentation model training method in the present application.

[0150] Fig.17 A block diagram of an image segmentation device according to an embodiment of the present application is shown.

[0151] Reference Fig.17 As shown, an image segmentation device 1700 according to an embodiment of the present application includes: a first sampling unit 1710 , a second sampling unit 1720 , a first fusion unit 1730 , and a first fusion unit 1730 .

[0152] Among them, the first sampling unit 1710 is used to perform multi-scale downsampling processing on the image to be segmented to obtain multiple initial feature maps, each initial feature map corresponds to a feature level; the second sampling unit 1720 is used to generate a derivative feature map of the lower feature level of the two adjacent feature levels in sequence through an upsampling attention mechanism based on the initial feature maps of the two adjacent feature levels; the first fusion unit 1730 is used to fuse the initial feature map and the derivative feature map in the lowest feature level of all feature levels to obtain the feature map of the image to be segmented; the segmentation unit 1740 is used to segment the image to be segmented according to the feature map of the image to be segmented.

[0153] In one embodiment of the present application, the second sampling unit 1720 includes:

[0154] A first mixing unit is used to generate, for an adjacent first feature level and a second feature level higher than the first feature level, a mixed feature map of an i-th feature map of the first feature level and an i-th feature map of the second feature level based on an upsampling attention mechanism, where i is a natural number greater than 1;

[0155] The second fusion unit is used to fuse all feature maps between the initial feature map of the first feature level and the i-th feature map, as well as the mixed feature map, to obtain the i+1-th feature map corresponding to the first feature level.

[0156] In one embodiment of the present application, the first mixing unit comprises:

[0157] A first updating unit, configured to update the i-th feature map of the first feature level based on the i-th feature map of the second feature level to obtain an updated feature map of the i-th feature map of the first feature level;

[0158] The second mixing unit is used to generate the mixed feature map according to the updated feature map and the i-th feature map of the second feature level.

[0159] In one embodiment of the present application, the second mixing unit comprises:

[0160] a third sampling unit, configured to upsample the i-th feature map of the second feature level to obtain a high-level sampling feature, or perform bilinear interpolation processing on the i-th feature map of the second feature level to obtain a high-level sampling feature, or perform upsampling and bilinear interpolation processing on the i-th feature map of the second feature level to obtain the high-level sampling feature;

[0161] The third mixing unit is used to fuse the updated feature map with the high-level sampling feature to obtain the mixed feature map.

[0162] In one embodiment of the present application, the third mixing unit comprises:

[0163] a fourth mixing unit, configured to add the feature element value corresponding to the updated feature map and the feature element value corresponding to the high-level sampling feature to obtain the feature element value corresponding to the mixed feature map;

[0164] The fifth mixing unit is used to generate the mixed feature map according to the feature element values ​​corresponding to the mixed feature map.

[0165] In one embodiment of the present application, the first updating unit includes:

[0166] A first vector unit, used for performing linear mapping processing on the i-th feature map of the second feature level to obtain a vector operator;

[0167] The second updating unit is used to update the features in the i-th feature map of the first feature level based on the vector operator to obtain the updated feature map.

[0168] In one embodiment of the present application, the second sampling unit 1720 is configured to: multiply the vector operator by the feature element value contained in the i-th feature map of the first feature level to obtain an updated feature element value; and generate the updated feature map according to the updated feature element value.

[0169] In one embodiment of the present application, the first vector unit is configured to: perform nonlinear activation processing on the result of the linear mapping processing to obtain the vector operator.

[0170] In one embodiment of the present application, the second fusion unit is configured as follows: based on a residual network, concatenating all feature maps between the initial feature map of the first feature level and the i-th feature map to obtain a concatenated feature map; performing convolution fusion processing on the concatenated feature map and the mixed feature map to obtain the i+1-th feature map corresponding to the first feature level.

[0171] In one embodiment of the present application, the first sampling unit is configured as:

[0172] Preprocessing the image to be segmented to obtain a preprocessed image;

[0173] Extracting target features corresponding to preset color channels in the preprocessed image;

[0174] The target features are subjected to multi-scale downsampling processing to obtain an initial feature map corresponding to each feature level.

[0175] In one embodiment of the present application, the image segmentation device 1700 further includes:

[0176] An image acquisition unit, used for acquiring the medical image;

[0177] The image processing unit is used to perform segmentation processing on the medical image to obtain an organ segmentation image.

[0178] Fig.18 A block diagram of an image segmentation device according to an embodiment of the present application is shown.

[0179] Reference Fig.18 As shown, a training device 1800 for an image segmentation model according to an embodiment of the present application includes: a segmentation unit 1810, a loss unit 1820 and a model unit 1830.

[0180] Among them, the segmentation unit 1810 is used to input the sample image into the segmentation network model to obtain the segmentation result output by the segmentation network model, wherein the segmentation network model is pre-constructed, and the segmentation network model performs multi-scale downsampling processing on the sample image to obtain the initial feature map corresponding to each feature level, and generates a derivative feature map of the lower feature level of two adjacent feature levels through an upsampling attention mechanism, so as to generate a segmentation result based on the fused feature map between the initial feature map and the derivative feature map of the lowest feature level among all feature levels; the loss unit 1820 is used to determine the loss information of the segmentation network model according to the segmentation result and the segmentation label corresponding to the sample image; the model unit 1830 is used to update the parameters of the segmentation network model according to the loss information to obtain an image segmentation model.

[0181] Fig.19 A schematic diagram of the structure of a computer system suitable for implementing an electronic device of an embodiment of the present application is shown.

[0182] It should be noted that Fig.19 The computer system 1900 of the electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0183] like Fig.19 As shown, the computer system 1900 includes a central processing unit (CPU) 1901, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 1902 or the program loaded from the storage part 1908 to the random access memory (RAM) 1903, such as executing the method described in the above embodiment. In RAM 1903, various programs and data required for system operation are also stored. CPU 1901, ROM 1902 and RAM 1903 are connected to each other through bus 1904. Input / output (I / O) interface 1905 is also connected to bus 1904.

[0184] The following components are connected to the I / O interface 1905: an input section 1906 including a keyboard, a mouse, etc.; an output section 1907 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 1908 including a hard disk, etc.; and a communication section 1909 including a network interface card such as a LAN (Local Area Network) card, a modem, etc. The communication section 1909 performs communication processing via a network such as the Internet. A drive 1910 is also connected to the I / O interface 1905 as needed. A removable medium 1911, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 1910 as needed so that a computer program read therefrom is installed into the storage section 1908 as needed.

[0185] In particular, according to an embodiment of the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a computer program for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication section 1909, and / or installed from a removable medium 1911. When the computer program is executed by a central processing unit (CPU) 1901, various functions defined in the system of the present application are executed.

[0186] It should be noted that the computer-readable medium shown in the embodiment of the present application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, - but not limited to - an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by an instruction execution system, device or device or used in combination with it. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, wherein a computer-readable computer program is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate, or transmit programs for use by or in conjunction with an instruction execution system, apparatus, or device. The computer program contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.

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

[0188] The units involved in the embodiments described in this application may be implemented by software or hardware, and the units described may also be set in a processor. The names of these units do not, in some cases, constitute limitations on the units themselves.

[0189] As another aspect, the present application also provides a computer-readable medium, which may be included in the electronic device described in the above embodiment; or may exist independently without being assembled into the electronic device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by an electronic device, the electronic device implements the method described in the above embodiment.

[0190] It should be noted that, although several modules or units of the equipment for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present application, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into being embodied by multiple modules or units.

[0191] Through the description of the above implementation methods, it is easy for those skilled in the art to understand that the example implementation methods described here can be implemented by software or by combining software with necessary hardware. Therefore, the technical solution according to the implementation methods of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a touch terminal, or a network device, etc.) to execute the method according to the implementation methods of the present application.

[0192] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the embodiments disclosed herein. The present application is intended to cover any variations, uses or adaptations of the present application, which follow the general principles of the present application and include common knowledge or customary technical means in the art that are not disclosed in the present application.

[0193] It should be understood that the present application is not limited to the precise 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 application is limited only by the appended claims.

Claims

1. An image segmentation method, characterized in that: include: Perform multi-scale downsampling on the image to be segmented to obtain multiple initial feature maps, each of which corresponds to a feature level; For an adjacent first feature level and a second feature level higher than the first feature level, updating the i-th feature map of the first feature level based on the i-th feature map of the second feature level to obtain an updated feature map of the i-th feature map of the first feature level, and generating a mixed feature map according to the updated feature map and the i-th feature map of the second feature level, where i is a natural number greater than 1; Performing a fusion process on all feature maps between the initial feature map of the first feature level and the i-th feature map, as well as the mixed feature map, to obtain an i+1-th feature map corresponding to the first feature level; Fusion of the initial feature map and the derived feature map in the lowest feature level in all feature levels to obtain the feature map of the image to be segmented; The image to be segmented is segmented according to the feature map of the image to be segmented.

2. The method according to claim 1, characterized in that Generating the mixed feature map according to the updated feature map and the i-th feature map of the second feature level includes: Upsampling the i-th feature map of the second feature level to obtain a high-level sampling feature, or performing bilinear interpolation processing on the i-th feature map of the second feature level to obtain a high-level sampling feature, or upsampling and bilinear interpolation processing on the i-th feature map of the second feature level to obtain a high-level sampling feature; The updated feature map and the high-level sampling features are fused to obtain the mixed feature map.

3. The method according to claim 2, characterized in that The updated feature map and the high-level sampling feature are fused to obtain the mixed feature map, including: Adding the feature element value corresponding to the updated feature map and the feature element value corresponding to the high-level sampling feature to obtain the feature element value corresponding to the mixed feature map; The mixed feature map is generated according to the feature element values ​​corresponding to the mixed feature map.

4. The method according to claim 1, characterized in that: The method of updating the i-th feature map of the first feature level based on the i-th feature map of the second feature level to obtain an updated feature map of the i-th feature map of the first feature level includes: Performing linear mapping processing on the i-th feature map of the second feature level to obtain a vector operator; The features in the i-th feature map of the first feature level are updated based on the vector operator to obtain the updated feature map.

5. The method according to claim 4, characterized in that Updating the features in the i-th feature map of the first feature level based on the vector operator to obtain the updated feature map includes: Multiplying the vector operator by the feature element value contained in the i-th feature graph of the first feature level to obtain an updated feature element value; The updated feature map is generated according to the updated feature element values.

6. The method according to claim 4, characterized in that After performing linear mapping processing on the i-th feature map of the second feature level, the method further includes: The result of the linear mapping process is subjected to nonlinear activation process to obtain the vector operator.

7. The method according to claim 1, characterized in that The method further comprises: performing fusion processing on all feature maps between the initial feature map of the first feature level and the i-th feature map, and the mixed feature map to obtain the i+1-th feature map corresponding to the first feature level, including: Concatenate all feature maps between the initial feature map of the first feature level and the i-th feature map based on the residual network to obtain a concatenated feature map; The series feature map and the mixed feature map are subjected to convolution fusion processing to obtain an i+1th feature map corresponding to the first feature level.

8. The method according to claim 1, characterized in that The image to be segmented is subjected to multi-scale downsampling to obtain multiple initial feature maps, including: Preprocessing the image to be segmented to obtain a preprocessed image; Extracting target features corresponding to preset color channels in the preprocessed image; The target features are subjected to multi-scale downsampling processing to obtain an initial feature map corresponding to each feature level.

9. The method according to any one of claims 1 to 8, characterized in that: The image to be segmented includes a medical image; The step of performing segmentation processing on the image to be segmented according to the feature map of the image to be segmented includes: The medical image is segmented according to the feature map of the image to be segmented and the target organ to be segmented to obtain a segmented image of the target organ.

10. A method for training an image segmentation model, characterized in that: include: Input a sample image into a segmentation network model to obtain a segmentation result output by the segmentation network model, wherein the segmentation network model is pre-constructed, and the segmentation network model performs multi-scale downsampling processing on the sample image to obtain an initial feature map corresponding to each feature level, each initial feature map corresponds to a feature level, and for an adjacent first feature level and a second feature level higher than the first feature level, the i-th feature map of the first feature level is updated based on the i-th feature map of the second feature level to obtain an updated feature map of the i-th feature map of the first feature level, and a mixed feature map is generated based on the updated feature map and the i-th feature map of the second feature level, wherein i is a natural number greater than 1, and all feature maps between the initial feature map of the first feature level and the i-th feature map, as well as the mixed feature map, are fused to obtain an i+1-th feature map corresponding to the first feature level, so as to generate a segmentation result based on the fused feature map between the initial feature map and the derived feature map of the lowest feature level among all feature levels; Determining loss information of the segmentation network model according to the segmentation result and the segmentation label corresponding to the sample image; The parameters of the segmentation network model are updated according to the loss information to obtain an image segmentation model.

11. An image segmentation device, characterized in that: include: A first sampling unit is used to perform multi-scale downsampling processing on the image to be segmented to obtain a plurality of initial feature maps, each of which corresponds to a feature level; A second sampling unit is used to update the i-th feature map of the first feature level based on the i-th feature map of the second feature level for an adjacent first feature level and a second feature level higher than the first feature level, to obtain an updated feature map of the i-th feature map of the first feature level, and to generate a mixed feature map according to the updated feature map and the i-th feature map of the second feature level, where i is a natural number greater than 1; to fuse all feature maps between the initial feature map of the first feature level and the i-th feature map, and the mixed feature map, to obtain an i+1-th feature map corresponding to the first feature level; A first fusion unit is used to fuse the initial feature map and the derived feature map in the lowest feature level of all feature levels to obtain the feature map of the image to be segmented; The segmentation unit is used to perform segmentation processing on the image to be segmented according to the feature map of the image to be segmented.

12. The device according to claim 11, characterized in that The first sampling unit is configured as follows: Preprocessing the image to be segmented to obtain a preprocessed image; Extracting target features corresponding to preset color channels in the preprocessed image; The target features are subjected to multi-scale downsampling processing to obtain an initial feature map corresponding to each feature level.

13. A training device for an image segmentation model, characterized in that: include: A construction unit for constructing a segmentation network model; A segmentation unit, used to input a sample image into the segmentation network model to obtain a segmentation result output by the segmentation network model, wherein the segmentation network model performs multi-scale downsampling processing on the sample image to obtain an initial feature map corresponding to each feature level, each initial feature map corresponds to a feature level, and for an adjacent first feature level and a second feature level higher than the first feature level, the i-th feature map of the first feature level is updated based on the i-th feature map of the second feature level to obtain an updated feature map of the i-th feature map of the first feature level, and a mixed feature map is generated based on the updated feature map and the i-th feature map of the second feature level, wherein i is a natural number greater than 1, and all feature maps between the initial feature map of the first feature level and the i-th feature map, as well as the mixed feature map, are fused to obtain an i+1-th feature map corresponding to the first feature level, so as to generate a segmentation result based on the fused feature map between the initial feature map and the derived feature map of the lowest feature level among all feature levels; A loss unit, used to determine loss information of the segmentation network model according to the segmentation result and the segmentation label corresponding to the sample image; A model unit is used to update the parameters of the segmentation network model according to the loss information to obtain an image segmentation model.

14. A computer readable medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the image segmentation method according to any one of claims 1 to 9 is implemented, or the image segmentation model training method according to claim 10 is implemented.

15. An electronic device, characterized in that: include: one or more processors; A storage device for storing one or more programs, which, when executed by the one or more processors, enables the one or more processors to implement the image segmentation method as described in any one of claims 1 to 9, or implement the training method of the image segmentation model as described in claim 10.