• 中国计算机学会会刊
  • 中国科技核心期刊
  • 中文核心期刊

Computer Engineering & Science ›› 2022, Vol. 44 ›› Issue (03): 463-470.

• Graphics and Images • Previous Articles     Next Articles

A masked face detection algorithm fusing improved channel and layer pruning

LIU Zi-yan,YUAN Lei,ZHU Ming-cheng,MA Shan-shan   

  1. (College of Big Data and Information Engineering,Guizhou University,Guiyang 550025,China)
  • Received:2020-08-16 Revised:2020-12-29 Accepted:2022-03-25 Online:2022-03-25 Published:2022-03-24

Abstract: Aiming at the problem of shortage of computing power and resources in target detection deployment in real scenarios, this paper proposes a model method based on improved channel and layer pruning. After improving the channel pruning by setting adaptive local security threshold and carrying out layer pruning by comprehensively evaluating the whole residual structure value, the proposed model pruning method is applied to detect masked face. Firstly, for training the YOLOv4 target detection network, the masked face dataset is constructed by using face-based data amplification method. Secondly, after pruning the YOLOv4 model to get different pruning models by the improved channel and layer pruning method, the comparative experiments with YOLOv4 and YOLOv4-tiny was carried out on the masked face dataset. The proposed pruning model (Prune-best) with the highest performance-to-price ratio reduces the number and size of parameters by 75% and 60%, compared with the YOLOv4 model. The reasoning speed of the model decreases by 3.7 ms and its mAP decreases by 2.7%. When the size of the model is 5.56 MB and the number of parameters is 1.428 MB, the mAP of the extreme pruning model (Prune-limit) reaches 0.662 that is 6.3% higher than YOLOv4-tiny, and the number of parameters of the model is only 1/4 of that of YOLOv4-tiny. The experimental results show that the proposed pruning model achieves higher performance-to-price ratio and is more suitable for masked face detection deployment in real scenarios.

Key words: model pruning, mask face detection, YOLOv4, real scenary