A mirror surface detection method based on dual-domain perception and progressive refinement
By employing a mirror detection method based on dual-domain perception and progressive refinement, and utilizing a pyramid visual converter, a frequency interaction alignment module, and a difference fusion module for multi-level feature perception and separation, the problems of reflection misalignment, scale variation, and occlusion in mirror detection are solved, achieving a high-efficiency improvement in mirror detection performance.
Patent Information
- Application Number
- CN202410883423.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-03
- Publication Date
- 2026-11-24
- Estimated Expiration
- 2044-07-03
AI Technical Summary
Existing mirror detection methods need to be improved in terms of performance. The parameters and floating-point calculations are large, and the reflection misalignment, large scale variation and irregular shape of the mirror area make detection difficult.
A mirror detection method based on dual-domain perception and progressive refinement is adopted. Multi-scale feature maps are extracted through a pyramid visual converter. Combined with a Laplacian pyramid and frequency interaction alignment module, a difference fusion module for multi-level feature perception and separation, the association between mirror and entity is established to improve detection accuracy.
On four datasets, it outperforms existing methods by an average of 3%, with only one-fifth of the parameters and floating-point computations required, demonstrating good generalization ability.
Smart Images

Figure CN118887510B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the technical field of mirror detection in image detection, and more specifically relates to a mirror detection method based on dual-domain perception and gradual refinement. BACKGROUND
[0002] The reflection characteristics of mirrors can seriously affect other tasks, such as segmentation, image restoration, depth estimation, and visual language navigation. Therefore, it is crucial to detect mirrors, determine the imaging and entities in the image, and correctly identify and segment the mirror region for downstream tasks. The task of mirror detection is to find the mirror region in an image / video and segment it out to avoid mistakenly identifying reflected objects.
[0003] As shown in Figure 1 , mirror detection mainly faces three problems:
[0004] 1) Reflection misorientation
[0005] As shown in Figure 1 Example 1, the reflection makes the physical characteristics of objects inside and outside the mirror the same, causing the model to easily confuse imaging and entities. How to establish the association between the two regions is the core of many methods. For example, SATNet utilizes the symmetry property of mirrors, see T. Huang, B. Dong, J. Lin, X. Liu, R. W. Lau, and W. Zuo, "Symmetry aware transformer-based mirror detection," in Proceedings of the AAAI Conference on Artificial Intelligence, 2023, pp. 935-943.
[0006] 2) Large scale variation
[0007] As shown in Figure 1In Examples 2-4, the mirror region varies greatly, ranging from nearly the entire image to occupying less than 30×30 pixels, representing only a small target, making it difficult to locate the corresponding entity. Utilizing additional cues for guidance may be a solution. For example, Mei et al. constructed a new RGBD mirror dataset and proposed PDNet to guide mirror detection by fusing depth information; see H. Mei, B. Dong, W. Dong, P. Peers, X. Yang, Q. Zhang, and X. Wei, “Depth-aware mirror segmentation,” in Proceedings of the IEEE / CVFConference on Computer Vision and Pattern Recognition, 2021, pp. 3044–3053.
[0008] 3) Occlusion and irregular shapes
[0009] like Figure 1 Example 5: The general shapes of mirrors are circles and rectangles. However, camera angles and object occlusion can cause mirrored regions to have various shapes and unclear boundaries. To address this issue, HetNet utilizes edge generation as an auxiliary task to better handle irregular mirrored regions; see R. He, J. Lin, and RWLau, “Efficient mirror detection via multilevel heterogeneous learning,” in Proceedings of the AAAI Conference on Artificial Intelligence, 2023, pp. 790–798.
[0010] Existing mirror inspection methods can be broadly classified into three categories:
[0011] The first type aims to achieve more accurate detection performance. Yang et al. proposed the first MD method, called MirrorNet, which explores the correlation between features inside and outside the mirror. See X. Yang, H. Mei, K. Xu, X. Wei, B. Yin, and R.W. Lau, “Where is my mirror?” in Proceedings of the IEEE / CVF International Conference on Computer Vision, 2019, pp. 8809–8818. Lin et al. introduced PMDNet, which compares mirror features with the context and fuses edge information. See J. Lin, G. Wang, and R.W. Lau, “Progressive mirror detection,” in Proceedings of the IEEE / CVF Conference on Computer Vision and Pattern Recognition, 2020, pp. 3697–3705. Guan et al. constructed semantic associations between objects based on graph representation. See H.Guan, J.Lin, and RWLau, “Learning semantic associations for mirror detection,” in Proceedings of the IEEE / CVF Conference on Computer Vision and Pattern Recognition, 2022, pp.5941–5950. Huang et al. [7] constructed a Transformer-based two-stream network to explore the symmetry properties of mirrors. See T.Huang, B.Dong, J.Lin, X.Liu, RWLau, and W.Zuo, “Symmetry aware transformer-based mirror detection,” in Proceedings of the AAAI Conference on Artificial Intelligence, 2023, pp.935–943.
[0012] The second type of method involves integrating prior information, such as depth information. Mei et al. proposed PDNet, which uses the difference in depth information between mirrors and other objects to guide detection. However, this inevitably introduces noise, see H. Mei, B. Dong, W. Dong, P. Peers, X. Yang, Q. Zhang, and X. Wei, “Depth-aware mirrorsegmentation,” in Proceedings of the IEEE / CVF Conference on Computer Vision and Pattern Recognition, 2021, pp. 3044–3053.
[0013] The third type of approach focuses on building lightweight detection models. He et al. proposed HetNet, which explores low-level and high-level features in a heterogeneous manner. See R. He, J. Lin, and RWLau, “Efficient mirror detection via multilevel heterogeneous learning,” in Proceedings of the AAAI Conference on Artificial Intelligence, 2023, pp. 790–798.
[0014] However, the performance of existing mirror detection methods still needs improvement, and the amount of parameters and floating-point calculations also needs to be reduced.
[0015] In addition, related detection methods include salient / camouflaged object detection. SOD (Satisfactory Object Detection) is a rapidly developing field aimed at discovering salient objects in images. Xie et al. proposed a single-stage detection method that uses a combination of convolutional neural networks (CNNs) and Transformers to process high-resolution images; see C. Xie, C. Xia, M. Ma, Z. Zhao, X. Chen, and J. Li, “Pyramid grafting network for one-stage high-resolution saliency detection,” in Proceedings of the IEEE / CVF Conference on Computer Vision and Pattern Recognition, 2022, pp. 11717–11726. Li et al. introduced ICNet through information conversion for RGB-D SOD; see G. Li, Z. Liu, and H. Ling, “Icnet: Informationconversion network for RGB-D based salient object detection,” IEEE Transactions on Image Processing, pp. 4873–4884, 2020. COD (Camouflaged Object Detection) can be considered the inverse task of SOD, aiming to identify camouflaged (non-salient) objects. Fan et al. proposed SINet, which decomposes COD into two stages: search and recognition. See D.-P. Fan, G.-P. Ji, G. Sun, M.-M. Cheng, J. Shen, and L. Shao, “Camouflaged object detection,” in Proceedings of the IEEE / CVF conference on computer vision and pattern recognition, 2020, pp. 2777–2787.Li et al. proposed PENet to progressively enhance feature representations; see X.Li, J.Yang, S.Li, J.Lei, J.Zhang, and D.Chen, “Locate, refine and restore: a progressive enhancement network for camouflaged object detection,” in Proceedings of the International Joint Conference on Artificial Intelligence, 2023, pp. 1116–1124. However, the SOD / COD method does not establish a correlation between the entity and the image, making it susceptible to mirror interference and therefore unsuitable for direct application to mirror detection tasks. Summary of the Invention
[0016] The purpose of this invention is to overcome the shortcomings of the prior art and provide a mirror detection method based on dual-domain perception and progressive refinement to improve mirror detection performance while reducing parameter and floating-point computation.
[0017] To achieve the above-mentioned objectives, the present invention provides a mirror detection method based on dual-domain sensing and progressive refinement, characterized by comprising the following steps:
[0018] (1) Extracting multi-scale feature maps X i
[0019] Using a Pyramid Vision Transformer (PVT) network as the backbone network, for input images I∈R 3×H×W Extracting long-range dependency feature maps at multiple scales is equivalent to generating multi-scale feature maps. Among them, C i H and W represent the number of channels, height, and width, respectively;
[0020] (2) Obtain the high-frequency feature map F f
[0021] Simultaneously, the Laplacian pyramid is used to process the input image I∈R 3×H×W Decompose to obtain high-frequency graphs High frequency map Scale adjustment to R 3×H×W Then, select channel F to view the high-frequency graph. j The images are spliced together to form a high-frequency image F∈R. 9×H×W Then, use residual channel attention blocks to apply the high-frequency graph F∈R 9 ×H×W Adaptive feature fusion is performed to obtain feature map Fs Finally, a convolutional network is used to process the feature map F. s The dimensions are adjusted to obtain a high-frequency feature map F with the same dimensions as feature map X1. f ;
[0022] (3) Frequency Interaction Alignment
[0023] 3.1) Interaction
[0024] First, 1×1 and 3×3 convolutional layers are used to process the feature map. Local feature encoding is performed, and query Q is generated through dimensionality transformation and normalization. r Key K r Sum V r :
[0025] Q r ,K r V r =Φ(X1) (1)
[0026] Among them, query Q r Key K r Sum N = HW / 16, where Φ represents the operations of local feature encoding, dimension transformation, and normalization to generate queries, keys, and values;
[0027] Similarly, for the high-frequency feature map F f Perform local feature encoding, dimension transformation, and normalization to generate query Q. f Key K f Sum V f ;
[0028] Then, the correlation graph (corr) is calculated from low frequency to high frequency. l2h :
[0029]
[0030] Where τ is a learnable scaling factor, and softmax represents the softmax function;
[0031] Correlation plots are obtained from high frequency to low frequency. h2l :
[0032]
[0033] Among them, the related graph corr l2h ,
[0034] Finally, low-frequency features generated after the interaction:
[0035]
[0036] High-frequency features generated after interaction:
[0037] F I =scorr l2h V f +F f (5)
[0038] 3.2) Alignment
[0039] First, regarding low-frequency characteristics and high-frequency characteristics F I Perform channel compression, then fuse them to obtain a spatial map.
[0040]
[0041] Where Avg represents averaging pixels along the channel dimension, σ represents the sigmoid function, CR represents convolution and ReLU operations, and Contac represents concatenation by channel;
[0042] Then, generate alignment features.
[0043]
[0044] Among them, S 1 S 2 These are the first and second channel maps of the spatial map S, respectively. ⊙ represents element-wise multiplication, and RCAB represents adaptive feature fusion of residual channel attention blocks.
[0045] (4) Multi-level feature perception
[0046] First, regarding alignment features With feature map X2, feature map X2 and feature map X3, feature map X3 and feature map X4, and aligned features With feature map The weights of adjacent feature maps are calculated using channel attention, and then adaptively fused to generate a feature map.
[0047]
[0048] in, For the convolution result of feature map X4, UP indicates upsampling, so that the two added features have the same shape;
[0049] Then, decoupling is performed:
[0050]
[0051] Where AP represents adaptive average pooling, Ψ is a scaling function with coefficients set to 1e-5, and δ represents the GELU activation function.
[0052] Then, Decomposed according to 1:1:2:4 And aggregate sequentially:
[0053] First gathering:
[0054]
[0055] Second aggregation:
[0056]
[0057] Third aggregation:
[0058]
[0059] Among them, DWCon 5×5 This represents a 5×5 depthwise convolution, where Proj indicates that the channels of the feature map are mapped to twice its size.
[0060] Then, enhance generate
[0061]
[0062] Then, by further applying the gating mechanism, a generation is achieved.
[0063]
[0064] Final output for:
[0065]
[0066]
[0067] (5) Separation-based difference fusion
[0068] 5.1) For feature maps Further convolution is performed to obtain the foreground mask image p5, and then the feature map is... Foreground mask image p5 and feature map To achieve differentiation and integration:
[0069] First, convolution and upsampling are performed to obtain the feature map.
[0070]
[0071] Among them, Conv 7×7 This represents a 7×7 convolution, and UP indicates upsampling;
[0072] Then calculate the difference plot:
[0073]
[0074] Where AP represents average pooling and AP represents max pooling. This indicates L2 norm normalization;
[0075] Then the feature map, background mask, and difference map are fused:
[0076]
[0077] Finally, the feature map f4 and the foreground mask image p4 are output:
[0078] f4 = Conv 3×3 (X′ o4 ),p4=Conv 7×7 (f4) (19)
[0079] 5.2) Combine feature map f4, foreground mask image p4, and feature map... To achieve differentiation and integration:
[0080] First, convolution and upsampling are performed to obtain the feature map.
[0081]
[0082] Then calculate the difference plot:
[0083]
[0084] Then the feature map, background mask, and difference map are fused:
[0085]
[0086] Finally, the feature map f3 and the foreground mask image p3 are output:
[0087] f3 = Conv 3×3 (X′ o3 ),p3=Conv 7×7 (f3) (23)
[0088] 5.3) Combine feature map f3, foreground mask image p3, and feature map f3. To achieve differentiation and integration:
[0089] First, convolution and upsampling are performed to obtain the feature map.
[0090]
[0091] Then calculate the difference plot:
[0092]
[0093] Then the feature map, background mask, and difference map are fused:
[0094]
[0095] Finally, the feature map f2 and the foreground mask image p2 are output:
[0096] f2 = Conv 3×3 (X′ o2 ),p2=Conv 7×7 (f2) (27)
[0097] 5.4) Combine feature map f2, foreground mask image p2, and alignment features To achieve differentiation and integration:
[0098] First, convolution and upsampling are performed to obtain the feature map.
[0099]
[0100] Then calculate the difference plot:
[0101]
[0102] Then the feature map, background mask, and difference map are fused:
[0103]
[0104] Finally, output the foreground mask image p1:
[0105] p1 = Conv 7×7 (Conv 3×3 (X′ o1 (31)
[0106] The foreground mask image p1 is the prediction image;
[0107] (6) Training
[0108] Based on steps (1) to (5), a frequency-guided progressive thinning network is constructed. The labeled images in the training dataset are fed into the frequency-guided progressive thinning network and processed according to steps (1) to (5) to obtain the prediction mask. Then, the total loss is calculated with the labeled true prediction map.
[0109]
[0110] in, For weighted binary cross-entropy loss, For weighted IoU loss;
[0111] Based on total losses Train the frequency-guided progressive refinement network until it converges;
[0112] (7) Mirror inspection
[0113] The image to be detected is fed into a frequency-guided progressive thinning network and processed according to steps (1) to (5) to obtain the foreground mask image p1, which is the prediction image, thus completing the mirror detection.
[0114] The objective of this invention is achieved as follows.
[0115] This invention introduces a frequency-guided approach and proposes a dual-domain perceptual progressive refinement network (DPRNet) to mine dual-domain information in a mirror detection method based on dual-domain perception and progressive refinement. Specifically, firstly, the image is decomposed into high-frequency and low-frequency components using a Laplacian pyramid and a visual Transformer. A Frequency Interaction Alignment (FIA) module is designed to integrate frequency features into the initially located mirror region. Then, to handle scale variations, a Multi-Order Feature Awareness (MOFP) module is proposed, adaptively aggregating adjacent features through progressive and gating mechanisms. Finally, a Separation-Based Differential Fusion (SDF) module is proposed to establish the association between entities and the image, and to discover the correct boundaries to mine the complete mirror region. Extensive experiments demonstrate that the proposed DPRNet outperforms existing methods by an average of 3% on four datasets, while its parameter and floating-point computation costs are only about one-fifth of those methods. Furthermore, the proposed DPRNet also achieves satisfactory performance in remote sensing and camouflage scenarios, validating its generalization ability. Attached Figure Description
[0116] Figure 1 These are five example diagrams illustrating the mirror detection task problem;
[0117] Figure 2 This is a general structural diagram of a specific implementation of the mirror detection method based on dual-domain perception and progressive refinement of the present invention;
[0118] Figure 3 This is a flowchart of a specific implementation of the mirror detection method based on dual-domain perception and progressive refinement of the present invention;
[0119] Figure 4 It is a frequency visualization comparison chart of mirrored and non-mirrored regions;
[0120] Figure 5 The diagram shows a comparison between existing detection frameworks and the present invention, where: (i) is a simple framework, (ii) is a layered framework, and (iii) is the contraction architecture of the present invention.
[0121] Figure 6 This is a comparison graph on the PMD dataset showing the DPRNet of this invention with ten state-of-the-art detection methods in terms of weighted F-measure (Fwβ), average E-measure (Em), and parameter usage.
[0122] Figure 7 This is a quantitative comparison plot on the MSD and PMD datasets.
[0123] Figure 8 These are quantitative ablation images, where (a) is the input image, (b) is the baseline model, (c) is the image with the FIA module added, (d) is the image with the FIA module and MOFP module added, (e) is the image with the FIA module and SDF module added, (f) is the present invention, and (g) is the true value. Detailed Implementation
[0124] The specific embodiments of the present invention will now be described with reference to the accompanying drawings to enable those skilled in the art to better understand the invention. It should be particularly noted that in the following description, detailed descriptions of known functions and designs that might obscure the main content of the invention will be omitted here.
[0125] Figure 2 This is a general structural diagram of a specific implementation of the mirror detection method based on dual-domain perception and progressive refinement of the present invention.
[0126] In this embodiment, as Figure 2 As shown, it comprises three key components: Frequency Interaction Alignment (FIA) module, Multi-order Feature Perception (MOFP) module, and Separation-based Difference Fusion (SDF) module. Given an image I∈R... 3×H×W It is then passed to the PyramidVisionTransformer (PVT) network, which captures low-frequency components to obtain multi-scale feature maps. Among them, C iH and W represent the number of channels, height, and width, respectively. Simultaneously, the Laplacian pyramid is used to analyze the input image I∈R. 3×H×W Decomposition yields multiple high-frequency components, i.e., a high-frequency map. Then, adaptive feature fusion is performed using residual channel attention blocks (RCAB) to eliminate frequency representation differences and align common features, generating a high-frequency feature map F adjusted to the same size as feature map X1. f Then, a better frequency representation is obtained using the FIA module. Mirrors have significant scale differences, which may result in images containing only reflections without corresponding entities; therefore, simply establishing a correlation between the image and the entity is insufficient. To address this, we propose a Multi-Level Feature Awareness (MOFP) module to aggregate adjacent features and delve deeper into matching features through channel segmentation, progressive fusion, and gating mechanisms. Then, based on a Separate Difference Fusion (SDF) module, foreground / background masks and difference maps are fused separately to explore the correlation between mirrored and non-mirrored regions, and between the image and the entity, resulting in a prediction map. Finally, the total loss is calculated against the labeled ground truth prediction map. The process is repeated until convergence. Finally, the image to be detected is fed into a frequency-guided progressive thinning network to obtain a predicted image, completing the mirror detection. Due to these careful design steps, this invention can uncover clear mirror boundaries and detect complete mirror regions, thereby improving mirror detection performance.
[0127] Figure 3 This is a flowchart of a specific implementation of the mirror detection method based on dual-domain perception and progressive refinement of the present invention.
[0128] In this embodiment, as Figure 3 As shown, the mirror detection method based on dual-domain sensing and progressive refinement of the present invention includes the following steps:
[0129] Step S1: Extract multi-scale feature maps X i
[0130] Using a Pyramid Vision Transformer (PVT) network as the backbone network, for input images I∈R 3×H×W Extracting long-range dependency feature maps at multiple scales is equivalent to generating multi-scale feature maps. Among them, C i H and W represent the number of channels, height, and width, respectively. In this embodiment, C1 = 64, C2 = 128, C3 = 320, and C4 = 512.
[0131] Step S2: Obtain the high-frequency feature map F f
[0132] Simultaneously, the Laplacian pyramid is used to process the input image I∈R 3×H×W Decompose to obtain high-frequency graphs High frequency map Scale adjustment to R 3×H×W Then, select channel F to view the high-frequency graph. j The images are spliced together to form a high-frequency image F∈R. 9×H×W Then, the Residual Channel Attention Block (RCAB) is used to process the high-frequency graph F∈R. 9×H×W Adaptive feature fusion is performed to obtain feature map F s Finally, a convolutional network is used to process the feature map F. s The dimensions are adjusted to obtain a high-frequency feature map F with the same dimensions as feature map X1. f .
[0133] Step S3: Frequency Interaction Alignment
[0134] High-frequency components of an image represent details such as edges and textures, while low-frequency components represent semantic information. Therefore, mirrored and non-mirrored regions can be separated in the frequency domain. To increase the difference between these two regions, this invention designs a Frequency Interaction Alignment (FIA) module to model better frequency representations. Furthermore, this invention introduces frequency guidance only on the feature map X1 to ensure model efficiency. The FIA module can be divided into two parts: interaction and alignment.
[0135] Step S3.1: Interaction
[0136] First, 1×1 and 3×3 convolutional layers are used to process the feature map. Local feature encoding is performed, and query Q is generated through dimensionality transformation and normalization. r Key K r Sum V r :
[0137] Q r ,K r V r =Φ(X1) (1)
[0138] Among them, query Q r Key K r Sum N = HW / 16, where Φ represents the operations of local feature encoding, dimension transformation, and normalization to generate queries, keys, and values.
[0139] Similarly, for the high-frequency feature map F f Perform local feature encoding, dimension transformation, and normalization to generate query Q. f Key K f Sum Vf .
[0140] Then, the correlation graph (corr) is calculated from low frequency to high frequency. l2h :
[0141]
[0142] Here, τ is a learnable scaling factor, and softmax represents the softmax function.
[0143] Correlation plots are obtained from high frequency to low frequency. h2l :
[0144]
[0145] Among them, the related graph corr l2h ,
[0146] Ordinary self-attention calculates the correlation graph from a spatial perspective. Primarily related to width and height, it requires more computational complexity. In contrast, this invention saves at least three times the resource consumption (memory usage) from a channel perspective, with virtually no impact on performance.
[0147] Finally, low-frequency features generated after the interaction:
[0148]
[0149] High-frequency features generated after interaction:
[0150] F I =scorr l2h V f +F f (5)
[0151] It is important to note that shape adjustment is required for the summation operation.
[0152] Step S3.2: Alignment
[0153] First, regarding low-frequency characteristics and high-frequency characteristics F I Perform channel compression, then fuse them to obtain a spatial map.
[0154]
[0155] Where Avg represents averaging pixels along the channel dimension, σ represents the sigmoid function, CR represents convolution and ReLU operations, and Contac represents concatenation by channel.
[0156] Then, generate alignment features.
[0157]
[0158] Among them, S 1 S 2 These are the first and second channel maps of the spatial map S, respectively. ⊙ represents element-wise multiplication, and RCAB represents adaptive feature fusion using residual channel attention blocks.
[0159] In this embodiment, Figure 4 It provides high-frequency and low-frequency images obtained through the Laplacian pyramid, along with corresponding frequency statistics, as well as the original images and statistics. The frequency distributions in the mirrored and non-mirrored regions are significantly different, especially in the high-frequency range.
[0160] Step S4: Multi-level feature perception
[0161] The size of mirrored regions can vary greatly; for example, a large target may be more than ten times the size of a small target. In such scenarios, there may not be an entity that completely corresponds to the image, or only a partial correspondence, making it difficult to infer the complete mirrored region by establishing correlations between them. Therefore, this invention proposes a Multi-order Feature Perception (MOFP) module that connects adjacent feature maps and then progressively explores the correlations between adjacent features and integrates contextual information.
[0162] First, regarding alignment features With feature map X2, feature map X2 and feature map X3, feature map X3 and feature map X4, and aligned features With feature map The weights of adjacent feature maps are calculated using channel attention, and then adaptively fused to generate feature maps.
[0163]
[0164] in, For the convolution result of feature map X4, UP indicates upsampling, so that the two added features have the same shape;
[0165] Then, decoupling is performed:
[0166]
[0167] Where AP represents adaptive average pooling, Ψ is a scaling function with coefficients set to 1e-5, and δ represents the GELU activation function.
[0168] Then, Decomposed according to 1:1:2:4 And aggregate sequentially:
[0169] First gathering:
[0170]
[0171] Second aggregation:
[0172]
[0173] Third aggregation:
[0174]
[0175]
[0176] Among them, DWCon 5×5 This represents a 5×5 depthwise convolution, where Proj indicates that the channels of the feature map are mapped to twice its size.
[0177] Then, enhance generate
[0178]
[0179] Then, a gating mechanism is further applied to generate...
[0180]
[0181] Final output for:
[0182]
[0183] Step S5: Separation-based differential fusion
[0184] Previous work has primarily focused on the foreground (mirror region), neglecting the fact that people determine object properties by comparing them to the surrounding environment. To establish the connection between the mirror region, the image, and the entity, this invention designs a separation-based difference fusion (SDF) module. Through the SDF module, we can obtain clearer boundaries and exhibit better robustness in handling occlusion, thereby completing the inference of the mirror region. Specifically:
[0185] Step S5.1: For the feature map Further convolution is performed to obtain the foreground mask image p5, and then the feature map is... Foreground mask image p5 and feature map To achieve differentiation and integration:
[0186] First, convolution and upsampling are performed to obtain the feature map.
[0187]
[0188] Among them, Conv 7×7 This represents a 7×7 convolution, and UP indicates upsampling;
[0189] Then calculate the difference plot:
[0190]
[0191] Where AP represents average pooling and AP represents max pooling. This indicates L2 norm normalization;
[0192] Then the feature map, background mask, and difference map are fused:
[0193]
[0194] Finally, the feature map f4 and the foreground mask image p4 are output:
[0195] f4 = Conv 3×3 (X′ o4 ),p4=Conv 7×7 (f4) (19) Step S5.2: Combine feature map f4, foreground mask image p4, and feature map To achieve differentiation and integration:
[0196] First, convolution and upsampling are performed to obtain the feature map.
[0197]
[0198] Then calculate the difference plot:
[0199]
[0200] Then the feature map, background mask, and difference map are fused:
[0201]
[0202] Finally, the feature map f3 and the foreground mask image p3 are output:
[0203] f3 = Conv 3×3 (X′ o3 ),p3=Conv 7×7 (f3) (23)
[0204] Step S5.3: Combine feature map f3, foreground mask image p3, and feature map... To achieve differentiation and integration:
[0205] First, convolution and upsampling are performed to obtain the feature map.
[0206]
[0207] Then calculate the difference plot:
[0208]
[0209] Then the feature map, background mask, and difference map are fused:
[0210]
[0211] Finally, the feature map f2 and the foreground mask image p2 are output:
[0212] f2 = Conv 3×3 (X′ o2 ),p2=Conv 7×7 (f2) (27)
[0213] Step S5.4: Combine feature map f2, foreground mask image p2, and alignment features. To achieve differentiation and integration:
[0214] First, convolution and upsampling are performed to obtain the feature map.
[0215]
[0216] Then calculate the difference plot:
[0217]
[0218] Then the feature map, background mask, and difference map are fused:
[0219]
[0220] Finally, output the foreground mask image p1:
[0221] p1 = Conv 7×7 (Conv 3×3 (X′ o1 (31)
[0222] The foreground mask image p1 is the prediction image.
[0223] Step S6: Training
[0224] Based on steps S1 to S5, a frequency-guided progressive thinning network is constructed. Labeled images from the training dataset are fed into this network and processed according to steps S1 to S5 to obtain a prediction mask. The total loss is then calculated by comparing this mask with the labeled ground truth prediction image.
[0225]
[0226] in, For weighted binary cross-entropy loss, For weighted IoU loss;
[0227] Based on total losses Train the frequency-guided progressive refinement network until it converges;
[0228] Step S7: Mirror Inspection
[0229] The image to be detected is fed into a frequency-guided progressive thinning network and processed according to steps S1 to S5 to obtain the foreground mask image p1, which is the prediction image, thus completing the mirror detection.
[0230] Figure 5 The diagram shows a comparison between existing detection frameworks and the present invention. (i) is a basic architecture represented by MirrorNet, PMD, etc., which passes all features of the encoder to the decoder through the same module. (ii) is a heterogeneous architecture represented by SANet
[13] and HetNet[9], which designs customized modules for low-level and high-level features respectively. (iii) is the shrinking architecture of the present invention, which introduces frequency guidance and aggregates adjacent features.
[0231] There are two types of existing mirror inspection frames:
[0232] 1) Simple framework
[0233] Following the encoding and decoding paradigm of U-Net, the extracted features are processed by the same custom module and then progressively fed into the decoder.
[0234] 2) Layered framework
[0235] Low-level features contain more details, while high-level features have rich semantics. Therefore, modules need to be designed separately and then carefully integrated to obtain better results.
[0236] This invention presents a frequency-guided and feature shrinkage framework. Unlike PDNet, which uses spatial and depth images as multimodal inputs, this invention uses only RGB images as inputs and obtains frequency features through specific transformations as guidance. Furthermore, this invention explores cross-layer associations by aggregating adjacent features to achieve coupling of contextual information without requiring the design of multiple modules.
[0237] Figure 6 This graph compares DPRNet, the invention, with ten state-of-the-art detection methods on the PMD dataset in terms of weighted F-measure (Fwβ), average E-measure (Em), and parameter usage. Larger circles represent higher parameter values. DPRNet achieves best performance on Fwβ and Em with low computational complexity, outperforming the state-of-the-art SOTA, SOD, COD, and MD methods, namely VST, FPNet, and SATNet, demonstrating better performance and lower computational complexity.
[0238] experiment
[0239] A. Dataset
[0240] Experiments were conducted on four datasets. Mirror dataset:
[0241] 1) The MSD dataset mainly focuses on indoor scenes, including 3063 training images and 955 test images.
[0242] 2) The PMD dataset
[10] contains various scenes and multiple objects, including 5096 training images and 571 test images.
[0243] 3) The Mirror-RGBD dataset includes depth images with higher resolution, comprising 2000 training images and 1049 test images.
[0244] Use the following dataset to validate the model's generalization ability:
[0245] Glass dataset: The GSD dataset contains 3285 training images and 813 test images.
[0246] Remote sensing datasets: ORSSD
[33] contains 600 training images and 200 test images. EORSSD is an extended version of it, containing 1400 training images and 600 test images. ORSI4199 contains various complex scenes, such as small objects, and includes 2000 training images and 2199 test images.
[0247] The dummy datasets: CAMO contains 1000 training images and 250 test images. There are 3040 training images and 2026 test images. NC4K
[38] is used only for testing.
[0248] B. Implementation Details
[0249] This experiment implements the model and conducts experiments using PyTorch on an A100 GPU. A PVT network pre-trained on ImageNet is used as the encoder, and some image augmentation methods, such as horizontal flipping, are employed. For all datasets, we use the same training and testing settings. For the mirror, glass, and camouflage datasets, all inputs are scaled to 384×384. For the remote sensing dataset, all inputs are scaled to 352×352. Note that no post-processing (e.g., CRF) is applied. For training, this experiment uses [presumably a specific algorithm or method] as the optimizer, training for 200 epochs with an initial learning rate of 1e-4 and a batch size of 28. For testing, this experiment does not use techniques such as test-time augmentation.
[0250] C. Evaluation Indicators
[0251] This experiment uses six evaluation metrics: S-measure (Sm), mean E-measure (Em), weighted F-measure, adaptive F-measure (Fadpβ), intersection-over-union ratio (IoU), and mean absolute error (MAE). Note that higher values for the first five metrics are better. Additionally, this experiment also uses more intuitive Precision-Recall (PR) and F-measure curves.
[0252] D. Comparison with the SOTA method
[0253] Quantitative comparison. The present invention was compared with the state-of-the-art (SOTA) method on three types of tasks across four datasets to verify the superiority and generalization ability of the present invention, as shown in Tables 1, 2, 3, 4, and 5.
[0254]
[0255] Table 1
[0256] Table 1 presents a quantitative comparison of the five evaluation parameters S, C, G, and M on the MSD and PMD datasets, where S represents SOD, C represents COD, G represents general segmentation, and M represents MD. Best performance is indicated in bold. As shown in Table 1, this experiment selected eight salient object detection methods on the MSD and PMD datasets: CPDNet, R3Net, EGNet, PoolNet, MINet, SETR, LDF, and VST; one salient object detection method, FPNet; one general segmentation model, SAM; and five multi-object detection methods: MirrorNet, PMDNet, HetNet, SATNet, and CSFwinformer. This invention demonstrates superior performance across various detection models, particularly outperforming other methods on the salient object detection method FPNet, proving that the frequency-based DPRNet of this invention better considers the task attributes of multi-object detection.
[0257]
[0258] Table 2
[0259]
[0260] Table 3
[0261] Table 2 presents a quantitative comparison of the four evaluation parameters on the ORSSD, EORSSD, and ORSI4199 datasets, with the best performance indicated in bold. Table 3 presents a quantitative comparison of the four evaluation parameters on the CAMO, COD10K, and NC4K datasets, with the best performance indicated in bold. For the ORSSD, EORSSD, and ORSI4199 datasets, as shown in Table 2, this experiment selected four remote sensing salient target detection methods: ICON, HFANet, ASTT, and GLGCNet. For the CAMO, COD10K, and NC4K datasets, as shown in Table 3, this experiment selected ZoomNet, FEDER, FSPNet, and PopNet. From Tables 2 and 3, we can see that this invention still achieves impressive results and demonstrates good generalization ability.
[0262]
[0263] Table 4
[0264] Table 4 presents a quantitative comparison of the five evaluation parameters on the Mirror-RGBD dataset. As shown in Table 4, for the Mirror-RGBD dataset, this experiment selected seven multimodal salient object detection methods—A2dele, HDFNet, S2MA, DANet, JL-DCF, VST, and BBSTNet—for comparison, along with one multimodal multi-object detection method, PDNet. Although this invention does not use depth information, it still outperforms some multimodal salient object detection methods and approaches the performance of PDNet. Note that DPRNet in this invention is not a multimodal method.
[0265]
[0266] Table 5
[0267] Table 5 presents a quantitative comparison of the three evaluation parameters on the GSD dataset, with the best performance indicated in bold. For the GSD dataset, this experiment selected one salient object detection method, BASNet; one salient object detection method, SINet; and four glass detection methods: TransLab, GDNet, GSDNet, and PGSNet.
[0268]
[0269] Table 6
[0270] Table 6 compares the model efficiency, comparing our invention with four state-of-the-art (MD) models in terms of parameter count and FLOPs. As shown in Table 6, compared with multi-object detection methods such as SATNet, our method has lower model and computational complexity. Note that a larger input size indicates higher FLOPs.
[0271] Qualitative comparison. This experiment selected representative examples from three mirror datasets for visualization and comparison. For example... Figure 7 As shown, the first three rows represent irregular and regular occlusion scenes. Our method can effectively distinguish between entities and images, capturing complete mirror regions. The fourth row represents multi-object scenes; our method can identify all mirror regions and establish clear boundaries. The last three rows illustrate scenes with varying scales. Our method can robustly capture both local and global dependencies.
[0272] E. Ablation Research
[0273] This experiment verified the impact of each module on the MSD and PMD datasets and visualized the results, as shown in Tables 7, 8, 9, and 10. Figure 8 As shown.
[0274]
[0275] Table 7
[0276] Table 7 shows the quantitative ablation comparison on the MSD and PMD datasets, where M1, M2, and M3 represent the FIA module, MOFP module, and SDF module, respectively.
[0277] 1) The effect of the FIA module
[0278] like Figure 8 As shown in (b) and (c), the baseline model can initially locate the position of the mirror region but cannot handle occlusion and has some incorrectly located pixels (top right corner). By adding the FIA module, this invention can distinguish between mirror and non-mirror regions, initially identify occluded entities, lay the foundation for subsequent refinement operations, and eliminate erroneous pixels. Compared with the baseline model, on the MSD dataset, as shown in Table 7, improvements of 0.5%, 0.9%, 1.2%, 1.4%, and 1.6% were achieved for Sm, Em, Fwβ, and IoU metrics, respectively.
[0279] 2) Effects of the MOFP module
[0280] This experiment evaluated the performance of the MOFP module based on the "benchmark model + FIA" model. As shown in Table 7, it improved five metrics by 0.4%, 1.4%, 0.5%, 1.1%, and 1.4% respectively on the MSD dataset. Figure 8 As shown in (d), the occlusion problem is further alleviated after adding the MOFP module, and other mirror areas are not affected. This indicates that the MOFP module can establish the dependency between long-range and short-range features, handle irregular foregrounds, and explore the correlation between adjacent features.
[0281] 3) The effect of the SDF module
[0282] Similar to evaluating the performance of the MOFP module, we conducted further experiments based on the "benchmark model + FIA" model to verify the effectiveness of the SDF module. Figure 8 As shown in (e), the occlusion problem is largely solved by separating the foreground and background using the SDF module and establishing the correlation between the entity and the image. As shown in Table 7, on the MSD dataset, the five metrics were improved by 0.5%, 0.9%, 0.7%, 0.8%, and 1.7%, respectively. However, the mirror area in the upper right corner was affected, so it is necessary to combine it with the MOFP module for processing.
[0283] 4) Combination of the three modules
[0284] Each module has its own function, and only through their combination can we maintain accurate and complete mirror areas in various scenarios, such as occlusion and scale changes. Figure 8As shown in (f), when combined, as shown in Table 7, the performance on the MSD dataset is improved by 1.5%, 3.1%, 2.9%, 3.9%, and 4.9%, respectively, and the detection results are close to the ground truth (GT).
[0285] 5) Different frequency decomposition methods
[0286]
[0287] Table 8
[0288] Table 8 shows the quantitative ablation comparison on the MSD and PMD datasets, where M1, M2, M3 and M4 represent wavelet, Fourier, discrete cosine and Laplace transforms, respectively.
[0289] As shown in Table 8, we used different frequency decomposition methods to obtain the high-frequency components of the image, among which the Laplacian method performed better. By combining features at different scales, we can obtain a better high-frequency representation.
[0290] 6) The effects of the interactive components in the FIA module
[0291]
[0292] Table 9
[0293] Table 9 shows the quantitative ablation comparison on the MSD dataset, where M1 and M2 represent the interaction module and alignment module, respectively. As shown in Table 9, the interaction components achieve information complementarity by exchanging pixel-level information between high-frequency and low-frequency features. However, frequency differences inevitably lead to feature misalignment.
[0294] 7) The effect of the alignment component in the FIA module
[0295] As shown in Table 9, we used the alignment component to reduce the difference between the high-frequency and low-frequency domains, but its improvement was weaker compared to using the interaction component alone. Performance was further improved by combining both components simultaneously. It can be observed that frequency interaction forms the basis for achieving alignment.
[0296] 8) The effect of the difference-aware component in the SDF module
[0297]
[0298] Table 10 shows the quantitative ablation comparison on the MSD dataset, where M1 and M2 are the difference module and the separation module, respectively. As shown in Table 10, we applied a difference-aware component to emphasize selective difference perception through pooling, capturing differences from both low-high and high-low perspectives. Compared to the baseline model, although the overall performance was improved, the Em metric decreased by 0.4%. This may be due to ignoring some unimportant but crucial feature differences (details).
[0299] 9) The effect of separating the sensing components in the SDF module
[0300] As shown in Table 10, we utilize a separation component to achieve foreground-background separation. Building upon this, we further fuse a difference component to capture different feature differences hierarchically and compensate for fine-grained perception. It can be observed that the combination of the two components achieves complementarity, further improving performance.
[0301] Summarize
[0302] This invention rethinks the mirror detection framework and proposes DPRNet. Inspired by the discovery of frequency differences between mirrored and non-mirrored regions, this invention uses a Laplacian pyramid and a visual Transformer to separate and acquire high-frequency and low-frequency features. Then, this invention proposes an FIA module to eliminate frequency differences and initially locate the target region. Simultaneously, a MOFP module is designed to aggregate adjacent features to handle variations in mirror size. Finally, this invention proposes an SDF module to facilitate foreground and background separation and establish a connection between the entity and the image. Extensive experiments demonstrate that the DPRNet of this invention outperforms state-of-the-art methods, achieving an average improvement of 3%, while having only one-fifth the number of parameters and FLOPs.
[0303] Although the illustrative specific embodiments of the present invention have been described above to enable those skilled in the art to understand the invention, it should be understood that the invention is not limited to the scope of the specific embodiments. For those skilled in the art, various changes are obvious as long as they are within the spirit and scope of the invention as defined and determined by the appended claims, and all inventions utilizing the concept of the present invention are protected.
Claims
1. A mirror detection method based on dual-domain sensing and progressive refinement, characterized in that, Includes the following steps: (1) Extracting multi-scale feature maps ; Using a pyramid visual converter network as the backbone network, the input image is processed... Extracting long-range dependency feature maps at multiple scales is equivalent to generating multi-scale feature maps. ,in, H and W represent the number of channels, height, and width, respectively; (2) Obtain high-frequency feature maps ; At the same time, the Laplacian pyramid is used to process the input image. Decompose to obtain high-frequency graphs , high frequency graph Adjust the scale to Then, select the high-frequency graph by channel. splicing to form a high-frequency image Then use residual channel attention blocks to analyze high-frequency images. Adaptive feature fusion is performed to obtain feature maps. Finally, a convolutional network is used to process the feature maps. The dimensions are adjusted to obtain the feature map. High-frequency feature maps of the same size ; (3) Frequency interaction alignment; 3.1) Interaction; First, 1×1 and 3×3 convolutional layers are used to process the feature map. Local feature encoding is performed, and queries are generated through dimensionality transformation and normalization. ,key Sum : ; Among them, query ,key Sum , , This represents operations that generate queries, keys, and values by encoding local features, transforming dimensions, and normalizing them. Similarly, for high-frequency feature maps Perform local feature encoding, dimension transformation, and normalization to generate queries. ,key Sum ; Then, the correlation diagram is calculated from low frequency to high frequency. : ; in, It is a learnable scaling factor. express function; Correlation diagrams were obtained from high frequency to low frequency calculations. : ; Among them, related diagrams , ; Finally, low-frequency features generated after the interaction: ; High-frequency features generated after interaction: ; 3.2) Alignment; First, regarding low-frequency characteristics and high frequency characteristics Perform channel compression, then fuse them to obtain a spatial map. : ; in, This indicates averaging the pixels along the channel dimension. This represents the sigmoid function. This represents convolution and ReLU operations. This indicates splicing by channel; Then, generate alignment features. : ; in, , Spatial diagrams The first and second channel plots, This indicates element-wise multiplication. This indicates that the residual channel attention block performs adaptive feature fusion; (4) Multi-level feature perception; First, regarding alignment features With feature map Feature map With feature map Feature map With feature map and alignment features With feature map The weights of adjacent feature maps are calculated using channel attention, and then adaptively fused to generate feature maps. ; ; ; ); in, For feature map The convolution result, This indicates upsampling, which makes the two added features have the same shape; Then, decoupling is performed: ( ); ( ); ( ); ( ); Where AP represents adaptive average pooling, and Ψ is a scaling function with a coefficient set to 1e-5. This represents the GELU activation function; Then, , , , Decomposed according to 1:1:2:4 , , , , And aggregate in sequence: First gathering: ; ; ; ; Second aggregation: ; ; ; ; Third aggregation: ; ; ; ; in, This represents a 5×5 depthwise convolution. This means mapping the channels of the feature map to twice its size; Then, enhance , , , generate , , , : ; ; ; ; Then, a gating mechanism is further applied to generate... , , , : ; ; ; ; Final output , , , for: ; ; ; ; (5) Differential fusion based on separation; 5.1) For feature maps Further convolution is performed to obtain the foreground mask image. Then feature map Foreground mask image and feature maps To achieve differentiation and integration: First, convolution and upsampling are performed to obtain the feature map. : ; in, express convolution, Indicates upsampling; Then calculate the difference plot: ; in, Indicates average pooling. This indicates max pooling. This indicates L2 norm normalization; Then the feature map, background mask, and difference map are fused: ; Finally, the feature map is output. and foreground mask image : ; 5.2) Feature map Foreground mask image and feature maps To achieve differentiation and integration: First, convolution and upsampling are performed to obtain the feature map. : ; Then calculate the difference plot: ; Then the feature map, background mask, and difference map are fused: ; Finally, the feature map is output. and foreground mask image : ; 5.3) Feature map Foreground mask image and feature maps To achieve differentiation and integration: First, convolution and upsampling are performed to obtain the feature map. : ; Then calculate the difference plot: ; Then the feature map, background mask, and difference map are fused: ; Finally, the feature map is output. and foreground mask image : ; 5.4) Feature map Foreground mask image and alignment features To achieve differentiation and integration: First, convolution and upsampling are performed to obtain the feature map. : ; Then calculate the difference plot: ; Then the feature map, background mask, and difference map are fused: ; Finally, output the foreground mask image. : ; Foreground mask image This is the prediction chart; (6) Training; Based on steps (1) to (5), a frequency-guided progressive thinning network is constructed. The labeled images in the training dataset are fed into the frequency-guided progressive thinning network and processed according to steps (1) to (5) to obtain the prediction mask. Then, the total loss is calculated with the labeled real prediction map. : ; in, For weighted binary cross-entropy loss, For weighted IoU loss; Based on total losses Train the frequency-guided progressive refinement network until it converges; (7) Mirror surface inspection; The image to be detected is fed into a frequency-guided progressive thinning network and processed according to steps (1) to (5) to obtain a foreground mask image. This is the predicted image, used to complete the mirror detection.
Citation Information
Patent Citations
Cross-modal depth forgery detection method based on time-frequency domain visual artifact feature adaptive fusion
CN114898438A
Low-illumination image enhancement method based on feature fusion and attention embedding
CN116797488A
