Eye fundus image-based multi-task segmentation model training method, method and product

By constructing a multi-task segmentation model in the fundus image, and using the pre-trained image encoder and cross-entropy loss function to train the sub-task segmentation model, the problem of poor multi-task segmentation effect in the existing technology is solved, and the multi-task segmentation model is realized local optimal effect and model flexibility.

CN118537299APending Publication Date: 2024-08-23BEIJING AIRDOC TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410593158.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2023-09-28
Filing Date
2024-05-14
Publication Date
2024-08-23

AI Technical Summary

Technical Problem

Existing segmentation models are difficult to achieve local optimal segmentation results in multi-task segmentation. Especially when processing multiple markers in fundus images, single-task annotation training results in unsatisfactory segmentation results.

Method used

A multi-task segmentation model training method based on fundus images is adopted. By obtaining the pre-trained image encoder, multiple sub-task segmentation models are constructed, and the parameters of the first image encoder are fixed during the training process, and the cross-entropy loss function is used to The task segmentation model is trained to form a multi-task segmentation model that shares the first image encoder.

Benefits of technology

It realizes the optimal segmentation effect of the multi-task segmentation model on multiple markers, improves the scalability and flexibility of the model, can handle more subtasks without retraining the entire model, and improves the segmentation effect and model performance. Practicality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118537299A
    Figure CN118537299A
Patent Text Reader

Abstract

The invention discloses a training method, method and product of a multi-task segmentation model based on an eye fundus image, the multi-task segmentation model is constructed by a plurality of sub-task segmentation models, and the training method comprises the following steps: obtaining a pre-trained first image encoder; for each subtask, based on the first image encoder, constructing a subtask segmentation model; and training the sub-task segmentation model by using the fundus image with the sub-task annotation, and fixing parameters of the first image encoder in the training process. According to the embodiment of the invention, each sub-task segmentation model is constructed and independently trained through the first image encoder based on the fixed parameters, so that the multi-task segmentation model constructed by the trained sub-task segmentation models has the capability of segmenting multiple tasks.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure generally relates to the field of image processing technology. More specifically, the present disclosure relates to a training method for a multi-task segmentation model based on fundus images, a method, a device and a computer-readable storage medium for performing multi-task segmentation based on fundus images. Background Art

[0002] Fundus images are widely used in the analysis of retinal structure and the prediction of certain diseases because of their convenience and non-invasiveness to patients. Fundus images provide some basic information about the structure of fundus tissues and markers such as pathological conditions, such as Figure 1 As shown, the fundus image shows some important biological tissue structures and four types of lesions, including optic disc 101, optic cup 102, blood vessel 103, hemorrhage (HE) 104, microaneurysm (MA) 105, soft exudate (SE) 106 and hard exudate (EX) 107. It can be clearly seen from the fundus image that the size and morphology of these lesions vary greatly, which increases the difficulty of the multi-category segmentation task.

[0003] In recent years, deep learning has made remarkable progress in many fields. In particular, convolutional neural networks (CNNs) have been widely used in various fields of fundus image analysis and have achieved satisfactory results in tasks such as optic disc and cup segmentation, blood vessel segmentation, and lesion segmentation. However, although various segmentation methods may perform well on different types of segmentation tasks, most methods usually focus on one type of task segmentation. This limitation makes it impossible for segmentation models to segment multiple landmarks simultaneously.

[0004] In view of this, there is an urgent need to provide a solution for multi-task segmentation based on fundus images. Summary of the invention

[0005] In order to at least solve one or more of the technical problems mentioned above, the present disclosure proposes in multiple aspects a training method for a multi-task segmentation model based on fundus images, a method, device and computer-readable storage medium for performing multi-task segmentation based on fundus images.

[0006] In a first aspect, the present disclosure provides a training method for a multi-task segmentation model based on fundus images, wherein the multi-task segmentation model is constructed from multiple sub-task segmentation models, and the training method includes: obtaining a pre-trained first image encoder; for each sub-task, constructing a sub-task segmentation model based on the first image encoder; training the sub-task segmentation model using a fundus image with sub-task annotations, and fixing the parameters of the first image encoder during the training process.

[0007] In some embodiments, the pre-training comprises self-supervised training.

[0008] In other embodiments, the self-supervised training includes adopting a training framework of MAE, DINO, MoCo-v3, or SimCLR.

[0009] In some further embodiments, constructing a subtask segmentation model includes: constructing a second image encoder in parallel with the first image encoder so that the output of the second image encoder is merged with the output of the first image encoder; setting a subtask image decoder so that the subtask image decoder is used to decode the merged output of the first image encoder and the second image encoder.

[0010] In some embodiments, training the subtask segmentation model using the fundus image with subtask annotations includes: inputting the fundus image with subtask annotations into the first image encoder to obtain a first image feature; inputting the fundus image with subtask annotations into the second image encoder to obtain a second image feature; merging the first image feature with the second image feature to obtain a merged feature; inputting the merged feature into the subtask image decoder to obtain a segmentation prediction output; and training the subtask segmentation model based on the segmentation prediction output and the subtask annotations to update the parameters of the second image encoder and the subtask image decoder.

[0011] In some other embodiments, training the subtask segmentation model further includes: using a cross entropy loss function when training the subtask segmentation model, wherein the cross entropy loss function is calculated as follows: L BCE =-[p·log(p * )+(1-p)·log(1-p * )], where L BCE represents the cross entropy loss function, p represents the subtask label, and p * Represents the segmentation prediction output.

[0012] In some further embodiments, the subtask image decoder is a decoder in a UNet, UNet++, or PSPNet network.

[0013] In some embodiments, the second image encoder is a lightweight image encoder.

[0014] In some other embodiments, the lightweight image encoder includes a hardnet network structure.

[0015] In some further embodiments, the multi-task segmentation model is constructed by a plurality of sub-task segmentation models in a manner of sharing the first image encoder.

[0016] In the second aspect, the present disclosure provides a method for performing multi-task segmentation based on fundus images, comprising: inputting the fundus image to be segmented into a multi-task segmentation model trained according to any training method described in the first aspect of the present disclosure; and using the multi-task segmentation model to perform a multi-task segmentation operation on the fundus image to be segmented, and outputting the multi-task segmentation results.

[0017] In a third aspect, the present disclosure provides a device for performing multi-task segmentation based on fundus images, comprising: a processor for executing program instructions; and a memory storing the program instructions, wherein when the program instructions are loaded and executed by the processor, the processor executes any training method described in the first aspect of the present disclosure or executes the method described in the second aspect of the present disclosure.

[0018] In a fourth aspect, the present disclosure provides a computer-readable storage medium having computer-readable instructions stored thereon, which, when executed by one or more processors, implement the training method as described in any one of the first aspects of the present disclosure or the method as described in the second aspect of the present disclosure.

[0019] Through the multi-task segmentation scheme based on fundus images provided above, the disclosed embodiment constructs and separately trains each sub-task segmentation model through a first image encoder based on fixed parameters, so that the multi-task segmentation model constructed by the trained sub-task segmentation models has the ability to segment multiple tasks and has a better segmentation effect for each sub-task. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] By reading the detailed description below with reference to the accompanying drawings, the above and other objects, features and advantages of the exemplary embodiments of the present disclosure will become readily understood. In the accompanying drawings, several embodiments of the present disclosure are shown in an exemplary and non-limiting manner, and the same or corresponding reference numerals represent the same or corresponding parts, wherein:

[0021] Figure 1 A fundus image including some landmark information is shown;

[0022] Figure 2 A flowchart of a training method for a multi-task segmentation model based on fundus images according to an embodiment of the present disclosure is shown;

[0023] Figure 3 A flowchart of a method for training a multi-task segmentation model based on fundus images according to another embodiment of the present disclosure is shown;

[0024] Figure 4 A schematic diagram showing the construction and training process of the subtask segmentation model according to an embodiment of the present disclosure is shown;

[0025] Figure 5 A schematic diagram showing a multi-task segmentation model constructed by using multiple sub-task segmentation models according to an embodiment of the present disclosure;

[0026] Figure 6a A flow chart of a method for performing multi-task segmentation based on fundus images according to an embodiment of the present disclosure is shown;

[0027] Figure 6b A schematic diagram showing the effect after segmentation according to the multi-task segmentation method of an embodiment of the present disclosure is shown;

[0028] Figure 7 is a schematic block diagram showing a system for multi-task segmentation according to an embodiment of the present disclosure. DETAILED DESCRIPTION

[0029] The following will be combined with the drawings in the embodiments of the present disclosure to clearly and completely describe the technical solutions in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present disclosure.

[0030] It should be understood that the terms "include" and "comprising" used in the specification and claims of the present disclosure indicate the presence of described features, integers, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or collections thereof.

[0031] It should also be understood that the terms used in this disclosure are only for the purpose of describing specific embodiments and are not intended to limit the disclosure. As used in this disclosure and claims, the singular forms of "a", "an", and "the" are intended to include the plural forms unless the context clearly indicates otherwise. It should also be further understood that the term "and / or" used in this disclosure and claims refers to any combination of one or more of the associated listed items and all possible combinations, including these combinations.

[0032] As used in this specification and claims, the term "if" may be interpreted as "when" or "upon" or "in response to determining" or "in response to detecting," depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" may be interpreted as meaning "upon determination" or "in response to determining" or "upon detection of [described condition or event]" or "in response to detecting [described condition or event]," depending on the context.

[0033] The inventors have found that in the training process of the existing segmentation model, the training is usually based on the training data labeled with a single task, so that the segmentation model used to perform a single segmentation task is obtained. The inventors have also found that when the same segmentation model is trained using training data labeled with tasks containing multiple categories, even if the segmentation model obtained after training can perform multi-task segmentation, it cannot reach the local optimal situation, that is, the segmentation effect for each task is not ideal. Based on this, the present disclosure provides a new solution to realize the training of a multi-task segmentation model, so that the trained multi-task segmentation model can be used to realize the segmentation requirements of multiple tasks and can achieve the local optimal segmentation effect.

[0034] The specific implementation of the present disclosure is described in detail below with reference to the accompanying drawings.

[0035] Figure 2 FIG. 4 is a flowchart of a method for training a multi-task segmentation model based on fundus images according to an embodiment of the present disclosure. Figure 2 As shown in , the training method 200 may include: in step 202, a pre-trained first image encoder may be obtained. In some embodiments, labeled and / or unlabeled fundus image data may be used for pre-training. These labeled and / or unlabeled fundus image data may come from existing data, and the labels here may not be limited to labels of one segmentation task, but may also be labels of multiple segmentation tasks, or only unlabeled fundus image data may be used for pre-training. In other embodiments, the pre-training in step 202 may include self-supervised training. By adopting self-supervised training and using unlabeled fundus image data for pre-training, existing data can be utilized to the maximum extent, which is also beneficial to improving the ability of the first image encoder to extract image features.

[0036] In other embodiments, self-supervised training may adopt a training framework including, for example, MAE, DINO, MoCo-v3, or SimCLR. Self-supervised training is performed on a network structure based on one of these training frameworks, and the image encoder (or feature extractor) in the network structure after self-supervised training may be used as the first image encoder. In some embodiments, the first image encoder may include a ViT (vision transformer) model, etc. In order to facilitate understanding of the process of obtaining the first image encoder through self-supervised training, MAE will be used as an example for explanation below.

[0037] MAE (Masked Autoencoders) is a self-supervised learning method for computer vision, which performs self-supervised training based on an asymmetric encoding and decoding structure. During the pre-training process, for a fundus image data X, the fundus image data X can be input into the feature extractor in the MAE network structure to extract the first feature F of the fundus image data; then, some features in the first feature F are randomly masked according to a certain proportion to obtain the second feature F'; the second feature F' is input into the decoder in the MAE network structure to obtain the decoded output and the reconstructed image X'; and based on the loss function between the input fundus image data X and the reconstructed image X', the network structure of MAE is optimized, thereby optimizing the feature extractor in the MAE network structure. In some embodiments, the loss function between the fundus image data X and the reconstructed image X' can adopt the MSE (mean squared error) loss function, and its calculation method can be as follows:

[0038]

[0039] Among them, L MSE represents the MSE loss function between the input fundus image data and the reconstructed image, X i represents the i-th fundus image data in the input MAE network structure, X′ i represents the i-th reconstructed image, and n represents the total number of fundus image data used for pre-training.

[0040] After the above self-supervised training, the feature extractor in the pre-trained network structure can be obtained and its parameters can be fixed as the first image encoder for subsequent operations.

[0041] like Figure 2 As shown in , then, in step 204, for each subtask, a subtask segmentation model can be constructed based on the first image encoder. In some embodiments, the subtask may include a task of segmenting one of the tissue structures such as the optic disc, the optic cup, or the blood vessel in the fundus image, or one of the lesion features such as HE (hemorrhage), MA (microaneurysm), SE (soft exudate) and EX (hard exudate). In other embodiments, the constructed subtask segmentation model includes at least the first image encoder.

[0042] Then, the process can proceed to step 206, where the subtask segmentation model can be trained using the fundus image with subtask annotations, and the parameters of the first image encoder can be fixed during the training process. After the first image encoder is obtained in step 202, the first image encoder does not update the parameters during the training process of each subtask segmentation model. In other words, each subtask segmentation model can have the same first image encoder.

[0043] In some embodiments, subtask annotation can be implemented by manual annotation or machine annotation. In other embodiments, a data set of fundus images with subtask annotations can be used to train the subtask segmentation model, and the data set can include one or more fundus images with subtask annotations. In some other embodiments, when the fundus image data used for pre-training includes data with labels, the fundus images with subtask annotations can be derived from the labeled fundus image data in the fundus image data used for pre-training.

[0044] For the training of each subtask segmentation model, a fundus image with one type of subtask annotation can be used. In some application scenarios, assuming that a subtask is to segment the blood vessels in the fundus image, the subtask annotation can be the annotation of the blood vessels in the fundus image. In other application scenarios, assuming that a subtask is to segment the microaneurysm area of ​​the fundus image, the subtask annotation can be the annotation of the microaneurysms existing in the fundus image. Based on this, for each subtask segmentation model, the fundus image with the corresponding subtask annotation is used for training, and the obtained subtask segmentation model can be used to segment the corresponding subtask.

[0045] Combination of the above Figure 2 The training method according to the embodiment of the present disclosure is described exemplarily. It can be understood that the multi-task segmentation model according to the embodiment of the present disclosure can be constructed by multiple sub-task segmentation models, so that the training of the multi-task segmentation model can be achieved by training each sub-task segmentation model. By training each sub-task segmentation model separately, each sub-task segmentation model can achieve a better sub-task segmentation effect, so that the constructed multi-task segmentation model can perform multi-task segmentation and has a better segmentation effect for each sub-task, which is conducive to achieving a local optimal technical effect.

[0046] In some embodiments, since the parameters of the first image encoder are fixed during the training process of each subtask segmentation model, that is, each subtask segmentation model shares the same first image encoder, the trained subtask segmentation models can be cascaded to form a multi-task segmentation model in a manner of sharing the first image encoder. According to such a setting, when a new subtask needs to be processed, a new subtask segmentation model can be constructed based on the shared first image encoder, and the trained new subtask segmentation model can be cascaded to the existing multi-task segmentation model without retraining the entire multi-task segmentation model. Therefore, the multi-task segmentation model according to the embodiment of the present disclosure has good scalability and flexibility, which is conducive to improving the convenience and agility of model development to meet the segmentation needs of a larger number and more types of subtasks.

[0047] It is also understandable that the above combination Figure 2 The description is exemplary and not restrictive. For example, the training method according to the disclosed embodiment may not be limited to including only step 202, step 204 and step 206 in the diagram. For example, in some embodiments, before pre-training, the fundus image data used for pre-training may be cleaned to remove low-quality image data; and / or before training the subtask segmentation model, the fundus images with subtask annotations used for training the subtask segmentation model may be cleaned to remove low-quality fundus images. For example, the constructed subtask segmentation model may not be limited to including only the first image encoder, but may also include other image encoders. The following will be combined with Figure 3 An exemplary description is given.

[0048] Figure 3 A flowchart of a training method for a multi-task segmentation model based on fundus images according to another embodiment of the present disclosure is shown. As can be seen from the following description, Figure 3 The training method 300 shown can be combined with Figure 2 A specific implementation of the training method 200 described above, therefore, Figure 2 The description of the training method 200 may also be applicable to the following description of the training method 300 .

[0049] like Figure 3 As shown, the training method 300 may include: in step 301, a pre-trained first image encoder may be obtained. Step 301 may be combined with the above or Figure 2 The described step 202 is the same or similar and will not be repeated here.

[0050] Next, in step 302, based on each subtask, a second image encoder connected in parallel with the first image encoder may be constructed so that the output of the second image encoder is merged with the output of the first image encoder. Constructing the second image encoder connected in parallel with the first image encoder may be implemented in a variety of ways. For example, in some embodiments, a second image encoder having the same or different network structure as the first image encoder may be selected as needed, and the output of the second image encoder may be directly merged with the output of the first image encoder. In other embodiments, the first image encoder may be connected to a basic segmentation model so that the output of the first image encoder is merged with the output of the original image encoder in the basic segmentation model. According to such a setting, the original image encoder here is the second image encoder.

[0051] In some other embodiments, the first image encoder may be used to replace the original image encoder in the basic segmentation model, and then a second image encoder may be additionally provided so that the output of the second image encoder is merged with the output of the first image encoder. In some other embodiments, assuming that the network structure of the original image encoder in the basic segmentation model used is the same as the network structure of the first image encoder in the disclosed embodiment, the parameters of the original image encoder may be initialized based on the parameters of the pre-trained first image encoder so that the parameters of the original image encoder here are the same as the parameters of the first image encoder, and the parameters are fixed; and then a second image encoder may be additionally provided so that the output of the second image encoder is merged with the output of the initialized and fixed original image encoder, which is also equivalent to achieving the construction goal of step 302. In some embodiments, the above-mentioned basic segmentation model may include models such as UNet, UNet++, or PSPNet.

[0052] According to such a setting, the first image encoder can be used to extract common semantic information and features in the fundus image, while the second image encoder can be used to extract differentiated features of each subtask.

[0053] In other embodiments, the second image encoder may be a lightweight image encoder. A lightweight image encoder has the characteristic of few parameters, so that when the parameters of the first image decoder are fixed, a lightweight image encoder is used to extract the difference features between the subtasks, which is beneficial to reduce the network parameters that need to be optimized when training the subtask segmentation model, and is beneficial to reduce the overall parameter amount when training the multi-task segmentation model, thereby facilitating the improvement of the training speed and the inference speed, and is beneficial to reducing the hardware requirements for using the model in actual scenarios, so as to improve the practicality of the model. In some other embodiments, the lightweight image encoder may include, for example, a hardnet network structure or other lightweight network structures.

[0054] Then, the process can proceed to step 303, and a subtask image decoder can be set so that the subtask image decoder is used to decode the combined output of the first image encoder and the second image encoder. Setting the subtask image decoder can be achieved in a variety of ways. For example, in some embodiments, the required decoder can be selected as the subtask image decoder as needed, and its input end is connected to the combined output end of the first image encoder and the second image encoder. In other embodiments, the first image encoder and the second image encoder constructed in step 302 can replace the original image encoder in the basic segmentation model so that the decoder in the basic segmentation model can be used as the subtask image decoder. In some other embodiments, the subtask image decoder can be a decoder in a network such as UNet, UNet++, or PSPNet. In some embodiments, the subtask image decoder may include a ViT (vision transformer) model, etc.

[0055] In other embodiments, the structures of the subtask segmentation models of different subtasks may be the same or different, that is, the second image encoders of the same or different structures may be used in different subtask segmentation models, and the subtask image decoders of the same or different structures may be used. According to such a setting, when constructing each subtask segmentation model, it can be constructed based on the basic segmentation model that is good at the segmentation of this type of subtask, so that the multi-task segmentation model finally constructed can integrate the subtask network structure that is good at the segmentation of various subtasks, which is conducive to further improving the segmentation effect of each subtask in the multi-task segmentation. For example, assuming that UNet is suitable for segmenting vascular structures in fundus images, and PSPNet is suitable for segmenting a certain lesion feature in fundus images, then a subtask segmentation model for the subtask of segmenting blood vessels can be constructed based on UNet, and a subtask segmentation model for the subtask of segmenting a certain lesion feature can be constructed based on PSPNet, so that the constructed multi-task segmentation model has better segmentation effects in both the subtasks of segmenting blood vessels and segmenting a certain lesion feature.

[0056] After constructing the subtask segmentation model, Figure 3 As further shown in FIG, in step 304, the fundus image with subtask annotations can be input into the first image encoder and the second image encoder respectively to obtain the first image feature and the second image feature respectively. Specifically, in some embodiments, the fundus image with subtask annotations can be input into the first image encoder to obtain the first image feature; the fundus image with subtask annotations can be input into the second image encoder to obtain the second image feature.

[0057] Then, in step 305, the first image feature and the second image feature can be merged to obtain a merged feature. The merged feature includes both the first image feature that is common to each subtask and the second image feature that is specific to each subtask. Then, in step 306, the merged feature can be input to the subtask image decoder to obtain a segmentation prediction output. The subtask image decoder can output a segmentation prediction output that takes into account both the first image feature and the second image feature by decoding the merged feature. The segmentation prediction output here can be a prediction probability value.

[0058] Further, in step 307, the subtask segmentation model can be trained based on the segmentation prediction output and the subtask annotation to update the parameters of the second image encoder and the subtask image decoder. In some embodiments, the subtask segmentation model can be back-propagated and trained based on the gap between the segmentation prediction output and the subtask annotation to iteratively update the parameters of the second image encoder and the subtask image decoder. In this process, the parameters of the first image encoder are not updated. In other embodiments, the subtask segmentation model can be trained based on the loss function between the segmentation prediction output and the subtask annotation until the loss function converges and the training is completed.

[0059] In some further embodiments, step 307 may further include: using a cross entropy loss function when training the subtask segmentation model, and the cross entropy loss function may be calculated as follows:

[0060] L BCE =-[p·log(p * )+(1-p)·log(1-p * )] (Formula 2)

[0061] Among them, L BCE represents the cross entropy loss function, p represents the subtask label, and p * Represents the segmentation prediction output.

[0062] Combination of the above Figure 3 The training method according to another embodiment of the present disclosure is described exemplarily. It is understandable that the above description is illustrative rather than restrictive. For example, the loss function used when training the subtask segmentation model may not be limited to the cross entropy loss function, and a suitable loss function may be set according to the network structure such as the second image encoder and the subtask image decoder. In addition, in order to make it easier to understand the construction and training process of the above subtask segmentation model, a subtask segmentation model will be taken as an example below. Figure 4 A further exemplary description is given.

[0063] Figure 4FIG. 1 is a schematic diagram showing the construction and training process of the subtask segmentation model according to an embodiment of the present disclosure. Figure 4 As shown in, after obtaining the pre-trained first image encoder 401, a second image encoder 402 connected in parallel with the first image encoder 401 can be constructed, and a sub-task image decoder 403 for decoding the combined output of the first image encoder 401 and the second image encoder 402 can be constructed, thereby obtaining a sub-task segmentation model.

[0064] Next, in the process of training the subtask segmentation model, the parameters of the first image encoder 401 may be fixed first, and then the parameters of the first image encoder 401 are no longer updated. Then, the fundus image Y with the subtask annotations may be input into the first image encoder 401 and the second image encoder 402, respectively, to obtain the first image feature F1 and the second image feature F2, respectively. Further, the first image feature F1 and the second image feature F2 are merged to obtain the merged feature F + , and the merged feature F + The subtask image decoder 403 is input to obtain the segmentation prediction output of the subtask. Based on the segmentation prediction output and the subtask annotation, the subtask segmentation model can be trained to update the parameters in the second image encoder 402 and the subtask image decoder 403.

[0065] Furthermore, since the parameters of the first image encoder are no longer updated during the training of the subtask segmentation model, when multiple subtask segmentation models are constructed into a multi-task segmentation model, the first image encoder can be shared in the multi-task segmentation model. Based on this, it is easier to construct a multi-task segmentation model. Figure 5 An exemplary description is given.

[0066] Figure 5 FIG. 2 shows a schematic diagram of constructing a multi-task segmentation model based on multiple sub-task segmentation models of an embodiment of the present disclosure. Figure 5 As shown in , it is assumed that multiple subtask segmentation models 501 include a subtask segmentation model of a first subtask and a subtask segmentation model of a second subtask, etc., wherein the subtask segmentation model of the first subtask includes a first image encoder 401, a second image encoder 402-1 of the first subtask and a subtask image decoder 403-1 of the first subtask, and the subtask segmentation model of the second subtask includes a first image encoder 401, a second image encoder 402-2 of the second subtask and a subtask image decoder 403-2 of the second subtask. The construction method of the subtask segmentation model of each subtask has been combined in the previous text. Figure 3 and Figure 4It has been explained in detail and will not be repeated here.

[0067] Based on the trained multiple sub-task segmentation models 501, a multi-task segmentation model 502 can be constructed by sharing the first image encoder 401. Figure 5 As shown in, in the multi-task segmentation model 502, a first image encoder 401 can be set, and the output end of the first image encoder 401 is connected to the output end of the second image encoder 402-1 of the first subtask, and is input to the subtask image decoder 403-1 of the first subtask; the output end of the first image encoder 401 is connected to the output end of the second image encoder 402-2 of the second subtask, and is input to the subtask image decoder 403-2 of the second subtask.

[0068] It can be understood that when more subtasks need to be processed, the second image encoders and subtask image decoders of more subtask segmentation models can be further cascaded and merged to the output of the first image encoder 401 in the multi-task segmentation model 502, so that the output of the second image encoder corresponding to more subtasks is merged with the output of the first image encoder 401 and input into the corresponding subtask image decoder.

[0069] According to this method, there is no need to repeatedly train the entire multi-task segmentation model 502. Instead, when a certain sub-task is needed, the corresponding sub-task segmentation model is trained separately, and the trained sub-task segmentation model is cascaded to the already trained multi-task segmentation model, so as to achieve the sub-task expansion of the multi-task segmentation model, which is conducive to improving the flexibility, agility and convenience of the training of the multi-task segmentation model, and enables the multi-task segmentation model to be easily expanded to more application areas when needed. It can also be understood that by sharing the first image encoder, all sub-tasks share a first image encoder, and the difference is the second image encoder and the sub-task image decoder, so it is conducive to reducing the network parameters of the entire model, and is conducive to improving the training speed and efficiency.

[0070] The above, in combination with multiple accompanying drawings, provides an exemplary description of the training method of the multi-task segmentation model based on fundus images according to the implementation case of the present disclosure. It can be understood that according to the training method of the embodiment of the present disclosure, by constructing and training each sub-task segmentation model based on a first image encoder with fixed parameters, the multi-task segmentation model constructed based on each sub-task segmentation model can extract the common semantic information and features between different sub-tasks through the first image encoder, and can share them in different dimensions, so that the segmentation of multiple sub-tasks can be processed simultaneously in a single model, which is also conducive to achieving a better segmentation effect for each sub-task, so as to improve the overall performance of the model.

[0071] In some embodiments, by adopting self-supervised training in pre-training, the first image encoder is allowed to learn rich feature information from a large amount of unlabeled data, which is beneficial to improving the feature expression ability of the multi-task segmentation model, thereby making the multi-task segmentation model more suitable for multi-marker segmentation tasks.

[0072] Furthermore, in other embodiments, by using a lightweight image encoder as the second image encoder, it is possible to learn the differential features between tasks while using a small number of parameters, which is beneficial to reducing the amount of training parameters of the multi-task segmentation model, as well as improving the training speed, training efficiency and post-training inference speed, and is also beneficial to reducing the hardware requirements for using the multi-task segmentation model in actual application scenarios, thereby helping to improve the practicality of the multi-task segmentation model.

[0073] In order to further understand the advantages of sharing the first image encoder and using a lightweight image encoder in the disclosed embodiments, an exemplary explanation will be given below in combination with comparative examples and experimental examples. Table 1 shows the comparison of the parameters of a single-task segmentation model, a multi-task segmentation model, and a model including a lightweight image encoder and a model excluding a lightweight image encoder, where A represents the parameter of a single first image encoder, and B represents the parameter of a single subtask image decoder. The multi-task segmentation model takes eight subtasks as an example. Table 2 shows the experimental data of the actual parameter quantities of the segmentation model in Table 1.

[0074] Table 1:

[0075]

[0076] Table 2:

[0077]

[0078] As can be seen from Tables 1 and 2, for a single-task segmentation model, increasing the number of encoders will increase the number of parameters of the model, so that a traditional single-task segmentation model usually includes only one encoder for one segmentation task. However, for multi-tasks, compared to an independently encoded multi-task segmentation model (i.e., for different categories of segmentation tasks, independent image encoders are set for separate training), the multi-task segmentation model according to the disclosed embodiment does not share a first image encoder and does not use an additional lightweight image encoder. Therefore, it is obvious that the multi-task segmentation model according to the disclosed embodiment has fewer parameters because it shares a first image encoder and uses an additional lightweight image encoder. It can be seen that the more subtasks there are, the more obvious the advantage of reducing the number of parameters of the multi-task segmentation model according to the disclosed embodiment will be.

[0079] In another aspect, the present application provides a method for performing multi-task segmentation based on fundus images, namely, an inference method or detection method of a multi-task segmentation model. Figure 6a Provide explanation.

[0080] Figure 6a FIG. 4 is a flow chart showing a method for performing multi-task segmentation based on fundus images according to an embodiment of the present disclosure. Figure 6a As shown in FIG. 6 , the method 600 may include: in step 601, the fundus image to be segmented may be input into the above combined Figure 2-Figure 5 In the multi-task segmentation model trained by any of the training methods described above. Next, in step 602, the multi-task segmentation model can be used to perform a multi-task segmentation operation on the fundus image to be segmented, and output the multi-task segmentation results.

[0081] In some embodiments, Figure 5 Taking the multi-task segmentation model shown in as an example, the fundus image to be segmented can be input into the multi-task segmentation model 502 trained according to the training method of the disclosed embodiment, for example, it can be simultaneously input into the first image encoder in the multi-task segmentation model and the second image encoder of each subtask, that is, the first image encoder and each second image encoder can both process the fundus image to be segmented itself. In this embodiment, the first image encoder in the multi-task segmentation model can extract the first image features of the fundus image to be segmented, and each second image encoder can respectively extract the second image features with differences in the fundus image to be segmented; on this basis, the first image features are respectively merged with each second image feature, so that each merged feature is respectively decoded, and the segmentation result corresponding to each subtask in the multi-task is output. The segmentation result here can be a segmentation probability, or a mask prediction value.

[0082] Figure 6b FIG. 1 shows a schematic diagram of the effect after segmentation according to the multi-task segmentation method of the disclosed embodiment. Figure 6b As shown in FIG, taking the fundus image 610 to be segmented as an example, assuming that multiple subtasks such as arteries, veins, optic cups, optic discs, fundus leopard spots, and arcuate spots need to be segmented, by using Figure 6a The method shown in Figure 6b The fundus image to be segmented 610 in the embodiment of the present disclosure is input into the trained multi-task segmentation model according to the embodiment of the present disclosure, and the segmentation process is performed on it, and the segmentation results of multiple subtasks in one fundus image can be output synchronously. The visualization effect of the segmentation result can be seen in the segmentation effect diagram 620. As shown in the segmentation effect diagram 620, the segmentation results of multiple subtasks such as veins 621, arteries 622, optic cups 625, optic discs 624, fundus leopard patterns 623, and arcuate spots 626 can be segmented in one fundus image.

[0083] The above scheme of the embodiment of the present disclosure can be implemented with the help of program instructions. Therefore, the present disclosure also provides a device for performing multi-task segmentation based on fundus images, including: a processor, which is used to execute program instructions; and a memory, which stores program instructions, when the program instructions are loaded and executed by the processor, the processor executes the above-mentioned Figure 2-Figure 5 The training method described in any embodiment or the execution of the above combined Figure 6a The described method for multi-task segmentation based on fundus images.

[0084] Figure 7 700 may include a device 701 according to an embodiment of the present disclosure and its peripheral devices and external network, wherein the device 701 is used to train a multi-task segmentation model or to perform operations such as segmentation of an image to be segmented, so as to achieve the aforementioned combination Figure 2 - Figure 6a The technical solution of any of the embodiments of the present disclosure.

[0085] like Figure 7 As shown in , the device 701 may include a CPU 7011, which may be a general-purpose CPU, a dedicated CPU, or other information processing and program execution unit. Further, the device 701 may also include a large-capacity memory 7012 and a read-only memory ROM 7013, wherein the large-capacity memory 7012 may be configured to store various types of data, including fundus images, network parameters and segmentation results, etc., as well as various programs required for running the neural network, and the ROM 7013 may be configured to store the power-on self-test of the device 701, the initialization of each functional module in the system, the basic input / output driver of the system, and the data required for booting the operating system.

[0086] Further, the device 700 also includes other hardware platforms or components, such as the TPU 7014, GPU 7015, FPGA 7016 and MLU 7017 shown. It is understood that although a variety of hardware platforms or components are shown in the device 700, this is only exemplary and not restrictive, and those skilled in the art can add or remove corresponding hardware according to actual needs. For example, the device 701 may include only a CPU as a well-known hardware platform and another hardware platform as a test hardware platform of the present disclosure.

[0087] The device 701 disclosed herein also includes a communication interface 7018, so that it can be connected to a local area network / wireless local area network (LAN / WLAN) 705 through the communication interface 7018, and then connected to a local server 706 or to the Internet ("Internet") 707 through the LAN / WLAN. Alternatively or additionally, the device 701 disclosed herein can also be directly connected to the Internet or a cellular network through the communication interface 7018 based on wireless communication technology, such as wireless communication technology based on the third generation ("3G"), the fourth generation ("4G") or the fifth generation ("5G") . In some application scenarios, the device 801 disclosed herein can also access a server 708 of an external network and a possible database 709 as needed to obtain various known fundus images and their labels, etc., and can remotely store various parameters or intermediate data.

[0088] The peripheral devices of the device 701 may include a display device 702, an input device 703, and a data transmission interface 704. In one embodiment, the display device 702 may include, for example, one or more speakers and / or one or more visual displays, which are configured to perform voice prompts and / or image video display on the computing process or classification results of the disclosed device. The input device 703 may include, for example, a keyboard, a mouse, a microphone, a gesture capture camera, or other input buttons or controls, which are configured to receive input or user instructions of fundus images. The data transmission interface 704 may include, for example, a serial interface, a parallel interface or a universal serial bus interface ("USB"), a small computer system interface ("SCSI"), a serial ATA, a FireWire ("FireWire"), a PCI Express, and a high-definition multimedia interface ("HDMI"), etc., which are configured for data transmission and interaction with other devices or systems. According to the scheme disclosed herein, the data transmission interface 704 can receive fundus images for training (e.g., fundus images with subtask annotations), or fundus images to be segmented, etc., and transmit various types of data and results to the device 701.

[0089] The CPU 7011, mass storage 7012, read-only memory ROM 7013, TPU 7014, GPU 7015, FPGA 7016, MLU 7017 and communication interface 7018 of the device 701 of the present disclosure can be interconnected through a bus 7019, and data interaction with peripheral devices can be achieved through the bus. In one embodiment, through the bus 7019, the CPU 7011 can control other hardware components in the device 701 and its peripheral devices.

[0090] In operation, the processor CPU 7011 of the device 701 disclosed herein can receive the fundus image for training or the fundus image to be segmented through the input device 703 or the data transmission interface 704, and retrieve the computer program instructions or codes (such as codes involving neural networks) stored in the memory 7012 to train the received training fundus image data or classify the fundus image to be segmented, so as to obtain the parameters or segmentation results of the trained multi-task segmentation model. After the CPU 7011 determines the segmentation result by executing the program instructions, the segmentation result can be displayed on the display device 702 or output by voice prompt. In addition, the device 701 can also upload the segmentation result to the network, such as the remote database 709, through the communication interface 7018.

[0091] It should also be understood that any module, unit, component, server, computer, terminal or device that executes instructions of the disclosed examples may include or otherwise access computer-readable media, such as storage media, computer storage media or data storage devices (removable and / or non-removable) such as disks, optical disks or tapes. Computer storage media may include volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information, such as computer-readable instructions, data structures, program modules or other data.

[0092] Based on the above, the present disclosure further provides a computer-readable storage medium having computer-readable instructions stored thereon, which, when executed by one or more processors, implements the above-mentioned Figure 2 - Figure 5 The training method described in any embodiment of the present invention or as described above in combination with Figure 6a The method for performing multi-task segmentation based on fundus images.

[0093] The computer-readable storage medium may be any suitable magnetic storage medium or magneto-optical storage medium, such as RRAM (Resistive Random Access Memory), DRAM (Dynamic Random Access Memory), SRAM (Static Random-Access Memory), EDRAM (Enhanced Dynamic Random Access Memory), HBM (High-Bandwidth Memory), HMC (Hybrid Memory Cube), etc., or any other medium that can be used to store the required information and can be accessed by the application, module, or both. Any such computer storage medium may be part of the device or accessible or connectable to the device. Any application or module described in the present invention may be implemented using computer-readable / executable instructions that may be stored or otherwise maintained by such a computer-readable medium.

[0094] Although multiple embodiments of the present disclosure have been shown and described herein, it will be apparent to those skilled in the art that such embodiments are provided by way of example only. Those skilled in the art may think of many changes, modifications, and alternatives without departing from the thought and spirit of the present disclosure. It should be understood that in the process of practicing the present disclosure, various alternatives to the embodiments of the present disclosure described herein may be adopted. The attached claims are intended to define the scope of protection of the present disclosure, and therefore cover equivalents or alternatives within the scope of these claims.

Claims

1. A training method for a multi-task segmentation model based on fundus images, characterized in that: The multi-task segmentation model is constructed by multiple sub-task segmentation models, and the training method includes: Obtain a pre-trained first image encoder; For each subtask, building a subtask segmentation model based on the first image encoder; The subtask segmentation model is trained using the fundus image with subtask annotations, and the parameters of the first image encoder are fixed during the training process.

2. The training method according to claim 1, characterized in that: The pre-training includes self-supervised training.

3. The training method according to claim 2, characterized in that: The self-supervised training includes adopting a training framework of MAE, DINO, MoCo-v3, or SimCLR.

4. The training method according to claim 1, characterized in that: Building a subtask segmentation model includes: constructing a second image encoder connected in parallel with the first image encoder so that an output of the second image encoder is combined with an output of the first image encoder; A subtask image decoder is set so that the subtask image decoder is used to decode the combined output of the first image encoder and the second image encoder.

5. The training method according to claim 4, characterized in that: Training the subtask segmentation model using the fundus image with subtask annotations includes: Inputting the fundus image with the subtask annotations into the first image encoder to obtain a first image feature; Inputting the fundus image with the subtask annotations into the second image encoder to obtain a second image feature; Merging the first image feature with the second image feature to obtain a merged feature; Inputting the merged features into the subtask image decoder to obtain a segmentation prediction output; and Based on the segmentation prediction output and the subtask annotation, the subtask segmentation model is trained to update parameters of the second image encoder and the subtask image decoder.

6. The training method according to claim 5, characterized in that: Also includes: The cross entropy loss function is used when training the subtask segmentation model. The cross entropy loss function is calculated as follows: L BCE =-[p·log(p * )+(1-p)·log(1-p * )] Among them, L BCE represents the cross entropy loss function, p represents the subtask label, and p * Represents the segmentation prediction output.

7. The training method according to any one of claims 4 to 6, characterized in that: The subtask image decoder is a decoder in a UNet, UNet++, or PSPNet network.

8. The training method according to any one of claims 4 to 6, characterized in that: The second image encoder is a lightweight image encoder.

9. The training method according to claim 8, characterized in that: The lightweight image encoder includes a hardnet network structure.

10. The training method according to claim 1, characterized in that: The multi-task segmentation model is constructed by a plurality of sub-task segmentation models in a manner of sharing the first image encoder.

11. A method for multi-task segmentation based on fundus images, characterized in that: include: Inputting the fundus image to be segmented into a multi-task segmentation model trained by the training method according to any one of claims 1 to 10; as well as The multi-task segmentation model is used to perform a multi-task segmentation operation on the fundus image to be segmented, and the multi-task segmentation results are output.

12. A device for performing multi-task segmentation based on fundus images, characterized in that: include: a processor for executing program instructions; as well as A memory storing the program instructions, which, when loaded and executed by the processor, enables the processor to execute the training method according to any one of claims 1-10 or the method according to claim 11.

13. A computer-readable storage medium, characterized in that: Computer-readable instructions are stored thereon, and when the computer-readable instructions are executed by one or more processors, the training method according to any one of claims 1 to 10 or the method according to claim 11 is implemented.