# A Hard Example Mining Approach for Concealed Multi-Object Detection of Active Terahertz Image
## 5 Results and Discussion
### Image-Level Detection Performance
#### 5.4.2 Balance of Detection Rate and False-Alarm Rate  
NMS Threshold: Generally, anchor-based detectors output a large number of detection bounding boxes with confidence, and multiple detections may exist for a single object. These redundant boxes are generally removed by NMS operations to retain the best detection results. The NMS process is as follows:  
1. [label=(0)]
2. Ranking of all candidate bounding boxes according to their confidence scores;
3. Select the bounding box with the highest confidence score to add to the final output list and remove it from the list of candidate bounding boxes;
4. Calculate the IoU of the bounding box with the highest confidence score against the other candidate boxes and remove the bounding boxes with an IoU greater than a threshold;
5. Repeat the above (2)\(\sim\)(3) process until the list of bounding boxes is empty. Too many retention boxes may result in too many false positives, while too few retention boxes may result in too many missed detections. The number of retention boxes is positively related to the NMS threshold; therefore, there is a need to balance this threshold. Subplot a,e of Figure 8 show the curves of detection rate and false-alarm rate corresponding to the change of NMS threshold from 0.1\(\sim\)0.9 curve, and subplot Figure 8f shows the curve of the lowest false-alarm rate and its corresponding detection rate with NMS threshold for each subplot. At low NMS thresholds, the increase in the NMS threshold mainly affects the false-alarm rate of the model. At high NMS thresholds, the NMS threshold has a serious impact on both the false-alarm rate and the detection rate. In particular, the detection rate was essentially constant for NMS thresholds below 0.5. Confidence threshold: After the detection results are subjected to NMS operation, most of the overlapping detection boxes will be removed, but some unreasonable detection boxes are still left behind. Each detection box has a confidence score, a value between 0\(\sim\)1, indicating the possibility that a target is surrounded by a box. As the confidence threshold gets higher, object recall decreases, but detection accuracy increases. Therefore, we need to set a suitable threshold so that the detection results are balanced between recall and detection rate. IoU threshold: The IoU threshold is a key threshold when calculating the performance metrics for a single image. To distinguish between correct detection and incorrect detection, the intersection over union ratio is calculated between the detection result and the ground truth of the test image. A higher IoU threshold will result in a lower detection rate of the object, but a higher probability of the object being detected correctly. This threshold also needs to be balanced. Comprehensive Analysis: In order to analyze the variation of single-image detection rate and false-alarm rate with confidence threshold and IoU threshold, the NMS threshold should be determined first. According to Figure 8f, when the NMS threshold is 0.1, the false-alarm rate is the lowest and the detection rate is the highest, which is the most desirable outcome in all cases. Therefore, we selected the experimental results when the NMS threshold is 0.1. \begin{table}
\begin{tabular}{l c c} \hline \hline
**Method** & **DR (\%)** & **FAR (\%)** \\ \hline YOLOv4 & 84.49 & **0.63** \\ FRCN-OHEM & 88.86 & 18.99 \\ RetinaNet & **91.46** & 1.27 \\ \hline \hline \end{tabular}
\end{table} 
Table 6: Image-level detection result. The detection results of 316 images in the test set are counted. Red is the best, and blue is the worst. The results with underline are the worst, and the results with **bold** are the best. According to the previous definition of single-image detection rate and false-alarm rate, we can find that the false-alarm rate is not only related to error detection but also related to missed detection. Therefore, as shown in Figure 9a, the curve change of the false-alarm rate is not unidirectional.