Method for camouflage target detection with scribble annotation based structural integrity enhancement
By combining the pyramid vision Transformer and the orientation context attention module, and utilizing the asymmetric local structure consistency loss function, the problems of blurred boundaries and incomplete structures in weakly supervised camouflage target detection are solved, and efficient camouflage target detection is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- INSTITUTE OF MATERIALS & INTELLIGENT MANUFACTURING JIANGXI ACADEMY OF SCIENCES
- Filing Date
- 2026-02-09
- Publication Date
- 2026-05-19
AI Technical Summary
Existing weakly supervised camouflage target detection methods suffer from blurred target boundaries, structural breaks, and poor integrity under sparse graffiti annotation conditions. Furthermore, they lack the ability to model global context and local structure, resulting in unrobust detection results.
Feature extraction is performed using a pyramid visual Transformer encoder and a directional context attention module. Combined with an asymmetric local structure consistency loss function, supervision signal propagation is carried out through sparse graffiti annotation to enhance boundary consistency and structural integrity. End-to-end optimization training is performed using multiple loss functions.
It significantly improves the segmentation accuracy and boundary clarity of camouflaged targets, enhances the robustness and practicality of the model, and solves the bottleneck problem of camouflaged target detection under weak supervision conditions.
Smart Images

Figure CN121661337B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of camouflage target detection technology, specifically to a camouflage target detection method based on enhanced structural integrity of graffiti annotations. Background Technology
[0002] Camouflage target detection aims to identify and segment target objects that are highly similar to their surroundings in color, texture, and structure. While existing fully supervised detection methods achieve good accuracy, they heavily rely on large amounts of pixel-level annotations, resulting in high annotation costs and limiting their widespread application. To reduce annotation overhead, researchers have proposed a camouflage target detection method based on graffiti annotations to enhance structural integrity. This method only requires annotating sparse line information in the image, significantly reducing annotation difficulty and time costs. In practical applications, camouflage target detection has significant value. In ecological conservation and wildlife monitoring, it can be used to accurately identify endangered animals that blend closely with their environment, improving the efficiency of automated monitoring. In medical image analysis, this technology helps detect lesions or tiny abnormal areas that are very similar to surrounding tissues, thus aiding in early diagnosis. In industrial quality inspection and automated manufacturing, it can be used to detect tiny defects that are highly consistent with the background or material surface. The introduction of weakly supervised methods enables this type of detection technology to be deployed quickly and at a lower cost to various real-world scenarios, showing broad application prospects.
[0003] However, existing weakly supervised methods for detecting camouflaged targets still have significant shortcomings. First, due to the sparse and discontinuous nature of graffiti annotations, the supervision signal is limited, often leading to insufficient learning of the target boundary region by the model, resulting in blurred contours and structural breaks in the segmentation results. Second, some methods rely on multi-stage pseudo-label generation and iterative optimization, which can improve the annotation scarcity problem to some extent, but the training process is complex and computationally expensive, making it unsuitable for practical applications. Third, current single-stage methods lack the ability to model local and global structures under weak supervision, making it difficult to guarantee the integrity of the target region and the robustness of the detection results, often resulting in false alarms or missed detections. Therefore, how to effectively enhance the structural integrity and boundary accuracy of camouflaged targets under low-cost annotation conditions remains a pressing technical challenge in this field. Summary of the Invention
[0004] To address the shortcomings of existing weakly supervised camouflage target detection methods based on graffiti annotations, such as blurred target boundaries, structural breaks, and poor integrity due to sparse supervision signals, as well as the insufficient ability of traditional methods to model global context and local structure, this invention provides a camouflage target detection method based on graffiti annotations to enhance structural integrity. Its aim is to significantly improve the segmentation accuracy, boundary clarity, and overall structural integrity of camouflage targets under extremely low annotation costs, effectively suppress noise interference, and enhance the robustness and practicality of the model.
[0005] To achieve the above objectives, the present invention provides the following technical solution: a camouflage target detection method based on enhanced structural integrity of graffiti annotations, comprising the following steps:
[0006] Step S1: Acquire an image of the object to be identified and perform preprocessing to obtain a preprocessed image;
[0007] Step S2: Use the pyramid vision Transformer as an encoder to extract features from the preprocessed image and obtain multi-level original feature maps;
[0008] Step S3: Construct a directional context attention module to optimize the original feature map: The directional context attention module generates horizontal and vertical features by modeling context dependencies in the horizontal and vertical directions respectively. The horizontal and vertical features are then processed by a multilayer perceptron and a channel weighting mechanism to generate a spatial attention map with directional dependencies. The original feature map and the spatial attention map are fused together and then residually connected to the original feature map to obtain structurally enhanced prediction features. The optimized prediction features from different layers are aggregated to generate the initial camouflage target segmentation prediction map.
[0009] Step S4: Construct a camouflage target detection model based on the pyramid visual Transformer encoder and the orientation context attention module;
[0010] Step S5: Construct an asymmetric local structure consistency loss function, using the pixels of sparse doodle annotation as confidence supervision signals, and propagate the supervision signals to neighboring pixels through an asymmetric weighting method to enhance boundary consistency and structural integrity;
[0011] Step S6: During the training process, a comprehensive loss function is formed by jointly using a partial binary cross-entropy loss function, a structural consistency loss function, a contrastive loss function, and an asymmetric local structural consistency loss function, and end-to-end optimization training is performed on the camouflage target detection model.
[0012] Step S7: In the inference phase, the test image is input into the trained camouflage target detection model, and the output is a camouflage target detection result with complete structure and clear boundaries.
[0013] Furthermore, step S3 specifically includes:
[0014] Step S31: Perform adaptive average pooling in the horizontal and vertical directions on the original feature map to obtain the horizontal and vertical features. The calculation formula is as follows:
[0015] ;
[0016] in, Indicates horizontal features, This represents adaptive average pooling along the horizontal direction. Represents the original feature maps of different layers. In this context, 'i' represents the original feature map at the 'i' level. Indicates vertical characteristics. This indicates adaptive average pooling along the vertical direction;
[0017] Step S32: Input the horizontal and vertical features into the multilayer perceptron for channel interaction, and then weight them using learnable channel weights to obtain the horizontally weighted features and the vertically weighted features. The calculation formula is as follows:
[0018] ;
[0019] in, This represents the horizontally weighted feature. This represents the learnable channel weighting parameters in the horizontal direction. This indicates element-wise multiplication. This represents a multilayer perceptron. This represents the weighted feature in the vertical direction. Represents the learnable channel weighting parameters in the vertical direction;
[0020] Step S33: Broadcast the horizontally weighted features and the vertically weighted features to the same spatial resolution and add them element-wise. Generate a spatial attention map using the Sigmoid activation function. The calculation formula is as follows:
[0021] ;
[0022] in, Representing a spatial attention map, This represents the Sigmoid activation function;
[0023] Step S34: After element-wise multiplication of the original feature map and the spatial attention map, the result is added to the original feature map via residual connection to obtain the predicted features for structural enhancement. The calculation formula is as follows:
[0024] ;
[0025] in, Indicates predictive features, In this context, 'i' represents the predicted feature at the 'i' level.
[0026] Step S35: Aggregate the optimized prediction features from different layers to generate an initial camouflage target segmentation prediction map. The calculation formula is as follows:
[0027] ;
[0028] in, This represents the initial camouflaged target segmentation prediction map. This indicates a feature aggregation operation.
[0029] Furthermore, step S5 specifically includes:
[0030] Step S51: Taking a certain annotated pixel in the initial camouflage target segmentation prediction image as the center, calculate the prediction difference between the center pixel and its neighboring pixels. The neighborhood range is determined by the radius. The prediction difference is calculated using the following formula:
[0031] ;
[0032] in, This represents the prediction difference between the center pixel i and its neighboring pixel j. This represents the predicted value of the center pixel i. This represents the predicted value of neighboring pixel j;
[0033] Step S52: Construct a Gaussian weighting function based on spatial distance and color difference, and calculate the similarity weights between pixels. The calculation formula is as follows:
[0034] ;
[0035] in, This represents the similarity weight between the center pixel i and its neighboring pixel j. This represents the natural exponential function. These represent the position coordinates of the center pixel i and its neighboring pixel j, respectively. Let i and j represent the color vectors of the center pixel i and its neighboring pixel j, respectively. These represent spatial scale parameters and color scale parameters, respectively.
[0036] Step S53: Calculate the asymmetric propagation factor using the Sigmoid function. The calculation formula is as follows:
[0037] ;
[0038] in, Let represent the asymmetric propagation factor between the center pixel i and its neighboring pixel j, where i and j represent the indices of the center pixel and the neighboring pixel, respectively. This represents the slope adjustment parameter, when... hour, A value close to 1 indicates strong positive propagation. hour, A value close to 0 indicates weak backpropagation;
[0039] Step S54: Combining the similarity weight and the asymmetric propagation factor, the asymmetric local structure consistency loss function is obtained, and the calculation formula is as follows:
[0040] ;
[0041] in, This represents the loss function for asymmetric local structure consistency. It represents the set of neighboring pixels centered at pixel i with radius r.
[0042] Furthermore, step S6 specifically includes:
[0043] Step S61: Calculate the partial binary cross-entropy loss function for the set of pixels with only graffiti annotations in the initial camouflaged target segmentation prediction map. The calculation formula is as follows:
[0044] ;
[0045] in, This represents a partial binary cross-entropy loss function. This represents the set of pixels used for graffiti annotations. This represents the true label of the i-th pixel. Represents a logarithm. This represents the model prediction value for the i-th pixel;
[0046] Step S62: The asymmetric local structure consistency loss function defined in step S5 is used, and the calculation formula is as follows:
[0047] ;
[0048] Step S63: By applying a random geometric transformation to the preprocessed image, the original image and the transformed image are obtained respectively. The structural difference loss between the original image and the transformed image is calculated to obtain the structural consistency loss function, and the calculation formula is as follows:
[0049] ;
[0050] in, Represents the structural consistency loss function. Represents the balance coefficient. Represents the structural similarity index. Represents the original image and the transformed image;
[0051] Step S64: By applying a slight perturbation to the preprocessed image, a perturbed image is obtained. The difference between the prediction results of the preprocessed image and the perturbed image is calculated to obtain the contrastive loss function, calculated as follows:
[0052] ;
[0053] in, This represents the contrastive loss function. This represents the predicted value of the preprocessed image. This represents the predicted value of the image after perturbation.
[0054] Furthermore, the comprehensive loss function in step S6 is as follows:
[0055] Step S65: The comprehensive loss function is a weighted combination of multiple loss functions, and the calculation formula is as follows:
[0056] ;
[0057] in, This represents the final comprehensive loss function.
[0058] Furthermore, in step S1, the collected image of the object to be identified is preprocessed and then input into the target detection model for subsequent processing.
[0059] Furthermore, in step S2, the pyramid vision Transformer encoder includes multiple progressive feature extraction stages and outputs the original feature maps of the multiple progressive feature extraction stages.
[0060] Furthermore, in step S7, the test image is normalized in size during the inference stage, and a segmentation map with complete structure and clear boundaries generated by the S-type activation function is output. The segmentation map with complete structure and clear boundaries is used as the detection result of the camouflaged target with complete structure and clear boundaries.
[0061] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, can execute instructions to perform a camouflage target detection method based on graffiti annotation-enhanced structural integrity.
[0062] Compared with the prior art, the present invention has the following beneficial effects:
[0063] This invention achieves significant results in weakly supervised camouflaged target detection tasks through a uniquely designed directional context attention module and an asymmetric local structure consistency loss function. The directional context attention module effectively models global spatial structure information by adaptively fusing the dependencies between the horizontal and vertical directions, making the target detection map more complete. The asymmetric local structure consistency loss function utilizes confidence-aware directional constraints to propagate the supervision signal of high-confidence pixels to uncertain pixel regions, thereby suppressing noise interference and enhancing boundary learning performance.
[0064] Compared with existing end-to-end doodle annotation-based structural integrity enhancement methods for camouflaged target detection, this invention innovatively solves the problem of poor model learning of camouflaged object structure caused by insufficient doodle annotation supervision, makes up for the limitation of incomplete segmentation of camouflaged targets in existing methods, and significantly improves the ability to model contextual relationships. It not only improves the accuracy and robustness of segmentation, but also achieves a breakthrough in segmentation performance bottlenecks. Attached Figure Description
[0065] Figure 1 This is a flowchart of the method of the present invention. Detailed Implementation
[0066] Referring to the following description and accompanying drawings, some specific embodiments of the present invention are disclosed to illustrate some ways of implementing the principles of the embodiments of the present invention. However, it should be understood that the scope of the embodiments of the present invention is not limited thereto.
[0067] like Figure 1 As shown, the present invention proposes the following technical solution: a camouflage target detection method based on enhanced structural integrity of graffiti annotations, comprising the following steps:
[0068] Step S1: Acquire an image of the object to be identified and perform preprocessing to obtain a preprocessed image;
[0069] Step S2: Use the pyramid vision Transformer as an encoder to extract features from the preprocessed image and obtain multi-level original feature maps;
[0070] Step S3: Construct a directional context attention module to optimize the original feature map: The directional context attention module generates horizontal and vertical features by modeling context dependencies in the horizontal and vertical directions respectively. The horizontal and vertical features are then processed by a multilayer perceptron and a channel weighting mechanism to generate a spatial attention map with directional dependencies. The original feature map and the spatial attention map are fused together and then residually connected to the original feature map to obtain structurally enhanced prediction features. The optimized prediction features from different layers are aggregated to generate the initial camouflage target segmentation prediction map.
[0071] Step S4: Construct a camouflage target detection model based on the pyramid visual Transformer encoder and the orientation context attention module;
[0072] Step S5: Construct an asymmetric local structure consistency loss function, using the pixels of sparse doodle annotation as confidence supervision signals, and propagate the supervision signals to neighboring pixels through an asymmetric weighting method to enhance boundary consistency and structural integrity;
[0073] Step S6: During the training process, a comprehensive loss function is formed by jointly using a partial binary cross-entropy loss function, a structural consistency loss function, a contrastive loss function, and an asymmetric local structural consistency loss function, and end-to-end optimization training is performed on the camouflage target detection model.
[0074] Step S7: In the inference phase, the test image is input into the trained camouflage target detection model, and the output is a camouflage target detection result with complete structure and clear boundaries.
[0075] Furthermore, step S3 specifically includes:
[0076] Step S31: Perform adaptive average pooling in the horizontal and vertical directions on the original feature map to obtain the horizontal and vertical features. The calculation formula is as follows:
[0077] ;
[0078] in, Indicates horizontal features, This represents adaptive average pooling along the horizontal direction. Represents the original feature maps of different layers. In this context, 'i' represents the original feature map at the 'i' level. Indicates vertical characteristics. This indicates adaptive average pooling along the vertical direction;
[0079] Step S32: Input the horizontal and vertical features into the multilayer perceptron for channel interaction, and then weight them using learnable channel weights to obtain the horizontally weighted features and the vertically weighted features. The calculation formula is as follows:
[0080] ;
[0081] in, This represents the horizontally weighted feature. This represents the learnable channel weighting parameters in the horizontal direction. This indicates element-wise multiplication. This represents a multilayer perceptron. This represents the weighted feature in the vertical direction. Represents the learnable channel weighting parameters in the vertical direction;
[0082] Step S33: Broadcast the horizontally weighted features and the vertically weighted features to the same spatial resolution and add them element-wise. Generate a spatial attention map using the Sigmoid activation function. The calculation formula is as follows:
[0083] ;
[0084] in, Representing a spatial attention map, This represents the Sigmoid activation function;
[0085] Step S34: After element-wise multiplication of the original feature map and the spatial attention map, the result is added to the original feature map via residual connection to obtain the predicted features for structural enhancement. The calculation formula is as follows:
[0086] ;
[0087] in, Indicates predictive features, In this context, 'i' represents the predicted feature at the 'i' level.
[0088] Step S35: Aggregate the optimized prediction features from different layers to generate an initial camouflage target segmentation prediction map. The calculation formula is as follows:
[0089] ;
[0090] in, This represents the initial camouflaged target segmentation prediction map. This indicates a feature aggregation operation.
[0091] Furthermore, step S5 specifically includes:
[0092] Step S51: Taking a certain annotated pixel in the initial camouflage target segmentation prediction image as the center, calculate the prediction difference between the center pixel and its neighboring pixels. The neighborhood range is determined by the radius. The prediction difference is calculated using the following formula:
[0093] ;
[0094] in, This represents the prediction difference between the center pixel i and its neighboring pixel j. This represents the predicted value of the center pixel i. This represents the predicted value of neighboring pixel j;
[0095] Step S52: Construct a Gaussian weighting function based on spatial distance and color difference, and calculate the similarity weights between pixels. The calculation formula is as follows:
[0096] ;
[0097] in, This represents the similarity weight between the center pixel i and its neighboring pixel j. This represents the natural exponential function. These represent the position coordinates of the center pixel i and its neighboring pixel j, respectively. Let i and j represent the color vectors of the center pixel i and its neighboring pixel j, respectively. These represent spatial scale parameters and color scale parameters, respectively.
[0098] Step S53: Calculate the asymmetric propagation factor using the Sigmoid function. The calculation formula is as follows:
[0099] ;
[0100] in, Let represent the asymmetric propagation factor between the center pixel i and its neighboring pixel j, where i and j represent the indices of the center pixel and the neighboring pixel, respectively. This represents the slope adjustment parameter, when... hour, A value close to 1 indicates strong positive propagation. hour, A value close to 0 indicates weak backpropagation;
[0101] Step S54: Combining the similarity weight and the asymmetric propagation factor, the asymmetric local structure consistency loss function is obtained, and the calculation formula is as follows:
[0102] ;
[0103] in, This represents the loss function for asymmetric local structure consistency. It represents the set of neighboring pixels centered at pixel i with radius r.
[0104] Furthermore, step S6 specifically includes:
[0105] Step S61: Calculate the partial binary cross-entropy loss function for the set of pixels with only graffiti annotations in the initial camouflaged target segmentation prediction map. The calculation formula is as follows:
[0106] ;
[0107] in, This represents a partial binary cross-entropy loss function. This represents the set of pixels used for graffiti annotations. This represents the true label of the i-th pixel. Represents a logarithm. This represents the model prediction value for the i-th pixel;
[0108] Step S62: The asymmetric local structure consistency loss function defined in step S5 is used, and the calculation formula is as follows:
[0109] ;
[0110] Step S63: By applying a random geometric transformation to the preprocessed image, the original image and the transformed image are obtained respectively. The structural difference loss between the original image and the transformed image is calculated to obtain the structural consistency loss function, and the calculation formula is as follows:
[0111] ;
[0112] in, Represents the structural consistency loss function. This represents the balance coefficient, typically taken as 0.85. Represents the structural similarity index. Represents the original image and the transformed image;
[0113] Step S64: By applying a slight perturbation to the preprocessed image, a perturbed image is obtained. The difference between the prediction results of the preprocessed image and the perturbed image is calculated to obtain the contrastive loss function, calculated as follows:
[0114] ;
[0115] in, This represents the contrastive loss function. This represents the predicted value of the preprocessed image. This represents the predicted value of the image after perturbation.
[0116] Furthermore, the comprehensive loss function in step S6 is as follows:
[0117] Step S65: The comprehensive loss function is a weighted combination of multiple loss functions, and the calculation formula is as follows:
[0118] ;
[0119] in, This represents the comprehensive loss function; each loss term jointly constrains the model during training to ensure that the segmentation results are clear in boundary and complete in structure under weak supervision.
[0120] Furthermore, in step S1, the collected image of the object to be identified is preprocessed and then input into the target detection model for subsequent processing.
[0121] Furthermore, in step S2, the pyramid vision Transformer encoder includes multiple progressive feature extraction stages and outputs the original feature maps of the multiple progressive feature extraction stages.
[0122] Furthermore, in step S7, the test image is normalized in size during the inference stage, and a segmentation map with complete structure and clear boundaries generated by the S-type activation function is output. The segmentation map with complete structure and clear boundaries is used as the detection result of the camouflaged target with complete structure and clear boundaries.
[0123] A computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, can execute instructions to perform a camouflage target detection method based on graffiti annotation-enhanced structural integrity.
[0124] Example: The method of the present invention and other methods are compared and evaluated on three publicly available benchmark datasets for camouflaged target detection: CAMO, COD10K and NC4K. Tables 1, 2 and 3 show the segmentation results of the method of the present invention on the three publicly available benchmark datasets for camouflaged target detection: CAMO, COD10K and NC4K, respectively. The evaluation metrics include the segmentation accuracy (Seg.Acc) of the mean absolute error (MAE), structure metric (Sm), enhancement matching metric (Em) and weighted F-metric (Fw).
[0125] Experimental results show that the segmentation accuracies of the method of the present invention on the CAMO benchmark dataset for camouflaged target detection are 0.06, 0.837, 0.908, and 0.77, respectively; on the COD10K benchmark dataset for camouflaged target detection, the segmentation accuracies are 0.033, 0.817, 0.89, and 0.698, respectively; and on the NC4K benchmark dataset for camouflaged target detection, the segmentation accuracies are 0.044, 0.844, 0.910, and 0.771, respectively. This demonstrates that the method of the present invention performs particularly well in terms of segmentation accuracy, fully verifying the effectiveness of the present invention in weakly supervised target detection tasks.
[0126] Experimental results show that the method of this invention outperforms other advanced weakly supervised or fully supervised comparative methods on three publicly available benchmark datasets for camouflaged target detection, CAMO, COD10K, and NC4K, as well as on major evaluation metrics. In particular, it significantly improves the structural metrics and enhanced matching metrics that measure boundary clarity. This fully demonstrates that the directional context attention module and asymmetric local structural consistency loss function proposed in this invention can effectively solve the problems of structural incompleteness and boundary ambiguity in camouflaged target segmentation under weak supervision.
[0127] Table 1. Performance comparison of the proposed method and other methods on the CAMO dataset.
[0128]
[0129] Table 2. Performance comparison of the proposed method and other methods on the COD10K dataset.
[0130]
[0131] Table 3. Performance comparison of the proposed method and other methods on the NC4K dataset.
[0132]
[0133] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.
Claims
1. A camouflage target detection method based on enhanced structural integrity of graffiti annotations, characterized in that, Includes the following steps: Step S1: Acquire an image of the object to be identified and perform preprocessing to obtain a preprocessed image; Step S2: Use the pyramid vision Transformer as an encoder to extract features from the preprocessed image and obtain multi-level original feature maps; Step S3: Construct a directional context attention module to optimize the original feature map: The directional context attention module generates horizontal and vertical features by modeling context dependencies in the horizontal and vertical directions respectively. The horizontal and vertical features are then processed by a multilayer perceptron and a channel weighting mechanism to generate a spatial attention map with directional dependencies. The original feature map and the spatial attention map are fused together and then residually connected to the original feature map to obtain structurally enhanced prediction features. The optimized prediction features from different layers are aggregated to generate the initial camouflage target segmentation prediction map. Step S4: Construct a camouflage target detection model based on the pyramid visual Transformer encoder and the orientation context attention module; Step S5: Construct an asymmetric local structure consistency loss function, using pixels from sparse doodle annotations as confidence monitoring signals. The monitoring signals are propagated to neighboring pixels using an asymmetric weighting method to enhance boundary consistency and structural integrity. The asymmetric propagation factor is calculated using the Sigmoid function, with the following formula: ; in, Let represent the asymmetric propagation factor between the center pixel i and its neighboring pixel j, where i and j represent the indices of the center pixel and the neighboring pixel, respectively. This represents the Sigmoid function. This indicates the slope adjustment parameter. This represents the predicted value of the center pixel i. This represents the predicted value of neighboring pixel j; A Gaussian weighting function is constructed based on spatial distance and color difference. The similarity weights between pixels are calculated. The similarity weights and the asymmetric propagation factor are combined to obtain the asymmetric local structure consistency loss function. Step S6: During the training process, a comprehensive loss function is formed by jointly using a partial binary cross-entropy loss function, a structural consistency loss function, a contrastive loss function, and an asymmetric local structural consistency loss function, and end-to-end optimization training is performed on the camouflage target detection model. Step S7: In the inference phase, the test image is input into the trained camouflage target detection model, and the output is a camouflage target detection result with complete structure and clear boundaries.
2. The camouflage target detection method based on graffiti annotation-enhanced structural integrity as described in claim 1, characterized in that: Step S3 is as follows: Step S31: Perform adaptive average pooling in the horizontal and vertical directions on the original feature map to obtain horizontal and vertical features respectively. Step S32: Input the horizontal and vertical features into the multilayer perceptron for channel interaction, and then weight them using learnable channel weights to obtain horizontal weighted features and vertical weighted features. Step S33: Broadcast the horizontally weighted features and the vertically weighted features to the same spatial resolution and add them element by element. Generate a spatial attention map using the Sigmoid activation function. Step S34: After multiplying the original feature map element-wise with the spatial attention map, add it to the original feature map through residual connection to obtain the predicted features of structure enhancement. Step S35: Aggregate the optimized prediction features from different layers to generate an initial camouflage target segmentation prediction map.
3. The camouflage target detection method based on graffiti annotation-enhanced structural integrity as described in claim 2, characterized in that: In step S5, Let a certain annotated pixel in the initial camouflaged target segmentation prediction map be the center. Calculate the prediction difference between the center pixel and its neighboring pixels. The neighborhood range is determined by the radius. The formula for calculating the asymmetric local structure consistency loss function is as follows: ; in, This represents the loss function for asymmetric local structure consistency. Let represent the set of neighboring pixels centered at pixel i with radius r. This represents the similarity weight between the center pixel i and its neighboring pixel j. This represents the prediction difference between the center pixel i and its neighboring pixel j.
4. The camouflage target detection method based on graffiti annotation-enhanced structural integrity as described in claim 3, characterized in that: Step S6 is as follows: Step S61: Calculate the partial binary cross-entropy loss function for the set of pixels with only graffiti annotations in the initial camouflage target segmentation prediction map. Step S62: Use the asymmetric local structure consistency loss function defined in step S5; Step S63: By applying a random geometric transformation to the preprocessed image, the original image and the transformed image are obtained respectively, and the structural difference loss between the original image and the transformed image is calculated to obtain the structural consistency loss function; Step S64: By applying a slight perturbation to the preprocessed image, a perturbed image is obtained, and the difference between the prediction results of the preprocessed image and the perturbed image is calculated to obtain the contrast loss function.
5. The camouflage target detection method based on graffiti annotation-enhanced structural integrity as described in claim 4, characterized in that: The comprehensive loss function in step S6 is as follows: Step S65: The comprehensive loss function is a weighted combination of multiple loss functions, and the calculation formula is as follows: ; in, Represents the comprehensive loss function. This represents a partial binary cross-entropy loss function. Represents the structural consistency loss function. This represents the contrastive loss function.
6. The camouflage target detection method based on graffiti annotation-enhanced structural integrity as described in claim 5, characterized in that: In step S1, the collected image of the object to be identified is preprocessed and then input into the target detection model for further processing.
7. The camouflage target detection method based on graffiti annotation-enhanced structural integrity as described in claim 6, characterized in that: In step S2, the pyramid vision Transformer encoder includes multiple progressive feature extraction stages and outputs the original feature maps of the multiple progressive feature extraction stages.
8. The camouflage target detection method based on graffiti annotation-enhanced structural integrity as described in claim 7, characterized in that: In step S7, the test image is normalized in size during the inference phase, and a segmentation map with complete structure and clear boundaries generated by the S-type activation function is output. The segmentation map with complete structure and clear boundaries is used as the detection result of the camouflaged target with complete structure and clear boundaries.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method as described in any one of claims 1 to 8.