Polyp segmentation model training method, segmentation method, device, medium and equipment

By extracting image features from the source and target domains in the polyp segmentation model, determining and updating the foreground block feature connectivity, and training the model using unlabeled target domain data, the problem of polyp segmentation model dependence on labeling is solved, achieving higher segmentation accuracy and cross-domain adaptability.

CN115375656BActive Publication Date: 2026-03-27DOUYIN VISION CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-23
Publication Date
2026-03-27

AI Technical Summary

Technical Problem

Existing polyp segmentation models require a large number of pixel-level precisely labeled datasets as training samples, and the segmentation accuracy is greatly affected by the equipment and data distribution, resulting in high consumption of human and material resources and unstable segmentation accuracy.

Method used

By extracting image features from the source and target domains based on a polyp segmentation model, the connectivity relationship of foreground block features is determined, and features are updated. Training is performed using unlabeled target domain data, which reduces the amount of labeling work, enhances foreground feature expression, and improves cross-domain segmentation accuracy.

Benefits of technology

While reducing the amount of data processing, it improves the accuracy of polyp segmentation, solves the problem of difficulty in segmentation caused by the strong camouflage of polyps, and is suitable for cross-domain polyp segmentation scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115375656B_ABST
    Figure CN115375656B_ABST
Patent Text Reader

Abstract

The present disclosure relates to a polyp segmentation model training method, a segmentation method, an apparatus, a medium and an equipment, the method comprising: performing image feature extraction on source domain images in a source domain data set and target domain images in a target domain data set based on a polyp segmentation model, to obtain first source domain block features and first target domain block features; determining source domain foreground block features in the first source domain block features and target domain foreground block features in the first target domain block features; determining a connection relationship corresponding to the source domain foreground block features and the target domain foreground block features; updating the first block features according to the connection relationship to obtain second block features; obtaining a predicted segmentation result corresponding to the source domain images according to the second source domain block features; determining a target loss of the polyp segmentation model according to the predicted segmentation result corresponding to the source domain images, polyp segmentation labels, and the second source domain block features and the second target domain block features, and training the polyp segmentation model according to the target loss.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of image processing, and more specifically, to a training method, segmentation method, apparatus, medium, and device for a polyp segmentation model. Background Technology

[0002] Colorectal cancer is a frequently diagnosed cancer worldwide, and colonoscopy can effectively detect and remove polyps. Polyp segmentation, a computer vision task, can automatically segment polyp areas in images or videos, reducing the false negative rate during colonoscopy.

[0003] However, most polyp segmentation models require a large number of pixel-level precisely labeled datasets as training samples, and their segmentation accuracy is greatly affected by the device and data distribution. Pixel-level precise labeling of the dataset also requires a lot of manpower and resources. Summary of the Invention

[0004] This summary section is provided to briefly introduce the concepts, which will be described in detail in the detailed description section below. This summary section is not intended to identify key or essential features of the claimed technical solution, nor is it intended to limit the scope of the claimed technical solution.

[0005] In a first aspect, this disclosure provides a training method for a polyp segmentation model, the method comprising:

[0006] Based on the polyp segmentation model, image features are extracted from source domain images in the source domain dataset and target domain images in the target domain dataset to obtain first source domain block features and first target domain block features. The images in the source domain dataset are labeled with polyp segmentation tags, while the images in the target domain dataset are not labeled. The data distributions of the source domain dataset and the target domain dataset are different. Each feature value in the first source domain block features corresponds to the features of n*n pixels in the source domain image, and each feature value in the first target domain block features corresponds to the features of n*n pixels in the target domain image.

[0007] Determine the source domain foreground block features in the first source domain block features and the target domain foreground block features in the first target domain block features;

[0008] Determine the connection relationship between the source domain foreground block features and the target domain foreground block features;

[0009] The first feature block is updated according to the connection relationship to obtain the second feature block. The first feature block includes a first source domain block feature under the source domain type and a first target domain block feature under the target domain type. The second feature block includes a second source domain block feature obtained by updating the first source domain block feature according to the connection relationship and a second target domain block feature obtained by updating the first target domain block feature according to the connection relationship.

[0010] The predicted segmentation result corresponding to the source domain image is obtained based on the second source domain block features;

[0011] Based on the predicted segmentation result corresponding to the source domain image, the polyp segmentation label, the second source domain block features, and the second target domain block features, the target loss of the polyp segmentation model is determined, and the polyp segmentation model is trained based on the target loss.

[0012] Secondly, this disclosure provides a method for polyp segmentation, the method comprising:

[0013] Received the target image for detection;

[0014] The target image is input into the trained polyp segmentation model to obtain the polyp segmentation result corresponding to the target image, wherein the polyp segmentation model is trained based on the training method of the polyp segmentation model described in the first aspect.

[0015] Thirdly, this disclosure provides a training apparatus for a polyp segmentation model, the apparatus comprising:

[0016] The feature extraction module is used to extract image features from source domain images in the source domain dataset and target domain images in the target domain dataset based on the polyp segmentation model, to obtain first source domain block features and first target domain block features. The images in the source domain dataset are labeled with polyp segmentation tags, while the images in the target domain dataset are not labeled. The data distributions of the source domain dataset and the target domain dataset are different. Each feature value in the first source domain block features corresponds to the features of n*n pixels in the source domain image, and each feature value in the first target domain block features corresponds to the features of n*n pixels in the target domain image.

[0017] The first determining module is used to determine the source domain foreground block features in the first source domain block features and the target domain foreground block features in the first target domain block features.

[0018] The second determining module is used to determine the connection relationship between the source domain foreground block features and the target domain foreground block features;

[0019] An update module is used to update a first feature block according to the connection relationship to obtain a second feature block. The first feature block includes a first source domain block feature under the source domain type and a first target domain block feature under the target domain type. The second feature includes a second source domain block feature obtained by updating the first source domain block feature according to the connection relationship and a second target domain block feature obtained by updating the first target domain block feature according to the connection relationship.

[0020] The acquisition module is used to obtain the predicted segmentation result corresponding to the source domain image based on the features of the second source domain block;

[0021] The training module is used to determine the target loss of the polyp segmentation model based on the predicted segmentation result corresponding to the source domain image, the polyp segmentation label, the second source domain block features, and the second target domain block features, and to train the polyp segmentation model based on the target loss.

[0022] Fourthly, this disclosure provides a polyp separation device, the device comprising:

[0023] The receiving module is used to receive the detected target image;

[0024] The segmentation module is used to input the target image into the trained polyp segmentation model to obtain the polyp segmentation result corresponding to the target image, wherein the polyp segmentation model is trained based on the training method of the polyp segmentation model described in the first aspect.

[0025] Fifthly, this disclosure provides a computer-readable medium having a computer program stored thereon, which, when executed by a processing device, implements the steps of the method described in the first or second aspect.

[0026] Sixthly, this disclosure provides an electronic device, comprising:

[0027] A storage device on which computer programs are stored;

[0028] A processing device for executing the computer program in the storage device to implement the steps of the method described in the first or second aspect.

[0029] The above technical solution allows for training of a polyp segmentation model based on labeled source domain data and unlabeled target domain data, effectively reducing the workload and technical requirements of manual annotation. Furthermore, during the training process, when extracting features from the image, block features containing multiple pixel features are extracted. This reduces data processing volume while analyzing the correlation of polyp segmentation features, thereby enhancing the foreground features of both the source and target domain images. This improves the discriminative power of polyps, ultimately increasing the accuracy of polyp segmentation and solving the segmentation difficulty caused by the strong camouflage of polyps. This ensures accurate cross-domain polyp segmentation and is suitable for application scenarios where polyps have strong foreground camouflage.

[0030] Other features and advantages of this disclosure will be described in detail in the following detailed description section. Attached Figure Description

[0031] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic, and the originals and elements are not necessarily drawn to scale. In the drawings:

[0032] Figure 1 This is a flowchart of a training method for a polyp segmentation model according to one embodiment of the present disclosure;

[0033] Figure 2 This is a block diagram of a training apparatus for a polyp segmentation model provided according to one embodiment of the present disclosure;

[0034] Figure 3 A schematic diagram of the structure of an electronic device suitable for implementing embodiments of the present disclosure is shown. Detailed Implementation

[0035] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.

[0036] It should be understood that the steps described in the method embodiments of this disclosure may be performed in different orders and / or in parallel. Furthermore, the method embodiments may include additional steps and / or omit the steps shown. The scope of this disclosure is not limited in this respect.

[0037] The term "comprising" and its variations as used herein are open-ended inclusions, meaning "including but not limited to". The term "based on" means "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Definitions of other terms will be given in the description below.

[0038] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are used only to distinguish different devices, modules or units, and are not used to limit the order of functions performed by these devices, modules or units or their interdependencies.

[0039] It should be noted that the terms "a" and "a plurality of" used in this disclosure are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".

[0040] The names of messages or information exchanged between multiple devices in the embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.

[0041] It is understood that before using the technical solutions disclosed in the various embodiments of this disclosure, users should be informed of the types, scope of use, and usage scenarios of the personal information involved in this disclosure in an appropriate manner in accordance with relevant laws and regulations, and user authorization should be obtained.

[0042] For example, upon receiving a user's active request, a prompt message is sent to the user to explicitly inform them that the requested operation will require the acquisition and use of the user's personal information. This allows the user to independently choose whether to provide personal information to the software or hardware, such as the electronic device, application, server, or storage medium performing the operations of this disclosed technical solution, based on the prompt message.

[0043] As an optional but non-limiting implementation, in response to a user's active request, sending a prompt message to the user can be done via a pop-up window, where the prompt message can be presented in text format. Furthermore, the pop-up window can also include a selection control allowing the user to choose "agree" or "disagree" to provide personal information to the electronic device.

[0044] It is understood that the above notification and user authorization process are merely illustrative and do not constitute a limitation on the implementation of this disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of this disclosure.

[0045] Meanwhile, it is understood that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and related provisions.

[0046] Figure 1 As shown, this is a training method for a polyp segmentation model according to one embodiment of the present disclosure, such as... Figure 1 As shown, the method may include:

[0047] In step 11, image features are extracted from the source domain images in the source domain dataset and the target domain images in the target domain dataset based on the polyp segmentation model to obtain the first source domain block features and the first target domain block features. The images in the source domain dataset are labeled with polyp segmentation tags, while the images in the target domain dataset are not labeled. The data distributions of the source domain dataset and the target domain dataset are different. Each feature value in the first source domain block features corresponds to the features of n*n pixels in the source domain image, and each feature value in the first target domain block features corresponds to the features of n*n pixels in the target domain image.

[0048] The polyp segmentation model can be implemented based on a segmentation network, such as the Unet network. In the Unet network, for the input image, it first performs downsampling using convolution, then extracts features layer by layer, and then uses these features layer by layer to perform upsampling, finally obtaining an image where each pixel corresponds to its category, thereby achieving image segmentation.

[0049] In the field of polyp segmentation, this corresponds to pixel-level prediction results, i.e., predicting the classification of each pixel in the image. For example, the features extracted from the penultimate feature layer of the Unet network can be used as output features. If a source domain image is input into the Unet network, the features extracted from the penultimate feature layer are used as the first source domain block features; if a target domain image is input into the Unet network, the features extracted from the penultimate feature layer are used as the first target domain block features. The penultimate feature layer of the Unet network performs downsampling feature extraction followed by upsampling feature extraction, but does not upsample to the same size as the original image. Therefore, each feature value in the feature map obtained through the Unet network corresponds to a block feature, and each feature value in this feature map can contain features corresponding to multiple pixels in the original input image.

[0050] For example, the size of the block features can be preset, meaning that the feature value of each block feature corresponds to the features of n*n pixels in the input image, where n can be set according to the actual application scenario. Accordingly, the source domain block features include foreground and background features from the source domain image, and the target domain block features include foreground and background features from the target domain image. The number of block features can be set based on the actual application scenario, and this disclosure does not limit this. To facilitate obtaining the correlation between adjacent pixels, in this embodiment, image feature extraction can be performed on the image to obtain block features. This reduces the amount of data processing while ensuring the correlation between adjacent pixels, fitting the polyp segmentation scenario.

[0051] In this process, the source domain image can be annotated by a physician with certain experience to obtain corresponding polyp segmentation labels. In the field of polyp segmentation, the polyp segmentation label can include the classification label of each pixel to indicate which pixels in the source domain image correspond to polyps.

[0052] As described in the background section of this disclosure, data from different modalities, devices, or hospitals may have different distributions. Therefore, a polyp segmentation model trained on images from the source domain dataset may struggle to directly detect polyps in the target domain. Furthermore, in the polyp segmentation field, due to the relatively small data volume and high annotation requirements, the workload of annotating the training images is substantial. Therefore, this disclosure allows for simultaneous training of the model on images from both the source and target domain datasets, enabling the trained polyp segmentation model to be adapted for polyp segmentation in images from the target domain without requiring annotation of the data in the target domain dataset.

[0053] For example, the source domain dataset could be image data from Hospital Hs1 with corresponding polyp labels, while the target domain dataset could be image data from Hospital Hs2.

[0054] In step 12, the source domain foreground block features in the first source domain block features and the target domain foreground block features in the first target domain block features are determined.

[0055] In this step, the polyp is usually located in the foreground of the image in both the source and target domain images. Accordingly, the source domain foreground block features are used to represent the predicted block features corresponding to the polyp in the source domain image, and the target domain foreground block features are used to represent the predicted block features corresponding to the polyp in the target domain image, so as to accurately segment the polyp.

[0056] In step 13, the connection relationship between the source domain foreground block features and the target domain foreground block features is determined.

[0057] In this context, for the same image, the features of each pixel are related. For different images in the source and target domains, accurate segmentation of cross-domain images within the target domain can be achieved by determining the correlation between the features of their respective corresponding pixels. In this embodiment, by determining this connection relationship, the correlation between corresponding features of the source and target domain images is analyzed, and the distribution alignment of image features across different domains is performed by constructing the connection relationship.

[0058] In step 14, the first feature block is updated according to the connection relationship to obtain the second feature block. The first feature block includes the first source domain block feature under the source domain type and the first target domain block feature under the target domain type. The second feature block includes the second source domain block feature obtained by updating the first source domain block feature according to the connection relationship and the second target domain block feature obtained by updating the first target domain block feature according to the connection relationship.

[0059] In the polyp segmentation scenario, the polyp's color and texture are very similar to the surrounding normal tissue, resulting in low contrast and significant camouflage, making accurate detection of the polyp's edges difficult. In this step, the connectivity relationship represents the correlation between the foreground features of the source domain and the foreground features of the target domain. Based on this connectivity relationship, foreground feature enhancement can be performed on the first source domain block features and the first target domain block features to highlight the contrast between the foreground features corresponding to the polyp and other regions. This can improve the foreground feature representation in the feature image corresponding to the source domain image to a certain extent, making it suitable for application scenarios where the polyp foreground is highly camouflaged.

[0060] In step 15, the predicted segmentation result corresponding to the source domain image is obtained based on the second source domain block features. In this step, the prediction can be made based on the classifier in the Unet network to obtain the predicted segmentation result. The predicted segmentation result includes the classification of each pixel in the source domain image to indicate whether it corresponds to the polyp classification or the non-polyp classification, which facilitates the segmentation of polyp edges.

[0061] In step 16, the target loss of the polyp segmentation model is determined based on the predicted segmentation result and polyp segmentation label corresponding to the source domain image, as well as the second source domain block features and the second target domain block features, and the polyp segmentation model is trained based on the target loss.

[0062] The segmentation accuracy of the polyp segmentation model can be determined based on the predicted segmentation results and polyp segmentation labels corresponding to the source domain image. Based on the second source domain block features and the second target domain block features, the source domain features and target domain features can be aligned by constraining their distributions to improve the segmentation accuracy of polyps in cross-domain images. Therefore, the target loss can include the accuracy of the polyp segmentation model and the distance between the distributions of the source domain block features and the target domain block features.

[0063] For example, training can be stopped when the target loss is less than the loss threshold, or when the number of training iterations reaches the threshold. Otherwise, the parameters in the polyp segmentation model can be updated using gradient descent based on the target loss, and the training can be repeated through the steps described above until the model training is complete.

[0064] Therefore, the above technical solution allows for the training of a polyp segmentation model based on labeled source domain data and unlabeled target domain data, effectively reducing the workload and technical requirements of manual annotation. Furthermore, during the training process, when extracting features from the image, block features containing multiple pixel features are extracted. This reduces data processing volume while analyzing the correlation of polyp segmentation features, thereby enhancing the foreground features of both the source and target domain images. This improves the discriminative power of polyps, thus increasing the accuracy of polyp segmentation and solving the segmentation difficulty caused by the strong camouflage of polyps. This ensures accurate cross-domain polyp segmentation and is suitable for application scenarios where polyps have strong foreground camouflage.

[0065] In one possible embodiment, an exemplary implementation of determining the source domain foreground block features in the first source domain block features and the target domain foreground block features in the first target domain block features in step 12 is as follows, which may include:

[0066] Feature segmentation is performed on the positions corresponding to the polyp segmentation labels to obtain segmentation label block features.

[0067] In this step, the polyp segmentation label corresponding to the source domain image is a pixel-level label, that is, it is a label for each pixel. In this step, the source domain image can be segmented based on the polyp segmentation label to segment the pixels corresponding to the foreground features and obtain multiple segmentation label block features. The pixel size corresponding to the segmentation label block features is the same as the pixel size corresponding to each of the first source domain block features.

[0068] The candidate foreground block feature set corresponding to the first source domain block feature is determined based on the segmentation label block features.

[0069] For example, the first source domain block feature is f sThen, the block features corresponding to the segmentation label block features in the first source domain block features can be used as the candidate foreground block feature set f. s fg That is, f s fg ∈f s .

[0070] For each candidate foreground block feature in the candidate foreground block feature set, determine the target domain matching foreground block feature corresponding to the candidate foreground block feature in the first target domain block feature set, and determine the source domain matching foreground block feature of the target domain matching foreground block feature in the first source domain block feature set.

[0071] Among them, for the i-th candidate foreground block feature f s fg,i The feature f of the candidate foreground block can be calculated separately. s fg,i With the first target domain block feature f t Each block feature f in t j The cosine similarity between the features is used to determine the block feature with the highest cosine similarity as the candidate foreground block feature f. s fg,i The corresponding target domain matching foreground block features are represented by the following subscripts:

[0072] j' = argmaxcos(f s fg,i ,f t j )

[0073] j∈{1,2,...,H t ×W t}

[0074] Where Ht and Wt are used to represent the first target domain block feature f t The height and width, i.e., each feature value in the first target domain block feature corresponds to a block feature, and are related to the candidate foreground block feature f. s fg,i The corresponding target domain matching foreground block feature is the j'th block feature in the first target domain block feature.

[0075] Furthermore, for the target domain matching foreground block feature, i.e., the j'th block feature in the first target domain block feature, the cosine similarity between it and each block feature in the first source domain block feature can be calculated, and the block feature with the largest cosine similarity is determined as the source domain matching foreground block feature of the target domain matching foreground block feature in the first source domain block feature. For example, the j'th block feature f in the first target domain block feature can be determined in a similar manner. t j 'The source domain matching foreground block feature in the first source domain block feature, such as the source domain matching foreground block feature being the i'th block feature in the first source domain block feature.

[0076] Subsequently, if the source domain matching foreground block feature belongs to the candidate foreground block feature set, the candidate foreground block feature is determined as the source domain foreground block feature, and the target domain matching foreground block feature is determined as the target domain foreground block feature.

[0077] For example, if the i'th block feature in the first source domain block features belongs to f s fg At this point, the candidate foreground block features f in the first source domain block features can be considered as... s fg,i This provides features for the source domain foreground blocks, and simultaneously determines features f in the first target domain block features. t j 'This represents the foreground block feature of the target domain.'

[0078] Therefore, through the above technical solution, the source domain foreground block features and the target domain foreground block features can be screened by the feature similarity between the source domain block features and the target domain block features, thereby determining representative block features from the source domain image and the target domain image. This allows for accurate determination of the target domain foreground block features without labeling the target domain image, thus improving the application scope of the method.

[0079] In one possible embodiment, an exemplary implementation of determining the connection relationship between the source domain foreground block features and the target domain foreground block features in step 13 may include:

[0080] Based on the foreground block features of each target type, the domain connection relationships under the target type are determined. The target type includes a source domain type and a target domain type. The domain connection relationships include the source domain connection relationships between the source domain foreground block features under the source domain type and the target domain connection relationships between the target domain foreground block features under the target domain type.

[0081] For example, determining the domain connectivity relationship under each target type based on the domain foreground block features includes:

[0082] For each domain foreground block feature under each target type, the similarity between the domain foreground block feature under the target type and each candidate domain foreground block feature is determined. The candidate domain foreground block features are different from the domain foreground block features and correspond to the same target type. For example, the domain foreground block features under the source domain type are the source domain foreground block features, and the domain foreground block features under the target domain type are the target domain foreground block features.

[0083] Taking each source domain foreground block feature in the first source domain block features as an example, the similarity between the source domain foreground block feature and each other source domain foreground block feature can be calculated. For example, cosine similarity can be calculated based on the features. The calculation method of cosine similarity is an existing technology and will not be elaborated here.

[0084] If the similarity is greater than or equal to a preset threshold, it is determined that there is a connection between the domain foreground block feature and the candidate domain foreground block feature. The domain connection relationship under the target type includes the connection relationship corresponding to each domain foreground block feature under the target type.

[0085] The preset threshold can be set based on the actual application scenario, and this disclosure does not limit it. Taking source domain foreground block features as an example, if the similarity between the source domain foreground block features and the candidate source domain foreground block features is greater than or equal to the preset threshold, then the source domain foreground block features and the candidate source domain foreground block features are similar. At this time, a connection relationship can be constructed between the source domain foreground block features and the candidate source domain foreground block features to explore the correlation between features in the source domain image and the correlation between features in the target domain image.

[0086] For example, source domain connectivity can be represented by an m*m adjacency matrix. An element with a value of 1 in the matrix indicates that there is a connectivity between the two source domain foreground features at that position, while an element with a value of 0 indicates that there is no connectivity between the two source domain foreground features at that position.

[0087] Correspondingly, similar methods can be used to calculate the similarity between the foreground block features of each target domain type and the foreground block features of other target domains, thereby determining the connection relationship of the target domains, which will not be elaborated here.

[0088] Accordingly, step 13, which determines the connectivity between the source domain foreground block features and the target domain foreground block features, may further include:

[0089] Based on the source domain foreground block features and the target domain foreground block features, the inter-domain connectivity relationship between the source domain foreground block features and the target domain foreground block features is determined.

[0090] For example, determining the inter-domain connectivity between the source domain foreground block features and the target domain foreground block features based on each of the source domain foreground block features and the target domain foreground block features may include:

[0091] The inter-domain connectivity value between the i-th source domain foreground patch feature and the j-th target domain foreground patch feature is determined by the following formula.

[0092]

[0093] in, Used to represent the features of the i-th source domain foreground block in the source domain image s;

[0094] Used to represent the features of the j-th foreground block in the target domain image t;

[0095] σ is used to represent the tuning hyperparameter;

[0096] Accordingly, the inter-domain connectivity relationship includes the inter-domain connectivity relationship value between each source domain foreground block feature and each target domain foreground block feature.

[0097] In this context, the source domain foreground block features are used to represent the foreground features in the source domain image, and the target domain foreground block features are used to represent the foreground features in the target domain image. The above formula can determine the correlation between the foreground features in the source domain and the target domain. This not only facilitates subsequent foreground feature enhancement based on the inter-domain connectivity, but also provides reliable data support for reducing the feature distribution differences between the foreground features in the source domain and the target domain. This ensures accurate identification of polyp features in the target domain in cross-domain scenarios and improves the accuracy of polyp segmentation in the target domain.

[0098] In one possible embodiment, an exemplary implementation of updating the first feature block according to the connection relationship to obtain the second feature block is as follows, and this step may include:

[0099] Based on the domain connectivity relationships under the target type and at least one attention feature layer, the first block of features under the target type is convolved to obtain the convolutional block features under the target type, wherein the attention weights corresponding to the attention feature layers under the target type are determined based on the domain connectivity relationships under the target type.

[0100] The attention weights in the attention feature layer under the target type are determined based on the domain connectivity under the target type using the following formula:

[0101]

[0102] in, This is used to represent the attention weight between the i-th domain foreground block feature and the j-th domain foreground block feature under the target type in the l-th attention feature layer, wherein the i-th domain foreground block feature and the j-th domain foreground block feature under the target type have a connection relationship;

[0103] A ij This value represents the connection relationship between the i-th domain foreground block feature and the j-th domain foreground block feature under the target type.

[0104] Used to represent the features of the i-th domain foreground block feature under the target type in the l-th attention feature layer;

[0105] Ni is used to represent the set of domain foreground block features that have a connection relationship with the i-th domain foreground block feature under the target type;

[0106] W is used to represent learnable feature transformation operations;

[0107] Used to represent learnable weight vectors;

[0108] || is used to represent feature splicing operations.

[0109] Accordingly, after determining the attention weights corresponding to the current attention feature layer, the attention features output by the current attention feature layer can be obtained using the following formula:

[0110]

[0111] in, The feature used to represent the i-th domain foreground block feature under the target type in the l-th layer. After performing attention feature extraction, the attention features at the (l+1)th layer, where the features at the lth layer are the first block of features under the target type;

[0112] δ() is used to represent nonlinear mapping.

[0113] Each attention feature layer can determine the attention weight corresponding to the current layer in the above manner, thereby enhancing and updating the input features based on the attention weight. The attention features corresponding to the last attention feature layer can be used as the convolution block features under the target type.

[0114] Therefore, through the above technical solution, the attention weights during attention feature extraction can be determined based on the domain connectivity under the target type, and then the features can be updated through the attention weights to complete the foreground feature enhancement based on the multi-layer graph attention mechanism.

[0115] Then, based on the inter-domain connectivity, multi-layer convolutional feature extraction can be performed on the convolutional block features under each target type to obtain the second block feature under the target type, wherein the number of convolutional feature extraction layers corresponding to the first source domain block feature and the first target domain block feature is the same.

[0116] The number of convolutional feature extraction layers can be set according to the actual application scenario, and this disclosure does not limit this. For example, for each target type, the second feature block can be obtained by performing multi-layer convolutional feature extraction on the convolutional block features based on the inter-domain connectivity relationship using the following formula:

[0117]

[0118] Among them, A st The matrix representing the interdomain connectivity between source domain foreground block features in source domain image s and target domain foreground block features in target domain image t;

[0119] I is used to denote the identity matrix;

[0120] D' is used to represent A st The degree matrix, where D' ii =∑ j A' ij ;

[0121] H (l) Used to represent the convolutional features corresponding to the l-th layer, where the convolutional features corresponding to the 0-th layer are the convolutional block features;

[0122] H l+1 Used to represent the convolutional features corresponding to the (l+1)th layer;

[0123] W (l) Used to represent the weight parameters corresponding to the l-th layer;

[0124] η() is used to represent nonlinear activation functions, such as the ReLU function.

[0125] In this technical solution, after updating the extracted block features based on the domain connectivity relationships under the target type, the updated features can be further updated based on the inter-domain connectivity relationships. During this process, by determining A... st The degree matrix can determine the comprehensive correlation between the i-th source domain foreground block feature and the target domain foreground block feature, thereby realizing the overall association between the source domain features and the target domain features, determining the overall correlation between the source domain features and the target domain features, and facilitating the constraint of the consistency between the obtained second source domain block feature and the second target domain block feature.

[0126] In one possible embodiment, determining the target loss of the polyp segmentation model based on the predicted segmentation result corresponding to the source domain image, the polyp segmentation label, the second source domain block features, and the second target domain block features includes:

[0127] Based on the predicted segmentation information in the predicted segmentation results and the polyp segmentation labels, the segmentation loss is determined. This loss can be calculated using a loss function from the Unet network, such as the cross-entropy loss function.

[0128] The feature alignment loss is determined based on the second source domain block features and the second target domain block features.

[0129] For example, the feature alignment loss is determined based on the second source domain block features and the second target domain block features using the following formula:

[0130]

[0131] Among them, L cst Used to represent the feature alignment loss;

[0132] N s The number of source domain foreground block features is used to represent the number of feature values ​​corresponding to the source domain foreground block features determined from each feature value of the first source domain block feature.

[0133] N t The number of features used to represent the foreground block features of the target domain is the number of feature values ​​corresponding to the foreground block features of the target domain determined from each feature value of the first target domain block features.

[0134] x i s Used to represent the i-th source domain foreground block feature in the second source domain block feature;

[0135] x j t Used to represent the j-th target domain foreground block feature in the second target domain block feature.

[0136] Then, the target loss can be determined based on the segmentation loss and the feature alignment loss.

[0137] For example, the target loss can be obtained by weighted summation based on the weights corresponding to the segmentation loss and the feature alignment loss. Thus, through the above technical solution, the target loss can include both a loss constraining the accuracy of polyp segmentation results and a loss constraining the feature distribution between image pixel features in the source domain and image pixel features in the target domain. This improves the segmentation accuracy during the training of the polyp segmentation model while making the model applicable to polyp image segmentation scenarios in the target domain, enhancing the accuracy of polyp segmentation prediction in cross-domain situations, and broadening the application scope of the polyp segmentation model.

[0138] This disclosure also provides a method for polyp segmentation, the method comprising:

[0139] The target image to be detected is received, wherein the target image may be an image acquired from an endoscope for real-time detection.

[0140] The target image is input into the trained polyp segmentation model to obtain the polyp segmentation detection result corresponding to the target image. The polyp segmentation model is trained based on any of the polyp segmentation model training methods described above.

[0141] The above technical solution enables polyp segmentation of target images based on a trained polyp segmentation model, ensuring both accuracy and efficiency. Furthermore, this polyp segmentation model is trained using source and target domain images as training samples. This process enhances the feature representation of the polyp foreground, reducing detection errors caused by the strong camouflage of polyp foreground features. This further broadens the application scope of the polyp segmentation method and improves the accuracy of the segmentation results.

[0142] This disclosure also provides a training device for a polyp segmentation model, such as Figure 2 As shown, the device 10 includes:

[0143] The feature extraction module 101 is used to extract image features from source domain images in the source domain dataset and target domain images in the target domain dataset based on the polyp segmentation model, to obtain first source domain block features and first target domain block features. The images in the source domain dataset are labeled with polyp segmentation labels, while the images in the target domain dataset are not labeled. The data distributions of the source domain dataset and the target domain dataset are different. Each feature value in the first source domain block features corresponds to the features of n*n pixels in the source domain image, and each feature value in the first target domain block features corresponds to the features of n*n pixels in the target domain image.

[0144] The first determining module 102 is used to determine the source domain foreground block features in the first source domain block features and the target domain foreground block features in the first target domain block features.

[0145] The second determining module 103 is used to determine the connection relationship between the source domain foreground block features and the target domain foreground block features;

[0146] Update module 104 is used to update the first block feature according to the connection relationship to obtain the second block feature, wherein the first block feature includes a first source domain block feature under the source domain type and a first target domain block feature under the target domain type, and the second feature includes a second source domain block feature obtained by updating the first source domain block feature according to the connection relationship and a second target domain block feature obtained by updating the first target domain block feature according to the connection relationship.

[0147] The acquisition module 105 is used to obtain the predicted segmentation result corresponding to the source domain image based on the features of the second source domain block;

[0148] The training module 106 is used to determine the target loss of the polyp segmentation model based on the predicted segmentation result corresponding to the source domain image, the polyp segmentation label, the second source domain block features, and the second target domain block features, and to train the polyp segmentation model based on the target loss.

[0149] Optionally, the first determining module includes:

[0150] The molecule segmentation module is used to perform feature segmentation on the position corresponding to the polyp segmentation label to obtain segmentation label block features;

[0151] The first determining submodule is used to determine the candidate foreground block feature set corresponding to the first source domain block feature based on the segmentation label block feature;

[0152] The second determining submodule is used to determine, for each candidate foreground block feature in the candidate foreground block feature set, a target domain matching foreground block feature corresponding to the candidate foreground block feature in the first target domain block feature set, and to determine the source domain matching foreground block feature of the target domain matching foreground block feature in the first source domain block feature set.

[0153] The third determining submodule is used to determine the candidate foreground block feature as the source domain foreground block feature and the target domain matching foreground block feature as the target domain foreground block feature if the source domain matching foreground block feature belongs to the candidate foreground block feature set.

[0154] Optionally, the second determining module includes:

[0155] The fourth determining submodule is used to determine the domain connection relationship under the target type based on the domain foreground block features under each target type. The target type includes a source domain type and a target domain type. The domain connection relationship includes the source domain connection relationship between source domain foreground block features under the source domain type and the target domain connection relationship between target domain foreground block features under the target domain type.

[0156] The fifth determining submodule is used to determine the inter-domain connectivity relationship between the source domain foreground block features and the target domain foreground block features based on each of the source domain foreground block features and the target domain foreground block features.

[0157] Optionally, the fourth determining submodule includes:

[0158] The sixth determining submodule is used to determine the similarity between the foreground block features of each domain under each target type and the foreground block features of each candidate domain, wherein the candidate foreground block features are different from the foreground block features of the domain and correspond to the same target type;

[0159] The seventh determining submodule is used to determine that there is a connection relationship between the domain foreground block feature and the candidate domain foreground block feature if the similarity is greater than or equal to a preset threshold. The domain connection relationship under the target type includes the connection relationship corresponding to each domain foreground block feature under the target type.

[0160] Optionally, the fifth determining submodule is used for:

[0161] The inter-domain connectivity value between the i-th source domain foreground patch feature and the j-th target domain foreground patch feature is determined by the following formula.

[0162]

[0163] in, Used to represent the features of the i-th source domain foreground block in the source domain image s;

[0164] Used to represent the features of the j-th foreground block in the target domain image t;

[0165] σ is used to represent the tuning hyperparameter;

[0166] The inter-domain connectivity relationship includes the inter-domain connectivity relationship value between each source domain foreground block feature and each target domain foreground block feature.

[0167] Optionally, the update module includes:

[0168] The first update submodule is used to perform convolution processing on the first block feature under the target type according to the domain connectivity relationship under the target type and at least one attention feature layer to obtain the convolution block feature under the target type, wherein the attention weights corresponding to the attention feature layer under the target type are determined based on the domain connectivity relationship under the target type;

[0169] The second update submodule is used to perform multi-layer convolutional feature extraction on the convolutional block features under each target type according to the inter-domain connectivity relationship, so as to obtain the second block feature under the target type, wherein the number of layers of convolutional feature extraction corresponding to the first source domain block feature and the first target domain block feature is the same.

[0170] Optionally, the training module includes:

[0171] The eighth determining submodule is used to determine the segmentation loss based on the predicted segmentation information in the predicted segmentation result and the polyp segmentation label;

[0172] The ninth determining submodule is used to determine the feature alignment loss based on the second source domain block features and the second target domain block features;

[0173] The tenth determination submodule is used to determine the target loss based on the segmentation loss and the feature alignment loss.

[0174] Optionally, the ninth determining submodule determines the feature alignment loss based on the second source domain block features and the second target domain block features using the following formula:

[0175]

[0176] Among them, L cst Used to represent the feature alignment loss;

[0177] N s Used to represent the number of features of the source domain foreground block;

[0178] N t Used to represent the number of foreground block features in the target domain;

[0179] x i s Used to represent the i-th source domain foreground block feature in the second source domain block feature;

[0180] x j t Used to represent the j-th target domain foreground block feature in the second target domain block feature.

[0181] This disclosure also provides a polyp segmentation device, the device comprising:

[0182] The receiving module is used to receive the detected target image;

[0183] The segmentation module is used to input the target image into the trained polyp segmentation model to obtain the polyp segmentation result corresponding to the target image, wherein the polyp segmentation model is trained based on any of the polyp segmentation model training methods described above.

[0184] The following is for reference. Figure 3 This diagram illustrates a structural schematic of an electronic device 600 suitable for implementing embodiments of the present disclosure. The terminal devices in the embodiments of the present disclosure may include, but are not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 3 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.

[0185] like Figure 3 As shown, electronic device 600 may include a processing device (e.g., a central processing unit, a graphics processor, etc.) 601, which can perform various appropriate actions and processes according to a program stored in read-only memory (ROM) 602 or a program loaded from storage device 608 into random access memory (RAM) 603. RAM 603 also stores various programs and data required for the operation of electronic device 600. Processing device 601, ROM 602, and RAM 603 are interconnected via bus 604. Input / output (I / O) interface 605 is also connected to bus 604.

[0186] Typically, the following devices can be connected to I / O interface 605: input devices 606 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 607 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 608 including, for example, magnetic tapes, hard disks, etc.; and communication devices 609. Communication device 609 allows electronic device 600 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 3 An electronic device 600 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively.

[0187] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device 609, or installed from a storage device 608, or installed from a ROM 602. When the computer program is executed by the processing device 601, it performs the functions defined in the methods of embodiments of this disclosure.

[0188] It should be noted that the computer-readable medium described in this disclosure can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this disclosure, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in connection with an instruction execution system, apparatus, or device. In this disclosure, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.

[0189] In some implementations, clients and servers can communicate using any currently known or future-developed network protocol such as HTTP (Hypertext Transfer Protocol) and can interconnect with digital data communication (e.g., communication networks) of any form or medium. Examples of communication networks include local area networks (“LANs”), wide area networks (“WANs”), the Internet (e.g., the Internet of Things), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future-developed networks.

[0190] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device.

[0191] The aforementioned computer-readable medium carries one or more programs that, when executed by the electronic device, cause the electronic device to: extract image features from source domain images in a source domain dataset and target domain images in a target domain dataset based on a polyp segmentation model, obtaining first source domain block features and first target domain block features, wherein the images in the source domain dataset are labeled with polyp segmentation tags, the images in the target domain dataset are not labeled, the data distributions of the source domain dataset and the target domain dataset are different, each feature value in the first source domain block features corresponds to the features of n*n pixels in the source domain image, and each feature value in the first target domain block features corresponds to the features of n*n pixels in the target domain image; and determine the source domain foreground block features in the first source domain block features and the target domain foreground block features in the first target domain block features. The process involves: determining the connection relationships between the source domain foreground block features and the target domain foreground block features; updating the first block features based on the connection relationships to obtain the second block features, wherein the first block features include first source domain block features under the source domain type and first target domain block features under the target domain type; the second feature includes second source domain block features obtained by updating the first source domain block features based on the connection relationships and second target domain block features obtained by updating the first target domain block features based on the connection relationships; obtaining the predicted segmentation result corresponding to the source domain image based on the second source domain block features; determining the target loss of the polyp segmentation model based on the predicted segmentation result corresponding to the source domain image, the polyp segmentation label, the second source domain block features, and the second target domain block features; and training the polyp segmentation model based on the target loss.

[0192] Alternatively, the aforementioned computer-readable medium carries one or more programs that, when executed by the electronic device, cause the electronic device to: receive a detected target image; input the target image into a trained polyp segmentation model to obtain a polyp segmentation result corresponding to the target image, wherein the polyp segmentation model is trained based on any of the polyp segmentation model training methods described above.

[0193] Computer program code for performing the operations of this disclosure can be written in one or more programming languages ​​or a combination thereof, including but not limited to object-oriented programming languages ​​such as Java, Smalltalk, and C++, as well as conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0194] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0195] The modules described in the embodiments of this disclosure can be implemented in software or in hardware. The names of the modules do not necessarily limit the module itself; for example, a feature extraction module can also be described as "a module that extracts image features from source domain images in a source domain dataset and target domain images in a target domain dataset based on a polyp segmentation model to obtain first source domain block features and first target domain block features."

[0196] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: Field Programmable Gate Arrays (FPGAs), Application-Specific Integrated Circuits (ASICs), Application Standard Products (ASSPs), System-on-Chip (SoCs), Complex Programmable Logic Devices (CPLDs), and so on.

[0197] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0198] According to one or more embodiments of this disclosure, Example 1 provides a method for training a polyp segmentation model, wherein the method includes:

[0199] Based on the polyp segmentation model, image features are extracted from source domain images in the source domain dataset and target domain images in the target domain dataset to obtain first source domain block features and first target domain block features. The images in the source domain dataset are labeled with polyp segmentation tags, while the images in the target domain dataset are not labeled. The data distributions of the source domain dataset and the target domain dataset are different. Each feature value in the first source domain block features corresponds to the features of n*n pixels in the source domain image, and each feature value in the first target domain block features corresponds to the features of n*n pixels in the target domain image.

[0200] Determine the source domain foreground block features in the first source domain block features and the target domain foreground block features in the first target domain block features;

[0201] Determine the connection relationship between the source domain foreground block features and the target domain foreground block features;

[0202] The first feature block is updated according to the connection relationship to obtain the second feature block. The first feature block includes a first source domain block feature under the source domain type and a first target domain block feature under the target domain type. The second feature block includes a second source domain block feature obtained by updating the first source domain block feature according to the connection relationship and a second target domain block feature obtained by updating the first target domain block feature according to the connection relationship.

[0203] The predicted segmentation result corresponding to the source domain image is obtained based on the second source domain block features;

[0204] Based on the predicted segmentation result corresponding to the source domain image, the polyp segmentation label, the second source domain block features, and the second target domain block features, the target loss of the polyp segmentation model is determined, and the polyp segmentation model is trained based on the target loss.

[0205] According to one or more embodiments of this disclosure, Example 2 provides the method of Example 1, wherein determining the source domain foreground block features in the first source domain block features and the target domain foreground block features in the first target domain block features includes:

[0206] The location corresponding to the polyp segmentation label is segmented to obtain the segmentation label block features;

[0207] Based on the segmentation label block features, determine the candidate foreground block feature set corresponding to the first source domain block features;

[0208] For each candidate foreground block feature in the candidate foreground block feature set, determine the target domain matching foreground block feature corresponding to the candidate foreground block feature in the first target domain block feature set, and determine the source domain matching foreground block feature of the target domain matching foreground block feature in the first source domain block feature set;

[0209] If the source domain matching foreground block feature belongs to the candidate foreground block feature set, the candidate foreground block feature is determined as the source domain foreground block feature, and the target domain matching foreground block feature is determined as the target domain foreground block feature.

[0210] According to one or more embodiments of this disclosure, Example 3 provides the method of Example 1, wherein determining the connection relationship between the source domain foreground block features and the target domain foreground block features includes:

[0211] Based on the foreground block features of each target type, the domain connection relationships under the target type are determined, wherein the target type includes a source domain type and a target domain type, and the domain connection relationships include the source domain connection relationships between source domain foreground block features under the source domain type and the target domain connection relationships between target domain foreground block features under the target domain type.

[0212] Based on the source domain foreground block features and the target domain foreground block features, the inter-domain connectivity relationship between the source domain foreground block features and the target domain foreground block features is determined.

[0213] According to one or more embodiments of this disclosure, Example 4 provides the method of Example 3, wherein determining the domain connectivity relationship under the target type based on the domain foreground block features under each target type includes:

[0214] For each domain foreground block feature under each target type, determine the similarity between the domain foreground block feature under the target type and each candidate domain foreground block feature, wherein the candidate domain foreground block features are different from the domain foreground block features and correspond to the same target type;

[0215] If the similarity is greater than or equal to a preset threshold, it is determined that there is a connection between the domain foreground block feature and the candidate domain foreground block feature. The domain connection relationship under the target type includes the connection relationship corresponding to each domain foreground block feature under the target type.

[0216] According to one or more embodiments of this disclosure, Example 5 provides the method of Example 3, wherein determining the inter-domain connectivity relationship between the source domain foreground block features and the target domain foreground block features based on each of the source domain foreground block features and the target domain foreground block features includes:

[0217] The inter-domain connectivity value between the i-th source domain foreground patch feature and the j-th target domain foreground patch feature is determined by the following formula.

[0218]

[0219] in, Used to represent the features of the i-th source domain foreground block in the source domain image s;

[0220] Used to represent the features of the j-th foreground block in the target domain image t;

[0221] σ is used to represent the tuning hyperparameter;

[0222] The inter-domain connectivity relationship includes the inter-domain connectivity relationship value between each source domain foreground block feature and each target domain foreground block feature.

[0223] According to one or more embodiments of this disclosure, Example 6 provides the method of Example 3, wherein updating the first feature block according to the connection relationship to obtain the second feature block includes:

[0224] Based on the domain connectivity under the target type and at least one attention feature layer, the first block feature under the target type is convolved to obtain the convolution block feature under the target type, wherein the attention weights corresponding to the attention feature layer under the target type are determined based on the domain connectivity under the target type;

[0225] Based on the inter-domain connectivity, multi-layer convolutional feature extraction is performed on the convolutional block features under each target type to obtain the second block feature under the target type, wherein the number of convolutional feature extraction layers corresponding to the first source domain block feature and the first target domain block feature is the same.

[0226] According to one or more embodiments of this disclosure, Example 7 provides the method of Example 1, wherein determining the target loss of the polyp segmentation model based on the predicted segmentation result corresponding to the source domain image and the polyp segmentation label, as well as the second source domain block features and the second target domain block features, includes:

[0227] Based on the predicted segmentation information in the predicted segmentation results and the polyp segmentation label, the segmentation loss is determined;

[0228] The feature alignment loss is determined based on the second source domain block features and the second target domain block features;

[0229] The target loss is determined based on the segmentation loss and the feature alignment loss.

[0230] According to one or more embodiments of this disclosure, Example 8 provides the method of Example 7, wherein the feature alignment loss is determined based on the second source domain block features and the second target domain block features using the following formula:

[0231]

[0232] Among them, L cst Used to represent the feature alignment loss;

[0233] N s Used to represent the number of features of the source domain foreground block;

[0234] N t Used to represent the number of foreground block features in the target domain;

[0235] x i sUsed to represent the i-th source domain foreground block feature in the second source domain block feature;

[0236] x j t Used to represent the j-th target domain foreground block feature in the second target domain block feature.

[0237] According to one or more embodiments of this disclosure, Example 9 provides a method for polyp segmentation, wherein the method includes:

[0238] Received the target image for detection;

[0239] The target image is input into the trained polyp segmentation model to obtain the polyp segmentation result corresponding to the target image. The polyp segmentation model is trained based on the training method of the polyp segmentation model in any one of Examples 1-8.

[0240] According to one or more embodiments of this disclosure, Example 10 provides a training apparatus for a polyp segmentation model, wherein the apparatus includes:

[0241] The feature extraction module is used to extract image features from source domain images in the source domain dataset and target domain images in the target domain dataset based on the polyp segmentation model, to obtain first source domain block features and first target domain block features. The images in the source domain dataset are labeled with polyp segmentation tags, while the images in the target domain dataset are not labeled. The data distributions of the source domain dataset and the target domain dataset are different. Each feature value in the first source domain block features corresponds to the features of n*n pixels in the source domain image, and each feature value in the first target domain block features corresponds to the features of n*n pixels in the target domain image.

[0242] The first determining module is used to determine the source domain foreground block features in the first source domain block features and the target domain foreground block features in the first target domain block features.

[0243] The second determining module is used to determine the connection relationship between the source domain foreground block features and the target domain foreground block features;

[0244] An update module is used to update a first feature block according to the connection relationship to obtain a second feature block. The first feature block includes a first source domain block feature under the source domain type and a first target domain block feature under the target domain type. The second feature includes a second source domain block feature obtained by updating the first source domain block feature according to the connection relationship and a second target domain block feature obtained by updating the first target domain block feature according to the connection relationship.

[0245] The acquisition module is used to obtain the predicted segmentation result corresponding to the source domain image based on the features of the second source domain block;

[0246] The training module is used to determine the target loss of the polyp segmentation model based on the predicted segmentation result corresponding to the source domain image, the polyp segmentation label, the second source domain block features, and the second target domain block features, and to train the polyp segmentation model based on the target loss.

[0247] According to one or more embodiments of this disclosure, Example 11 provides a polyp segmentation device, wherein the device includes:

[0248] The receiving module is used to receive the detected target image;

[0249] The segmentation module is used to input the target image into the trained polyp segmentation model to obtain the polyp segmentation result corresponding to the target image, wherein the polyp segmentation model is trained based on the training method of any of the polyp segmentation models described in Examples 1-8.

[0250] According to one or more embodiments of the present disclosure, Example 12 provides a computer-readable medium having a computer program stored thereon that, when executed by a processing device, implements the steps of the method described in any one of Examples 1-9.

[0251] According to one or more embodiments of this disclosure, Example 13 provides an electronic device, including:

[0252] A storage device on which computer programs are stored;

[0253] A processing device for executing the computer program in the storage device to implement the steps of any one of the methods in Examples 1-9.

[0254] The above description is merely a preferred embodiment of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features disclosed in this disclosure that have similar functions.

[0255] Furthermore, while the operations are described in a specific order, this should not be construed as requiring these operations to be performed in the specific order shown or in a sequential order. In certain environments, multitasking and parallel processing may be advantageous. Similarly, while several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of this disclosure. Certain features described in the context of individual embodiments may also be implemented in combination in a single embodiment. Conversely, various features described in the context of a single embodiment may also be implemented individually or in any suitable sub-combination in multiple embodiments.

[0256] Although the subject matter has been described using language specific to structural features and / or methodological logic, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. Rather, the specific features and actions described above are merely illustrative forms of implementing the claims. Regarding the apparatus in the above embodiments, the specific manner in which the various modules perform their operations has been described in detail in the embodiments relating to the method, and will not be elaborated upon here.

Claims

1. A method for training a polyp segmentation model, characterized in that, The method comprises: Based on the polyp segmentation model, image feature extraction is performed on source domain images in a source domain dataset and target domain images in a target domain dataset to obtain first source domain block features and first target domain block features, wherein the images in the source domain dataset are labeled with polyp segmentation labels, the images in the target domain dataset are not labeled, the data distribution of the source domain dataset is different from that of the target domain dataset, each feature value in the first source domain block features corresponds to the feature of an n pixel point in the source domain image, and each feature value in the first target domain block features corresponds to the feature of an n pixel point in the target domain image. determining source domain foreground block features in the first source domain block features and target domain foreground block features in the first target domain block features; determining a connection relationship corresponding to the source domain foreground block features and the target domain foreground block features; updating the first block features according to the connection relationship to obtain second block features, wherein the first block features comprise first source domain block features under a source domain type and the first target domain block features under a target domain type, and the second block features comprise second source domain block features obtained by updating the first source domain block features according to the connection relationship and second target domain block features obtained by updating the first target domain block features according to the connection relationship; obtaining a predicted segmentation result corresponding to the source domain image according to the second source domain block features; determining a target loss of the polyp segmentation model according to the predicted segmentation result corresponding to the source domain image, the polyp segmentation label, the second source domain block features and the second target domain block features, and training the polyp segmentation model according to the target loss; The determination of the connection relationship corresponding to the source domain foreground block features and the target domain foreground block features comprises: determining a domain connection relationship under each target type according to domain foreground block features under the target type, wherein the target type comprises a source domain type and a target domain type, and the domain connection relationship comprises a source domain connection relationship between source domain foreground block features under the source domain type and a target domain connection relationship between the target domain foreground block features under the target domain type; determining an inter-domain connection relationship between the source domain foreground block features and the target domain foreground block features based on each of the source domain foreground block features and the target domain foreground block features.

2. The method of claim 1, wherein, The determination of the source domain foreground block features in the first source domain block features and the target domain foreground block features in the first target domain block features comprises: performing feature segmentation on a position corresponding to the polyp segmentation label to obtain a segmentation label block feature; determining a candidate foreground block feature set corresponding to the first source domain block features according to the segmentation label block feature; for each candidate foreground block feature in the candidate foreground block feature set, determining a target domain matching foreground block feature in the first target domain block features corresponding to the candidate foreground block feature, and determining a source domain matching foreground block feature of the target domain matching foreground block feature in the first source domain block features; if the source domain matching foreground block feature belongs to the candidate foreground block feature set, determining the candidate foreground block feature as the source domain foreground block feature and determining the target domain matching foreground block feature as the target domain foreground block feature.

3. The method of claim 1, wherein, The determination of the domain connection relationship under the target type according to the domain foreground block features under each target type comprises: for each domain foreground block feature under each target type, determining a similarity between the domain foreground block feature under the target type and each candidate domain foreground block feature, the candidate domain foreground block feature being different from the domain foreground block feature and corresponding to the same target type. If the similarity is greater than or equal to a preset threshold, it is determined that there is a connection between the domain foreground block feature and the candidate domain foreground block feature. The domain connection relationship under the target type includes the connection relationship corresponding to each domain foreground block feature under the target type.

4. The method of claim 1, wherein, The step of determining the inter-domain connectivity between the source domain foreground block features and the target domain foreground block features based on each of the source domain foreground block features and the target domain foreground block features includes: The number is determined by the following formula. i Features of the source domain foreground block and the first j Interdomain connectivity values ​​among foreground block features in the target domain : wherein, for representing a first source domain foreground block feature in a source domain image s i for representing a first source domain foreground block feature in a source domain image​ for representing a first target domain foreground block feature in a target domain image t first target domain foreground block feature j first target domain foreground block feature for representing adjusting hyperparameters; The inter-domain connectivity relationship includes the inter-domain connectivity relationship value between each source domain foreground block feature and each target domain foreground block feature.

5. The method of claim 1, wherein, The step of updating the first feature block according to the connection relationship to obtain the second feature block includes: Based on the domain connectivity under the target type and at least one attention feature layer, the first block feature under the target type is convolved to obtain the convolution block feature under the target type, wherein the attention weights corresponding to the attention feature layer under the target type are determined based on the domain connectivity under the target type; Based on the inter-domain connectivity, multi-layer convolutional feature extraction is performed on the convolutional block features under each target type to obtain the second block feature under the target type, wherein the number of convolutional feature extraction layers corresponding to the first source domain block feature and the first target domain block feature is the same.

6. The method of claim 1, wherein, The step of determining the target loss of the polyp segmentation model based on the predicted segmentation result corresponding to the source domain image, the polyp segmentation label, the second source domain block features, and the second target domain block features includes: Based on the predicted segmentation information in the predicted segmentation results and the polyp segmentation label, the segmentation loss is determined; The feature alignment loss is determined based on the second source domain block features and the second target domain block features; The target loss is determined based on the segmentation loss and the feature alignment loss.

7. The method of claim 6, wherein, The feature alignment loss is determined using the following formula based on the features of the second source domain block and the features of the second target domain block: wherein, for representing the feature alignment loss; a number of source domain foreground block features for representing the source domain foreground block features; a number of target domain foreground block features for representing the target domain foreground block features; for representing a first source domain foreground block feature in the second source domain block feature i ​ for representing a first target domain foreground block feature in the second target domain block feature. j for representing a first target domain foreground block feature in the second target domain block feature.

8. A polyp segmenting method characterized by, The method includes: Received the target image for detection; The target image is input into the trained polyp segmentation model to obtain the polyp segmentation result corresponding to the target image, wherein the polyp segmentation model is trained based on the training method of the polyp segmentation model according to any one of claims 1-7. 9.A device for training a polyp segmentation model, characterized by, The device includes: The feature extraction module is configured to perform image feature extraction on source domain images in a source domain dataset and target domain images in a target domain dataset based on a polyp segmentation model, to obtain first source domain block features and first target domain block features, wherein the images in the source domain dataset are labeled with polyp segmentation labels, the images in the target domain dataset are not labeled, the data distribution of the source domain dataset is different from that of the target domain dataset, each feature value in the first source domain block features corresponds to the feature of an n th pixel point in the source domain image, and each feature value in the first target domain block features corresponds to the feature of an n th pixel point in the target domain image. The first determining module is used to determine the source domain foreground block features in the first source domain block features and the target domain foreground block features in the first target domain block features. The second determining module is used to determine the connection relationship between the source domain foreground block features and the target domain foreground block features; An update module is used to update a first feature block according to the connection relationship to obtain a second feature block. The first feature block includes a first source domain block feature under the source domain type and a first target domain block feature under the target domain type. The second feature includes a second source domain block feature obtained by updating the first source domain block feature according to the connection relationship and a second target domain block feature obtained by updating the first target domain block feature according to the connection relationship. The acquisition module is configured to acquire a predicted segmentation result corresponding to the source domain image according to the second source domain block feature; The training module is configured to determine a target loss of the polyp segmentation model according to the predicted segmentation result corresponding to the source domain image and the polyp segmentation label, and the second source domain block feature and the second target domain block feature, and train the polyp segmentation model according to the target loss; The second determination module includes: The fourth determination submodule is configured to determine a domain connection relationship under each target type according to the domain foreground block feature under each target type, wherein the target type includes a source domain type and a target domain type, and the domain connection relationship includes a source domain connection relationship between source domain foreground block features under the source domain type and a target domain connection relationship between the target domain foreground block features under the target domain type; The fifth determination submodule is configured to determine an inter-domain connection relationship between the source domain foreground block features and the target domain foreground block features based on each of the source domain foreground block features and the target domain foreground block features.

10. A polyp segmenting apparatus characterized by, The device includes: The receiving module is configured to receive a target image to be detected; The segmentation module is configured to input the target image into the trained polyp segmentation model to obtain a polyp segmentation result corresponding to the target image, wherein the polyp segmentation model is obtained by training based on the polyp segmentation model training method in any one of claims 1-7.

11. A computer readable medium having stored thereon a computer program, characterized in that, The program is executed by the processing device to implement the steps of the method in any one of claims 1-8.

12. An electronic device, comprising: It includes: A storage device having a computer program stored thereon; A processing device configured to execute the computer program in the storage device to implement the steps of the method in any one of claims 1-8.

Citation Information

Patent Citations

  • Image segmentation method and device, equipment and storage medium

    CN113706551A

  • Training method based on image-instance alignment network and cross-domain target detection method

    CN114693983A