# Shadow Hunter: Low-Illumination Object-Detection Algorithm
## 3 Low-Illumination Object Detection
### Context-Spatial Decoupling Head  
In contrast to image classification tasks, object detection involves not only classifying objects but also precisely localizing their positions within an image. For instance, the detection head of the popular YOLOv5 detector follows a similar design to YOLOv3 [32], incorporating three separate receptive field branches at the output end. Each branch has a coupled head that directly predicts the regression and classification tasks in a single step. The shared head for localization and classification can be traced back to the two-stage object-detection network Fast R-CNN [2], which was a standard approach in early object-detection tasks. However, as proposed in the RCL [33] paper, the authors found through experimental analysis that the two head structures exhibit exactly opposite preferences for the two sub-tasks of classification and localization. The convolutional head is more suitable for localization, while the fully connected head is more suitable for classification tasks. The fully connected head has higher spatial sensitivity and a stronger ability to distinguish between a complete and a partial object, but it is not robust for regressing the entire object. Therefore, YOLOX [34] proposed a decoupled head to improve the convergence speed and accuracy. Figure 4: This is the FFN structure proposed by us, which enhances the extraction capability of low-level features by fusing features of different feature map sizes. As mentioned earlier, classification tasks demand a higher level of semantic information derived from the context, which is naturally associated with deep feature maps. Therefore, it is reasonable to fuse the deep feature maps and integrate them into the current feature maps for classification tasks. Conversely, regression tasks necessitate more precise spatial information, which can be effectively provided by shallow feature maps. Consequently, the information from shallow feature maps is propagated to the subsequent layer of feature maps, allowing the model to capture finer spatial details and improve the accuracy of regression tasks. In the classification head, the output feature map of the nth layer undergoes downsampling to align with the size of the \((n+1)\)th layer's feature map. Subsequently, the downsampled feature map is added to the feature map of the \((n+1)\)th layer. The resulting feature map is then concatenated with the feature map of the \((n+1)\)th layer to achieve the fusion of context semantic information, thereby enriching the overall context information available to the model (Figure 5). \[Cls=Concat(P_{n+1},\,Add(Ds(P_{n}),P_{n+1})) \tag{4}\]  
where _Concat_ denotes concatenation, Add denotes feature map summation, and \"\(Ds\)\" denotes downsampling. The feature map \"\(Cls\)\" has half the size of \(P_{n}\) and twice the number of channels as \(P_{n+1}\). This feature map is then fed into the classification head to obtain the classification prediction score. By using the proposed method, richer contextual semantic information can be obtained from a higher layer of the pyramid, particularly for images that are significantly impacted by illumination or those without texture. In the localization head, shallow features are employed due to their ability to provide richer spatial detail information. These details are crucial in accurately performing the  
Figure 5: The structures of our proposed classification head which realize the intersection of contextual semantic information to obtain richer contextual information. regression task, where precise localization of objects is required. Leveraging the spatial information present in shallow features improves the accuracy and effectiveness of regression in object localization. Therefore, the shallow feature map is then propagated to the next layer of feature maps to incorporate higher spatial detail correlation between adjacent feature maps and avoid generating gaps in the information. The localization head consists of several steps.