Camouflage object identification method, system and device and storage medium
By extracting and processing the image features, obtaining secondary significant features and complementary features, and optimizing segmentation features with the relationship consistency matrix, the problem of background interference in camouflage object recognition is solved, and accurate camouflage instance segmentation of complex scenes is achieved.
Patent Information
- Application Number
- CN202411263719.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-10
- Publication Date
- 2024-12-13
- Estimated Expiration
- 2044-09-10
AI Technical Summary
When faced with diverse appearances or complex scenes with low contrast, existing camouflage object recognition methods are easily disturbed by messy backgrounds, resulting in the inability to accurately segment instances.
By converting the image into a feature map, filling and significant feature calculations, secondary significant features and complementary features are obtained, combined with preset rule processing and linear mapping, a relationship consistency matrix is built, segmentation features are optimized, background interference is reduced, and camouflage instances are improved. Performance of segmentation.
It realizes accurate identification and segmentation of camouflage objects, reduces background interference, improves the accuracy of object-level camouflage instance segmentation and obtains fine-grained semantic information.
Smart Images

Figure CN119131397A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of camouflage instance segmentation, and in particular relates to a camouflage object recognition method, system, device and storage medium. Background Art
[0002] Camouflage is a ubiquitous phenomenon in nature, where organisms change their appearance, including brightness, color, and pattern, to adapt to their surroundings in order to avoid being hunted or to capture prey. In a wide range of contexts, camouflaged objects include entities that are able to cleverly blend into their surroundings, employing strategies such as size reduction, color and texture mimicry, or strategic feature hiding. Camouflage instance segmentation (CIS) is a challenging task that aims to accurately identify and characterize instance-level masks of camouflaged objects that are intricately blended with their background. Camouflage instance segmentation has many valuable practical applications, such as medical image analysis (e.g., polyp segmentation) and counter-military camouflage.
[0003] In the related technologies, disguised instance segmentation mainly adopts model fusion method, feature query method and multi-trunk architecture method. Model fusion method is a technology that combines the prediction results of multiple models to improve model performance and prediction accuracy, giving different weights to the prediction results of different models, and weighted averaging or weighted fusion them into the final prediction result.
[0004] Regarding the above-mentioned related technologies, although existing camouflage object recognition methods can reliably detect various camouflages, when faced with targets with diverse appearances or complex scenes with low contrast, these methods are easily interfered by cluttered backgrounds, resulting in inaccurate instance segmentation. Summary of the invention
[0005] The technical problem to be solved by the present invention is to provide a disguised object recognition method, system, device and storage medium, which can utilize subtle secondary salient features, effectively coordinate the contextual relationship between instances, reduce background interference, and enhance the performance of disguised instance segmentation.
[0006] A method for identifying a camouflaged object, comprising:
[0007] Converting an image into a feature map, wherein the image contains a camouflaged object to be identified;
[0008] Filling the feature map to generate significant features of a specific dimension;
[0009] Based on the salient features, calculating secondary salient features;
[0010] Complementary features are calculated based on the secondary significant features and significant features;
[0011] Measuring the external reliability of the complementary features to obtain new query features;
[0012] Measuring the internal reliability of the new query feature to obtain a complete instance feature;
[0013] Optimizing the complete instance feature based on the loss function to obtain an optimized segmentation feature, and using the optimized segmentation feature as a camouflage object;
[0014] Measuring the external reliability of the complementary features to obtain new query features, specifically including:
[0015] Processing the complementary features according to preset rules to obtain an optimized feature map;
[0016] Dividing the optimized feature graph into a plurality of regions, and obtaining query instance features, context features, and similar instance features for each region through linear mapping;
[0017] Based on the query instance features, context features, and similar instance features, constructing a relationship consistency matrix for different region groups;
[0018] Select the first l elements with the highest similarity in the relationship consistency matrix to form an index matrix;
[0019] Querying a feature tensor from the similar instance features according to the index matrix;
[0020] The query instance feature is updated through the feature tensor to obtain the new query feature.
[0021] Specifically, the optimized segmentation feature is the required image feature extracted from the background, and the background image feature and the required image feature are segmented into camouflage instances.
[0022] The optimized segmentation feature is the target object identified from the disguised object.
[0023] Optionally, applying the same padding to the input feature map to generate salient features of a specific dimension includes:
[0024] Initialize kernel size P and expansion coefficient X;
[0025] The dimension of the input feature map is R C*H*W .
[0026] According to the kernel size and the dilation coefficient, the input feature map is applied with the same padding to generate a salient feature of a specific dimension, where the specific dimension is Among them, R represents the number of feature maps, C represents the number of channels of the feature map, H represents the height of the feature map, W represents the width of the feature map, and P X Indicates the number of local regions that are expanded.
[0027] Optionally, based on the significant feature, calculating the secondary significant feature includes:
[0028] According to the number of local regions, the significant feature is divided into two at the middle position of the number of local regions, and the one before the middle position is defined as the front significant feature, and the one after the middle position is defined as the rear significant feature
[0029] Calculating the secondary salient feature according to the front salient feature, the rear salient feature and a secondary pixel calculation formula;
[0030] The secondary pixel calculation formula is:
[0031]
[0032] in, The most notable feature is For the post-significant features, dim=2 means calculating the position of the central pixel in the two-dimensional array.
[0033] Optionally, the processing the complementary features according to a preset rule to obtain an optimized feature map includes:
[0034] Based on the preset rule, determining whether the feature value of the complementary feature is greater than a first threshold or less than a second threshold;
[0035] If the feature value of the complementary feature is greater than the first threshold, defining the complementary feature as 1 as the feature value of the modified complementary feature;
[0036] If the feature value of the complementary feature is less than the second threshold, defining the complementary feature as 0 as the feature value of the modified complementary feature;
[0037] The feature value of the modified complementary feature is multiplied element by element by the initial mask to obtain the optimized feature map.
[0038] Optionally, constructing a relationship consistency matrix of different region groups based on the query instance feature, the context feature, and the similar instance feature includes:
[0039] Obtaining the linear projection weights of query instance features, context feature linear projection weights, and similar instance feature linear projection weights;
[0040] According to the linear projection weight of the query instance feature, the query reality, the linear projection weight of the context feature, the linear projection weight of the context feature and the similar instance feature, and the similar instance feature, the relationship consistency matrix of the three different regions is calculated.
[0041] Optionally, querying a feature tensor from similar instance features according to the index matrix includes:
[0042] According to the index matrix and the similar instance features, a gather function is used to query and obtain a feature tensor.
[0043] Optionally, measuring the internal reliability of the new query feature to obtain the complete instance feature includes:
[0044] The relationship consistency between the new query features and the internal context features of the instance itself is measured to obtain a new relationship consistency matrix.
[0045] The l features in the new relationship consistency matrix that have the highest correlation with the new query feature are selected as the query index matrix.
[0046] A first feature and a second feature are obtained from the new query features according to the query index matrix and the new relationship consistency matrix.
[0047] A complete instance feature is obtained based on the first feature, the second feature and the new query feature.
[0048] A disguised object recognition method system, comprising:
[0049] A conversion module, used for converting an image into a feature map, wherein the image contains a camouflaged object to be identified;
[0050] A filling module, used to fill the feature map to generate significant features of a specific dimension;
[0051] A first calculation module, configured to calculate a secondary significant feature based on the significant feature;
[0052] A second calculation module, used for calculating complementary features according to the secondary significant features and the significant features;
[0053] An external measurement module, used to measure the external reliability of the complementary features to obtain new query features;
[0054] An internal measurement module, used for measuring the internal reliability of the new query feature to obtain a complete instance feature;
[0055] An optimization module, used for optimizing the complete instance feature based on the complete instance feature and the loss function to obtain an optimized segmentation feature;
[0056] Measuring the external reliability of the complementary features to obtain new query features, specifically including:
[0057] A processing module, used for processing the complementary features according to preset rules to obtain an optimized feature map;
[0058] A mapping module, used to divide the optimized feature map into a plurality of regions and obtain query instance features, context features and similar instance features for each region through linear mapping;
[0059] A construction module, used to construct a relationship consistency matrix of different region groups based on the query instance features, context features and similar instance features;
[0060] The third calculation module is used to select the first l features with the highest element similarity in the relationship consistency matrix to form an index matrix;
[0061] A query module, configured to query a feature tensor from the similar instance features according to the index matrix;
[0062] An updating module is used to update the query instance feature through the feature tensor to obtain the new query feature.
[0063] A terminal device comprises a memory and a processor. The memory stores a computer program that can be run on the processor. When the processor loads and executes the computer program, a disguised object recognition method is adopted.
[0064] A computer-readable storage medium stores a computer program. When the computer program is loaded and executed by a processor, a disguised object recognition method is adopted.
[0065] The beneficial effects of the present invention are:
[0066] By filling the input image, the salient features are obtained, and then the salient features are divided into the front salient features and the back salient features to calculate the secondary salient features. The complementary features are obtained based on the secondary salient features and the salient features, and then the complementary features are processed to obtain the optimized feature map. At this point, richer fine-grained semantic information is obtained to achieve semantic segmentation. Then, the optimized feature map obtained by complementary mining is used to calculate the relationship consistency between instances and the relationship consistency within instances, and finally the complete instance features are obtained. Since the main features and secondary features are taken into account in the segmentation process, and the background and foreground are accurately separated, the background interference is reduced, and the object-level (specific instance or independent object) camouflage instance segmentation is achieved. BRIEF DESCRIPTION OF THE DRAWINGS
[0067] Figure 1 This is a comparison chart of evaluation indicators of the present invention and other disguised object recognition methods under different backbone networks.
[0068] Figure 2 This is a comparison diagram of the segmentation effect between the present invention and other camouflage object recognition methods. DETAILED DESCRIPTION
[0069] A method for identifying a camouflaged object, comprising:
[0070] S100, converting an input image into an input feature map, wherein the image contains a camouflaged object to be identified.
[0071] Specifically, the input image is an image to be segmented. In this embodiment, it is a snake in a wild environment, and the color of the snake is similar to the background color. The input feature map is a series of feature images obtained by extracting features from the input image. The feature map is obtained through a convolution operation. The input feature map F is usually expressed as Among them, C represents the number of channels, H represents the height, and W represents the width. Indicates a real set.
[0072] S101, filling the feature map to generate significant features of a specific dimension.
[0073] Specifically, padding the feature map means using the same padding method to keep the size of the input feature map and the output feature map consistent when calculating the convolution operation. Padding means adding additional values (usually zero) around the input feature map to expand the size of the input so that the convolution operation can be effectively calculated on edge pixels.
[0074] The salient features that generate a specific dimension by applying the same padding to the input feature map include:
[0075] S1010 , initialize kernel size P and expansion coefficient X.
[0076] S1011, the dimension of the input feature map is R C*H*W .
[0077] S1012, according to the kernel size and the expansion coefficient, the input feature map is filled with the same padding to generate a significant feature of a specific dimension, the specific dimension is Among them, R represents the number of feature maps, C represents the number of channels of the feature map, H represents the height of the feature map, W represents the width of the feature map, and P X Indicates the number of local regions that are expanded.
[0078] Specifically, in this embodiment, the expansion coefficient is set to 2, so the significant feature F' s The dimensions are:
[0079]
[0080] S102: Calculate secondary salient features based on the salient features.
[0081] Specifically, the number of local areas is divided into two from the middle, that is, The first half is the pre-significant feature, and the second half is the post-significant feature. The concatenation of the pre-significant feature and the post-significant feature produces a complementary feature.
[0082] Specifically, the central salient pixels are omitted in both the front salient features and the back salient features, that is, Pixels at .
[0083] Based on the previous and subsequent salient features, the calculation of secondary salient features includes:
[0084] Calculate the secondary salient feature according to the front salient feature, the rear salient feature and the secondary pixel calculation formula;
[0085] The secondary pixel calculation formula is:
[0086]
[0087] in, The most notable feature is is the post-significant feature, dim=2 means calculating the position of the central pixel in the two-dimensional array, : is the slice operator in Python, : is used to extract subsets from sequence types (such as lists, tuples, strings, NumPy arrays, etc.).
[0088] S103: Calculate complementary features based on the secondary significant features and the significant features.
[0089] Specifically, the calculated secondary significant features are adjusted to the dimension of R C*H*W*B Align, where B is the batch size. Then, we merge the P2-1 complementary features along the channel dimension and selectively extract the most critical complementary features from the candidate pool. After aggregation, the salient features are averaged element by element, and finally the complete complementary features are obtained:
[0090] F′ sc =Mean(F′ s +F′ c )
[0091] Among them, F' s As a notable feature, F' c For secondary significant features, Mean() represents the operation of averaging the channel dimension of the feature tensor, which promotes the fusion of feature information from different sources.
[0092] Measure the external reliability of complementary features to obtain new query features, including:
[0093] Specifically, external reliability is to enhance the credibility and application value of research by ensuring the consistency of results between different implementation examples.
[0094] S104: Process the complementary features according to preset rules to obtain an optimized feature map.
[0095] Specifically, in the process of complementary feature mining, we ensure that a comprehensive set of features can be captured. The pixel range value is between 0 and 1, where 1 means that the pixel belongs to the foreground (i.e., the instance object) and 0 means that the pixel belongs to the background (i.e., interference noise). Therefore, it is difficult to judge whether the value is foreground or background when it is near 0.5. In order to optimize this problem, we encourage values close to 0 and 1, while suppressing values close to 0.5.
[0096] In order to better distinguish the foreground and background, the complementary features are processed according to the preset rules. The preset rules are to set two thresholds, define the value greater than the larger threshold as 1, and define the value less than the smaller threshold as 0. The mask M is initialized as a zero tensor with a shape of M = zeros(1, 1, H, W).
[0097] The complementary features are processed according to preset rules to obtain the optimized feature graph including:
[0098] S1040: Based on a preset rule, determine whether the feature value of the complementary feature is greater than a first threshold or less than a second threshold.
[0099] S1041. If the feature value of the complementary feature is greater than a first threshold, define the complementary feature as 1 as a modified complementary feature.
[0100] S1042: If the feature value of the complementary feature is less than the second threshold, define the complementary feature as 0 as a modified complementary feature;
[0101] S1043: If the feature value of the complementary feature is between the first threshold and the second threshold, it remains unchanged.
[0102] S1044. Multiply the eigenvalue of the modified complementary feature by the initial mask element by element to obtain an optimized feature map.
[0103] Specifically, the first threshold is set to 0.9 in this embodiment, and the second threshold is set to 0.1 in this embodiment. In the complementary feature, a value greater than 0.9 is defined as 1, and a value less than 0.1 is defined as 0. That is:
[0104]
[0105] Among them, i and j represent pixel positions, M is the mask, and A ij is the semantic feature value of a certain position, m ij is the characteristic value.
[0106] Then the new mask M is multiplied element by element with the feature map F to obtain the optimized feature, namely the optimized feature map F0.
[0107] F o =F⊙M.
[0108] Where ⊙M represents element-wise multiplication.
[0109] S105, dividing the optimized feature map into several regions and obtaining query instance features for each region through linear mapping.
[0110] Specifically, for the optimized feature map F0, it is expressed as Divide it into N*N different regions and apply linear mapping to each region to obtain the query instance features.
[0111] The query instance feature refers to the feature representation of a specific target instance, which is used to help the segmentation network accurately locate the instance. Through linear mapping, a feature subset related to the target instance can be extracted from the feature map to generate the query instance feature. The context feature refers to the feature representation of the area around the target instance, which is used to provide context information to assist the segmentation task. Through linear mapping, a feature subset of the area adjacent to the target instance can be extracted from the feature map to generate the context feature. The similar instance feature refers to the feature representation of other instances with similar features to the target instance, which is used to learn the similarity relationship between instances.
[0112] S106: construct a relationship consistency matrix for different region groups based on query instance features, context features, and similar instance features.
[0113] Specific, known similar instance features and the contextual features of the query instance itself Each group contains the vector [q1, q2, ..., q N ], [r1, r2, ..., r N ] and [s1, s2, ..., s N ], respectively as follows:
[0114]
[0115] Where q, r, s∈1,2,N; W q , W r and W s are the linear projection weights of the query instance feature Q, the known similar instance feature R, and the context feature S of the query instance. In order to measure the reliability of the relationship consistency between these three different regional groups (i.e., Q, R, and S), the relationship consistency matrix U of these N groups in three different regions is calculated. n as follows:
[0116] U n =(β(αQ n (R n) T ))(S n ) T , n∈N
[0117] Among them, β and α are set to C -0.5 The scaling factor of U n It measures the consistency of the relationship between the query instance features Q, known similar instances R, and the context features S within the instance itself.
[0118] S107: Select the first l elements with the highest element similarity in the relationship consistency matrix to form an index matrix.
[0119] S108. Query feature tensors from similar instance features according to the index matrix.
[0120] Querying feature tensors from similar instance features based on the index matrix includes:
[0121] Based on the index matrix and similar instance features, the gather function is used to query and obtain the feature tensor.
[0122] S109: The query instance feature is updated from the feature tensor to obtain a new query feature.
[0123] Specifically, for each region, the first l most relevant features are selected as the index matrix of the relationship matrix According to the index matrix, relevant features are extracted from similar instances R according to the first feature tensor and the second feature tensor, specifically:
[0124]
[0125] Among them, K is the feature tensor K, V is the feature tensor V, K QR That is, extract the features related to the query instance R from the feature tensor K according to the index matrix, V QR It is to extract the features related to the query instance R from the feature tensor V according to the index matrix. G is the gather function, which extracts the features related to the query instance R according to the given index. Query similar features with high reliability from K and V, K QR and V QR Therefore, K QR and V QR It can form a soft label relationship consistency measure with the query instance feature Q, encouraging the query instance to learn new query features from known similar instances, thereby guiding the current query instance to learn new query features The details are as follows:
[0126]
[0127] Among them, Atten is the soft attention that can calculate the next query feature. The update here refers to the continuous optimization and update as the network is trained, and the new query features are updated using Atten soft attention.
[0128] New query features are learned from each other, which can fuse information between different instances and generate richer and more comprehensive feature representations. These new features may capture information that previous features cannot extract or omit, thereby better describing the characteristics and attributes of the instance.
[0129] S110, measuring the internal reliability of the new query feature to obtain the complete instance feature.
[0130] S1100, measuring the relationship consistency between the new query features and the internal context features of the instance itself, and obtaining a new relationship consistency matrix.
[0131] S1101. Select l features in the new relationship consistency matrix that are most relevant to the new query features as the query index matrix.
[0132] S1102, query the index matrix and the new relationship consistency matrix to obtain the first feature and the second feature from the new query feature.
[0133] S1103: Obtain complete instance features based on the first feature, the second feature, and the new query feature.
[0134] Specifically, for new query instance features learned through similar features between instances Need to be further confirmed and its own instance's internal contextual texture features, thereby guiding the query instance features Learn the complete features belonging to the instance itself. Similarly, measure the reliability of the consistency of the relationship between the features of the new query instance and the internal context features S of the instance itself.
[0135]
[0136] in, (New Relation Consistency Matrix) measures the characteristics of new query instances The relational consistency between the contextual features S within the query instance itself.
[0137] Similar to the consistency of relationships between instances, for each region, select the most relevant top features as query index matrix And based on the index matrix get and new query features from the query instance itself
[0138]
[0139] Among them, G is the gather function, G is the gather function, which is based on the given index Query similar features with high reliability from K and V. Therefore, (First feature) and (Second feature) can be combined with the query instance feature Form a soft label relationship consistency measure. Encourage query features to obtain guidance information from the instance itself, thereby obtaining complete instance features The details are as follows:
[0140]
[0141] S111. Based on the complete instance features and the loss function, the complete instance features are optimized to obtain optimized segmentation features.
[0142] Specifically, a composite loss function is used to coordinate multiple objectives to improve segmentation quality. We use binary cross entropy loss to classify instances and integrate focal loss and dice loss to constrain mask prediction. The final loss function is a weighted sum of the above components, which together drive the model to achieve accurate instance segmentation:
[0143] L toatl =λ bce L bce +λ focal L focal +λ dice L dice
[0144] Among them, λ bce , focal and λ dice is the balance factor, which is set to 1.0, 20.0 and 1.0 in this embodiment; L bce is the binary difference entropy loss, L focal is the integrated focal loss, L dice It's a dice loss.
[0145] The interference of similar backgrounds will cause some ambiguous features at the boundary of the predicted results. By setting the preset rules, that is, setting the threshold, those certain features are directly determined without learning, and then learning those uncertain features. Relational consistency is to refer to the features of the instances that have been learned when learning new instances, that is, there is similarity between instances. However, if we only pay attention to the similarity between reference instances, it will lead to treating the newly learned instance as part of the features that have been learned (that is, treating them as one instance). Our goal is to distinguish different instances. Therefore, the relationship consistency within the instance is considered at the same time, ensuring that while referring to the features of the known instances, the uniqueness of the instance itself is guaranteed, and not excessively referring to the features of known similar instances. This ensures that each learned instance is a different instance, improving the accuracy of camouflaged instance segmentation.
[0146] Specific implementation content:
[0147] Datasets. Evaluation is performed on two widely used benchmark datasets: COD10K and NC4K. The COD10K dataset contains a comprehensive collection of 3,040 training images and 2,026 test images, all of which are carefully annotated at the instance level. The NC4K dataset contains 4,121 images and serves as a strong test set for evaluating the generalization ability of CIS models. The annotations provided are detailed and can meet the specific needs of instance-level detection tasks. It is worth noting that another dataset, CAMO+, contains a large number of 5,500 image samples with instance-level annotations, so our experimental settings are consistent with the precedent set by UQFormer, utilizing the COD1OK training set for model development. The performance of our model is then rigorously evaluated on the COD1OK and NC4K test sets to ensure robustness and accuracy.
[0148] Evaluation Metrics. To evaluate the performance of our disguised instance segmentation model, we adopted standard metrics widely recognized in the field. These include the average precision AP across union intersection IoU thresholds, specifically AP50 and AP75. AP50 and AP75 represent the accuracy when the IoU threshold is set to 50% and 75%, respectively, while AP is a comprehensive metric, the average accuracy across multiple IoU thresholds. Unlike traditional instance segmentation metrics that may consider performance of a specific category, the evaluation focuses on detecting disguised instances regardless of their category, which is consistent with the category-independent nature of the task.
[0149] Implementation details. To ensure fair comparison, the widely used ResNet-50 architecture is used as the feature extractor, initialized with ImageNet pre-trained weights. We train the model with a batch size of 2. Training uses the AdamW optimizer, starting with a learning rate of 1-4, spanning 100,000 iterations. A warm-up phase of 10 iterations is included at the beginning of training. The experiments are performed on a single RTX3090 GPU and PyTorch is used as the selected framework. The maximum size of the input image is resized to 1,024 pixels, and the scaling factor varies from 0.1 to 2.0. Weight decay is set to 0.05. The learning rate schedule is designed for 70,000 and 90,000 iterations, and the learning rate multiplier of the backbone network is fixed to 0.1.
[0150] Quantitative Results. To ensure a fair comparison, we evaluate previous CIS-specific methods and generic instance segmentation methods, all using ResNet-50 and ResNet-101 backbones, since CIS is an emerging task. Figure 1 Quantitative results of CCNet against 16 other state-of-the-art methods on two benchmark datasets are shown in Figure 2. As can be seen, our proposed method consistently and significantly outperforms recent methods on both datasets without relying on any post-processing tricks. Specifically, on the COD1OK dataset with a ResNet-50 backbone, our method surpasses the previous leading Mask2Former and DCNet6.5 in terms of Average Precision (AP), respectively. On the NC4K dataset with a ResNet-50 backbone, we achieve 53.6% AP, which is 11.1% higher than OSFormer. For the backbone ResNet-101, our method outperforms Mask2Former by 9.0%, 5.6%, and 12.0% in terms of AP, AP50, and AP75, which illustrates the strong generalization ability of our model. It is worth noting that our method can still achieve good performance without using non-maximum suppression (NMS) post-processing, which is different from typical CIS methods.
[0151] Qualitative Results. In a qualitative evaluation, a series of visual results are presented, highlighting the efficacy of our camouflaged object recognition approach. Compared to existing methods, our complementary feature mining and relation consistency learning approach demonstrates improved capabilities in accurately segmenting instances and delineating object boundaries, especially in complex scenes with multiple instances. Figure 2The qualitative results in illustrate the clear advantages of our method. For example, our method is able to skillfully segment camouflaged objects with very low background contrast (e.g., the first and second columns) and accurately capture the details of camouflaged objects with various poses (e.g., the third and fourth columns). In addition, our method can not only accurately identify a variety of camouflage instances, but also ensure the integrity of each segmented instance (e.g., the fifth and sixth columns). In addition, our method excels in handling scenes containing multiple small camouflage instances, achieving accurate depiction of each camouflage instance (e.g., the seventh and eighth columns). Overall, the qualitative results highlight the ability of our method to handle a variety of challenging camouflage scenes, consistently surpassing the capabilities of existing methods.
[0152] A disguised object recognition system, comprising:
[0153] A conversion module, used for converting an image into a feature map, wherein the image contains a camouflaged object to be identified;
[0154] A filling module, used to fill the feature map to generate significant features of a specific dimension;
[0155] A first calculation module, configured to calculate a secondary significant feature based on the significant feature;
[0156] A second calculation module, used for calculating complementary features according to the secondary significant features and the significant features;
[0157] An external measurement module, used to measure the external reliability of the complementary features to obtain new query features;
[0158] An internal measurement module, used for measuring the internal reliability of the new query feature to obtain a complete instance feature;
[0159] An optimization module, used for optimizing the complete instance feature based on the complete instance feature and the loss function to obtain an optimized segmentation feature;
[0160] Measuring the external reliability of the complementary features to obtain new query features, specifically including:
[0161] A processing module, used for processing the complementary features according to preset rules to obtain an optimized feature map;
[0162] A mapping module, used to divide the optimized feature map into a plurality of regions and obtain query instance features, context features and similar instance features for each region through linear mapping;
[0163] A construction module, used to construct a relationship consistency matrix of different region groups based on the query instance features, context features and similar instance features;
[0164] The third calculation module is used to select the first l features with the highest element similarity in the relationship consistency matrix to form an index matrix;
[0165] A query module, configured to query a feature tensor from the similar instance features according to the index matrix;
[0166] An updating module is used to update the query instance feature through the feature tensor to obtain the new query feature.
[0167] The embodiment of the present application also discloses a terminal device, including a memory and a processor. The memory stores a computer program that can be run on the processor. When the processor loads and executes the computer program, a disguised object recognition method is adopted.
[0168] The terminal device may be a computer device such as a desktop computer, a laptop computer or a cloud server, and the terminal device includes but is not limited to a processor and a memory. For example, the terminal device may also include input and output devices, a network access device and a bus.
[0169] Among them, the processor can adopt a central processing unit (CPU). Of course, according to actual usage, other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. can also be adopted. The general-purpose processor can adopt a microprocessor or any conventional processor, etc., and this application does not impose any restrictions on this.
[0170] Among them, the memory can be an internal storage unit of the terminal device, such as a hard disk or memory of the terminal device, or it can be an external storage device of the terminal device, such as a plug-in hard disk, a smart memory card (SMC), a secure digital card (SD) or a flash memory card (FC) equipped on the terminal device, etc., and the memory can also be a combination of an internal storage unit and an external storage device of the terminal device. The memory is used to store computer programs and other programs and data required by the terminal device. The memory can also be used to temporarily store data that has been output or is to be output, and this application does not impose any restrictions on this.
[0171] Among them, through this terminal device, a disguised object recognition method in the above embodiment is stored in the memory of the terminal device, and is loaded and executed on the processor of the terminal device, which is convenient for use.
[0172] The embodiment of the present application further discloses a computer-readable storage medium, and the computer-readable storage medium stores a computer program, wherein when the computer program is executed by a processor, a disguised object recognition method in the above embodiment is adopted.
[0173] Among them, the computer program can be stored in a computer-readable medium, the computer program includes computer program code, the computer program code can be in the form of source code, object code, executable file or certain middleware, etc. The computer-readable medium includes any entity or device that can carry the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the computer-readable medium includes but is not limited to the above-mentioned components.
[0174] Among them, through this computer-readable storage medium, a disguised object recognition method in the above embodiment is stored in a computer-readable storage medium, and is loaded and executed on a processor to facilitate the storage and application of the above method.
[0175] A person skilled in the art should understand that the discussion of any of the above embodiments is merely illustrative and is not intended to imply that the scope of protection of the present application is limited to these examples. In line with the concept of the present application, the technical features in the above embodiments or different embodiments may be combined, the steps may be implemented in any order, and there are many other variations of different aspects of one or more embodiments of the present application as above, which are not provided in detail for the sake of simplicity.
[0176] One or more embodiments of the present application are intended to cover all such substitutions, modifications and variations that fall within the broad scope of the present application. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of one or more embodiments of the present application should be included in the protection scope of the present application.
Claims
1. A method for identifying a disguised object, characterized in that: include: Converting an image into a feature map, wherein the image contains a camouflaged object to be identified; Filling the feature map to generate significant features of a specific dimension; Based on the salient features, calculating secondary salient features; Obtaining complementary features by learning the secondary significant features and the significant features; Measuring the external reliability of the complementary features to obtain new query features; Measuring the internal reliability of the new query feature to obtain a complete instance feature; Optimizing the complete instance feature based on the loss function to obtain an optimized segmentation feature, and using the optimized segmentation feature as a camouflage object; Measuring the external reliability of the complementary features to obtain new query features, specifically including: Processing the complementary features according to preset rules to obtain an optimized feature map; Dividing the optimized feature graph into a plurality of regions, and obtaining query instance features, context features, and similar instance features for each region through linear mapping; Based on the query instance features, context features, and similar instance features, constructing a relationship consistency matrix for different region groups; Select the first l elements with the highest similarity in the relationship consistency matrix to form an index matrix; Querying a feature tensor from the similar instance features according to the index matrix; The query instance feature is updated through the feature tensor to obtain the new query feature.
2. The method for identifying a disguised object according to claim 1, wherein: The specific dimension is Among them, R represents the number of feature maps, C represents the number of channels of the feature map, H represents the height of the feature map, W represents the width of the feature map, and P X Indicates the number of local regions that are expanded.
3. The method for identifying a disguised object according to claim 2, wherein: The calculating of the secondary significant features based on the significant features comprises: At the middle position of the number of local regions, the significant feature is divided into two, the one before the middle position is defined as the front significant feature, and the one after the middle position is defined as the rear significant feature; Calculating the secondary salient feature according to the front salient feature, the rear salient feature and a secondary pixel calculation formula; The secondary pixel calculation formula is: in, The most notable feature is is the post-significant feature, dim=2 means calculating the position of the center pixel in the two-dimensional array, Indicates pixels, Indicates pixels, : is the operator.
4. The method for identifying a disguised object according to claim 1, wherein: The processing of the complementary features according to preset rules to obtain an optimized feature map comprises: Based on the preset rule, determining whether the feature value of the complementary feature is greater than a first threshold or less than a second threshold; If the feature value of the complementary feature is greater than the first threshold, defining the complementary feature as 1 as the feature value of the modified complementary feature; If the feature value of the complementary feature is less than the second threshold, defining the complementary feature as 0 as the feature value of the modified complementary feature; The feature value of the modified complementary feature is multiplied element by element by the initial mask to obtain the optimized feature map.
5. The method for identifying a disguised object according to claim 1, wherein: The constructing a relationship consistency matrix of different region groups based on the query instance feature, the context feature and the similar instance feature comprises: Obtaining the linear projection weights of query instance features, context feature linear projection weights, and similar instance feature linear projection weights; The relationship consistency matrix of different regions is calculated according to the linear projection weight of the query instance feature, the query instance feature, the linear projection weight of the context feature, the linear projection weight of the context feature and the similar instance feature, and the similar instance feature.
6. The method for identifying a disguised object according to claim 1, wherein: The querying of feature tensors from similar instance features according to the index matrix includes: According to the index matrix and the similar instance features, a gather function is used to query and obtain a feature tensor.
7. The method for identifying a disguised object according to claim 1, wherein: The measuring the internal reliability of the new query feature to obtain the complete instance feature includes: Measuring the relationship consistency between the new query features and the internal context features of the disguised object to obtain a new relationship consistency matrix; Select l features in the new relationship consistency matrix that have the highest correlation with the new query feature as the query index matrix; Obtaining a first feature and a second feature from the new query feature according to the query index matrix and the new relationship consistency matrix; A complete instance feature is obtained based on the first feature, the second feature and the new query feature.
8. A disguised object identification method system, characterized in that: include: A conversion module, used for converting an image into a feature map, wherein the image contains a camouflaged object to be identified; A filling module, used to fill the feature map to generate significant features of a specific dimension; A first calculation module, configured to calculate a secondary significant feature based on the significant feature; A second calculation module, used for calculating complementary features according to the secondary significant features and the significant features; An external measurement module, used to measure the external reliability of the complementary features to obtain new query features; An internal measurement module, used for measuring the internal reliability of the new query feature to obtain a complete instance feature; An optimization module, used for optimizing the complete instance feature based on the complete instance feature and the loss function to obtain an optimized segmentation feature; Measuring the external reliability of the complementary features to obtain new query features, specifically including: A processing module, used for processing the complementary features according to preset rules to obtain an optimized feature map; A mapping module, used to divide the optimized feature map into a plurality of regions and obtain query instance features, context features and similar instance features for each region through linear mapping; A construction module, used to construct a relationship consistency matrix of different region groups based on the query instance features, context features and similar instance features; The third calculation module is used to select the first l features with the highest element similarity in the relationship consistency matrix to form an index matrix; A query module, configured to query a feature tensor from the similar instance features according to the index matrix; An updating module is used to update the query instance feature through the feature tensor to obtain the new query feature.
9. A terminal device, comprising a memory and a processor, characterized in that: The memory stores a computer program that can be run on the processor. When the processor loads and executes the computer program, the disguised object recognition method according to any one of claims 1 to 7 is adopted.
10. A computer-readable storage medium, wherein a computer program is stored in the computer-readable storage medium, characterized in that: When the computer program is loaded and executed by a processor, the disguised object recognition method according to any one of claims 1 to 7 is adopted.
Citation Information
Patent Citations
System and method for simultaneous real-time object detection and semantic segmentation
CN115004242A
Neural network-based camouflage target detection method and device, and storage medium
CN116935189A
Small sample camouflage target segmentation method
CN118097150A
Face Authentication Using Recognition-by-Parts, Boosting, and Transduction
US20110135166A1
Tissue image recognition method and apparatus, and readable medium and electronic device
WO2023185497A1
