A training method of a biological image instance segmentation model

By employing a biological image instance segmentation model training method, which utilizes semantic guidance based on local salient features and weight vector adjustment to enhance foreground feature attention and reduce the influence of background features, the problem of insufficient segmentation accuracy in complex biological images is solved, achieving higher segmentation accuracy and robustness.

CN118799578BActive Publication Date: 2025-11-28TECH & ENG CENT FOR SPACE UTILIZATION CHINESE ACAD OF SCI
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410950069.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-16
Publication Date
2025-11-28
Estimated Expiration
2044-07-16

AI Technical Summary

Technical Problem

Existing biological image instance segmentation techniques lack sufficient segmentation accuracy in complex biological images, especially when there are many background impurities, dark, overexposed, high similarity between foreground and background, a large number of segmented objects, high density, and curling and overlapping.

Method used

A biological image instance segmentation model training method is adopted. Through a backbone feature extractor, feature fusion processor and decoder, the attention distribution of the feature map is adjusted by using semantic guidance of local salient features to enhance the attention of foreground features and reduce the influence of background features. Combined with weight vector and model parameter updates, the segmentation accuracy is improved.

Benefits of technology

It improves the accuracy and robustness of biological image instance segmentation, solves the segmentation accuracy problem in complex backgrounds, and enhances the saliency and segmentation effect of local salient features.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118799578B_ABST
    Figure CN118799578B_ABST
Patent Text Reader

Abstract

The application provides a training method of a biological image instance segmentation model, which can train the biological image instance segmentation model based on local significant feature semantic guidance. In the training process, by introducing a first weight vector and a second weight vector, the attention of the biological image instance segmentation model to the local significant features of the input image can be strengthened, and the attention of the biological image instance segmentation model to the background image features of the input image can be weakened. Based on the training result output by the biological image instance segmentation model, the model parameters, the first weight vector and the second weight vector of the biological image instance segmentation model can be continuously updated, so that the accuracy of the biological image instance segmentation model in segmenting the input biological image instance is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of image segmentation, and particularly relates to a training method of a biological image instance segmentation model. BACKGROUND

[0002] Biological image instance segmentation is a key task in the field of computer vision, aiming to accurately extract the biological structure of the target instance from the biological image, and has important significance in biological research and biomedical engineering research. Taking nematode images as an example, nematodes are regarded as a popular biological model for current biological research due to their simple physical form. In experiments taking nematodes as research objects, the biological structure of nematodes can be segmented from nematode images and the physical form change thereof is recorded, so as to provide actual basis for related research. Therefore, how to efficiently and accurately perform instance segmentation on biological images is a problem to be solved.

[0003] With the development of the field of computer vision, deep learning has made significant breakthroughs in the field of biological image instance segmentation, and architectures such as convolutional neural networks and U-Net have become mainstream in biological image instance segmentation. However, for more complex biological images, for example, biological images including too many background impurities, being dark, overexposed, having high similarity between foreground and background and being difficult to distinguish, having a large number of instances to be segmented, high density, and being curled and overlapped, the existing biological image segmentation technology still needs to be improved in terms of instance segmentation accuracy. SUMMARY

[0004] The technical problem to be solved by the present application is to provide a training method of a biological image instance segmentation model, which can improve the accuracy of biological image instance segmentation.

[0005] The technical solution of the present application to solve the above technical problem is as follows:

[0006] In a first aspect, the present application provides a training method of a biological image instance segmentation model, which is used for training a biological image instance segmentation model, and the biological image instance segmentation model comprises a backbone feature extractor, a feature fusion processor and a decoder. The method provided by the present application comprises the following steps: inputting at least one training image into the backbone feature extractor. For any training image in the at least one training image, the training image comprises a foreground image and a background image. The foreground image comprises a local salient feature, and the feature in the background image is a background image feature. The local salient feature comprises an image feature corresponding to at least one target to be segmented, and any training image corresponds to a pre-labeled feature label. The backbone feature extractor extracts features of any training image at different scales, and outputs at least one feature image corresponding to any training image. Different feature images correspond to different resolutions. For any feature image in the at least one feature image, the feature fusion processor adjusts any feature image based on a first weight vector, a second weight vector, a local salient feature map true value and a background image true value. The local salient feature map true value and the background image true value are determined based on the feature label corresponding to any training image. The first weight vector is used to enhance the local salient feature of any feature image based on the local salient feature map true value. The second weight vector is used to weaken the background image feature of any feature image based on the background image true value. The decoder decodes each adjusted feature image corresponding to any training image, and outputs a segmentation result. The segmentation result comprises a feature prediction value of each adjusted feature image corresponding to any training image. In a case where the biological image instance segmentation model does not meet a model convergence condition, the model parameters of the biological image instance segmentation model are adjusted based on the segmentation result.

[0007] The present application has the following beneficial effects: based on the local salient feature semantic guidance to change the attention distribution of the multi-scale feature map, so that the biological image instance segmentation model pays more attention to the local salient feature region in the foreground image, enhances the saliency of the local salient feature in the multi-scale feature map, solves the problems of too many background impurities, darkness, overexposure in the image to be segmented, high similarity between the foreground and the background, difficult to distinguish, too many segmented objects, high density and overlapping, and low segmentation accuracy, and can improve the accuracy and robustness of biological image instance segmentation.

[0008] On the basis of the above technical solution, the present application can be further improved as follows.

[0009] Further, the first weight vector is adjusted based on the segmentation result.

[0010] Further, the second weight vector is adjusted based on the segmentation result.

[0011] Further, the feature fusion processor generates a local salient feature attention map based on the first weight vector and the local salient feature map ground truth. The feature fusion processor generates a background weakening attention map based on the second weight vector and the background map ground truth. The feature fusion processor adjusts any feature image based on the local salient feature attention map and the background weakening attention map.

[0012] Further, the feature fusion processor adds the local salient feature attention map, the background weakening attention map and any feature image to adjust the any feature image. Alternatively, the feature fusion processor multiplies the local salient feature attention map, the background weakening attention map and any feature image to adjust the any feature image.

[0013] Further, the decoder decodes each adjusted feature image corresponding to any training image by taking the initialization vector as a query vector, and obtains a decoding result of each adjusted feature image corresponding to any training image through the mask attention mechanism and the self-attention mechanism. Based on the decoding result of each adjusted feature image corresponding to any training image, a feature prediction value of each adjusted feature image corresponding to any training image is output.

[0014] Further, the model convergence condition includes that, for any one of the adjusted feature images corresponding to any training image, the difference between the feature prediction value of the any one of the adjusted feature images and the feature ground truth of the any one of the adjusted feature images is less than a preset difference. The feature ground truth of the any one of the adjusted feature images is determined based on the feature label corresponding to the any training image.

[0015] Further, based on the difference between the feature prediction value of any one of the adjusted feature images and the feature ground truth of any one of the adjusted feature images, the model parameters of the biological image instance segmentation model are adjusted.

[0016] Further, based on the difference between the feature prediction value of any one of the adjusted feature images and the feature ground truth of any one of the adjusted feature images, the first weight vector is adjusted.

[0017] Further, based on the difference between the feature prediction value of any one of the adjusted feature images and the feature ground truth of any one of the adjusted feature images, the second weight vector is adjusted.

[0018] In a second aspect, the present application provides a biological image instance segmentation model, comprising a backbone feature extractor, a feature fusion processor and a decoder. The backbone feature extractor is configured to extract features of a received image to be segmented at different scales, and output at least one feature image corresponding to the image to be segmented. Different feature images correspond to different resolutions. For any feature image in the at least one feature image, the feature fusion processor is configured to adjust the feature image based on a first weight vector, a second weight vector, a local salient feature map ground truth and a background map ground truth. The local salient feature map ground truth and the background map ground truth are determined based on a feature label corresponding to the image to be segmented. The first weight vector is configured to enhance the local salient features of the feature image based on the local salient feature map ground truth. The second weight vector is configured to weaken the background image features of the feature image based on the background map ground truth. The decoder is configured to decode the adjusted feature images corresponding to any training image, and output a segmentation result.

[0019] In a third aspect, the present application provides an electronic device, comprising a memory and one or more processors; the memory and the processor are coupled; wherein the memory stores computer program code, and the computer program code comprises computer instructions, when the computer instructions are executed by the processor, the electronic device executes the training method of the biological image instance segmentation model according to any one of the first aspect.

[0020] In a fourth aspect, a computer readable storage medium is provided, comprising computer instructions, when the computer instructions are executed on an electronic device, the electronic device executes the training method of the biological image instance segmentation model according to any one of the first aspect.

[0021] In a fifth aspect, a computer program product is provided, when the computer program product is executed on a computer, the computer executes the training method of the biological image instance segmentation model according to any one of the first aspect.

[0022] It can be understood that the beneficial effects of the biological image instance segmentation model of the second aspect, the electronic device of the third aspect, the computer readable storage medium of the fourth aspect and the computer program product of the fifth aspect can refer to the beneficial effects of the first aspect and any possible design of the first aspect, which will not be repeated here. BRIEF DESCRIPTION OF DRAWINGS

[0023] Figure 1 A structural schematic diagram of a biological image instance segmentation model provided by an embodiment of the present application;

[0024] Figure 2 A flowchart of a training method of a biological image instance segmentation model provided by an embodiment of the present application;

[0025] Figure 3 A schematic diagram of a training image provided for an embodiment of the present application;

[0026] Figure 4 A schematic diagram of image features provided for an embodiment of the present application. DETAILED DESCRIPTION

[0027] The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application. In the description of the present application, unless otherwise specified, “ / ” represents that the objects before and after the “ / ” are in an “or” relationship, for example, A / B can represent A or B; “and / or” in the present application is only a description of the association relationship of the associated objects, which means that there can be three relationships, for example, A and / or B can represent: A exists alone, A and B exist together, and B exists alone, where A and B can be singular or plural. In addition, in the description of the present application, unless otherwise specified, “multiple” means two or more than two. “At least one of the following” or the like means any combination of the items, including any combination of single item or multiple items. For example, at least one of a, b, or c can represent: a, b, c, a-b, a-c, b-c, or a-b-c, where a, b, and c can be single or multiple. In addition, in order to clearly describe the technical solutions of the embodiments of the present application, in the embodiments of the present application, the same items or similar items with basically the same function and role are distinguished by using “first”, “second”, etc. The skilled in the art can understand that “first”, “second”, etc. do not limit the quantity and execution order, and “first”, “second”, etc. also do not limit the difference. At the same time, in the embodiments of the present application, “exemplary” or “for example” means to represent as an example, illustration or description. Any embodiment or design scheme described as “exemplary” or “for example” in the embodiments of the present application should not be interpreted as more preferred or more advantageous than other embodiments or design schemes.

[0028] The application provides a biological image instance segmentation model training method, which can train a biological image instance segmentation model based on local significant feature semantic guidance. In the training process, by introducing a first weight vector and a second weight vector, the attention of the biological image instance segmentation model to the local significant features of the input image can be strengthened, and the attention of the biological image instance segmentation model to the background image features of the input image can be weakened. Based on the training results output by the biological image instance segmentation model, the model parameters, the first weight vector and the second weight vector of the biological image instance segmentation model can be continuously updated, so as to solve the problem of low segmentation result precision of the biological image instance segmentation model when performing biological image instance segmentation on a to-be-segmented image including too much background impurities, darkness, overexposure, high similarity between foreground and background, too many segmentation objects, high density and overlapping, etc. The biological image instance segmentation model training method provided by the application can improve the precision and robustness of the biological image instance segmentation model in biological image instance segmentation.

[0029] The application provides a biological image instance segmentation model training method for training a biological image instance segmentation model, as shown in Figure 1 The biological image instance segmentation model can include a backbone feature extractor, a feature fusion processor and a decoder.

[0030] As shown in Figure 2 The biological image instance segmentation model training method provided by the application can include steps S201-S205.

[0031] S201: input at least one training image into the backbone feature extractor.

[0032] For any training image in the at least one training image, the any training image includes a foreground image and a background image. The foreground image includes local significant features, and the features in the background image are all background image features. The local significant features include image features corresponding to at least one to-be-segmented target. The any training image corresponds to a pre-labeled feature label.

[0033] For example, as shown in Figure 3 The training image 300 includes a foreground image composed of to-be-segmented targets 301, 302 and 303, and a background image 310 composed of noise 304 and impurities 305. The image features corresponding to the to-be-segmented targets 301, 302 and 303 are local significant features included in the foreground features of the training image 300.

[0034] When the training image 300 is input into the biological image instance segmentation model provided by the application, the output can be as shown in Figure 4The predicted values ​​for image feature 401, image feature 402, and image feature 403 are shown. Among them, Figure 4 Image feature 401 and Figure 3 The target to be segmented in the text corresponds to 301. Figure 4 Image feature 402 and Figure 3 The target to be segmented in the text corresponds to 302. Figure 4 Image feature 403 and Figure 3 The target to be segmented in the text corresponds to 303.

[0035] It should be noted that local salient features can be features of biological local parts with physical meaning. Taking nematodes as an example, the local salient features of nematodes can be the coordinates of key points of the nematode. Taking mice as an example, the local salient features of mice can be features of the head, limbs, and tail, or the coordinates of the center point (or key point coordinates) of the head, limbs, and tail, or the individual masks of the head, limbs, and tail.

[0036] S202: The backbone feature extractor extracts features from any training image at different scales and outputs at least one feature image corresponding to any training image.

[0037] Different feature images correspond to different resolutions.

[0038] In some embodiments, the backbone feature extractor can use a neural network framework as its core, taking a training image R of size H×W as input, and extracting multiple resolution features corresponding to the training image R to generate multiple feature images. Any feature image can be represented as... Among them, C F S is the stride of the feature image, which depends on the number of channels of a specific backbone.

[0039] In some embodiments, the backbone feature extractor may include convolutional layers and pooling layers. Alternatively, the backbone feature extractor may include a feedforward neural network and an attention module.

[0040] For example, the backbone feature extractor can be either a standard convolution-based ResNet backbone or a Swin-Transformer.

[0041] When the backbone feature extractor is a ResNet backbone based on a convolutional neural network architecture, the backbone feature extractor can include a convolutional layer and a pooling layer. The number of layers of the ResNet can be 18, 34, 50, 101, or 152 layers. The convolutional layer in the backbone feature extractor can use one or more of the size sizes [7*7, 3*3, 1*1] with a stride of 2 to extract local non-salient features (edges, corners, textures, etc.) of the training image, and the pooling layer can use a max-pooling operation with a convolution kernel of 3*3 and a stride of 2 to extract local salient features of the training image (see the description of the foregoing embodiments).

[0042] When the backbone feature extractor is a SwinTransformer (e.g., Swin-tiny, Swin-small, Swin-base, Swin-large) based on a Transformer architecture, the backbone feature extractor can include an attention module and a feedforward neural network.

[0043] S203: For any feature image in the at least one feature image, the feature fusion processor adjusts the any feature image based on the first weight vector, the second weight vector, the local salient feature map ground truth, and the background map ground truth.

[0044] wherein the local salient feature map ground truth and the background map ground truth are determined based on a feature label corresponding to the any training image. The first weight vector is used to enhance the local salient features of the any feature image based on the local salient feature map ground truth. The second weight vector is used to weaken the background image features of the any feature image based on the background map ground truth.

[0045] In some embodiments, the feature fusion processor generates a local salient feature attention map based on the first weight vector and the local salient feature map ground truth. The feature fusion processor generates a background weakening attention map based on the second weight vector and the background map ground truth. The feature fusion processor adjusts the any feature image based on the local salient feature attention map and the background weakening attention map.

[0046] In some embodiments, the feature fusion processor can add the local salient feature attention map, the background weakening attention map, and the any feature image to adjust the any feature image.

[0047] In some embodiments, the feature fusion processor can multiply the local salient feature attention map, the background weakening attention map, and the any feature image to adjust the any feature image.

[0048] S204: The decoder decodes the adjusted feature images corresponding to the any training image to output a segmentation result.

[0049] wherein the segmentation result comprises a feature prediction value of each adjusted feature image corresponding to any training image.

[0050] In some embodiments, the decoder takes the initialization vector as a query vector, decodes each adjusted feature image corresponding to any training image, and obtains a decoding result of each adjusted feature image corresponding to any training image through the masked attention mechanism and the self-attention mechanism. Based on the decoding result of each adjusted feature image corresponding to any training image, a feature prediction value of each adjusted feature image corresponding to any training image is output.

[0051] In some embodiments, the decoder can decode each adjusted feature image by taking the initialization vector as a query vector. The query vector can be understood as a vector used by the biological image instance segmentation model to detect and aggregate image features, and is a set of fixed number of learnable vectors. These query vectors are optimized throughout the training process so that they can effectively extract useful information from the input feature map. The initialization vector interacts with the feature map through the cross-attention mechanism, thereby achieving feature extraction and generation of segmentation mask.

[0052] The decoder can predict a binary mask through the masked attention and the self-attention to obtain a final class prediction result and a mask prediction result. The binary mask can be used to segment a certain object in the corresponding feature image, and the pixels of the object to be segmented in the binary mask are set to 1, and the remaining pixels are set to 0. The class prediction result can be used to distinguish the class (foreground or background) of the features included in the training image, and the mask prediction result is the segmentation result.

[0053] In some embodiments, the decoder can include n decoding layers, each of which includes a masked attention module, a self-attention module, and a feedforward neural network.

[0054] Wherein, the decoder can use the masked attention mechanism, that is, the cross-attention mechanism with a mask, on the premise that the local salient features in the training image are sufficient to ensure the update of the query vector and the context information of the salient features can be obtained through the self-attention mechanism. The mask attention adjusts the attention matrix by adding a mask value, which limits the attention to the local salient features centered on the prediction segment, which makes each feature passing through the decoder only interact between the local salient feature regions in the foreground image, rather than each pixel making attention to the whole image.

[0055] The prediction segment refers to the context range that the biological image instance segmentation model focuses on when predicting at the current position. The mask attention mechanism limits the range of the attention matrix by setting a mask, so that the biological image instance segmentation model only focuses on specific salient features. It is not a fixed range, but can be dynamically set or adjusted according to the needs of the task. For example, in the segmentation task, the mask can be used to limit the attention to the area of interest, thereby improving the accuracy of segmentation. The prediction segment can be understood as the neighborhood range of the current pixel or region.

[0056] In some embodiments, the positions of the self-attention module and the mask attention module can be exchanged; wherein the query feature is initialized to zero and is associated with a learnable position embedding, and the decoder takes the query vector, the image feature, and the mask as input, so that the query feature is learnable.

[0057] For example, the decoder can use a Transformer decoder, and the L query embeddings are initialized to zero vectors, and each query embedding can be associated with a learnable position encoding. The query embedding is the input of the decoder, which is updated constantly in the subsequent decoding process and interacts with the feature map.

[0058] In some embodiments, the key components of the decoder include a mask attention operator, which extracts local salient features by limiting the cross-attention to the local salient feature area in the foreground image of each query's prediction mask.

[0059] Compared with the cross-attention used in the standard decoder that focuses on all positions, the mask attention in the decoder provided by the application can achieve faster convergence and better performance, thereby improving the convergence and effect of the decoder. In addition, the change of the order of the self-attention and the cross-attention positions makes the calculation more efficient.

[0060] S205: In the case where it is determined that the biological image instance segmentation model does not satisfy the model convergence condition, adjusting the model parameters of the biological image instance segmentation model based on the segmentation result.

[0061] In some embodiments, the model convergence condition includes that the difference between the feature prediction value of any adjusted feature image and the feature true value of any adjusted feature image is less than a preset difference. The feature true value of any adjusted feature image is determined based on the feature label corresponding to any training image.

[0062] In some embodiments, based on the difference between the feature prediction value of any adjusted feature image and the feature true value of any adjusted feature image, the model parameters of the biological image instance segmentation model can be adjusted.

[0063] In some embodiments, the first weight vector can also be adjusted based on the segmentation result.

[0064] Specifically, the first weight vector can be adjusted based on a gap between a feature prediction value of any adjusted feature image and a feature ground truth value of the any adjusted feature image.

[0065] In some embodiments, the second weight vector can also be adjusted based on the segmentation result.

[0066] Specifically, the second weight vector can be adjusted based on a gap between a feature prediction value of any adjusted feature image and a feature ground truth value of the any adjusted feature image.

[0067] It can be seen that the first weight vector, the second weight vector and the model parameters of the biological image instance segmentation model in the present application are updatable. The boundaries of the local salient features can be gradually explored by continuously updating the first weight vector, the second weight vector and the model parameters of the biological image instance segmentation model, so as to prevent the image features in the background image from being regarded as the local salient features, thereby improving the accuracy of the biological image instance segmentation model in biological image instance segmentation.

[0068] The present application also provides a biological image instance segmentation model, comprising a backbone feature extractor, a feature fusion processor and a decoder.

[0069] The backbone feature extractor is configured to perform feature extraction on the received image to be segmented at different scales, and output at least one feature image corresponding to the image to be segmented. Different feature images correspond to different resolutions.

[0070] For any feature image in the at least one feature image, the feature fusion processor is configured to adjust the any feature image based on the first weight vector, the second weight vector, the local salient feature ground truth value and the background image ground truth value.

[0071] The local salient feature ground truth value and the background image ground truth value are determined based on the feature label corresponding to the image to be segmented. The first weight vector is configured to perform enhancement processing on the local salient features of the any feature image based on the local salient feature ground truth value. The second weight vector is configured to perform weakening processing on the background image features of the any feature image based on the background image ground truth value.

[0072] The decoder is configured to perform decoding processing on the adjusted feature images corresponding to the training image, and output the corresponding segmentation result. The segmentation result comprises a plurality of prediction values corresponding to the image features of the image to be segmented, for the user to select as needed.

[0073] The application is based on local salient feature semantic guidance to change the attention distribution of the multi-scale feature map, so that the biological image instance segmentation model pays more attention to the local salient feature region, enhances the saliency of the local salient feature in the multi-scale feature map, solves the problems such as too much background impurities, dark, overexposure in the image to be segmented, high similarity between foreground and background, difficult to distinguish, too many segmented objects, high density, and curled overlapping, and improves the precision and robustness of biological image instance segmentation.

[0074] In some schemes, the embodiments of the present application can be combined, and the combined scheme is implemented. Optionally, some operations in the flow of each method embodiment are optionally combined, and / or the order of some operations is optionally changed. Moreover, the execution order between the steps of each flow is only exemplary, and does not constitute a limitation on the execution order between the steps, and other execution orders between the steps can also be used. The described execution order is not intended to indicate that these operations can only be executed in this order. A person of ordinary skill in the art can think of various ways to reorder the operations described herein. In addition, it should be pointed out that the process details related to some embodiments herein are also applicable in a similar manner to other embodiments, or different embodiments can be combined for use.

[0075] In addition, some steps in the method embodiment can be equivalently replaced by other possible steps. Alternatively, some steps in the method embodiment can be optional and can be deleted in some use scenarios. Alternatively, other possible steps can be added to the method embodiment. Moreover, each method embodiment can be implemented individually or in combination.

[0076] Through the description of the above embodiments, those skilled in the art can clearly understand that, for the convenience and brevity of description, only the above division of functional modules is taken as an example for illustration, and in actual application, the above functions can be completed by different functional modules according to needs, that is, the internal structure of the model is divided into different functional modules to complete all or part of the functions described above.

[0077] In several embodiments provided in the present application, it should be understood that the disclosed model and method can be implemented in other ways. For example, the model embodiments described above are only illustrative, for example, the division of the modules or units is only a logical functional division, and in actual implementation, there can be another division way, for example, a plurality of units or components can be combined or integrated into another model, or some features can be ignored or not executed. Another point, the coupling or direct coupling or communication connection between the displayed or discussed each other can be through some interface, indirect coupling or communication connection between the units or components, which can be electrical, mechanical or other forms.

[0078] In addition, each function unit in each embodiment of the present application can be integrated in one processing unit, or each unit can be physically present separately, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software function unit.

[0079] When the integrated unit is realized in the form of a software function unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present application essentially or the parts that make contributions or the whole or part of the technical solutions can be embodied in the form of a software product. The software product is stored in a storage medium, includes a plurality of instructions for making a device (which can be a single-chip microcomputer, a chip, etc.) or a processor execute all or part of the steps of the method described in each embodiment of the present application. The foregoing storage medium includes a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various media that can store program codes.

[0080] The above is only a specific embodiment of the present application, but the protection scope of the present application is not limited thereto. Any change or replacement within the technical scope disclosed in the present application should be covered in the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims

1. A training method for a biological image instance segmentation model, characterized in that, A method for training a biological image instance segmentation model, the biological image instance segmentation model including a backbone feature extractor, a feature fusion processor, and a decoder; the method includes: At least one training image is input into the backbone feature extractor; for any training image among the at least one training images, the training image includes a foreground image and a background image; the foreground image includes local salient features; the features in the background image are background image features; the local salient features include at least one image feature corresponding to the target to be segmented; each training image corresponds to a pre-labeled feature label; The backbone feature extractor extracts features from any training image at different scales and outputs at least one feature image corresponding to any training image; different feature images correspond to different resolutions. For any feature image among the at least one feature images, the feature fusion processor adjusts the feature image based on a first weight vector, a second weight vector, the ground truth value of the local salient feature map, and the ground truth value of the background image; the ground truth value of the local salient feature map and the ground truth value of the background image are determined based on the feature label corresponding to the training image; the first weight vector is used to enhance the local salient features of the feature image based on the ground truth value of the local salient feature map; the second weight vector is used to weaken the background image features of the feature image based on the ground truth value of the background image. The decoder decodes each adjusted feature image corresponding to any training image and outputs a segmentation result; the segmentation result includes the feature prediction values ​​of each adjusted feature image corresponding to any training image; If it is determined that the biological image instance segmentation model does not meet the model convergence condition, the model parameters of the biological image instance segmentation model are adjusted based on the segmentation results.

2. The training method according to claim 1, characterized in that, The step of adjusting the model parameters of the biological image instance segmentation model based on the segmentation results when it is determined that the biological image instance segmentation model does not meet the model convergence condition further includes: The first weight vector is adjusted based on the segmentation result.

3. The training method according to claim 2, characterized in that, The step of adjusting the model parameters of the biological image instance segmentation model based on the segmentation results when it is determined that the biological image instance segmentation model does not meet the model convergence condition further includes: The second weight vector is adjusted based on the segmentation result.

4. The training method according to claim 3, characterized in that, The feature fusion processor adjusts any one of the feature images based on a first weight vector, a second weight vector, the true value of the local salient feature map, and the true value of the background image, including: The feature fusion processor generates a local salient feature attention map based on the first weight vector and the true values ​​of the local salient feature map; The feature fusion processor generates a background weakening attention map based on the second weight vector and the true value of the background image; The feature fusion processor adjusts any of the feature images based on the local salient feature attention map and the background weakening attention map.

5. The training method according to claim 4, characterized in that, The feature fusion processor adjusts any of the feature images based on the local salient feature attention map and the background weakening attention map, including: The feature fusion processor adds the local salient feature attention map, the background weakening attention map, and any of the feature images to adjust the feature image. Alternatively, the feature fusion processor multiplies the local salient feature attention map, the background weakening attention map, and any of the feature images to adjust the feature image.

6. The training method according to claim 5, characterized in that, The decoder decodes each adjusted feature image corresponding to any training image and outputs a segmentation result, including: The decoder uses the initialization vector as the query vector to decode each adjusted feature image corresponding to any training image. Through mask attention mechanism and self attention mechanism, the decoding result of each adjusted feature image corresponding to any training image is obtained. Based on the decoding results of each adjusted feature image corresponding to any training image, the feature prediction values ​​of each adjusted feature image corresponding to any training image are output.

7. The training method according to claim 6, characterized in that, The model convergence conditions include: For any adjusted feature image among all adjusted feature images corresponding to any training image, the difference between the predicted feature value of any adjusted feature image and the true feature value of any adjusted feature image is less than a preset difference; the true feature value of any adjusted feature image is determined based on the feature label corresponding to any training image.

8. The training method according to claim 7, characterized in that, The adjustment of the model parameters of the biological image instance segmentation model based on the segmentation results includes: The model parameters of the biological image instance segmentation model are adjusted based on the difference between the predicted feature value and the true feature value of any adjusted feature image.

9. The training method according to claim 8, characterized in that, Adjusting the first weight vector based on the segmentation result includes: The first weight vector is adjusted based on the difference between the predicted feature value and the true feature value of any adjusted feature image.

10. The training method according to claim 9, characterized in that, The step of adjusting the second weight vector based on the segmentation result includes: The second weight vector is adjusted based on the difference between the predicted feature value and the true feature value of any adjusted feature image.

Citation Information

Patent Citations

  • Target detection method and device and electronic system

    CN112418244A

  • Feature extraction model training method and device, and feature extraction model re-identification method and device

    CN115294420A