# AODs-CLYOLO: An Object Detection Method Integrating Fog Removal and Detection in Haze Environments
## 3 Method
### AODs: Advanced AODNet Series for Dehazing  
In foggy conditions, haze affects how well targets can be detected. AODNet [7] is good at removing haze but sometimes makes images too dark or too contrasty, especially with varying image scales. To improve this, we developed AODs, a dehazing algorithm for object detection. AODs processes foggy images before they are analyzed by the detection network. Inspired by AODNet, AODs is designed as an end-to-end model with two main parts: the K-Estimation Module and the Clean Image Generation Module.  
The K-Estimation Module calculates the parameter K(x), which represents the haze transmission map necessary for restoring clear images. This parameter K(x) is crucial as it helps in estimating the thickness of the haze and compensates for the loss of image clarity. By accurately determining K(x), the module can adjust the image's contrast and brightness effectively. The Clean Image Generation Module uses the parameter K(x) to produce fog-free images by enhancing the visual quality and clarity. Figure 3 shows the structure of AODs.  
Dehazing data preprocessing is a common method used before object detection. Let the input be the foggy image I(x), and the output be the processed, fog-free image J(x). (I(x) and J(x) are images, meaning matrices, with dimensions (H \(\times\) W \(\times\) 3). According to AODNet, the fog-free image can be solved using Equation (1):  
\[J(x)=K(x)I(x)-K(x)+b \tag{1}\]  
Here, b is a constant bias with a default value of 1. K(x) is the transmission map, which is a grayscale image with dimensions H \(\times\) W \(\times\) 1, defined as shown in Equation (2):  
\[K(x)=\frac{\frac{1}{I(x)}(I(x)-A)+(A-b)}{I(x)-1} \tag{2}\]  
Figure 3: The network diagram and configuration of AODs.  
Figure 2: The AODs-CLYOLO model. The AODs-CLYOLO object detection algorithm consists of inputs, an AODs dehazing model, and a CLYOLO detection model.  
Here, t(x) is the medium transmission rate, which has dimensions of H \(\times\) W \(\times\) 1, where H and W are the height and width of the image, respectively; A represents the global atmospheric light, which is typically a scalar value. Additionally, \(\frac{1}{t(x)}\) represents element-wise reciprocals, and the division in \(\frac{\frac{1}{t(x)}(I(x)-A)+(A-b)}{I(x)-1}\) refers to element-wise division.  
We have redesigned the deep network module of the parameter estimation module, as shown in Figure 4. In this module, we introduce a Channel-Pixel (CP) attention mechanism [14] and a multi-scale feature fusion module. The deeper cross-fusion enhances the network's ability to focus on different channel features and important pixels, thereby improving the model's feature representation capability, which is beneficial for detection tasks. Additionally, AODs employs a composite loss function that includes an image reconstruction loss function (L1) and Contrastive Regularization (CR) based on contrastive learning [26]. This enables the model to effectively capture the correlations of multi-scale features. The experimental details of the dehazing model are presented in Appendix A.