Instance segmentation network optimization method, equipment and medium
By performing data augmentation and comparison learning of tail data samples and optimizing the instance segmentation network with pseudo-semantic labels, the problem of poor segmentation effect of long-tail instances in the existing technology is solved, and the model's recognition accuracy and segmentation effect of long-tail data are improved.
Patent Information
- Application Number
- CN202411598967.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-11
- Publication Date
- 2025-03-28
- Estimated Expiration
- 2044-11-11
AI Technical Summary
In the prior art, the category balanced sampling method lacks sufficient sample variance, which can easily lead to poor model overfitting and generalization. Cost-sensitive learning methods may cause the model to learn error information, resulting in poor effect of long-tail instance segmentation.
By obtaining batches of tail data samples, data augmentation is generated, tail extension samples are performed, and comparison learning is performed to obtain tail comparison losses. Then build a pseudo-semantic label of the tail extension sample, input the head and tail data samples into the preset instance segmentation network, calculate the segmentation mask loss and category loss based on the truth value label and pseudo-semantic label, and adjust the network to optimize its performance.
The network's ability to identify inter-class discriminative features of long-tail data and its ability to pay attention to in-class invariance features is reduced, and the difference between the label of the input sample and the corresponding predicted values output by the network is reduced, thereby improving the recognition accuracy of long-tail data and the segmentation effect of long-tail instances.
Smart Images

Figure CN119723073A_ABST
Abstract
Description
Background Art
[0002] Instance segmentation aims to associate each pixel in an image with its corresponding semantic category and instance. It has the characteristics of semantic segmentation, which requires pixel-level classification, and the characteristics of target detection, which requires the location of different instances. Instance segmentation can provide computers with more fine-grained scene information for understanding images and achieve more accurate object detection. It has always been an important research direction in image processing. In practical application fields, most data distribution is not uniform, but a skewed distribution. The number of instances of most common categories is very large, while the number of instances of rare categories is extremely low, showing a long tail as a whole. The long-tail distribution causes the model to be more inclined to learn and optimize the features of the head category during training, while the recognition ability of the tail category is insufficient, thus affecting the accuracy of instance segmentation. Therefore, instance segmentation methods for long-tail distribution of data are becoming more and more research hotspots.
[0003] The core of instance segmentation task for long-tail data distribution is to deal with the imbalance of data distribution. Existing research methods can be mainly divided into two categories: class-balanced sampling and cost-sensitive learning. Class-balanced sampling methods mitigate the impact of long-tail distribution by adjusting the selection strategy of training samples. Common methods include oversampling and undersampling. Oversampling increases the number of tail class samples by duplicating existing samples or using simple data augmentation techniques such as cropping and flipping to balance data distribution, while undersampling reduces head samples to make each category relatively balanced in training. Although these methods can achieve superficial balance in terms of categories, their essence is to let the model repeatedly learn a small amount of data from the tail class samples, lacking sufficient sample variance, which is prone to overfitting and poor generalization. Cost-sensitive learning alleviates the long-tail problem by assigning different training weights to samples of different categories. However, determining the weight of each category is a challenging problem, especially in practical scenarios, where the association and weight distribution between categories may not be obvious. If the weight setting is inaccurate, the model may learn wrong information during training, affecting the performance of the model. For rare categories, the model will give higher loss weights during training, so that the model assigns higher costs to errors in tail categories. This method does not change the data distribution, but encourages the model to focus more on rare categories by modifying the loss function. However, the weight distribution of each category in the loss function and the association between categories may not be obvious. Modifying only the loss function may cause the model to learn wrong information during training, which will affect the performance of the model.
[0004] Therefore, in the existing technology, the class-balanced sampling method lacks sufficient sample variance, which easily leads to model overfitting and poor generalization. The cost-sensitive learning method may cause the model to learn wrong information. The models trained by the two methods have low recognition accuracy for rare categories at the tail, resulting in poor long-tail instance segmentation. Therefore, an instance segmentation network that can solve the long-tail instance segmentation problem is urgently needed. Summary of the invention
[0005] In order to overcome the problem that the existing models have low recognition accuracy for rare categories at the tail, resulting in poor effect of long-tail instance segmentation, the present application provides an instance segmentation network optimization method, device and medium.
[0006] In a first aspect, in order to solve the above technical problems, the present application provides an instance segmentation network optimization method, comprising:
[0007] Obtain batches of tail data samples, and perform data augmentation on the tail data samples to obtain tail extended samples;
[0008] Perform comparative learning on the tail data samples and the tail extension samples to obtain the tail contrast loss;
[0009] Construct pseudo semantic labels for tail extension samples;
[0010] Get batches of head data samples, where both the head data samples and tail data samples contain true value labels;
[0011] Input the head data sample, tail data sample and tail extension sample into the preset instance segmentation network, and calculate the segmentation mask loss and category loss based on the true value label and pseudo semantic label;
[0012] Based on the tail contrast loss, segmentation mask loss and category loss, the preset instance segmentation network is adjusted to obtain the optimized instance segmentation network.
[0013] In a second aspect, the present application also provides an instance segmentation network optimization system, including:
[0014] The data augmentation module is used to obtain batches of tail data samples and perform data augmentation on the tail data samples to obtain tail extended samples;
[0015] The comparison module is used to compare the tail data samples and the tail extension samples to obtain the tail comparison loss;
[0016] Construction module, used to construct pseudo semantic labels for tail extension samples;
[0017] An acquisition module is used to acquire batches of head data samples, where both the head data samples and the tail data samples contain true value labels;
[0018] A calculation module, used for inputting the head data sample, the tail data sample and the tail extension sample into a preset instance segmentation network, and calculating the segmentation mask loss and the category loss based on the true value label and the pseudo semantic label;
[0019] The optimization module is used to adjust the preset instance segmentation network based on tail contrast loss, segmentation mask loss and category loss to obtain an optimized instance segmentation network.
[0020] In a third aspect, the present application also provides a computing device, including a memory, a processor, and a program stored in the memory and running on the processor, and when the processor executes the program, the steps of an instance segmentation network optimization method as described above are implemented.
[0021] In a fourth aspect, the present application also provides a computer-readable storage medium, in which instructions are stored. When the instructions are executed on a terminal device, the terminal device executes the steps of an instance segmentation network optimization method.
[0022] The beneficial effects of the present application are: by performing data augmentation on batches of tail data samples, tail extension samples are obtained, the sample diversity of the tail category can be increased, and more tail category feature variants are provided for subsequent model training to preliminarily balance the data distribution used for training. The tail extension samples are compared and studied with the tail data samples to obtain the tail contrast loss. The tail contrast loss can be used to understand the network's ability to recognize inter-class discriminative features and the network's ability to focus on intra-class invariant features. Then, pseudo-semantic labels for the tail extension samples are constructed, and both the head data samples and the tail data samples contain true value labels. The batches of head data samples, tail data samples, and tail extension samples are input into the preset instance segmentation network, and the segmentation mask loss and category loss are calculated based on the true value labels and pseudo-semantic labels. The difference between the label and the predicted value of the tail input value can be understood through the segmentation mask loss and the category loss. Based on the tail contrast loss, segmentation mask loss and category loss, the preset instance segmentation network is adjusted to achieve network optimization, which can not only improve the network's ability to recognize the inter-class discriminative features of long-tail data and improve the network's attention to the intra-class invariant features of long-tail data, but also reduce the difference between the label of the input sample and the corresponding prediction value output by the network, thereby improving the recognition accuracy of the optimized instance segmentation network for long-tail data, and then improving the segmentation effect of the network model on long-tail instances. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] Figure 1 A schematic diagram of a flow chart of an example segmentation network optimization method shown in an exemplary embodiment of the present application;
[0024] Figure 2A distribution bar graph of the number of instances of head data and long-tail data in the prior art;
[0025] Figure 3 A network structure diagram for implementing an instance segmentation network optimization method in an exemplary embodiment of the present application;
[0026] Figure 4 This is a schematic diagram of a scene image of a tail data sample in an exemplary embodiment of the present application;
[0027] Figure 5 This is a schematic diagram of a predicted image obtained by processing a tail data sample through an optimized instance segmentation network in an exemplary embodiment of the present application;
[0028] Figure 6 The present invention is a schematic diagram of the structure of an example segmentation network optimization system shown in an exemplary embodiment of the present application. DETAILED DESCRIPTION
[0029] The following examples are provided to further explain and supplement the present application and do not constitute any limitation to the present application.
[0030] The following describes an example segmentation network optimization method, device and medium according to an embodiment of the present application in conjunction with the accompanying drawings.
[0031] An example segmentation network optimization method according to an embodiment of the present application is applied to a terminal device. In the present application scheme, the terminal device is used as the execution subject to illustrate the present application scheme. The terminal device is used to execute the steps of an example segmentation network optimization method.
[0032] See also Figure 1 , Figure 1 An example segmentation network optimization method is shown as an exemplary embodiment of the present application. Figure 1 As shown, the present application provides an instance segmentation network optimization method, comprising:
[0033] Step S11, obtaining a batch of tail data samples, and performing data augmentation on the tail data samples to obtain tail extended samples;
[0034] Step S12, performing comparative learning on the tail data sample and the tail extension sample to obtain the tail comparative loss;
[0035] Step S13, constructing a pseudo semantic label of the tail extension sample;
[0036] Step S14, obtaining a batch of header data samples, where both the header data samples and the tail data samples contain true value labels;
[0037] Step S15, inputting the head data sample, the tail data sample and the tail extension sample into a preset instance segmentation network, and calculating the segmentation mask loss and the category loss based on the true value label and the pseudo semantic label;
[0038] Step S16, based on the tail contrast loss, the segmentation mask loss and the category loss, the preset instance segmentation network is adjusted to obtain an optimized instance segmentation network.
[0039] An instance segmentation network optimization method of this embodiment, by performing data augmentation on batches of tail data samples, obtains tail extension samples, can increase the sample diversity of the tail category, provide more tail category feature variants for subsequent model training, and preliminarily balance the data distribution used for training. And the tail extension samples are compared and studied with the tail data samples to obtain the tail contrast loss. Through the tail contrast loss, the network's ability to recognize inter-class discriminative features and the network's ability to focus on invariant features within the class can be understood. Then, a pseudo-semantic label of the tail extension sample is constructed, and both the head data sample and the tail data sample contain true value labels, and the batches of head data samples, tail data samples, and tail extension samples are input into the preset instance segmentation network, and the segmentation mask loss and category loss are calculated based on the true value label and the pseudo-semantic label. Through the segmentation mask loss and category loss, the difference between the label and the predicted value of the tail input value can be understood. Based on the tail contrast loss, segmentation mask loss and category loss, the preset instance segmentation network is adjusted to achieve network optimization, which can not only improve the network's ability to recognize the inter-class discriminative features of long-tail data, and improve the network's attention to the intra-class invariant features of long-tail data, but also reduce the difference between the label of the input sample and the corresponding predicted value output by the network, thereby improving the recognition accuracy of the optimized instance segmentation network for long-tail data, and further improving the segmentation effect of the network model on long-tail instances. Among them, the number of tail data samples is small, the number of tail extension samples is large, and the number of tail data samples and the number of tail extension samples are balanced with the number of head data samples.
[0040] The number of instances of head data and long tail data in the prior art is as follows: Figure 2 As shown, Figure 2In the example, frequent represents frequent categories, common represents common categories, and rare represents rare categories. The sum of the number of categories of frequent and common is used as the number of instances of the head data sample, and rare is used as the number of instances of the tail data sample. In this embodiment, the tail data sample is expanded by generative AI technology to achieve data augmentation of the tail data sample. Although traditional class balanced sampling methods (such as oversampling and undersampling) can solve the problem of unbalanced sample quantity, they cannot fundamentally solve the problem of learnable feature diversity of the network model due to the lack of sufficient sample variance. Therefore, this embodiment combines generative AI technology to generate tail extension samples with diversity, aiming to balance the data distribution while allowing the model to be exposed to more tail category variants, so as to improve the network model's feature recognition ability for the tail category. At the same time, by performing comparative learning on the tail data sample and the tail extension sample, comparing the similarities and differences between the two samples, and realizing comparative learning, the preset instance segmentation network can learn the inter-class difference features and the intra-class invariant features, strengthen the feature association between the two samples, and thus improve the network model's recognition ability for the tail category. At the same time, it can also improve the generalization ability of the network model and its robustness to noise and interference, making the network model more robust.
[0041] Therefore, this embodiment performs data augmentation on the tail data samples and uses a contrastive learning method to strengthen the feature association between a small number of tail data samples and a large number of augmented tail extension samples. This can balance the distribution ratio of head category samples and tail category samples input into the network model during training, and guide the network model to learn the consistent features of a large number of tail extension samples, thereby improving the segmentation performance of the model on the tail category and improving the segmentation effect of long-tail instances.
[0042] Optionally, a contrastive learning is performed on the tail data sample and the tail extension sample to obtain the tail contrast loss, including:
[0043] Extract features from the tail data samples to obtain tail data features;
[0044] Extract features of the tail extension samples to obtain tail extension data features;
[0045] Calculate the first cosine similarity between each tail extension data feature and each tail data feature to obtain a similarity set corresponding to each tail extension data feature;
[0046] The calculation formula for the first cosine similarity is as follows:
[0047]
[0048] Wherein, sim(u, v) represents the first cosine similarity, u represents the tail extension data feature, v represents the tail data feature, and T represents transposition;
[0049] Based on the tail extension data features and the similarity set, a feature contrast loss of the tail extension data features is obtained;
[0050] Based on the tail extension data feature and the similarity set, feature enhancement is performed on the tail extension data feature, and an enhancement contrast loss of the tail extension data feature is determined;
[0051] The tail contrast loss is formed based on the feature contrast loss and the enhancement contrast loss.
[0052] In this embodiment, feature extraction is performed on the tail data sample and the tail extension sample respectively to obtain the tail data feature and the tail extension data feature, and the first cosine similarity between each tail extension data feature and each tail data feature is calculated to obtain the similarity set corresponding to each tail extension data feature. Then, based on the tail extension data feature and the similarity set, the feature contrast loss and the enhanced contrast loss of the tail extension data feature are obtained to form the tail contrast loss. Since the feature contrast loss can reflect the recognition ability of the network model for the inter-class discriminative features, the enhanced contrast loss can reflect the attention ability of the network model to the intra-class invariant features. Therefore, in this embodiment, the tail contrast loss can improve the recognition ability of the network model for the inter-class discriminative features and enhance the attention of the network model to the intra-class invariant features during the subsequent preset instance segmentation network training, thereby improving the recognition accuracy of the optimized instance segmentation network obtained by the subsequent optimization training for the long-tail data, and further improving the segmentation effect of the network model on the long-tail instances.
[0053] In an exemplary embodiment, when extracting features from the tail data samples and the tail extension samples, feature extraction is also performed on the head data samples, and the three types of samples are input into a three-branch parallel weight-sharing feature extraction network to extract their corresponding feature representations. The weight-sharing feature extraction network used in this embodiment simplifies the structure of the network model by sharing weights, reduces the total number of parameters of the model, and reduces storage requirements and computational complexity. At the same time, weight sharing can ensure the consistency of the extraction conditions of feature extraction, thereby helping the model to establish better feature connections between samples of different categories, thereby improving the ability to distinguish rare categories.
[0054] At the same time, batches of tail extension data features can be embedded into the constructed query Q, and each tail extension data feature is used as a query feature q in the query Q. The tail data feature is used as a key K, and each tail data feature is used as a key feature k in the key K. For each query feature q, the cosine similarity between it and each key feature k is calculated, and the cosine similarity is used as the first cosine similarity between the corresponding tail extension data feature and a tail data feature.
[0055] Optionally, based on the tail extension data feature and the similarity set, a feature contrast loss of the tail extension data feature is obtained, including:
[0056] Taking the multiple similarity sets as to-be-compared sets respectively, obtaining a first target similarity between the to-be-compared set and other similarity sets in the multiple similarity sets except the to-be-compared set;
[0057] Taking tail extended data features corresponding to other similarity sets whose first target similarity is greater than or equal to a preset similarity as positive samples;
[0058] The tail extension data features corresponding to other similarity sets whose first target similarity is less than the preset similarity are taken as negative samples;
[0059] The feature comparison loss is obtained based on the tail extension data features corresponding to the positive samples, negative samples and the set to be compared;
[0060] The calculation formula of feature contrast loss is as follows:
[0061]
[0062]
[0063] in, represents the feature comparison loss of the tail extension data feature corresponding to the current set to be compared, q represents the tail extension data feature corresponding to the current set to be compared, q + Represents the positive sample of the tail extension data feature corresponding to the current set to be compared, q - represents the negative sample of the tail extended data feature corresponding to the current set to be compared, τ represents the temperature coefficient, which is an adjustable parameter used to affect the model's discrimination of samples, λ represents the weight for measuring the similarity between positive and negative samples, and the weight is used to reduce the influence of negative samples similar to positive samples, N neg Indicates the number of negative samples.
[0064] In this embodiment, by using a similarity set consisting of the first cosine similarity between the tail extended data feature and the tail data feature, positive samples and negative samples corresponding to each tail extended data feature are constructed, a comparison relationship between the two samples is established, and corresponding feature comparison losses are obtained based on the positive samples and negative samples of each tail extended data feature. This can effectively guide the model to capture the inter-class discriminative features between the tail extended data feature and the tail data feature, so as to improve the model's recognition ability for the inter-class discriminative features, thereby strengthening the feature association between the tail extended sample and the tail data sample, and enhancing the model's recognition ability for different categories without relying on complex weight settings.
[0065] In this embodiment, for each query feature q of the query Q constructed by the tail extended data feature, its similar features (i.e., the tail extended data features corresponding to other similarity sets whose first target similarity is greater than or equal to the preset similarity) and itself are designated as positive samples according to the corresponding cosine similarity calculation result, and other query features are designated as negative samples. The contrast loss is calculated between the positive and negative samples, so that the model shortens the distance between similar samples and pushes the distance between different samples in the feature space, so as to learn more accurate category boundaries.
[0066] Optionally, based on the tail extension data feature and the similarity set, the tail extension data feature is feature enhanced to determine the enhancement contrast loss of the tail extension data feature, including:
[0067] Taking the multiple similarity sets as to-be-compared sets respectively, obtaining a first target similarity between the to-be-compared set and other similarity sets in the multiple similarity sets except the to-be-compared set;
[0068] Taking tail extended data features corresponding to other similarity sets whose first target similarity is greater than or equal to a preset similarity as positive samples;
[0069] The tail extension data features corresponding to other similarity sets whose first target similarity is less than the preset similarity are taken as negative samples;
[0070] The first cosine similarity in the set to be compared that is greater than the threshold is used as the second target similarity;
[0071] Performing a feature aggregation operation on the tail data features corresponding to the second target similarity and the tail extended data features corresponding to the set to be compared to obtain enhanced features;
[0072] Based on the positive samples, negative samples and enhanced features, the enhanced contrast loss of the tail extended data features corresponding to the set to be compared is obtained;
[0073] The calculation formula of enhanced contrast loss is as follows:
[0074]
[0075] Among them, q represents the enhanced feature corresponding to the current set to be compared, q + Represents the positive sample of the tail extension data feature corresponding to the current set to be compared, q - It represents the negative sample of the tail extended data feature corresponding to the current set to be compared. τ represents the temperature coefficient, which is an adjustable parameter used to affect the model's discrimination of samples.
[0076] In this embodiment, a similarity set consisting of the first cosine similarity between the tail extension data feature and the tail data feature is used to construct positive samples and negative samples corresponding to each tail extension data feature, establish a contrast relationship between the two samples, and determine a second target similarity from the similarity set, and obtain an enhanced feature corresponding to each tail extension data feature based on the second target similarity. Then, an enhanced contrast loss of each tail extension data feature is obtained based on the positive sample, the negative sample and the enhanced feature, so that the model can be effectively guided to capture the intra-class invariant features between the tail extension data feature and the tail data feature, so as to improve the model's recognition ability of the intra-class invariant features, further strengthen the feature association between the tail extension sample and the tail data sample, and further enhance the model's recognition ability for different categories without relying on complex weight settings.
[0077] Optionally, construct pseudo semantic labels for the tail extension samples, including:
[0078] Extract features from the tail extension samples to obtain dense features;
[0079] Downsample the dense features to obtain reduced-dimensional features, and use the reduced-dimensional features as pseudo-category labels for the tail extension samples;
[0080] Calculate the second cosine similarity between each reduced feature and each dense feature;
[0081] Based on the second cosine similarity and dense features, the score mapping of the tail extension samples is obtained;
[0082] Calculate a pseudo mask of the corresponding tail extension sample based on the score mapping;
[0083] Pseudo semantic labels are formed based on pseudo masks and pseudo category labels.
[0084] In this embodiment, the dense features of the tail extension sample are extracted, and the dense features are downsampled, and the obtained reduced dimension features are used as pseudo category labels of the tail extension samples. Based on the second cosine similarity between each reduced dimension feature and each dense feature, the score mapping of the tail extension sample is obtained, the pseudo mask of the corresponding tail extension sample is calculated based on the score mapping, and a pseudo semantic label is formed based on the pseudo mask and the pseudo category label, so as to facilitate the subsequent optimization of the preset instance segmentation network using the pseudo semantic label, so as to improve the recognition accuracy of the optimized instance segmentation network obtained by the optimization for long-tail data, and improve the segmentation effect of the network model on the long-tail instance.
[0085] In an exemplary embodiment, the pre-trained backbone network is used to extract features from the tail extension samples to obtain dense features I∈R H×W×E , H×W×E represents the size of the feature space. Then construct the query Q and key K: take the dense feature I as a key K in the set of keys K. i,j , perform bilinear downsampling on I to form a reduced dimension feature, and use the reduced dimension feature as a query vector q∈R in the set of queries Q E , where the query Q∈R H×W×E , H′×W×E′ represents the size of the downsampled space. For each query vector q in the query Q, calculate its correlation with each key K in the key K i,j The cosine similarity between the corresponding dimension reduction feature and a dense feature is used as the second cosine similarity. Based on the second cosine similarity and the dense feature, the score mapping S∈R of the tail extension sample is obtained. H×W×N .
[0086] The calculation formula of the score mapping is as follows:
[0087] S i,j,q =sim(Q q , K i,j );
[0088] Among them, S i,j,q Represents the score mapping attention map composed of the second cosine similarity corresponding to the qth query vector, which reflects the relationship between the qth query vector and the key K i,j The second cosine similarity between each position in the corresponding H×W×E feature map, Q q represents the qth query vector, K i,j Represents the key at position (i, j) in the H′×W′×E′ space.
[0089] Optionally, a pseudo mask of the corresponding tail extension sample is calculated based on the score mapping, including:
[0090] Normalize the score map to get the initial pseudo mask;
[0091] Obtaining a mask score of the initial pseudo mask, and using the mask score as a confidence score of the initial pseudo mask;
[0092] Based on the confidence score, a non-maximum suppression operation is performed on the initial pseudo mask to obtain a pseudo mask of the tail extension sample corresponding to the score mapping.
[0093] In this embodiment, the score mapping is normalized, and different score mappings can be standardized to obtain initial pseudo-masks of the same format. The mask score of the initial pseudo-mask is obtained, and the mask score is used as the confidence score of the initial pseudo-mask, and the initial pseudo-mask is subjected to non-maximum suppression based on the confidence score, and the redundant mask in the initial pseudo-mask is removed to obtain a pseudo-mask that meets the accuracy requirements of the tail extension sample corresponding to the score mapping, so as to reduce the interference of the redundant mask during the subsequent model training, thereby improving the accuracy of the model training, and further improving the segmentation effect of the trained network model on the long-tail instance.
[0094] In an exemplary embodiment, the score map is normalized to the range of [0,1] to generate an initial pseudo mask. The initial pseudo mask is further calculated as a confidence score. A threshold τ is set to convert the initial pseudo mask into a binary mask, and the binary masks are sorted according to the confidence score. The redundant masks are removed by non-maximum suppression operation to obtain the pseudo mask of the tail extension sample corresponding to the score map. The calculation formula is as follows:
[0095] M=NMS(Maskness(Norm(S i,j,q )));
[0096] Among them, M represents a pseudo mask, NMS represents a non-maximum suppression operation, Maskness represents an operation of calculating the confidence score of the initial pseudo mask, and Norm represents a normalization operation on the score mapping.
[0097] The confidence score of the initial pseudo mask is calculated as follows:
[0098]
[0099] Among them, maskness represents the confidence score of the initial pseudo mask, N f represents the initial pseudo mask P i The number of foreground pixels represents the initial pseudo mask P i The number of pixels with eigenvalues greater than τ, P i represents the i-th initial pseudo mask.
[0100] Optionally, the true value label includes a true mask and a true category label; the head data sample, the tail data sample, and the tail extension sample are input into a preset instance segmentation network, and the segmentation mask loss and the category loss are calculated based on the true value label and the pseudo semantic label, including:
[0101] Inputting the head data sample, the tail data sample and the tail extension sample into a preset instance segmentation network to obtain the prediction mask and the prediction semantic category corresponding to the head data sample, the tail data sample and the tail extension sample;
[0102] Based on the real mask, pseudo mask and predicted mask, the segmentation mask loss is obtained;
[0103] Based on the true category label, pseudo category label and predicted semantic category, the category loss is obtained.
[0104] In this embodiment, the head data sample, the tail data sample and the tail extension sample are input into the preset instance segmentation network for training, and the obtained model output includes the prediction mask and the prediction semantic category corresponding to the head data sample, the tail data sample and the tail extension sample. Based on the real mask of the head data sample, the tail data sample, the pseudo mask of the tail extension sample and the prediction mask of the three, the segmentation mask loss for guiding the model to segment the contour boundary of the target object is obtained, and based on the real category label of the head data sample, the tail data sample, the pseudo category label of the tail extension sample and the predicted semantic category of the three, the category loss for enhancing the model's understanding ability of the object category is obtained, which is convenient for the subsequent adjustment and optimization of the preset instance segmentation network based on the segmentation mask loss and the category loss, so as to improve the accuracy of the network model in segmenting the contour boundary of the object in the image, and improve the network model's ability to understand the category of the long-tail object, so as to improve the recognition accuracy of the optimized instance segmentation network obtained by the optimization for the long-tail data, and then improve the segmentation effect of the network model for the long-tail instance.
[0105] In an exemplary embodiment, the segmentation mask loss is calculated as follows:
[0106] L mask =γL avg-proj +L max-proj +L pairwise ;
[0107] L avg-proj =L(avg x (m),avg x (m * ))+L(avg y (m),avg y (m * ));
[0108] Lmax-proj =L(max x (m),max x (m * ))+L(max y (m),max y (m * ));
[0109]
[0110] Among them, L mask represents the segmentation mask loss, γ represents a trade-off hyperparameter, and L avg-proj represents the average projection loss, L represents the Dice (image segmentation task) loss, m * represents the predicted mask, m represents the real mask and pseudo mask, L avg-proj The predicted mask is projected onto the x-axis by performing an avg operation on each axis, and the real mask and pseudo mask are projected onto the y-axis; L max-proj represents the maximum projection loss, which projects the predicted mask onto the x-axis by performing the max operation on each axis, and projects the real mask and pseudo mask onto the y-axis. avg-proj With L max-proj work together to minimize m * The difference between the projection of and the projection of m; L pairwise represents the pairwise affinity loss, which supervises the predicted mask in a pixel-by-pixel manner to ensure label consistency between adjacent pixels; E in Represents a set of pixel edges; define y e ∈{0,1} is the label of edge e, y e = 1 means that the two pixels connected by the edge have the same label, y e = 0 means that the two pixels connected by an edge have different labels.
[0111] The calculation formula of class loss is as follows:
[0112] L cate =L focal +μL sem ;
[0113] L focal =-α t (1-p t ) λ log(p t );
[0114]
[0115] Among them, L cate represents the category loss, L focalrepresents the focal loss, which is used to classify the foreground and background of the image, μ represents a trade-off hyperparameter, and L sem Represents the negative cosine similarity function, which measures the cosine of the angle between two vectors and takes its opposite, L sem Optimize the recognition accuracy of the model for object semantic embedding by minimizing negative cosine similarity; α t Represents a balancing factor, which is used to adjust the loss weight between the positive class (foreground) and the negative class (background) to help the model better deal with the problem of class imbalance. t represents the model's predicted probability that the sample belongs to a certain category (foreground or background), λ represents an adjustment factor used to reduce the loss of easy-to-classify samples, so that the model pays more attention to difficult-to-classify samples during training, and q * Represents the predicted semantic category, q represents the true category label and the pseudo category label.
[0116] Optionally, based on the tail contrast loss, the segmentation mask loss and the category loss, the preset instance segmentation network is adjusted to obtain an optimized instance segmentation network, including:
[0117] When the tail contrast loss, segmentation mask loss, and category loss meet the preset loss requirements, the preset instance segmentation network is used as the optimized instance segmentation network;
[0118] Otherwise, adjusting the network parameters in the preset instance segmentation network to obtain an adjusted instance segmentation network;
[0119] The head data samples, tail data samples and tail extension samples are input into the adjusted instance segmentation network until the corresponding tail contrast loss, segmentation mask loss and category loss meet the preset loss requirements to obtain the optimized instance segmentation network.
[0120] In this embodiment, the preset instance segmentation network is adjusted using tail contrast loss, segmentation mask loss and category loss to measure the gap between the predicted value and the true label until the gap between the predicted value and the true label is reduced to a level and will no longer decrease significantly, so that the network's tail contrast loss, segmentation mask loss and category loss meet the preset loss requirements, thereby achieving network optimization, so that the recognition accuracy of the optimized instance segmentation network for long-tail data can meet the accuracy requirements, thereby significantly improving the segmentation effect of the network model on long-tail instances.
[0121] See also Figure 3 , Figure 3 A network structure diagram of an example segmentation network optimization method implemented in an exemplary embodiment of the present application; Figure 3As shown, the network structure diagram includes a sample module, a feature extraction module, a contrastive learning module, a pseudo-label pseudo-mask generation module, a segmentation head and an optimization module. Among them, the sample module includes tail data samples and head data samples that are samples that have been labeled with true value labels (real masks and real category labels), and unlabeled tail extension samples obtained by data augmentation of labeled tail data samples. When implementing an instance segmentation network optimization method, first, the labeled tail data samples, unlabeled tail extension samples and labeled head data samples are input into the pre-trained weight-sharing backbone network in the feature extraction module for feature extraction, and the corresponding tail data features, tail extension data features and head data features are obtained. Secondly, the tail data features and tail extension data input features are embedded in the contrastive learning module, and the tail data features and tail extension data features are contrastively learned to obtain the tail contrast loss. Thirdly, the unlabeled tail extension samples are input into the pseudo-label generation module to construct the pseudo semantic labels (pseudo masks and pseudo category labels) of the tail extension samples. Then, the segmentation head adopts a dual-branch structure of mask prediction and semantic category prediction, and the semantic category prediction branch is used to indicate the semantic category probability. The segmentation head can predict the mask of each sample, and add a parallel branch consisting of a single convolutional layer in the last layer of the segmentation head to predict the semantic category of each sample. Then the head data sample, the tail data sample and the tail extension sample are input into the preset instance segmentation network of the segmentation head, and the predicted masks and predicted semantic categories corresponding to the head data sample and the tail data sample are predicted, as well as the predicted masks and predicted semantic categories corresponding to the tail extension sample. Finally, in the optimization module, the real masks and real category labels in the annotations of the head data sample and the tail data sample are obtained, and the segmentation mask loss and category loss are calculated using the real mask, pseudo mask, predicted mask, real category label, pseudo category label and predicted semantic category, which can make full use of limited annotation resources and significantly reduce the data annotation cost. And based on the tail contrast loss, segmentation mask loss and category loss, the preset instance segmentation network is adjusted to obtain the optimized instance segmentation network.
[0122] In an exemplary embodiment, batches of head data samples and batches of tail data samples are obtained from an open source long-tail data sample set. Figure 4 is a tail data sample in the open source long-tail data sample set, and the optimized instance segmentation network is used to segment the Figure 4 The tail data sample shown in the figure is predicted, and the predicted image is as follows Figure 5 shown. Figure 5 In the figure, the predicted category and the confidence of the category are shown. The higher the confidence, the more confident the optimized instance segmentation network is about the result, and the higher the accuracy.
[0123] The present invention discloses an example segmentation network optimization method, which firstly expands the tail data samples into tail extension samples with diversity by combining generative AI technology to preliminarily balance the sample distribution, and then sends the samples to a weight-shared feature extraction network to extract deep features; then, calculates the cosine similarity between the tail data features and the tail extension data features, aggregates the similarity features between the tail data features and the tail extension data features to form a tail enhancement feature, and determines the positive and negative samples of the tail extension data features according to the cosine similarity calculation result; calculates the feature contrast loss between the tail extension data features and the positive and negative samples to achieve feature association between the tail extension samples and the tail data samples; calculates the enhanced contrast loss between the tail enhancement features and the positive and negative samples to achieve feature clustering of the tail data samples and the tail extension samples, thereby improving the network's recognition ability of the inter-class discriminative features of the long-tail data and improving the network's attention to the intra-class invariant features of the long-tail data. Finally, the tail extension samples are sent to the zero-supervised pseudo-label generation network to generate corresponding pseudo-masks and pseudo-category labels, and are input into the preset instance segmentation network together with the head data samples and the tail data samples for joint training to obtain the segmentation mask loss and category loss. The preset instance segmentation network is optimized and adjusted using the tail contrast loss, segmentation mask loss and category loss to obtain the optimized instance segmentation network.
[0124] This application combines the advantages of contrastive learning to design a feature embedding contrastive learning module. By establishing contrast relationships between different samples, the model can effectively capture the similarity features within the tail category and the difference features between different categories, improve the recognition ability of the tail category, enhance the adaptability to long-tail distribution data, and thus improve the overall segmentation performance of the model when the data is distributed in a long tail. At the same time, this application introduces a zero-supervised pseudo-label generation network to design a semi-supervised mechanism that combines full supervision, zero supervision and weak supervision. It not only improves the utilization efficiency of samples and reduces the dependence on a large amount of high-quality labeled data, thereby significantly reducing the cost of data labeling, but also can more effectively improve the learning effect and generalization ability of the model.
[0125] See also Figure 6 , Figure 6 An example segmentation network optimization system is shown as an exemplary embodiment of the present application. Figure 6 As shown, the present application provides an instance segmentation network optimization system, comprising:
[0126] The data augmentation module is used to obtain batches of tail data samples and perform data augmentation on the tail data samples to obtain tail extended samples;
[0127] The comparison module is used to compare the tail data samples and the tail extension samples to obtain the tail comparison loss;
[0128] A construction module is used to construct a pseudo mask and pseudo category label for the tail extension sample. Both the head data sample and the tail data sample contain true value labels.
[0129] An acquisition module is used to acquire batches of head data samples, where both the head data samples and the tail data samples contain true value labels;
[0130] A calculation module, used for inputting the head data sample, the tail data sample and the tail extension sample into a preset instance segmentation network, and calculating the segmentation mask loss and the category loss based on the true value label and the pseudo semantic label;
[0131] The optimization module is used to adjust the preset instance segmentation network based on tail contrast loss, segmentation mask loss and category loss to obtain an optimized instance segmentation network.
[0132] An example segmentation network optimization system of this embodiment performs data augmentation on a batch of tail data samples through a data augmentation module to obtain tail extension samples, which can increase the sample diversity of the tail category and provide more tail category feature variants for subsequent model training to preliminarily balance the data distribution used for training. And the tail extension samples are compared and learned with the tail data samples using a comparison module to obtain the tail comparison loss. The network's ability to recognize inter-class discriminative features and the network's ability to focus on intra-class invariant features can be understood through the tail comparison loss. Then, the pseudo-semantic label of the tail extension sample is constructed using a construction module, and both the head data sample and the tail data sample contain true value labels. The batch of head data samples, tail data samples and tail extension samples are input into a preset instance segmentation network using a obtaining module, and the segmentation mask loss and category loss are calculated based on the true value label and the pseudo-semantic label. The difference between the label and the predicted value of the tail input value can be understood through the segmentation mask loss and the category loss. The optimization module is used to adjust the preset instance segmentation network based on tail contrast loss, segmentation mask loss and category loss to achieve network optimization. This can not only improve the network's ability to recognize the inter-class discriminative features of long-tail data and improve the network's attention to the intra-class invariant features of long-tail data, but also reduce the difference between the label of the input sample and the corresponding predicted value output by the network, thereby improving the recognition accuracy of the optimized instance segmentation network for long-tail data, and thus improving the segmentation effect of the network model on long-tail instances.
[0133] Optionally, the comparison module is specifically used for:
[0134] Extract features from the tail data samples to obtain tail data features;
[0135] Extract features of the tail extension samples to obtain tail extension data features;
[0136] Calculate the first cosine similarity between each tail extension data feature and each tail data feature to obtain a similarity set corresponding to each tail extension data feature;
[0137] Based on the tail extension data features and the similarity set, a feature contrast loss of the tail extension data features is obtained;
[0138] Based on the tail extension data feature and the similarity set, feature enhancement is performed on the tail extension data feature, and an enhancement contrast loss of the tail extension data feature is determined;
[0139] The tail contrast loss is formed based on the feature contrast loss and the enhancement contrast loss.
[0140] Optionally, the comparison module is specifically used for:
[0141] Taking the multiple similarity sets as to-be-compared sets respectively, obtaining a first target similarity between the to-be-compared set and other similarity sets in the multiple similarity sets except the to-be-compared set;
[0142] Taking tail extended data features corresponding to other similarity sets whose first target similarity is greater than or equal to a preset similarity as positive samples;
[0143] The tail extension data features corresponding to other similarity sets whose first target similarity is less than the preset similarity are taken as negative samples;
[0144] The feature contrast loss is obtained based on the tail extended data features corresponding to the positive samples, negative samples and the set to be compared.
[0145] Optionally, the comparison module is specifically used for:
[0146] Taking the multiple similarity sets as to-be-compared sets respectively, obtaining a first target similarity between the to-be-compared set and other similarity sets in the multiple similarity sets except the to-be-compared set;
[0147] Taking tail extended data features corresponding to other similarity sets whose first target similarity is greater than or equal to a preset similarity as positive samples;
[0148] The tail extension data features corresponding to other similarity sets whose first target similarity is less than the preset similarity are taken as negative samples;
[0149] The first cosine similarity in the set to be compared that is greater than the threshold is used as the second target similarity;
[0150] Performing a feature aggregation operation on the tail data features corresponding to the second target similarity and the tail extended data features corresponding to the set to be compared to obtain enhanced features;
[0151] Based on the positive samples, negative samples and enhanced features, the enhanced contrast loss of the tail extended data features corresponding to the set to be compared is obtained.
[0152] Optionally, construct a module specifically for:
[0153] Extract features from the tail extension samples to obtain dense features;
[0154] Downsample the dense features to obtain reduced-dimensional features, and use the reduced-dimensional features as pseudo-category labels for the tail extension samples;
[0155] Calculate the second cosine similarity between each reduced feature and each dense feature;
[0156] Based on the second cosine similarity and dense features, the score mapping of the tail extension samples is obtained;
[0157] Calculate a pseudo mask of the corresponding tail extension sample based on the score mapping;
[0158] Pseudo semantic labels are formed based on pseudo masks and pseudo category labels.
[0159] Optionally, construct a module specifically for:
[0160] Normalize the score map to get the initial pseudo mask;
[0161] Obtaining a mask score of the initial pseudo mask, and using the mask score as a confidence score of the initial pseudo mask;
[0162] Based on the confidence score, a non-maximum suppression operation is performed on the initial pseudo mask to obtain a pseudo mask of the tail extension sample corresponding to the score mapping.
[0163] Optionally, the true value label includes a true mask and a true category label; the computing module is specifically used to:
[0164] Inputting the head data sample, the tail data sample and the tail extension sample into a preset instance segmentation network to obtain the prediction mask and the prediction semantic category corresponding to the head data sample, the tail data sample and the tail extension sample;
[0165] Based on the real mask, pseudo mask and predicted mask, the segmentation mask loss is obtained;
[0166] Based on the true category label, pseudo category label and predicted semantic category, the category loss is obtained.
[0167] Optionally, the optimization module is specifically used to:
[0168] When the tail contrast loss, segmentation mask loss, and category loss meet the preset loss requirements, the preset instance segmentation network is used as the optimized instance segmentation network;
[0169] Otherwise, adjusting the network parameters in the preset instance segmentation network to obtain an adjusted instance segmentation network;
[0170] The head data samples, tail data samples and tail extension samples are input into the adjusted instance segmentation network until the corresponding tail contrast loss, segmentation mask loss and category loss meet the preset loss requirements to obtain the optimized instance segmentation network.
[0171] It should be noted that the instance segmentation network optimization system provided in the above embodiment and the instance segmentation network optimization method provided in the above embodiment belong to the same concept, wherein the specific manner in which each module and unit performs the operation has been described in detail in the method embodiment and will not be repeated here. In practical applications, the instance segmentation network optimization system provided in the above embodiment can allocate the above functions to different functional modules as needed, that is, divide the internal structure of the system into different functional modules to complete all or part of the functions described above, and this is not limited here.
[0172] A computing device according to an embodiment of the present application includes a memory, a processor, and a program stored in the memory and running on the processor. When the processor executes the program, some or all steps of the above-mentioned instance segmentation network optimization method are implemented.
[0173] Among them, the computing device can be a computer, and correspondingly, its program is computer software. The above-mentioned parameters and steps in a computing device of the present application can refer to the parameters and steps in the embodiment of the example segmentation network optimization method in the above text, and will not be repeated here.
[0174] In an embodiment of the present application, a computer-readable storage medium is provided, in which instructions are stored. When the instructions are executed, the steps of the above-mentioned instance segmentation network optimization method are executed.
[0175] The computer-readable storage medium may be a transient computer-readable storage medium or a non-transitory computer-readable storage medium.
[0176] The technical solution of the embodiment of the present disclosure can be embodied in the form of a software product, which is stored in a storage medium and includes one or more instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method of the embodiment of the present disclosure. The aforementioned computer-readable storage medium may be a non-transitory computer-readable storage medium, including: a USB flash drive, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a disk or an optical disk, and other media that can store program codes, or a transient computer-readable storage medium.
[0177] The flowchart and block diagram in the accompanying drawings illustrate the possible architecture, functions and operations of the system, method and computer program product according to various embodiments of the present application. Wherein, each box in the flowchart or block diagram can represent a module, a program segment, or a part of the code, and the above-mentioned module, program segment, or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of boxes in the block diagram or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0178] Those skilled in the art know that the present application can be implemented as a system, method or computer program product. Therefore, the present disclosure can be specifically implemented in the following forms, namely: it can be complete hardware, it can be complete software (including firmware, resident software, microcode, etc.), or it can be a combination of hardware and software, generally referred to as "module" or "system" herein. In addition, in some embodiments, the present application can also be implemented in the form of a computer program product in one or more computer-readable media, and the computer-readable medium contains computer-readable program code. Computer-readable storage media can be, for example, but not limited to - electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or devices, or any combination of the above.
[0179] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.
[0180] Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limitations on the present application. Ordinary technicians in this field can change, modify, replace and modify the above embodiments within the scope of the present application.
Claims
1. An instance segmentation network optimization method, characterized in that: include: Acquire batches of tail data samples, and perform data augmentation on the tail data samples to obtain tail extended samples; Performing comparative learning on the tail data sample and the tail extension sample to obtain a tail comparative loss; Constructing a pseudo semantic label of the tail extension sample; Obtaining a batch of header data samples, wherein the header data samples and the tail data samples both contain true value labels; Inputting the head data sample, the tail data sample and the tail extension sample into a preset instance segmentation network, and calculating the segmentation mask loss and the category loss based on the true value label and the pseudo semantic label; Based on the tail contrast loss, the segmentation mask loss and the category loss, the preset instance segmentation network is adjusted to obtain an optimized instance segmentation network.
2. The method according to claim 1, characterized in that The performing comparative learning on the tail data sample and the tail extension sample to obtain the tail comparative loss includes: Extracting features from the tail data sample to obtain tail data features; Extracting features of the tail extension samples to obtain tail extension data features; Calculating a first cosine similarity between each of the tail extension data features and each of the tail data features to obtain a similarity set corresponding to each of the tail extension data features; Based on the tail extension data feature and the similarity set, obtaining a feature contrast loss of the tail extension data feature; Based on the tail extension data feature and the similarity set, feature enhancement is performed on the tail extension data feature to determine an enhancement contrast loss of the tail extension data feature; A tail contrast loss is formed based on the feature contrast loss and the enhancement contrast loss.
3. The method according to claim 2, characterized in that The obtaining, based on the tail extension data feature and the similarity set, a feature contrast loss of the tail extension data feature, comprises: Taking the plurality of similarity sets as to-be-compared sets respectively, and obtaining a first target similarity between the to-be-compared sets and other similarity sets among the plurality of similarity sets except the to-be-compared sets; Taking tail extended data features corresponding to other similarity sets whose first target similarity is greater than or equal to a preset similarity as positive samples; The tail extension data features corresponding to other similarity sets whose first target similarity is less than the preset similarity are taken as negative samples; A feature comparison loss is obtained based on the tail extension data features corresponding to the positive sample, the negative sample and the set to be compared.
4. The method according to claim 2, characterized in that: The step of enhancing the tail extended data feature based on the tail extended data feature and the similarity set, and determining the enhanced contrast loss of the tail extended data feature, includes: Taking the plurality of similarity sets as to-be-compared sets respectively, and obtaining a first target similarity between the to-be-compared sets and other similarity sets among the plurality of similarity sets except the to-be-compared sets; Taking tail extended data features corresponding to other similarity sets whose first target similarity is greater than or equal to a preset similarity as positive samples; The tail extension data features corresponding to other similarity sets whose first target similarity is less than the preset similarity are taken as negative samples; Taking the first cosine similarity in the set to be compared that is greater than a threshold as the second target similarity; Performing a feature aggregation operation on the tail data features corresponding to the second target similarity and the tail extended data features corresponding to the to-be-compared set to obtain enhanced features; An enhanced contrast loss of the tail extended data feature corresponding to the to-be-compared set is obtained based on the positive sample, the negative sample and the enhanced feature.
5. The method according to claim 1, characterized in that The step of constructing the pseudo semantic label of the tail extension sample includes: Extracting features from the tail extension samples to obtain dense features; Downsampling the dense features to obtain reduced-dimensional features, and using the reduced-dimensional features as pseudo-category labels for the tail extension samples; Calculating the second cosine similarity between each of the reduced dimension features and each of the dense features; Based on the second cosine similarity and the dense feature, obtaining a score mapping of the tail extension sample; Calculating a pseudo mask of the corresponding tail extension sample based on the score mapping; A pseudo semantic label is formed based on the pseudo mask and the pseudo category label.
6. The method according to claim 5, characterized in that The calculating of the pseudo mask of the corresponding tail extension sample based on the score mapping includes: Normalizing the score map to obtain an initial pseudo mask; Obtaining a mask score of the initial pseudo mask, and using the mask score as a confidence score of the initial pseudo mask; A non-maximum suppression operation is performed on the initial pseudo mask based on the confidence score to obtain a pseudo mask of the tail extension sample corresponding to the score mapping.
7. The method according to any one of claims 1 to 6, characterized in that: The true value label includes a true mask and a true category label; the step of inputting the head data sample, the tail data sample, and the tail extension sample into a preset instance segmentation network, and calculating the segmentation mask loss and the category loss based on the true value label and the pseudo semantic label includes: Inputting the head data sample, the tail data sample and the tail extension sample into a preset instance segmentation network to obtain prediction masks and prediction semantic categories corresponding to the head data sample, the tail data sample and the tail extension sample; Based on the true mask, the pseudo mask and the predicted mask, a segmentation mask loss is obtained; A category loss is obtained based on the true category label, the pseudo category label, and the predicted semantic category.
8. The method according to any one of claims 1 to 6, characterized in that: The step of adjusting the preset instance segmentation network based on the tail contrast loss, the segmentation mask loss and the category loss to obtain an optimized instance segmentation network includes: When the tail contrast loss, the segmentation mask loss, and the category loss meet preset loss requirements, using the preset instance segmentation network as an optimized instance segmentation network; Otherwise, adjusting the network parameters in the preset instance segmentation network to obtain an adjusted instance segmentation network; The head data sample, the tail data sample and the tail extension sample are input into the adjusted instance segmentation network until the corresponding tail contrast loss, the segmentation mask loss and the category loss meet the preset loss requirements, thereby obtaining an optimized instance segmentation network.
9. A computing device comprising a memory, a processor, and a program stored in the memory and running on the processor, characterized in that: When the processor executes the program, the steps of an instance segmentation network optimization method according to any one of claims 1 to 8 are implemented.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores instructions, and when the instructions are executed on a terminal device, the terminal device executes the steps of an instance segmentation network optimization method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Instance segmentation method based on detection enhancement and multi-stage bounding box feature refinement
CN115797629A
Long-tail image recognition method based on pseudo tag
CN116310493A
SAR (Synthetic Aperture Radar) long-tail target detection method based on dual-drive equilibrium loss and recessive feature enhancement
CN117710783A
Cited By
Generation method for improving quality of content generated by RAG technology based on semantic matching
CN121599129A
Federal learning-based long tail domain distribution face recognition method, device and equipment
CN122336823A
Face recognition method and device based on long-tail domain distribution of federated learning, and equipment
CN122336823B