Image segmentation method, system, device and storage medium
By using image training data sets of different modalities to learn pixel distribution differences and update the image segmentation model, it solves the problem of cumbersome data collection in deep network training and improves the training effect and efficiency of the image segmentation model.
Patent Information
- Application Number
- CN202410756483.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-13
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2044-06-13
AI Technical Summary
Existing image segmentation technology requires a large amount of image data and pixel-level annotations when developing deep networks. Data collection is cumbersome and time-consuming, and requires multiple rounds of annotations by domain experts, resulting in heavy training data collection burden and low efficiency.
By obtaining the training data set of the first image of the target modality and an image of different modalities, the initial image segmentation model is used to learn the difference in pixel distribution, determine the importance weight and update the model until the difference reaches the preset value, easing training data collection Burden, enhance the contribution of useful data to the network, suppress useless or harmful data, and improve the model training effect.
By using images of different modalities for training, the burden of data collection is reduced, the training effect of the image segmentation model is improved, the contribution of useful data to network updates is enhanced, useless or harmful data is suppressed, and the overall performance of the model is improved.
Smart Images

Figure CN118334061B
Abstract
Description
Technical Field
[0001] The present application relates to the technical field related to image segmentation, and in particular to an image segmentation method, system, device and storage medium. Background Art
[0002] Image segmentation is an important part of image processing and the initial stage of image processing. Its purpose is to extract the features of the image to segment the image. Image segmentation also plays an important role in the field of image analysis and is also a part of image analysis. The essence of image segmentation is to extract the area of interest while removing the area of no interest, which can effectively reduce the interference of useless areas on the image. Therefore, the study of images is of great significance.
[0003] Currently, image segmentation technology has made significant progress with the assistance of advanced machine learning methods and deeper neural networks. However, the development of these deep networks usually requires a large amount of image data and pixel-level annotations. The data collection process is cumbersome and time-consuming, and requires multiple rounds of annotations by domain experts. Summary of the invention
[0004] The present application aims to at least solve the technical problems existing in the prior art. To this end, the present application proposes an image segmentation method, system, device and storage medium, which can use images of different modalities for training, reduce the burden of training data collection, and improve the training effect.
[0005] In a first aspect of the present application, an image segmentation method is provided, comprising the following steps:
[0006] Acquire an image training data set, wherein the image training data set includes a first image of a target modality and a second image of a modality different from the target modality;
[0007] Inputting the images in the image training data set into a preset initial image segmentation model, so as to learn the pixel distribution difference between the first image and the second image through the initial image segmentation model, and determining the importance weight of the second image according to the pixel distribution difference;
[0008] The initial image segmentation model is updated according to the importance weight until the pixel distribution difference between the first image and the second image reaches a preset value, thereby obtaining a first image segmentation model.
[0009] The control method according to the embodiment of the present application has at least the following beneficial effects:
[0010] The method obtains an image training data set, wherein the image training data set includes a first image of a target modality and a second image of a modality different from the target modality; inputs the images in the image training data set into a preset initial image segmentation model to learn the pixel distribution difference between the first image and the second image through the initial image segmentation model, and determines the importance weight of the second image according to the pixel distribution difference; updates the initial image segmentation model according to the importance weight until the pixel distribution difference between the first image and the second image reaches a preset value, thereby obtaining a first image segmentation model, and reduces the burden of training data collection by using images of different modalities for training, and determines the importance weight of the second image according to the pixel distribution difference between the first image and the second image, thereby enhancing the contribution of useful data to network updates, and suppressing "useless" or even "harmful" data, thereby improving the training effect of the image segmentation model.
[0011] According to some embodiments of the present application, the calculation formula for determining the importance weight of the second image according to the pixel distribution difference is:
[0012]
[0013]
[0014] in, To preset the regularization parameter, is the pixel distribution difference between the pixels of the first image and the pixels of the second image, For the The importance weight at the iteration, is the total number of importance weights, is the nth importance weight, is the importance weight.
[0015] According to some embodiments of the present application, the method further includes:
[0016] learning a first pixel distribution difference between the first image and the second image through the first image segmentation model, and determining a first importance weight of the second image according to the first pixel distribution difference;
[0017] Calculating a first loss value of the second image in the first image segmentation model;
[0018] updating the first image segmentation model according to the first importance weight and the first loss value to obtain a second image initial segmentation model;
[0019] Calculating a second loss value of the second image in the second image initial segmentation model;
[0020] Calculating a constraint loss value according to the second loss value and the first loss value;
[0021] When the constraint loss value satisfies the preset constraint condition, the second image initial segmentation model is used as the second image segmentation model.
[0022] According to some embodiments of the present application, the calculation formula for calculating the constraint loss value based on the second loss value and the first loss value is:
[0023]
[0024] in, is the total number of second images, For the The first image is in The loss value in the first image segmentation model of the iteration, For the The loss value of the first image in the initial segmentation model of the second image, For the The constraint loss value for iteration .
[0025] According to some embodiments of the present application, the calculation formula for updating the first image segmentation model according to the first importance weight and the first loss value to obtain the second image initial segmentation model is:
[0026]
[0027] in, For the The first image segmentation model of the iteration, For the The first image segmentation model of the iteration, is the learning rate, is the gradient operator, For the The second image is in The weight value at the iteration, For the The first image is in The loss value in the first image segmentation model of the iteration, is the penalty coefficient.
[0028] According to some embodiments of the present application, calculating a first loss value of the second image in the first image segmentation model includes:
[0029] Acquire an actual value and a predicted value of the second image, wherein the predicted value is a prediction of the second image by the first image segmentation model;
[0030] The first loss value is calculated by a cross entropy loss function or a Dice loss function.
[0031] According to some embodiments of the present application, the method further includes:
[0032] Obtain the image to be segmented of the target modality;
[0033] The image to be segmented of the target modality is input into the second image segmentation model to obtain an image segmentation result of the image to be segmented.
[0034] In a second aspect of the present application, an image segmentation system is provided, the image segmentation system comprising:
[0035] A data acquisition module, configured to acquire an image training data set, wherein the image training data set includes a first image of a target modality and a second image of a modality different from the target modality;
[0036] a weight determination module, configured to input the images in the image training data set into a preset initial image segmentation model, so as to learn the pixel distribution difference between the first image and the second image through the initial image segmentation model, and determine the importance weight of the second image according to the pixel distribution difference;
[0037] A model updating module is used to update the initial image segmentation model according to the importance weight until the pixel distribution difference between the first image and the second image reaches a preset value, thereby obtaining a first image segmentation model.
[0038] The system obtains an image training data set, wherein the image training data set includes a first image of a target modality and a second image of a modality different from the target modality; inputs the images in the image training data set into a preset initial image segmentation model to learn the pixel distribution difference between the first image and the second image through the initial image segmentation model, and determines the importance weight of the second image according to the pixel distribution difference; updates the initial image segmentation model according to the importance weight until the pixel distribution difference between the first image and the second image reaches a preset value, thereby obtaining a first image segmentation model, and reduces the burden of training data collection by using images of different modalities for training, and determines the importance weight of the second image according to the pixel distribution difference between the first image and the second image, thereby enhancing the contribution of useful data to network updates, while suppressing "useless" or even "harmful" data, thereby improving the training effect of the image segmentation model.
[0039] In a third aspect of the present application, an image segmentation electronic device is provided, comprising at least one control processor and a memory for communicating with the at least one control processor; the memory stores instructions executable by the at least one control processor, and the instructions are executed by the at least one control processor so that the at least one control processor can perform the above-mentioned image segmentation method.
[0040] According to a fourth aspect of the present application, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable a computer to execute the above-mentioned image segmentation method.
[0041] It should be noted that the beneficial effects between the second to fourth aspects of the present application and the prior art are the same as the beneficial effects between the above-mentioned image segmentation system and the prior art, and will not be described in detail here.
[0042] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the description of the embodiments in conjunction with the following drawings, in which:
[0044] Figure 1 is a flow chart of an embodiment of the image segmentation method provided by the present application;
[0045] Figure 2 is another flow chart of an embodiment of the image segmentation method provided by the present application;
[0046] Figure 3 is another flow chart of an embodiment of the image segmentation method provided by the present application;
[0047] Figure 4 is another flow chart of an embodiment of the image segmentation method provided by the present application;
[0048] Figure 5 is a structural schematic diagram of an embodiment of an image segmentation system provided by the present application;
[0049] Figure 6 It is a schematic diagram of the structure of an embodiment of the electronic device provided by the present application. DETAILED DESCRIPTION
[0050] The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present application, and cannot be understood as limiting the present application.
[0051] In the description of this application, if there is a description of first, second, etc., it is only for the purpose of distinguishing technical features, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features or implicitly indicating the order of the indicated technical features.
[0052] In the description of the present application, it should be understood that the descriptions involving orientation, such as the orientation or positional relationship indicated as up, down, etc., are based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the present application.
[0053] In the description of this application, it should be noted that, unless otherwise clearly defined, terms such as setting, installing, connecting, etc. should be understood in a broad sense, and technicians in the relevant technical field can reasonably determine the specific meaning of the above terms in this application based on the specific content of the technical solution.
[0054] Image segmentation is an important part of image processing and the initial stage of image processing. Its purpose is to extract the features of the image to segment the image. Image segmentation also plays an important role in the field of image analysis and is also a part of image analysis. The essence of image segmentation is to extract the area of interest while removing the area of no interest, which can effectively reduce the interference of useless areas on the image. Therefore, the study of images is of great significance.
[0055] Currently, image segmentation technology has made significant progress with the assistance of advanced machine learning methods and deeper neural networks. However, the development of these deep networks usually requires a large amount of image data and pixel-level annotations. The data collection process is cumbersome and time-consuming, and requires multiple rounds of annotations by domain experts.
[0056] In order to solve the above technical defects, refer to Figure 1 , the present application provides an image segmentation method, comprising:
[0057] Step S101, obtaining an image training data set, wherein the image training data set includes a first image of a target modality and a second image of a modality different from the target modality;
[0058] Step S102: input the images in the image training data set into a preset initial image segmentation model, so as to learn the pixel distribution difference between the first image and the second image through the initial image segmentation model, and determine the importance weight of the second image according to the pixel distribution difference;
[0059] Step S103: updating the initial image segmentation model according to the importance weight until the pixel distribution difference between the first image and the second image reaches a preset value, thereby obtaining a first image segmentation model.
[0060] The above importance weight is the term "weight" commonly used in network models.
[0061] Specifically, in some embodiments, an image to be segmented of a target modality and an image training data set are obtained, wherein the image training data set includes a first image of the target modality and a second image of a modality different from the target modality, and the image in the image training data set is input into a preset initial image segmentation model to learn the pixel distribution difference between the first image and the second image through the initial image segmentation model, and determine the importance weight of the second image according to the pixel distribution difference; the initial image segmentation model is updated according to the importance weight until the pixel distribution difference between the first image and the second image reaches a preset value, so as to obtain a first image segmentation model; the image to be segmented of the target modality is input into the first image segmentation model to obtain a segmentation result of the image to be segmented of the target modality.
[0062] The method obtains an image training data set, wherein the image training data set includes a first image of a target modality and a second image of a modality different from the target modality; inputs the images in the image training data set into a preset initial image segmentation model to learn the pixel distribution difference between the first image and the second image through the initial image segmentation model, and determines the importance weight of the second image according to the pixel distribution difference; updates the initial image segmentation model according to the importance weight until the pixel distribution difference between the first image and the second image reaches a preset value, thereby obtaining a first image segmentation model, and reduces the burden of training data collection by using images of different modalities for training, and determines the importance weight of the second image according to the pixel distribution difference between the first image and the second image, thereby enhancing the contribution of useful data to network updates, and suppressing "useless" or even "harmful" data, thereby improving the training effect of the image segmentation model.
[0063] In some embodiments, the calculation formula for determining the importance weight of the second image according to the pixel distribution difference is:
[0064]
[0065]
[0066] in, To preset the regularization parameter, is the pixel distribution difference between the pixels of the first image and the pixels of the second image, For the The importance weight at the iteration, is the total number of importance weights, is the nth importance weight, is the importance weight.
[0067] Specifically, in this embodiment, by determining the importance weight of the second image according to the difference in pixel distribution between the first image and the second image, the contribution of useful data to network updating is enhanced, while "useless" or even "harmful" data is suppressed.
[0068] In the process of estimating importance weights, this application introduces a learning trajectory, which improves the training effect of the image segmentation model by dynamically adjusting the importance weight of each data according to the current network status and data distribution in each iterative step.
[0069] In some embodiments, reference Figure 2 , the method further comprises:
[0070] Step S201: learning a first pixel distribution difference between a first image and a second image through a first image segmentation model, and determining a first importance weight of the second image according to the first pixel distribution difference;
[0071] Step S202, calculating a first loss value of the second image in the first image segmentation model;
[0072] Step S203: updating the first image segmentation model according to the first importance weight and the first loss value to obtain a second image initial segmentation model;
[0073] Step S204, calculating a second loss value of the second image in the second image initial segmentation model;
[0074] Step S205, calculating the constraint loss value according to the second loss value and the first loss value;
[0075] Step S206: When the constraint loss value satisfies the preset constraint condition, the second image initial segmentation model is used as the second image segmentation model.
[0076] Specifically, in this embodiment, a first pixel distribution difference between the first image and the second image is learned through a first image segmentation model, and a first importance weight of the second image is determined according to the first pixel distribution difference; a first loss value of the second image in the first image segmentation model is calculated; the first image segmentation model is updated according to the first importance weight and the first loss value to obtain an initial segmentation model of the second image; a second loss value of the second image in the initial segmentation model of the second image is calculated; a constrained loss value is calculated according to the second loss value and the first loss value, and a constraint condition is introduced on the basis of the first image segmentation model to ensure that the sum of losses on all internal data cannot exceed the sum of losses on the optimal model, thereby enabling the image segmentation model to better handle data with annotation errors and improving the training effect of the image segmentation model.
[0077] In some embodiments, the calculation formula for calculating the constraint loss value based on the second loss value and the first loss value is:
[0078]
[0079] in, is the total number of second images, For the The first image is in The loss value in the first image segmentation model of the iteration, For the The loss value of the first image in the initial segmentation model of the second image, For the The constraint loss value for iteration .
[0080] Specifically, in this embodiment, constraints are introduced to ensure that the sum of losses on all internal data cannot exceed the sum of losses on the optimal model, so that the image segmentation model can better handle data with annotation errors, thereby improving the training effect of the image segmentation model.
[0081] In some embodiments, the first image segmentation model is updated according to the first importance weight and the first loss value, and the calculation formula for obtaining the second image initial segmentation model is:
[0082]
[0083] in, For the The first image segmentation model of the iteration, For the The first image segmentation model of the iteration, is the learning rate, is the gradient operator, For the The second image is in The weight value at the iteration, For the The first image is in The loss value in the first image segmentation model of the iteration, is the penalty coefficient.
[0084] Specifically, during the network update process, the method of the present application introduces constraints, which are achieved by dynamically adjusting the strength of the constraints in each iterative step according to the current network status and data distribution. This enables the model to better adapt to data changes, thereby improving training results.
[0085] In some embodiments, reference Figure 3 , calculating the first loss value of the second image in the first image segmentation model, including:
[0086] Step S301, obtaining an actual value and a predicted value of a second image, wherein the predicted value is a prediction of the second image by a first image segmentation model;
[0087] Step S302: Calculate a first loss value using a cross entropy loss function or a Dice loss function.
[0088] Specifically, in some embodiments, the first loss value may be calculated by using a cross entropy loss function or a Dice loss function, or may be calculated by using a KL divergence or a Wasserstein distance.
[0089] In some embodiments, reference Figure 4 , the method further comprises:
[0090] Step S401, obtaining an image to be segmented in a target modality;
[0091] Step S402: input the image to be segmented of the target modality into the second image segmentation model to obtain an image segmentation result of the image to be segmented.
[0092] Specifically, in order to facilitate understanding by those skilled in the art, a set of optimal embodiments is provided below:
[0093] 1. Data acquisition:
[0094] An image to be segmented and an image training data set of a target modality are obtained, wherein the image training data set includes a first image of the target modality and a second image of a modality different from the target modality.
[0095] 2. Image segmentation of the first image segmentation model:
[0096] The images in the image training data set are input into the preset initial image segmentation model to learn the pixel distribution difference between the first image and the second image through the initial image segmentation model, and determine the importance weight of the second image according to the pixel distribution difference, wherein the calculation formula for determining the importance weight of the second image according to the pixel distribution difference is:
[0097]
[0098]
[0099] in, To preset the regularization parameter, is the pixel distribution difference between the pixels of the first image and the pixels of the second image, For the The importance weight at the iteration, is the total number of importance weights, is the nth importance weight, is the importance weight.
[0100] The initial image segmentation model is updated according to the importance weight until the pixel distribution difference between the first image and the second image reaches a preset value, thereby obtaining a first image segmentation model.
[0101] The image to be segmented of the target modality is input into the first image segmentation model to obtain a first segmentation result of the image to be segmented of the target modality.
[0102] 3: Image segmentation of the first image segmentation model:
[0103] learning a first pixel distribution difference between the first image and the second image through a first image segmentation model, and determining a first importance weight of the second image according to the first pixel distribution difference;
[0104] Calculate the first loss value of the second image in the first image segmentation model, specifically:
[0105] Obtaining an actual value and a predicted value of the second image, wherein the predicted value is a prediction of the second image by the first image segmentation model;
[0106] The first loss value is calculated by the cross entropy loss function or the Dice loss function.
[0107] The first image segmentation model is updated according to the first importance weight and the first loss value to obtain the second image initial segmentation model, wherein the calculation formula for updating the first image segmentation model according to the first importance weight and the first loss value to obtain the second image initial segmentation model is:
[0108]
[0109] in, For the The first image segmentation model of the iteration, For the The first image segmentation model of the iteration, is the learning rate, is the gradient operator, For the The second image is in The weight value at the iteration, For the The first image is in The loss value in the first image segmentation model of the iteration, is the penalty coefficient.
[0110] Calculate a second loss value of the second image in the second image initial segmentation model;
[0111] The constraint loss value is calculated according to the second loss value and the first loss value, wherein the calculation formula for calculating the constraint loss value according to the second loss value and the first loss value is:
[0112]
[0113] in, is the total number of second images, For the The first image is in The loss value in the first image segmentation model of the iteration, For the The loss value of the first image in the initial segmentation model of the second image, For the The constraint loss value for iteration .
[0114] When the constraint loss value satisfies the preset constraint condition, the second image initial segmentation model is used as the second image segmentation model.
[0115] The image to be segmented of the target modality is input into the second image segmentation model to obtain a second image segmentation result of the image to be segmented.
[0116] In addition, refer to Figure 5 One embodiment of the present application provides an image segmentation system, including a data acquisition module 1100, a weight determination module 1200 and a model update module 1300, wherein:
[0117] The data acquisition module 1100 is used to acquire an image training data set, wherein the image training data set includes a first image of a target modality and a second image of a modality different from the target modality;
[0118] The weight determination module 1200 is used to input the images in the image training data set into a preset initial image segmentation model, so as to learn the pixel distribution difference between the first image and the second image through the initial image segmentation model, and determine the importance weight of the second image according to the pixel distribution difference;
[0119] The model updating module 1300 is used to update the initial image segmentation model according to the importance weight until the pixel distribution difference between the first image and the second image reaches a preset value, thereby obtaining a first image segmentation model.
[0120] The system obtains an image training data set, wherein the image training data set includes a first image of a target modality and a second image of a modality different from the target modality; inputs the images in the image training data set into a preset initial image segmentation model to learn the pixel distribution difference between the first image and the second image through the initial image segmentation model, and determines the importance weight of the second image according to the pixel distribution difference; updates the initial image segmentation model according to the importance weight until the pixel distribution difference between the first image and the second image reaches a preset value, thereby obtaining a first image segmentation model, and reduces the burden of training data collection by using images of different modalities for training, and determines the importance weight of the second image according to the pixel distribution difference between the first image and the second image, thereby enhancing the contribution of useful data to network updates, while suppressing "useless" or even "harmful" data, thereby improving the training effect of the image segmentation model.
[0121] It should be noted that the present system embodiment and the above-mentioned method embodiment are based on the same inventive concept, so the relevant contents of the above-mentioned method embodiment are also applicable to the present system embodiment and will not be repeated here.
[0122] Figure 6 A schematic diagram of the hardware structure of image segmentation provided in an embodiment of the present application is shown.
[0123] The image segmentation device may include a processor 601 and a memory 602 storing computer program instructions.
[0124] Specifically, the processor 601 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.
[0125] The memory 602 may include a large capacity memory for data or instructions. By way of example and not limitation, the memory 602 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive or a combination of two or more of these. In appropriate cases, the memory 602 may include a removable or non-removable (or fixed) medium. In appropriate cases, the memory 602 may be inside or outside the integrated gateway disaster recovery device. In a specific embodiment, the memory 602 is a non-volatile solid-state memory.
[0126] In some embodiments, the memory 602 may include a read-only memory (ROM), a random access memory (RAM), a magnetic disk storage media device, an optical storage media device, a flash memory device, an electrical, optical or other physical / tangible memory storage device. Thus, in general, the memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., a memory device) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the method according to an aspect of the present disclosure.
[0127] The processor 601 implements any one of the image segmentation methods in the above embodiments by reading and executing computer program instructions stored in the memory 602 .
[0128] In one example, the image segmentation device may further include a communication interface 603 and a bus 610. Figure 6 As shown, the processor 601, the memory 602, and the communication interface 603 are connected via a bus 610 and communicate with each other.
[0129] The communication interface 603 is mainly used to implement communication between various modules, devices, units and / or equipment in the embodiments of the present application.
[0130] Bus 610 includes hardware, software or both, and the components of the image segmentation device are coupled to each other. For example, but not limitation, the bus may include accelerated graphics port (AGP) or other graphics bus, enhanced industrial standard architecture (EISA) bus, front-side bus (FSB), hypertransport (HT) interconnection, industrial standard architecture (ISA) bus, infinite bandwidth interconnection, low pin count (LPC) bus, memory bus, micro channel architecture (MCA) bus, peripheral component interconnection (PCI) bus, PCI-Express (PCI-X) bus, serial advanced technology attachment (SATA) bus, video electronics standard association local (VLB) bus or other suitable bus or two or more of these combinations. In appropriate cases, bus 610 may include one or more buses. Although the present application embodiment describes and shows a specific bus, the present application considers any suitable bus or interconnection.
[0131] The image segmentation device can execute the image segmentation method in the embodiment of the present application based on the three-dimensional design model, thereby realizing the combination of Figure 1 and Figure 5 Described is an image segmentation method and system.
[0132] In addition, in combination with the image segmentation method in the above embodiment, the embodiment of the present application can provide a computer storage medium for implementation. The computer storage medium stores computer program instructions; when the computer program instructions are executed by a processor, any one of the image segmentation methods in the above embodiment is implemented.
[0133] It should be clear that the present application is not limited to the specific configuration and processing described above and shown in the figures. For the sake of simplicity, a detailed description of the known method is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present application is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between the steps after understanding the spirit of the present application.
[0134] The functional blocks shown in the structural block diagram described above can be implemented as hardware, software, firmware or a combination thereof. When implemented in hardware, it can be, for example, an electronic circuit, an application-specific integrated circuit (ASIC), appropriate firmware, a plug-in, a function card, etc. When implemented in software, the elements of the present application are programs or code segments used to perform the required tasks. The program or code segment can be stored in a machine-readable medium, or transmitted on a transmission medium or a communication link by a data signal carried in a carrier. "Machine-readable medium" may include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROMs, flash memories, erasable ROMs (EROMs), floppy disks, CD-ROMs, optical disks, hard disks, optical fiber media, radio frequency (RF) links, etc. The code segment can be downloaded via a computer network such as the Internet, an intranet, etc.
[0135] It should also be noted that the exemplary embodiments mentioned in this application describe some methods or systems based on a series of steps or devices. However, this application is not limited to the order of the above steps, that is, the steps can be performed in the order mentioned in the embodiment, or in a different order from the embodiment, or several steps can be performed simultaneously.
[0136] Aspects of the present disclosure are described above with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products according to the embodiments of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device to produce a machine so that these instructions executed by the processor of the computer or other programmable data processing device enable the implementation of the functions / actions specified in one or more boxes of the flowchart and / or block diagram. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field programmable logic circuit. It can also be understood that each box in the block diagram and / or flowchart and the combination of boxes in the block diagram and / or flowchart can also be implemented by dedicated hardware that performs the specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions.
[0137] The above is only a specific implementation of the present application. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the systems, modules and units described above can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here. It should be understood that the protection scope of the present application is not limited to this. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in this application, and these modifications or replacements should be included in the protection scope of this application.
Claims
1. An image segmentation method, characterized in that: The image segmentation method comprises: Acquire an image training data set, wherein the image training data set includes a first image of a target modality and a second image of a modality different from the target modality; The images in the image training data set are input into a preset initial image segmentation model to learn the pixel distribution difference between the first image and the second image through the initial image segmentation model, and the importance weight of the second image is determined according to the pixel distribution difference, wherein the calculation formula for determining the importance weight of the second image according to the pixel distribution difference is: ; ; in, To preset the regularization parameter, is the pixel distribution difference between the pixels of the first image and the pixels of the second image, For the The importance weight at the iteration, is the total number of importance weights, is the nth importance weight, is the importance weight; updating the initial image segmentation model according to the importance weight until the pixel distribution difference between the first image and the second image reaches a preset value, thereby obtaining a first image segmentation model; learning a first pixel distribution difference between the first image and the second image through the first image segmentation model, and determining a first importance weight of the second image according to the first pixel distribution difference; Calculating a first loss value of the second image in the first image segmentation model; The first image segmentation model is updated according to the first importance weight and the first loss value to obtain a second image initial segmentation model, wherein the calculation formula for updating the first image segmentation model according to the first importance weight and the first loss value to obtain the second image initial segmentation model is: ; in, For the The first image segmentation model of the iteration, For the The first image segmentation model of the iteration, is the learning rate, is the gradient operator, For the The second image is in The weight value at the iteration, For the The first image is in The loss value in the first image segmentation model of the iteration, is the penalty coefficient; Calculating a second loss value of the second image in the second image initial segmentation model; Calculating a constraint loss value according to the second loss value and the first loss value; When the constraint loss value satisfies the preset constraint condition, the second image initial segmentation model is used as the second image segmentation model.
2. The image segmentation method according to claim 1, characterized in that: The calculation formula for calculating the constraint loss value based on the second loss value and the first loss value is: ; in, is the total number of second images, For the The first image is in The loss value in the first image segmentation model of the iteration, For the The loss value of the first image in the initial segmentation model of the second image, For the The constraint loss value for iteration .
3. The image segmentation method according to claim 2, characterized in that: The calculating a first loss value of the second image in the first image segmentation model comprises: Acquire an actual value and a predicted value of the second image, wherein the predicted value is a prediction of the second image by the first image segmentation model; The first loss value is calculated by a cross entropy loss function or a Dice loss function.
4. The image segmentation method according to claim 3, characterized in that: The method further comprises: Obtain the image to be segmented of the target modality; The image to be segmented of the target modality is input into the second image segmentation model to obtain an image segmentation result of the image to be segmented.
5. An image segmentation system, characterized in that: The image segmentation system comprises: A data acquisition module, configured to acquire an image training data set, wherein the image training data set includes a first image of a target modality and a second image of a modality different from the target modality; A weight determination module is used to input the images in the image training data set into a preset initial image segmentation model to learn the pixel distribution difference between the first image and the second image through the initial image segmentation model, and determine the importance weight of the second image according to the pixel distribution difference, wherein the calculation formula for determining the importance weight of the second image according to the pixel distribution difference is: ; ; in, To preset the regularization parameter, is the pixel distribution difference between the pixels of the first image and the pixels of the second image, For the The importance weight at the iteration, is the total number of importance weights, is the nth importance weight, is the importance weight; A model updating module, used for updating the initial image segmentation model according to the importance weight until the pixel distribution difference between the first image and the second image reaches a preset value, thereby obtaining a first image segmentation model; learning a first pixel distribution difference between the first image and the second image through the first image segmentation model, and determining a first importance weight of the second image according to the first pixel distribution difference; Calculating a first loss value of the second image in the first image segmentation model; The first image segmentation model is updated according to the first importance weight and the first loss value to obtain a second image initial segmentation model, wherein the calculation formula for updating the first image segmentation model according to the first importance weight and the first loss value to obtain the second image initial segmentation model is: ; in, For the The first image segmentation model of the iteration, For the The first image segmentation model of the iteration, is the learning rate, is the gradient operator, For the The second image is in The weight value at the iteration, For the The first image is in The loss value in the first image segmentation model of the iteration, is the penalty coefficient; Calculating a second loss value of the second image in the second image initial segmentation model; Calculating a constraint loss value according to the second loss value and the first loss value; When the constraint loss value satisfies the preset constraint condition, the second image initial segmentation model is used as the second image segmentation model.
6. An image segmentation device, characterized in that: It includes at least one control processor and a memory for communicating with the at least one control processor; the memory stores instructions that can be executed by the at least one control processor, and the instructions are executed by the at least one control processor so that the at least one control processor can execute an image segmentation method as described in any one of claims 1 to 4.
7. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable a computer to execute an image segmentation method as claimed in any one of claims 1 to 4.
