# A Two-Phase Fashion Apparel Detection Method Based on YOLOv4
## 4 Experimental Results
### Results  
During the model training, the CCP dataset was divided into 90% for the training set and 10% for the validation set. Table 3 shows the experimental results of this research. The proposed YOLOv4-TPD model was through the two-phase transfer learning and the CLAHE image enhancement method. The YOLOv4-TL model only performed two-phase transfer learning. The YOLOv4-CLAHE model only implemented the CLAHE image enhancement method. The YOLOv4 model was the original model without any optimization method. \begin{table}
\begin{tabular}{c c c} \hline \hline
**Parameters** & **Phase 1 Model** & **Phase 2 Model** \\ \hline classes & 3 & 5 \\ iterations & 6000 & 10,000 \\ steps & 4800, 5400 & 1000, 8000, 9000 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: The hyperparameter setting of the model. Compared to the original YOLOv4 model, the mAP was increased to 0.9%, by implementing the CLAHE image enhancement method and 1.67% by performing two-phase transfer learning. The proposed YOLOv4-TPD model increased the mAP from 92.57% to 96.01% by using both methods. The recall and the precision were also increased, getting 0.94 and 0.85. In IoU, the effect of adding only two-phase transfer learning or CLAHE alone had little difference. Adding both methods at the same time could increase the value of the IoU. The detection results of the five categories of apparel are shown in Figure 5. The bars from left to right in each apparel category are YOLOv4-TPD, YOLOv4-TL, YOLOv4-CLAHE, and YOLOv4. As can be seen, the detection results of the YOLOv4-TPD model had the best average precision. The experimental results proved that our proposed model was effective in fashion apparel detection. The total detection time of the YOLOv4-TPD for fifty images was 781.654 milliseconds. The average time for one image was 15.633 milliseconds, which was equal to 64 frames per second (FPS). The detection efficiency of the model was fully suitable for real-time detection. Table 4 shows the comparison of experimental results with previous methods. The previous work [26] used YOLOv2 in fashion apparel detection with five categories. The precision and recall achieved were 83.9% and 73%. The detection speed was 56 milliseconds per image. In research [27], the YOLOv3 was only used to detect skirts. The results showed that the model obtained 92.98% in mAP. In this study, we proposed the YOLOv4-TPD model to improve detection efficiency and accuracy. The experimental results showed that our proposed model was better than [26; 27] in fashion apparel detection. \begin{table}
\begin{tabular}{c c c c c} \hline \hline  & **YOLOv4-TPD** & **YOLOv4-TL** & **YOLOv4-CLAHE** & **YOLOv4** \\ \hline Two-phase & o & o & x & x \\ CLAHE & o & x & o & x \\ mAP & 96.01\% & 94.24\% & 93.47\% & 92.57\% \\ Recall & 0.94 & 0.90 & 0.93 & 0.90 \\ Precision & 0.85 & 0.81 & 0.78 & 0.81 \\ IoU & 72.36\% & 66.91\% & 67.50\% & 68.07\% \\ \hline \hline \end{tabular}
\end{table} 
Table 3: The detection results of fashion apparel. Figure 5: The detection results of the five categories of apparel. Figure 6 shows the detection results of our model. As can be seen in Figure 6a,b, our model had a good detection effect. Our model detected the apparel regions accurately and had satisfactory confidence scores. However in Figure 6c, the person was sideways, which prevented the model from correctly detecting the upper clothing. In Figure 6d, the model could not detect the apparel because the scarf covered a large apparel area. Therefore, our model was relatively poor at detecting the side of the apparel or apparel undercover. We supposed that the training data were not comprehensive enough, which caused this problem. \begin{table}
\begin{tabular}{c c c c} \hline \hline  & **YOLOv4-TPD** & **Previous Method [26]** & **Previous Method [27]** \\ \hline Architecture & YOLOv4 & YOLOv2 & YOLOv3 \\ Categories & 5 & 5 & 1 \\ mAP & 96.01\% & - & 92.98\% \\ Precision & 0.85 & 0.839 & - \\ Recall & 0.94 & 0.73 & - \\ Detection time & 15.633 ms & 56 ms & - \\ \hline \hline \end{tabular}
\end{table}