# Robust Miner Detection in Challenging Underground Environments: An Improved YOLOv11 Approach
## 2 Materials and Methods
### Mine Worker Detection Network Structure
#### 2.2.2 Weighted CIoU with Adaptive Confidence Loss Function (WCIoU-ACLoss)  
In single-class object detection tasks of miners, especially under complex environments such as occlusion and low illumination, it is very important to design a loss function to improve the localization accuracy and enhance the robustness of the model. The proposed loss function consists of weighted CIoU [25] and adaptive confidence loss. As for the  
Figure 3: Schematic diagram of ECA module. design rationale, it can be found below. In challenging environments with occlusion, the precision of localization is essential for object bounding boxes. Complete Intersection over Union integrates the distance between the centers of predicted and ground-truth boxes and their aspect ratio consistency into the standard IoU formulation. Additionally, it also incorporates a weighting factor into the complete gain of Intersection over Union to further improve robustness in complex conditions [26; 27]. In the single-class detection, the loss weight will be dynamically adjusted with the variation of the predicted confidence score so that low-confidence regions will suffer higher penalties. The adaptive weighting design helps the models to pay more attention to the uncertain object regions, especially those under dark and occlusion circumstances. The formula of the weighted CIoU component of the loss function is given by Equation (3). \[\mathcal{L}_{wCIoU} = \left(1-\text{IoU}+\frac{\rho^{2}\big{(}\mathbf{b_{p}},\mathbf{b_{g}} \big{)}}{c^{2}}+\alpha v\right)\cdot w_{\text{occlusion}} \tag{3}\]  
The parameters in the weighted CIoU formula are defined as follows. IoU represents the Intersection over Union between the predicted bounding box and the ground-truth box, indicating their overlap ratio. \(\rho^{2}\big{(}\mathbf{b_{p}},\mathbf{b_{g}}\big{)}\) is the Euclidean distance between the centers of the predicted (\(\mathbf{b_{p}}\)) and ground-truth (\(\mathbf{b_{g}}\)) bounding boxes, while \(c\) represents the diagonal length of the smallest enclosing box that contains both of these bounding boxes. Alpha and \(v\) are the adjustment factors used to ensure aspect ratio consistency between the predicted and ground-truth boxes. Additionally, an occlusion weight (\(w\_\)occlusion) is applied to improve robustness under occlusion and low-light conditions. This weight, defined as w_occlusion = exp(\(-\)confidence), assigns higher importance to low-confidence situations, thereby enhancing the model's ability to handle challenging scenarios effectively. The adaptive confidence loss function is provided in Equation (4). The confidence score represents the level of certainty that the model has regarding the predicted bounding box containing the target object. To enhance the model's sensitivity to uncertain predictions, an adaptive weighting factor (\(w_{\text{confidence}}\)) is incorporated into the loss function. This weighting factor is designed to increase for low-confidence regions and is formulated as \(w_{\text{confidence}}\) = (\(1-\)confidence)\({}^{\gamma}\), where \(\gamma\) serves as a hyperparameter that controls the strength of the penalty for low-confidence areas. Typically, \(\gamma\) is set to 2, which effectively emphasizes regions with low confidence, thereby enhancing the model's robustness under challenging conditions and contributing to improved detection performance in adverse environments. \[\mathcal{L}_{\text{{adaptive confidence}}} = -\text{log}(\text{confidence})\cdot w_{confidence} \tag{4}\]  
The comprehensive loss function is given in Equation (5). \(\lambda\) is a balancing factor used to control the weight between localization loss and confidence loss. Under severe occlusion conditions, increasing the value of \(\lambda\) can help enhance localization accuracy. It is recommended that \(\lambda\) be initially set to 0.7 to prioritize localization loss, with further fine-tuning during training to optimize the model's overall performance.