Camouflage object recognition method, system, device and storage medium
By calculating the salient and secondary salient features of the image and optimizing the relation consistency matrix, the problem of inaccurate segmentation of disguised objects in complex backgrounds is solved, and accurate segmentation of disguised objects is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-10
- Publication Date
- 2026-03-17
AI Technical Summary
Existing methods for identifying camouflaged objects are easily affected by cluttered backgrounds when faced with complex scenes with diverse appearances or low contrast, leading to inaccurate segmentation of camouflaged instances.
By converting images into feature maps, calculating salient and secondary salient features, measuring the external and internal reliability of complementary features, constructing a relation consistency matrix, optimizing segmentation features, and reducing background interference, accurate segmentation of camouflaged objects can be achieved.
It improves the performance of spoofed instance segmentation, can accurately identify spoofed objects in complex backgrounds, reduces background interference, and achieves accurate segmentation of object-level spoofed instances.
Smart Images

Figure CN119131397B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of spoofing instance segmentation, and specifically relates to a method, system, device and storage medium for identifying spoofed objects. Background Technology
[0002] Camouflage is a ubiquitous phenomenon in nature, where organisms alter their appearance—including brightness, color, and pattern—to adapt to their environment and avoid being preyed upon or to capture prey. In a broad context, camouflaged objects encompass entities that cleverly blend into their surroundings, employing strategies such as size reduction, color and texture mimicry, or strategic feature concealment. Camouflage instance segmentation (CIS) is a challenging task aimed at accurately identifying and characterizing instance-level masks of camouflaged objects that intricately blend into 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 related technologies, spoofed instance segmentation mainly employs model fusion, feature query, and multi-backbone architecture methods. Model fusion is a technique that combines the prediction results of multiple models to improve model performance and prediction accuracy. It assigns different weights to the prediction results of different models and then weights them or fuses them into a final prediction result.
[0004] Regarding the aforementioned technologies, while existing methods for identifying disguised objects can reliably detect various disguises, they are easily interfered with by cluttered backgrounds when faced with targets of diverse appearances or complex scenes with low contrast, resulting in inaccurate instance segmentation. Summary of the Invention
[0005] The technical problem to be solved by the present invention is to provide a method, system, device and storage medium for identifying spoofed objects, which can effectively coordinate the contextual relationships between instances and reduce background interference by utilizing subtle secondary salient features, thereby enhancing the performance of spoofed instance segmentation.
[0006] A method for identifying spoofed objects includes:
[0007] The image is converted into a feature map, which contains a disguised object to be identified;
[0008] The feature map is filled to generate salient features in a specific dimension;
[0009] Based on the aforementioned salient features, secondary salient features are calculated;
[0010] Complementary features are calculated based on secondary salient features and salient features;
[0011] The external reliability of the complementary features is measured to obtain new query features;
[0012] The internal reliability of the new query features is measured to obtain complete instance features;
[0013] The features of the complete instance are optimized based on the loss function to obtain optimized segmentation features, which are then used as masquerading objects.
[0014] Measuring the external reliability of the complementary features to obtain new query features specifically includes:
[0015] The complementary features are processed according to preset rules to obtain an optimized feature map;
[0016] The optimized feature map is divided into several regions, and for each region, query instance features, context features, and similar instance features are obtained through linear mapping.
[0017] Based on the query instance features, context features, and similar instance features, a relationship consistency matrix for different region groups is constructed.
[0018] Select the l elements with the highest element similarity in the relation consistency matrix to form an index matrix;
[0019] Query the feature tensor from the similar instance features based on the index matrix;
[0020] The new query features are obtained by updating the query instance features using the feature tensor.
[0021] Specifically, the optimized segmentation features are the required image features extracted from the background, and the background image features and the required image features are used for camouflaged instance segmentation.
[0022] The optimized segmentation features are the target objects identified from the masquerading objects.
[0023] Optionally, applying the same padding to the input feature map to generate salient features in a specific dimension includes:
[0024] Initialize the kernel size P and expansion coefficient X;
[0025] The dimension of the input feature map is R. C*H*W .
[0026] Based on the kernel size and the inflation coefficient, the input feature map is padded with the same method to generate salient features in a specific dimension, where the specific dimension is... Where R represents the number of feature maps, C represents the number of channels in the feature map, H represents the height of the feature map, W represents the width of the feature map, and P represents the height of the feature map. X Indicates the number of local regions expanded.
[0027] Optionally, based on the salient features, calculating secondary salient features includes:
[0028] Based on the number of local regions, at the midpoint of this number, the salient feature is divided into two parts: the part before the midpoint is defined as the pre-salient feature, and the part after the midpoint is defined as the post-salient feature.
[0029] The secondary salient features are calculated based on the aforementioned pre-salient features, the aforementioned post-salient features, and the secondary pixel calculation formula;
[0030] The formula for calculating the secondary pixel is:
[0031]
[0032] in, Prestigious features As a post-saliency feature, dim=2 indicates that the position of the center pixel is calculated in the two-dimensional array.
[0033] Optionally, processing the complementary features according to preset rules to obtain an optimized feature map includes:
[0034] Based on the preset rules, it is determined 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, then the complementary feature is defined 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, then the complementary feature is defined as 0 as the feature value of the modified complementary feature;
[0037] The optimized feature map is obtained by multiplying the feature values of the modified complementary features element-wise with the initial mask.
[0038] Optionally, constructing a relationship consistency matrix for different region groups based on the query instance features, context features, and similar instance features includes:
[0039] Obtain the linear projection weights of the query instance features, the linear projection weights of the context features, and the linear projection weights of the similar instance features;
[0040] Based on the linear projection weights of the query instance features, the actual query, the linear projection weights of the context features, the linear projection weights of the context features and the similar instance features, calculate the relationship consistency matrix of the three different regions.
[0041] Optionally, querying the feature tensor from similar instance features based on the index matrix includes:
[0042] Based on the index matrix and the similar instance features, the feature tensor is obtained by querying using the gather function.
[0043] Optionally, measuring the internal reliability of the new query features to obtain complete instance features includes:
[0044] The consistency between the new query features and the internal context features of the instance itself is measured to obtain the new relationship consistency matrix.
[0045] Select the l features in the new relation consistency matrix that have the highest relevance to the new query feature as the query index matrix.
[0046] The first feature and the second feature are obtained from the new query features based on the query index matrix and the new relation consistency matrix.
[0047] Based on the first feature, the second feature, and the new query feature, the complete instance features are obtained.
[0048] A method system for identifying spoofed objects, comprising:
[0049] A conversion module is used to convert an image into a feature map, wherein the image contains a disguised object to be identified;
[0050] A filling module is used to fill the feature map to generate salient features in a specific dimension;
[0051] The first calculation module is used to calculate secondary salient features based on the salient features;
[0052] The second calculation module is used to calculate complementary features based on minor salient features and salient features;
[0053] An external measurement module is used to measure the external reliability of the complementary features to obtain new query features;
[0054] An internal measurement module is used to measure the internal reliability of the new query features to obtain complete instance features;
[0055] The optimization module is used to optimize the complete instance features based on the complete instance features and the loss function to obtain optimized segmentation features;
[0056] Measuring the external reliability of the complementary features to obtain new query features specifically includes:
[0057] The processing module is used to process the complementary features according to preset rules to obtain an optimized feature map;
[0058] The mapping module is used to divide the optimized feature map into several regions and obtain query instance features, context features, and similar instance features for each region through linear mapping.
[0059] The construction module is used to construct a relationship consistency matrix for 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 top l features with the highest element similarity in the relation consistency matrix to form an index matrix.
[0061] The query module is used to query a feature tensor from the similar instance features based on the index matrix;
[0062] The update module is used to update the query instance features using the feature tensor to obtain the new query features.
[0063] A terminal device includes a memory and a processor. The memory stores a computer program that can run on the processor. When the processor loads and executes the computer program, it employs a method for identifying spoofed objects.
[0064] A computer-readable storage medium storing a computer program that, when loaded and executed by a processor, employs a method for identifying spoofed objects.
[0065] The beneficial effects of this invention are:
[0066] By padding the input image, salient features are obtained. These salient features are then divided into pre-salient and post-salient features to calculate secondary salient features. Complementary features are derived from the secondary and salient features, and then processed to obtain an optimized feature map. This yields richer, finer-grained semantic information, achieving semantic segmentation. The optimized feature map obtained through complementarity mining is then used to calculate the consistency of relationships between instances and within instances, ultimately obtaining complete instance features. Because the segmentation process considers both primary and secondary features and accurately separates the background and foreground, reducing background interference, it achieves object-level (concrete instance or independent object) dummy instance segmentation. Attached Figure Description
[0067] Figure 1 This is a comparison chart of the evaluation metrics of the present invention with other spoofing object identification methods under different backbone networks.
[0068] Figure 2 This is a comparison diagram of the segmentation effect of the present invention with other disguised object recognition methods. Detailed Implementation
[0069] A method for identifying spoofed objects includes:
[0070] S100. Convert the input image into an input feature map, where the image contains a disguised object to be identified.
[0071] Specifically, the input image is the image to be segmented; in this embodiment, it is a snake in a wild environment, whose color is similar to the background color. The input feature map is a series of feature images obtained after feature extraction from the input image, which is acquired through convolution operations. The input feature map F is typically represented as... Where C represents the number of channels, H represents the height, and W represents the width. This indicates that it belongs to a set.
[0072] S101. Fill the feature map to generate salient features in a specific dimension.
[0073] Specifically, padding the feature map means using the same padding method when computing convolution operations to keep the input and output feature maps of the same size. Padding involves adding extra values (usually zeros) around the input feature map to expand its size, allowing the convolution operation to be efficiently computed even at edge pixels.
[0074] Applying the same padding to the input feature map to produce salient features in a specific dimension includes:
[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. Based on the kernel size and inflation coefficient, apply the same padding to the input feature map to generate salient features in a specific dimension, where the specific dimension is... Where R represents the number of feature maps, C represents the number of channels in the feature map, H represents the height of the feature map, W represents the width of the feature map, and P represents the height of the feature map. X Indicates the number of local regions expanded.
[0078] Specifically, in this embodiment, the expansion coefficient is set to 2, therefore the salient feature F' s The dimensions are:
[0079]
[0080] S102. Calculate secondary salient features based on salient features.
[0081] Specifically, dividing the local area in half from the middle means... In this case, the first half is a pre-salient feature, and the second half is a post-salient feature. The concatenation of pre-salient and post-salient features produces complementary features.
[0082] Specifically, the central salient pixel is omitted in both the pre-salient and post-salient features. The pixels at that location.
[0083] Based on pre-significant and post-significant features, the calculation of secondary significant features includes:
[0084] Calculate the secondary salient features based on the pre-salient features, post-salient features, and the formula for calculating secondary pixels;
[0085] The formula for calculating secondary pixels is:
[0086]
[0087] in, Prestigious features For post-saliency features, dim=2 indicates the position of the center pixel in a 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. Based on the minor salient features and the salient features, the complementary features are calculated.
[0089] Specifically, the calculated secondary salient features are adjusted in dimension and R. C*H*W*B Alignment is performed, where B is the batch size. Then, P2-1 complementary features are merged along the channel dimension, selectively extracting the most critical complementary features from the candidate pool. After aggregation, element-wise averaging of the salient features yields the complete complementary features:
[0090] F′ sc =Mean(F′) s +F′ c )
[0091] Among them, F' s As a salient feature, F' c For secondary salient features, Mean() represents an operation that averages the channel dimensions of the feature tensor, promoting the fusion of feature information from different sources.
[0092] Measuring the external reliability of complementary features yields new query features, specifically including:
[0093] Specifically, external reliability enhances the credibility and application value of research by ensuring consistency of results across different implementations.
[0094] S104. The complementary features are processed according to preset rules to obtain the optimized feature map.
[0095] Specifically, in the complementary feature mining process, we ensure that a comprehensive set of features is captured. Pixel values range from 0 to 1, where 1 indicates that the pixel belongs to the foreground (i.e., the instance object), and 0 indicates that the pixel belongs to the background (i.e., noise). Therefore, values near 0.5 are difficult to determine whether they belong to the foreground or the background. To optimize this, we encourage values close to 0 and 1, while suppressing values close to 0.5.
[0096] To better distinguish between foreground and background, complementary features are processed using preset rules. These rules define features greater than the larger threshold as 1 and features less than the smaller threshold as 0. The mask M is initialized as a zero tensor of shape M = zeros(1, 1, H, W).
[0097] Complementary features are processed according to preset rules to obtain optimized feature maps, including:
[0098] S1040. Based on preset rules, determine whether the feature value of complementary features is greater than the first threshold or less than the second threshold.
[0099] S1041. If the eigenvalue of the complementary feature is greater than the first threshold, then the complementary feature is defined as 1 as the modified complementary feature.
[0100] S1042. If the eigenvalue of the complementary feature is less than the second threshold, then the complementary feature is defined as 0 as the modified complementary feature.
[0101] S1043. If the eigenvalues of complementary features are between the first threshold and the second threshold, they remain unchanged.
[0102] S1044. Multiply the eigenvalues of the modified complementary features element-wise with the initial mask to obtain the optimized feature map.
[0103] Specifically, in this embodiment, the first threshold is set to 0.9, and the second threshold is set to 0.1. In the complementary features, values greater than 0.9 are defined as 1, and values less than 0.1 are defined as 0. That is:
[0104]
[0105] Where i and j represent pixel positions, M is the mask, and A ij Let m be the semantic feature value at a certain location. ij These are the eigenvalues.
[0106] Then, the new mask M is multiplied element-wise with the feature map F to obtain the optimized feature map F0.
[0107] F o =F⊙M.
[0108] Where ⊙M represents element-wise multiplication.
[0109] S105. Divide the optimized feature map into several regions and obtain the query instance features for each region through linear mapping.
[0110] Specifically, for the optimized feature map F0, it is represented as Divide it into N*N distinct regions, and apply a linear mapping to each region to obtain query instance features.
[0111] Query instance features refer to the feature representation of a specific target instance, used to help the segmentation network accurately locate the instance. Through linear mapping, a subset of features related to the target instance can be extracted from the feature map to generate query instance features. Context features refer to the feature representation of the region surrounding the target instance, used to provide contextual information to aid the segmentation task. Through linear mapping, a subset of features from the region adjacent to the target instance can be extracted from the feature map to generate contextual features. Similar instance features refer to the feature representation of other instances with similar features to the target instance, used to learn the similarity relationships between instances.
[0112] S106. Based on query instance features, context features, and similar instance features, construct a relationship consistency matrix for different region groups.
[0113] Specifically, known similar instance features and the contextual features of the query instance itself. Each group contains a vector [q1, q2, ..., q]. N ],[r1,r2,...,r N ] and [s1, s2, ..., s N The details are as follows:
[0114]
[0115] Where q, r, s∈1,2,N; W q W r and W s These 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, respectively. To measure the reliability of the relationship consistency among these three different region groups (i.e., Q, R, and S), the relationship consistency matrix U of these N groups in the three different regions is calculated. n as follows:
[0116] U n =(β(αQ) n (R n) T ))(S n ) T , n∈N
[0117] Where β and α are set to C -0.5 The scaling factor, while U n Measure the consistency between the features of the query instances (Q), the known similar instances (R), and the contextual features within the instance itself (S).
[0118] S107. Select the l elements with the highest element similarity in the relation consistency matrix to form an index matrix.
[0119] S108. Query the feature tensor from the features of similar instances based on the index matrix.
[0120] The feature tensor retrieved from similar instance features based on the index matrix includes:
[0121] Based on the index matrix and similar instance features, the feature tensor is obtained by querying using the gather function.
[0122] S109. The query instance features are updated from the feature tensor to obtain new query features.
[0123] Specifically, for each region, the l most relevant features are selected as the index matrix of the relation matrix. Based on the index matrix, relevant features are extracted from similar instances R using the first feature tensor and the second feature tensor, specifically as follows:
[0124]
[0125] Where K is the feature tensor K, V is the feature tensor V, and K QR This involves extracting features related to the query instance R from the feature tensor K based on the index matrix, V. QR This involves extracting features related to the query instance R from the feature tensor V based on the index matrix. G is the gather function, which calculates features based on the given index. Queries similar features for high reliability from K and V, K QR and V QR The constituent feature tensor. 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. Specifically as follows:
[0126]
[0127] Atten is a soft attention mechanism that can calculate the next query feature. The update here refers to the continuous optimization and updating of the network as it is trained, using Atten soft attention to update the new query features.
[0128] New query features are generated through mutual learning between instances, fusing information from different instances to produce richer and more comprehensive feature representations. These new features may capture information that previous features could not extract or missed, thus better describing the characteristics and attributes of instances.
[0129] S110. Measure the internal reliability of the new query features to obtain complete instance features.
[0130] S1100. Measure the consistency between the new query features and the internal context features of the instance itself to obtain the new relationship consistency matrix.
[0131] S1101. Select the l features in the new relation consistency matrix that have the highest relevance to the new query features as the query index matrix.
[0132] S1102, the query index matrix and the new relation consistency matrix are used to obtain the first and second features from the new query features.
[0133] S1103. Based on the first feature, the second feature, and the new query feature, the complete instance features are obtained.
[0134] Specifically, for new query instance features learned through inter-instance similarity features... Further confirmation is needed. and the internal contextual texture features of its own instances, thereby guiding the query of instance features. Learn the complete features that belong to the instance itself. Similarly, measure the reliability of the consistency between the features of a new query instance and the instance's internal context features S.
[0135]
[0136] in, (New Relation Consistency Matrix) Measures Characteristics of New Query Instances Consistency with the relationship between the contextual features S within the query instance itself.
[0137] Similarly, to maintain consistency in relationships between instances, for each region, select the most relevant top element. These features are used as the query index matrix. And based on the index matrix get New query features from the query instance itself
[0138]
[0139] Where G is the gather function, which is based on the given index. Queries similar features for high reliability from K and V. Therefore, (first characteristic) and (Second feature) can be compared with query instance features Establish a consistency measure for soft label relationships. Encourage query features to derive guiding information from the instance itself, thereby obtaining complete instance features. Specifically as follows:
[0140]
[0141] S111. Based on the complete instance features and the loss function, optimize the complete instance features to obtain optimized segmentation features.
[0142] Specifically, a composite loss function is employed to coordinate multiple objectives and improve segmentation quality. We utilize binary cross-entropy loss for instance classification and integrate focus loss and dice loss to constrain mask prediction. The final loss function is a weighted sum of the above components, which collectively drive the model to achieve accurate instance segmentation.
[0143] L toatl =λ bce L bce +λ focal L focal +λ dice L dice
[0144] Where, λ bce , λ focal and λ dice This is a balance factor, set to 1.0, 20.0, and 1.0 in this embodiment; L bce It is a binary difference entropy loss, L focal It is the integrated focus loss, L dice It's a loss from the dice.
[0145] Interference from similar backgrounds can lead to ambiguous features in the predicted boundaries. By setting thresholds using predefined rules, we can directly identify the definite features without learning them, and then learn the uncertain features. Relational consistency is used to reference already learned instance features when learning new instances, meaning instances share a similar appearance. However, focusing solely on inter-instance similarity can lead to treating newly learned instances as part of already learned features (treating them as a single instance), while our goal is to distinguish between different instances. Therefore, intra-instance relational consistency is also considered, ensuring that while referencing known instance features, the uniqueness of each instance is maintained, avoiding excessive reference to features of known similar instances. This ensures that each learned instance is distinct, improving the accuracy of dummy instance segmentation.
[0146] Specific implementation details:
[0147] Datasets. Evaluation was 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 meticulously annotated at the instance level. The NC4K dataset contains 4,121 images, serving as a robust test set for evaluating the generalization ability of the CIS model. The provided annotations are detailed and meet the specific needs of instance-level detection tasks. Notably, another dataset, CAMO+, contains a large number of 5,500 image samples with instance-level annotations; therefore, our experimental setup, consistent with the precedent set by UQFormer, utilizes the COD10K training set for model development. The performance of our model was then rigorously evaluated on the COD10K and NC4K test sets to ensure robustness and accuracy.
[0148] Evaluation Metrics. To evaluate the performance of our spoofed instance segmentation model, we adopted widely accepted standard metrics in the field. These include the mean precision (AP) across joint intersection IoU thresholds, specifically AP50 and AP75. AP50 and AP75 represent the precision when the IoU thresholds are set to 50% and 75%, respectively, while AP is a comprehensive metric, representing the average precision across multiple IoU thresholds. Unlike traditional instance segmentation metrics that may consider class-specific performance, the evaluation focuses on detecting spoofed instances regardless of their class, consistent with the class-independent nature of the task.
[0149] Implementation Details. To ensure fair comparisons, the model employs the widely used ResNet-50 architecture, initialized with ImageNet pre-trained weights as the feature extractor. We train the model with a batch size of 2. Training uses the AdamW optimizer, starting with a learning rate of 1-4 and spanning 100,000 iterations. A 10-iteration warm-up phase is included at the beginning of training. Experiments are performed on a single RTX 3090 GPU, using PyTorch as the chosen framework. The maximum size of the input images is resized to 1,024 pixels, with scaling factors varying between 0.1 and 2.0. Weight decay is set to 0.05. The learning rate is planned for 70,000 and 90,000 iterations, with the learning rate multiplier for the backbone fixed at 0.1.
[0150] Quantitative Results. To ensure fair comparisons, we evaluated previous CIS-specific and general instance segmentation methods, all using ResNet-50 and ResNet-101 backbones, as CIS is an emerging task. Figure 1 This paper presents quantitative results of CCNet against 16 other state-of-the-art methods on two benchmark datasets. It can be seen that 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 outperforms the previously leading Mask2Former and DCNet6.5 in terms of mean accuracy (AP). On the NC4K dataset with a ResNet-50 backbone, we achieve an AP of 53.6%, which is 11.1% higher than OSFormer. For the ResNet-101 backbone, our method outperforms Mask2Former by 9.0%, 5.6%, and 12.0% in AP, AP50, and AP75, respectively, demonstrating the strong generalization ability of our model. Notably, our method still achieves good performance without using non-maximum suppression (NMS) post-processing, which differs from typical CIS methods.
[0151] Qualitative Results. In the qualitative evaluation, a series of visual results are presented, highlighting the effectiveness of our camouflaged object recognition method. Compared to existing methods, the complementary feature mining and relation consistency learning approach proposed in this paper demonstrates improved capabilities in accurately segmenting instances and depicting object boundaries, particularly in complex scenes with multiple instances. Figure 2The qualitative results illustrate the clear advantages of our method. For example, our method skillfully segments camouflaged objects with very low background contrast (e.g., columns 1 and 2) and accurately captures details of camouflaged objects with various poses (e.g., columns 3 and 4). Furthermore, our method not only accurately identifies various camouflage instances but also ensures the integrity of each segmented instance (e.g., columns 5 and 6). In addition, our method excels at handling scenes containing multiple small camouflage instances, achieving accurate depiction of each camouflage instance (e.g., columns 7 and 8). Overall, the qualitative results highlight our method's ability to handle a wide range of challenging camouflage scenes, consistently surpassing the capabilities of existing methods.
[0152] A disguised object recognition system, comprising:
[0153] A conversion module is used to convert an image into a feature map, wherein the image contains a disguised object to be identified;
[0154] A filling module is used to fill the feature map to generate salient features in a specific dimension;
[0155] The first calculation module is used to calculate secondary salient features based on the salient features;
[0156] The second calculation module is used to calculate complementary features based on minor salient features and salient features;
[0157] An external measurement module is used to measure the external reliability of the complementary features to obtain new query features;
[0158] An internal measurement module is used to measure the internal reliability of the new query features to obtain complete instance features;
[0159] The optimization module is used to optimize the complete instance features based on the complete instance features and the loss function to obtain optimized segmentation features;
[0160] Measuring the external reliability of the complementary features to obtain new query features specifically includes:
[0161] The processing module is used to process the complementary features according to preset rules to obtain an optimized feature map;
[0162] The mapping module is used to divide the optimized feature map into several regions and obtain query instance features, context features, and similar instance features for each region through linear mapping.
[0163] The construction module is used to construct a relationship consistency matrix for 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 top l features with the highest element similarity in the relation consistency matrix to form an index matrix.
[0165] The query module is used to query a feature tensor from the similar instance features based on the index matrix;
[0166] The update module is used to update the query instance features using the feature tensor to obtain the new query features.
[0167] This application also discloses a terminal device, including a memory and a processor. The memory stores a computer program that can run on the processor. When the processor loads and executes the computer program, it employs a method for identifying spoofed objects.
[0168] The terminal device can be a computer device such as a desktop computer, a laptop computer, or a cloud server. The terminal device includes, but is not limited to, a processor and a memory. For example, the terminal device may also include input / output devices, network access devices, and buses.
[0169] The processor can be a central processing unit (CPU). Of course, depending on the actual use, it can also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), off-the-shelf programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor, etc., and this application does not limit it in this regard.
[0170] The memory can be an internal storage unit of the terminal device, such as a hard disk or RAM of the terminal device, or an external storage device of the terminal device, such as a plug-in hard disk, smart memory card (SMC), secure digital card (SD), or flash memory card (FC) equipped on the terminal device. Furthermore, the memory can be a combination of internal storage units and external storage devices 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 will be output. This application does not limit this.
[0171] In this terminal device, a disguised object identification method from the above embodiments is stored in the terminal device's memory and loaded and executed on the terminal device's processor for convenient use.
[0172] This application also discloses a computer-readable storage medium, which stores a computer program, wherein when the computer program is executed by a processor, it employs a disguised object identification method as described in the above embodiments.
[0173] The computer program can be stored in a computer-readable medium. The computer program includes computer program code, which can be in the form of source code, object code, executable file, or certain middleware. The computer-readable medium includes any entity or device capable of carrying computer program code, recording media, USB flash drive, portable hard drive, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the computer-readable medium includes, but is not limited to, the above-mentioned components.
[0174] The above-described method for identifying spoofed objects is stored in the computer-readable storage medium and loaded and executed on the processor to facilitate the storage and application of the method.
[0175] Those skilled in the art should understand that the discussion of any of the above embodiments is merely exemplary and is not intended to imply that the scope of protection of this application is limited to these examples; under the concept of this application, the technical features of the above embodiments or different embodiments can also be combined, the steps can be implemented in any order, and there are many other variations of different aspects of one or more embodiments of this application as described above, which are not provided in detail for the sake of brevity.
[0176] One or more embodiments in this application are intended to cover all such substitutions, modifications, and variations that fall within the broad scope of this application. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of one or more embodiments in this application should be included within the protection scope of this application.
Claims
1. A method of camouflage object recognition, characterized in that, The method comprises the following steps: transforming an image containing a camouflage object to be identified into a feature map; filling the feature map to generate a significant feature of a certain dimension; calculating a secondary significant feature based on the significant feature; obtaining a complementary feature according to the secondary significant feature and the significant feature; measuring the external reliability of the complementary feature to obtain a new query feature; measuring the internal reliability of the new query feature to obtain a complete instance feature; optimizing the complete instance feature based on a loss function to obtain an optimized segmentation feature, wherein the optimized segmentation feature is a target object identified from the camouflage object; measuring the external reliability of the complementary feature to obtain a new query feature, specifically comprising: processing the complementary feature according to a preset rule to obtain an optimized feature map; dividing the optimized feature map into several regions, and obtaining a query instance feature, a context feature and a similar instance feature for each region through linear mapping; constructing a relationship consistency matrix of different region groups based on the query instance feature, the context feature and the similar instance feature; selecting the top l elements of the element similarity in the relationship consistency matrix to form an index matrix; querying a feature tensor from the similar instance feature according to the index matrix; updating the query instance feature through the feature tensor to obtain the new query feature.
2. The camouflage object recognition method according to claim 1, characterized by, The specific dimension is wherein R represents the number of feature maps, C represents the channel number of the feature map, H represents the height of the feature map, and W represents the width of the feature map, represents the number of unfolded local regions, is a kernel size, is an inflation coefficient.
3. The camouflage object recognition method according to claim 2, characterized by, The method further comprises the following steps: dividing the significant feature into two parts at the middle position of the number of local regions, defining the significant feature before the middle position as a front significant feature, and defining the significant feature after the middle position as a rear significant feature; calculating the secondary significant feature according to the front significant feature, the rear significant feature and a secondary pixel calculation formula; the secondary pixel calculation formula is: wherein, is the front salient feature, is the back salient feature, dim=2 means the position of the center pixel is calculated in a two-dimensional array, represents the pixel, represents the pixel, : is an operator.
4. The camouflage object recognition method of claim 1, wherein, The method further comprises the following steps: judging whether the feature value of the complementary feature is greater than a first threshold value or less than a second threshold value based on the preset rule; if the feature value of the complementary feature is greater than the first threshold value, defining the complementary feature as 1 as a feature value of a modified complementary feature; if the feature value of the complementary feature is less than the second threshold value, defining the complementary feature as 0 as a feature value of a modified complementary feature; multiplying the feature value of the modified complementary feature with an initial mask element by element to obtain the optimized feature map.
5. The camouflage object recognition method of claim 1, wherein, The method further comprises the following steps: obtaining a linear projection weight of the query instance feature, a linear projection weight of the context feature and a linear projection weight of the similar instance feature; calculating a relationship consistency matrix of different regions according to the linear projection weight of the query instance feature, the query instance feature, the linear projection weight of the context feature, the context feature and the linear projection weight of the similar instance feature.
6. The camouflage object recognition method of claim 1, wherein, The method further comprises the following steps: querying a feature tensor using a gather function according to the index matrix and the similar instance feature.
7. The camouflage object recognition method of claim 1, wherein, The method further comprises the following steps: Measuring the relationship consistency between the new query feature and the internal context feature of the camouflage object, obtaining a new relationship consistency matrix; selecting as a query index matrix a feature having the highest correlation degree with the new query feature in the new relationship consistency 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; Obtaining a complete instance feature based on the first feature, the second feature and the new query feature.
8. A method system for camouflage object recognition, characterized in that, Comprise: A conversion module for converting an image into a feature map, the image containing a camouflage object to be identified; A padding module for padding the feature map to generate a significant feature of a specific dimension; A first calculation module for calculating a secondary significant feature based on the significant feature; A second calculation module for calculating a complementary feature according to the secondary significant feature and the significant feature; An external measurement module for measuring the external reliability of the complementary feature to obtain a new query feature; An internal measurement module for measuring the internal reliability of the new query feature to obtain a complete instance feature; An optimization module for optimizing the complete instance feature based on a loss function to obtain an optimized segmentation feature, the optimized segmentation feature being a target object identified from the camouflage object; The external measurement module specifically comprises: A processing module for processing the complementary feature according to a preset rule to obtain an optimized feature map; A mapping module for dividing the optimized feature map into a plurality of regions and obtaining a query instance feature, a context feature and a similar instance feature for each region through linear mapping; A construction module for constructing a relationship consistency matrix of different region groups based on the query instance feature, the context feature and the similar instance feature; The third calculation module is configured to select the first K features with the highest similarity in the relationship consistency matrix as an index matrix. l The third calculation module is configured to select the first K features with the highest similarity in the relationship consistency matrix as an index matrix. A query module for querying a feature tensor from the similar instance feature according to the index matrix; An update module for updating 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 capable of running on the processor, and when the processor loads and executes the computer program, the camouflage object identification method of any one of claims 1 to 7 is adopted.
10. A computer-readable storage medium having stored therein a computer program, characterized in that, The computer program is loaded and executed by the processor, and the camouflage object identification method of 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