# Object Detection Related to Irregular Behaviors of Substation Personnel Based on Improved YOLOv4
## 4 Experimental Results and Analysis
### Influence Factors and Result Analysis
#### 4.2.4 Detection Results under Gamma Correction  
Because the irregular behaviors images of substation personnel were collected in complex and diverse environments, the problems of uneven illumination and areas in the images that are either very bright or very dark need to be solved. Therefore, on the basis of the improved YOLOv4 lightweight model the gamma correction preprocessing method was combined with changes to the image brightness to enhance image contrast, thereby improving the accuracy of the model. The detection results when using gamma correction are shown in Table 6 and Figure 10.  
\begin{table}
\begin{tabular}{c c c c c c c c} \hline \multirow{2}{*}{\(\gamma\)} & \multicolumn{6}{c}{**AP of Each Class (\%)**} & \multirow{2}{*}{**mAP (\%)**} \\ \cline{2-2} \cline{5-8}  & & **Badge** & & **Glove** & **Helmet** & **Operatingbar** & **Person** & **Powerchecker** \\ \hline
0.2 & 71.71 & 48.99 & 90.21 & 64.52 & 85.44 & 57.61 & 69.75 \\
0.4 & 83.34 & 66.61 & 93.22 & 72.97 & 91.41 & 65.28 & 78.80 \\
0.6 & 82.56 & 72.91 & 94.05 & 74.33 & 92.35 & 67.07 & 80.55 \\
0.8 & 83.04 & 73.59 & 94.26 & 75.39 & 92.58 & 67.16 & 81.00 \\
1 & 84.88 & 75.96 & 94.3 & 74.96 & 92.8 & 65.76 & 81.44 \\
1.2 & 85.01 & 80.95 & 95.33 & 76.08 & 94.01 & 69.65 & 83.51 \\
1.4 & 84.55 & 75.78 & 94.28 & 74.25 & 92.68 & 65.4 & 81.16 \\
1.6 & 83.92 & 74.22 & 94.8 & 74.42 & 92.29 & 65.29 & 80.82 \\
1.8 & 82.51 & 71.68 & 94.43 & 74.14 & 91.12 & 65.12 & 79.83 \\
2 & 81.42 & 67.55 & 93.8 & 73.37 & 90.79 & 64.29 & 78.85 \\ \hline \end{tabular}
\end{table}
Table 6: Detection results using different values of \(\gamma\).  
\begin{table}
\begin{tabular}{c c c c c c c} \hline \multirow{2}{*}{**Methods**} & \multicolumn{6}{c}{**F1-Score of Each Class**} \\ \cline{2-7}  & **Badge** & **Glove** & **Helmet** & **Operatingbar** & **Person** & **Powerchecker** \\ \hline Faster RCNN & 0.29 & 0.5 & 0.79 & 0.64 & 0.78 & 0.41 \\ SSD & 0.51 & 0.56 & 0.86 & 0.6 & 0.9 & 0.53 \\ YOLOv3 & 0.82 & 0.69 & 0.91 & 0.59 & 0.91 & 0.55 \\ YOLOv4 & 0.81 & 0.82 & 0.93 & 0.61 & 0.9 & 0.58 \\ Improved YOLOv4 & 0.83 & 0.74 & 0.93 & 0.74 & 0.89 & 0.62 \\ \hline \end{tabular}
\end{table}
Table 5: The F1-scores of each class using different detection methods.  
It can be seen from the above results that when the \(\gamma\) of gamma correction preprocessing is less than 1.0, the AP of each class and the overall mAP decrease greatly with the decrease of \(\gamma\); that is, the detection effect becomes worse as the image becomes brighter. However, when \(\gamma\) is equal to 1.2 the overall mAP is the highest, at 83.51%, and the APs of all classes are the highest as well. When \(\gamma\) is greater than 1.2, both the APs of all classes and the overall mAP decrease, while the APs of the glove, operatingbar, and powerchecker decrease the most drastically. Moreover, it can be found from this tendency that there are many very bright images in the dataset, which can be corrected to normal brightness when \(\gamma\) is equal to 1.2 and the image contrast is opportune, thus making it easier for the model to detect the targets.