Fusion frequency-aware bad weather recovery and target detection method
By using the Frequency Aware Parallel Framework (FARD) and the Similarity Recovery Decoder (SRD), the frequency domain information is utilized to optimize features during the training phase, which solves the conflict between the recovery module and the detection module in target detection under severe weather conditions, and achieves efficient robustness and accuracy improvement.
Patent Information
- Application Number
- CN202611387222.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-08
- Publication Date
- 2026-11-27
AI Technical Summary
In target detection under adverse weather conditions, existing technologies employ a series or two-stage fine-tuning framework between the recovery module and the detection module, which does not fully utilize frequency domain information. This results in residual degradation interference or loss of key structural information in the recovered image, and the recovery process increases inference computation overhead.
The Frequency Aware Parallel Framework (FARD) is adopted, which includes parallel recovery and detection branches. The Similarity Recovery Decoder (SRD) is enabled only during the training phase. Features are optimized through low-frequency recovery loss and high-frequency structure reconstruction loss. The recovery branch is completely removed during the inference phase after the training phase to avoid computational overhead.
It effectively improves the model's robustness under severe weather conditions, avoids artifact propagation and computational overhead, maintains the spatial position and shape information of the target, and improves detection accuracy.
Smart Images

Figure CN123181808A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of target detection technology, and in particular to a method for recovery and target detection under adverse weather conditions that integrates frequency sensing. Background Technology
[0002] Image restoration and target detection techniques under adverse weather conditions refer to methods such as image restoration, enhancement, or feature reconstruction to address image quality degradation and feature blurring caused by severe weather conditions like rain, snow, fog, and haze. These techniques aim to suppress weather-related degradation interference and improve the robustness and accuracy of target detection algorithms in adverse scenarios. In the field of image processing, frequency domain analysis can separate the structural and detailed information of an image, and the appropriate use of frequency domain priors can help achieve stronger robustness under degraded conditions.
[0003] Chinese invention patent CN116343144A, entitled "A Real-Time Object Detection Method Integrating Visual Perception and Adaptive Dehazing," discloses a method that combines image dehazing and object detection. This method first trains a dehazing module on the input image and ground truth labels. Then, it freezes the trained dehazing module, pre-trains the detection module on an object detection dataset, and fine-tunes the detection module on a foggy dataset in conjunction with the dehazing module. This scheme jointly trains the dehazing and detection modules in a cascaded manner, aiming to reduce the impact of weather degradation on detection.
[0004] While existing technologies have achieved some success in target detection during severe weather, the recovery and detection modules employ a serial or two-stage fine-tuning framework. The recovery process focuses on image reconstruction in the pixel space, failing to utilize frequency domain information to separate weather degradation features from target structural features. This results in the recovered image still retaining degradation interference or losing key structural information. Furthermore, the recovery module still needs to perform forward computation during the inference phase, introducing additional computational overhead. Therefore, how to fully utilize prior information in the frequency domain to enhance the robustness of the detection model to severe weather without increasing the inference burden is a pressing issue that needs to be addressed. Summary of the Invention
[0005] The technical problem to be solved by the present invention is to address the shortcomings of the prior art by providing a method for recovery and target detection under severe weather conditions that integrates frequency awareness. This method can highly align the target of the recovery task with the discriminative features required for the detection task, avoid conflicts in joint tasks and performance loss caused by target inconsistency, prevent the transfer of recovery artifacts to the detection module, and avoid additional computational overhead during the inference process. It can effectively improve the robustness of the model under severe weather conditions and better preserve the spatial position and shape information of the target.
[0006] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is as follows: On one hand, this invention provides a frequency-aware recovery and target detection method under severe weather conditions, constructing a FARD frequency-aware parallel framework. This framework includes parallel recovery and detection branches, with the recovery branch containing a similarity recovery decoder (SRD) that is enabled only during the training phase and completely removed during the inference phase. Specifically, the method includes the following steps: S1: Model training phase; Step 1.1: Convert the degraded image I under severe weather conditions degraded The input recovery branch, after having its basic features extracted by the recovery encoder, is fed into the similarity recovery decoder SRD. The similarity recovery decoder SRD incorporates a similarity-aware module SMP. The SMP uses multiple receptive field convolutions to extract multi-scale features and combines them with cosine similarity to generate similarity weights. Based on these weights, it optimizes and outputs multi-scale invariant features, which are then upsampled through pixel shuffling to output the recovered image. ; Step 1.2: Construct the frequency-aware loss, including the low-frequency recovery loss L. LF With high-frequency structure reconstruction loss L HF The combination recovers the loss. : (8); in, and These are manually set hyperparameters used to balance the weighting of low-frequency and high-frequency losses. Step 1.3: Convert the degraded image I under severe weather conditions degraded Input detection branch, the backbone network of the detection branch fuses the recovered features of the SRD output. After feature enhancement is completed, the detection head outputs the target detection prediction result, and the corresponding detection loss is calculated based on the detector type. ; Step 1.4: Construct the overall loss function: (11); in, The balance coefficient for detecting loss; The backpropagation algorithm is used to synchronously update all trainable parameters of the recovery branch and the detection branch to complete the model convergence training. S2: Model inference stage; Completely remove the recovery branch and SRD module from the FARD framework, retaining only the trained detection branch; degraded images The pre-trained detection branch backbone network is directly input, and the backbone network completes the encoding based on the frequency domain anti-interference features learned during the training phase. The detection head outputs the target detection results under adverse weather conditions.
[0007] Furthermore, the feature processing steps of the similarity-aware module SMP include: For the input basic features f in The receptive field size was respectively used. , , convolutional layers , , Extracting multi-scale features , , ; Calculate output features and The cosine similarity between them is used to obtain the similarity weight f, as shown in the following formula: (1); The similarity weight f is multiplied element-wise with the feature Fr, and the output is the SMP-optimized feature f. out : (2).
[0008] Furthermore, the low-frequency recovery loss L LF The calculation methods include: For the restored image I restored Clean and clear image I clear Performing a Fast Fourier Transform (FFT) yields the spectrum. , Perform a zero-frequency center shift on the spectrum; Constructing a low-frequency mask As shown in the following formula: (4); With the spectrum center The low-frequency region is defined by the cutoff frequency radius D0; The translated spectrum and the low-frequency mask After element-wise multiplication, inverse FFT translation and inverse FFT are performed to obtain the restored image after low-frequency filtering. and clean images ; Low-frequency recovery loss is calculated using the L1 norm: (5).
[0009] Furthermore, the high-frequency structure reconstruction loss L HF The calculation methods include: Constructing a high-pass mask based on the spectrum after FFT transformation Extracting high-frequency edge texture components from the image: (6); The high-frequency filtered and restored image is obtained after high-pass mask filtering and inverse Fourier transform. and degraded images ; The high-frequency reconstruction loss is calculated using the L1 norm: (7).
[0010] Furthermore, the detection loss L det Configure single-stage detectors and two-stage detectors separately: When the detector is a single-stage detector, the detection loss L det Including bounding box regression loss Target classification loss and focus loss As shown in the following formula: (9); in, , , The weights of each loss term; When the detector is a two-stage detector, the detection loss L det Including regional recommended losses and bounding box regression loss As shown in the following formula: (10); Weights set to , .
[0011] Furthermore, the SRD adopts a lightweight structural design, internally performing feature upsampling through pixel shuffle, and only outputting multi-scale semantically invariant features for detecting branch feature enhancement, without outputting a complete pixel-level reconstructed image.
[0012] On the other hand, the present invention also provides an electronic device including one or more processors and a memory for storing instructions that, when executed by the one or more processors, cause the one or more processors to perform the fusion frequency-aware recovery and target detection method under adverse weather conditions.
[0013] Thirdly, this application also provides a computer-readable storage medium having executable instructions stored thereon, which, when executed, cause a processor to perform the fused frequency-aware recovery and target detection method under adverse weather conditions.
[0014] The beneficial effects of adopting the above technical solution are as follows: The fusion frequency sensing method for recovery and target detection under severe weather conditions provided by the present invention has the following beneficial effects: (1) This invention designs a frequency-aware parallel framework (FARD), which further introduces frequency domain loss functions (including low-frequency recovery loss and high-frequency structure reconstruction loss) and similarity recovery decoder (SRD) on the basis of parallel architecture. Frequency domain information can effectively enable the backbone network to focus on scale-invariant overall structural features and detailed features such as target edges and textures. At the same time, SRD focuses on reconstructing multi-scale invariant features rather than pixel-level images, so that the target of the recovery task is highly aligned with the discriminative features required by the detection task, avoiding the conflict problem in the joint task. Moreover, SRD only takes effect during the training phase and is completely removed during inference, without increasing additional computational overhead.
[0015] (2) To address the problem in existing joint training methods where the recovery task pursues pixel-level reconstruction accuracy while the detection task pursues feature discrimination, resulting in mutual interference between their objective functions, this invention designs a Similarity Recovery Decoder (SRD). This SRD focuses on recovering multi-scale invariant features that are highly semantically correlated with the detection task, rather than directly reconstructing the pixel values of the original image. Since the SRD outputs semantic-level features, which are highly aligned with the discriminative features required by the detection task, it avoids the performance loss caused by the inconsistency of objectives in existing methods.
[0016] (3) To address the issues of artifacts and structural distortion caused by the prior recovery and detection in existing cascaded frameworks, this invention adopts a parallel framework, which prevents the detection branch from directly relying on the image output by the recovery module. Since the recovery branch is only used to guide the network to learn frequency prior enhancements for degradation perception, the detection branch directly performs inference based on the original degradation image and the enhanced features, thus avoiding the transmission of recovery artifacts to the detection module.
[0017] (4) The similarity recovery decoder (SRD) designed in this invention is only designed as an auxiliary module in the training phase and is completely removed during inference. Since the SRD is only used for the backbone network to learn multi-scale invariant features and does not participate in detection calculation, the inference process will not generate additional computational overhead.
[0018] (5) This invention introduces frequency-aware priors, and models low-frequency features (degradation information caused by rain, snow, fog, etc.) and high-frequency features (detail information such as edges and textures) in degraded images through low-frequency recovery loss and high-frequency structure reconstruction loss, respectively. Since weather degradation mainly affects low-frequency information, while target detection depends on high-frequency structure information, this separation of the frequency domains enables the network to learn features that are insensitive to weather interference and sensitive to target structure, thereby improving the robustness of the model under severe weather conditions.
[0019] (6) The low-frequency recovery loss introduced in this invention forces the backbone network to focus on the scale-invariant overall structural information in the image during training. Since low-frequency information has good invariance to changes in target scale, the features learned by the network can better preserve the spatial location and shape information of the target.
[0020] (7) The high-frequency reconstruction loss introduced in this invention can clearly enable the network to reconstruct details such as edges and textures in the image. Since high-frequency details are the key basis for object detection to distinguish categories (people, objects, and markers), this loss function enables the network to retain high-frequency features with high discriminative power even under degradation conditions. Attached Figure Description
[0021] Figure 1 This is a structural diagram of the FARD frame provided in Embodiment 1 of the present invention; Figure 2 This is a flowchart of the fusion frequency sensing recovery detection method provided in Embodiment 1 of the present invention; Figure 3 This is a structural diagram of the similarity perception module provided in Embodiment 1 of the present invention; Figure 4 A flowchart of a similarity-aware decoder provided in Embodiment 1 of the present invention; Figure 5 This is a comparison diagram of the parallel framework provided in Embodiment 1 of the present invention with other frameworks; Figure 6 The comparison results of the fusion frequency sensing recovery detection method provided in Embodiment 1 of the present invention with other methods are shown in the figure. Detailed Implementation
[0022] The specific embodiments of the present invention will be described in further detail below with reference to the accompanying drawings and examples. The following examples are for illustrative purposes only and are not intended to limit the scope of the invention.
[0023] Example 1: A frequency-aware-based method for target recovery and detection in adverse weather conditions is proposed, which constructs a FARD frequency-aware parallel framework, such as... Figure 1As shown, the framework includes a parallel recovery branch and a detection branch. The recovery branch is used to recover a clear image from the degraded image and extract recovery features; the detection branch is used to perform object detection on the degraded image and receives the recovery features provided by the recovery branch to enhance feature encoding capabilities. The recovery branch includes a similarity recovery decoder (SRD) that is enabled only during the training phase and completely removed during the inference phase. The SRD contains a similarity-aware module (SMP) to capture multi-scale invariant feature representations, ensuring structural consistency of the recovered representations. The SRD employs a lightweight design to maintain compatibility with the detection backbone network, avoiding feature misalignment and performance degradation due to excessive parameters. The framework also introduces frequency-aware loss, including low-frequency (LF) recovery loss and high-frequency (HF) structural reconstruction loss, to better align the recovery prior with the object detection task. The detection method in this embodiment is as follows: Figure 2 As shown, the specific method is as follows.
[0024] Step 1: During the model training phase, degraded images The input is the recovery branch. The recovery branch first extracts basic features using the recovery encoder, then feeds these features into the similarity recovery decoder (SRD). The SRD uses a similarity-aware module (SMP) to extract multi-scale invariant features and outputs the recovered image. .
[0025] like Figure 4 As shown, SRD uses pixel shuffle for upsampling to preserve structural information and introduces a similarity-aware module (SMP) to capture scale-invariant features across multiple receptive fields. Figure 3 As shown, the specific operation of SMP is as follows: For input features Using receptive field sizes of , , Convolutional layers (denoted as) , , Extract features to obtain , , Then calculate. and Cosine similarity between them: (1); The obtained similarity weights With basic features Element-wise multiplication yields the output features: (2).
[0026] Frequency sensing loss includes low-frequency (LF) recovery loss. and high frequency (HF) structural reconstruction loss The specific calculation process is as follows: First, the restored image and clean images Perform Fast Fourier Transform (FFT) separately: (3); Then, an FFT translation is performed to center the zero-frequency component in the spectrum. A low-frequency mask is then constructed. : (4); in, The coordinates of the spectrum center The cutoff frequency radius. The shifted spectrum is compared with... Element-wise multiplication, followed by inverse FFT shift and inverse FFT, yields the recovered image after low-frequency filtering. and clean images Low-frequency recovery loss is defined as: (5).
[0027] Similarly, constructing a high-pass mask : (6); Obtain the restored image after high-frequency filtering and degraded images The high-frequency reconstruction loss is defined as: (7).
[0028] The final recovery loss is: (8); in, and This is a hyperparameter used to balance the contributions of low-frequency loss and high-frequency loss.
[0029] Degraded image The input detection branch, whose backbone network simultaneously receives recovery features from the SRD, is also input to the detection branch. Perform feature enhancement (e.g., feature concatenation or addition). The detection head outputs the detection results. Detection loss. Determined based on the baseline detector.
[0030] For single-stage detectors (such as YOLOX and YOLOv7), the detection loss includes bounding box regression loss. Classification loss and focus loss : (9); in , , These represent the weights of each loss term. The focal loss is... By using cross-entropy, the training focus is placed on samples that are difficult to classify.
[0031] In specific implementation, for YOLOX, the settings are as follows: , , For YOLOv7, set , , .
[0032] For a two-stage detector, the detection loss includes region proposal loss. and bounding box regression loss : (10); Weights set to , .
[0033] The overall loss function is defined as: (11); in, To balance the detection loss, the backpropagation algorithm is used to simultaneously update all trainable parameters of both the recovery and detection branches until the network converges.
[0034] Step 2: As Figure 1 and Figure 2 As shown, during the inference phase, the entire recovery branch (including SRD) is removed, retaining only the detection branch. The degraded image... The pre-trained detection backbone network (whose parameters have been enhanced during training by recovering features) is directly input into the detection head, which outputs the final detection result. This design ensures lightweight and high efficiency during inference.
[0035] Figure 5 The method designed for this embodiment is compared with other framework methods. (a) Direct method: directly applying the detection model. (b) Cascaded method: restoring the damaged image before detection. (c) Parallel method: enhancing detection in the image domain using a restoration branch. (d) The method of this embodiment: enhancing detection in the frequency domain using a restoration branch. A direct comparison of the results shows that the method of this embodiment can extract the region of interest in the image more accurately.
[0036] Figure 6The results of the qualitative comparison between the frequency-aware recovery detection method of this embodiment and other methods are shown in the intuitive comparison results. It can be seen that the method of this embodiment can detect the region of the image more accurately, and has a great advantage in detection accuracy compared with other existing methods.
[0037] Example 2: This embodiment proposes an electronic device, including: one or more processors, and a memory, the memory being used to store instructions, which, when executed by the one or more processors, cause the one or more processors to perform the fusion frequency sensing-based recovery and target detection method under adverse weather conditions.
[0038] The electronic device may be a mobile phone, computer, or tablet computer, etc., and includes a memory and a processor. The memory stores a computer program, which, when executed by the processor, implements the fusion frequency sensing method for recovery and target detection in adverse weather conditions as described in the embodiments. It is understood that the electronic device may also include input / output (I / O) interfaces and communication components.
[0039] The processor is used to execute all or part of the steps in the fusion frequency sensing recovery and target detection method under adverse weather conditions as described in the above embodiments. The memory is used to store various types of data, which may include, for example, instructions for any application or method in the electronic device, as well as application-related data.
[0040] The processor can be implemented as an Application Specific Integrated Circuit (ASIC), Digital Signal Processor (DSP), Programmable Logic Device (PLD), Field Programmable Gate Array (FPGA), controller, microcontroller, microprocessor, or other electronic components, and is used to execute the fusion frequency sensing recovery and target detection method under severe weather conditions described in the above embodiments.
[0041] Example 3: This embodiment proposes a computer-readable storage medium that stores executable instructions. When these instructions are executed, if they are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium.
[0042] The computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the fusion frequency sensing recovery and target detection method under severe weather conditions described in the various embodiments of this application.
[0043] The aforementioned storage media include: flash memory, hard disks, multimedia cards, card-type memory (e.g., SD (Secure Digital Memory Card) or DX (Memory Data Register, MDR) memory), random access memory (RAM), static random-access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic storage, disks, optical discs, servers, APP (Application) app stores, and other media capable of storing program verification codes. These media store computer programs, which, when executed by a processor, can implement the various steps of the aforementioned fusion frequency sensing-based recovery and target detection method under adverse weather conditions.
[0044] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope defined by the present invention.
Claims
1. A method for recovery and target detection under severe weather conditions that integrates frequency sensing, characterized in that: A FARD frequency-aware parallel framework is constructed, comprising a parallel recovery branch and a detection branch. The recovery branch includes a similarity recovery decoder (SRD) that is enabled only during the training phase and completely removed during the inference phase. Specifically, the following steps are included: S1: Model training phase; Step 1.1: Transfer the degraded image I degraded The input recovery branch, after having its basic features extracted by the recovery encoder, is fed into the similarity recovery decoder SRD. The similarity recovery decoder SRD incorporates a similarity-aware module SMP. The SMP uses multiple receptive field convolutions to extract multi-scale features and combines them with cosine similarity to generate similarity weights. Based on these weights, it optimizes and outputs multi-scale invariant features, which are then upsampled through pixel shuffling to output the recovered image. ; Step 1.2: Construct the frequency-aware loss, including the low-frequency recovery loss L. LF With high-frequency structure reconstruction loss L HF The combination recovers the loss. : (8); in, and These are manually set hyperparameters used to balance the weighting of low-frequency and high-frequency losses. Step 1.3: Transfer the degraded image I degraded Input detection branch, the backbone network of the detection branch fuses the recovered features of the SRD output. After feature enhancement is completed, the detection head outputs the target detection prediction result, and the corresponding detection loss is calculated based on the detector type. ; Step 1.4: Construct the overall loss function: (11); in, The balance coefficient for detecting loss; The backpropagation algorithm is used to synchronously update all trainable parameters of the recovery branch and the detection branch to complete the model convergence training. S2: Model inference stage; Completely remove the recovery branch and SRD module from the FARD framework, retaining only the trained detection branch; degraded images The pre-trained detection branch backbone network is directly input, and the backbone network completes the encoding based on the frequency domain anti-interference features learned during the training phase. The detection head outputs the target detection results under adverse weather conditions.
2. The method for recovery and target detection under severe weather conditions based on fusion frequency sensing according to claim 1, characterized in that: The feature processing steps of the similarity-aware module SMP include: For the input basic features f in The receptive field size was respectively used. , , convolutional layers , , Extracting multi-scale features , , ; Calculate output features and The cosine similarity between them is used to obtain the similarity weight f, as shown in the following formula: (1); The similarity weight f is multiplied element-wise with the feature Fr to output the SMP-optimized feature f. out : (2)。 3. The method for recovery and target detection under severe weather conditions based on fusion frequency sensing according to claim 1, characterized in that: The low-frequency recovery loss L LF The calculation methods include: For the restored image I restored Clean and clear image I clear Performing a Fast Fourier Transform (FFT) yields the spectrum. , Perform a zero-frequency center shift on the spectrum; Constructing a low-frequency mask As shown in the following formula: (4); With the spectrum center The low-frequency region is defined by the cutoff frequency radius D0; The translated spectrum and the low-frequency mask After element-wise multiplication, inverse FFT translation and inverse FFT are performed to obtain the restored image after low-frequency filtering. and clean images ; Low-frequency recovery loss is calculated using the L1 norm: (5)。 4. The method for recovery and target detection under severe weather conditions based on fusion frequency sensing according to claim 3, characterized in that: The high-frequency structure reconstruction loss L HF The calculation methods include: Constructing a high-pass mask based on the spectrum after FFT transformation Extracting high-frequency edge texture components from the image: (6); The high-frequency filtered and restored image is obtained after high-pass mask filtering and inverse Fourier transform. and degraded images ; The high-frequency reconstruction loss is calculated using the L1 norm: (7)。 5. The method for recovery and target detection under severe weather conditions based on fusion frequency sensing according to claim 1, characterized in that: The detection loss L det Differentiate between single-stage and two-stage detectors and configure them separately: When the detector is a single-stage detector, the detection loss L det Including bounding box regression loss Target classification loss and focus loss As shown in the following formula: (9); in, , , The weights of each loss term; When the detector is a two-stage detector, the detection loss L det Including regional recommended losses and bounding box regression loss As shown in the following formula: (10); Weights set to , .
6. The method for recovery and target detection under severe weather conditions based on fusion frequency sensing according to claim 1, characterized in that: The SRD adopts a lightweight structure design. Internally, it performs feature upsampling through pixel shuffle and only outputs multi-scale semantically invariant features for detection branch feature enhancement, without outputting a complete pixel-level reconstructed image.
7. An electronic device, characterized in that: The method includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the fusion frequency sensing recovery and target detection method under severe weather conditions as described in any one of claims 1 to 6.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by the processor, it implements the fusion frequency sensing recovery and target detection method under severe weather conditions as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Real-time target detection method fusing visual perception adaptive defogging
CN116343144A
