# Face Mask Detection on Photo and Real-Time Video Images Using Caffe-MobileNetV2 Transfer Learning
## 3 MobileNetV2
### Depthwise Separable Convolution
\begin{table}
\begin{tabular}{l l l|l l l} \hline
**Block-11:Layers Name** & **Output Size** & **Parameters Used** & **Block-12:Layers Name** & **Output Size** & **Parameters Used** \\ \hline Extended\_Conv2D & (14,14,576) & 55,296 & Extended\_Conv2D & (14,14,576) & 55,296 \\ Extended\_BN & (14,14,576) & 2304 & Extended\_BN & (14,14,576) & 2304 \\ Extended\_ReLU & (14,14,576) & 0 & Extended\_ReLU & (14,14,576) & 0 \\ Depthwise\_Conv & (14,14,576) & 5184 & Depthwise\_Conv & (14,14,576) & 5184 \\ Depthwise\_BN & (14,14,576) & 2304 & Depthwise\_BN & (14,14,576) & 2304 \\ Depthwise\_ReLU & (14,14,576) & 0 & Depthwise\_ReLU & (14,14,576) & 0 \\ Convolution2D & (14,14,96) & 55,296 & Convolution2D & (14,14,96) & 55,296 \\ Batch Normalization & (14,14,96) & 384 & Batch Normalization & (14,14,96) & 384 \\ Add & (14,14,96) & 0 & Add & (14,14,96) & 0 \\ \hline Block-13:Layers Name & Output size & Parameters used & Block-14:Layers Name & Output size & Parameters used \\ \hline Extended\_Conv2D & (14,14,576) & 55,296 & Extended\_Conv2D & (7,79,60) & 153,600 \\ Extended\_BN & (14,14,576) & 2304 & Extended\_BN & (7,79,60) & 3840 \\ Extended\_ReLU & (14,14,576) & 0 & Extended\_ReLU & (7,79,60) & 0 \\ Zero\_Pading2D & (15,15,576) & 0 & Depthwise\_Conv & (7,79,60) & 8640 \\ Depthwise\_Conv & (7,7,576) & 5184 & Depthwise\_BN & (7,79,60) & 3840 \\ Depthwise\_BN & (7,7,576) & 2304 & Depthwise\_ReLU & (7,79,60) & 0 \\ Depthwise\_ReLU & (7,7,576) & 0 & Convolution2D & (7,7,160) & 153,600 \\ Convolution2D & (7,7,160) & 92,160 & Batch Normalization & (7,7,160) & 640 \\ Batch Normalization & (7,7,160) & 640 & Add & (7,21,60) & 0 \\ \hline Block-15:Layers Name & Output size & Parameters used & Block-16:Layers Name & Output size & Parameters used \\ \hline Extended\_Conv2D & (7,79,60) & 153,600 & Extended\_Conv2D & (7,79,60) & 153,600 \\ Extended\_BN & (7,7,960) & 3840 & Extended\_BN & (7,79,60) & 3840 \\ Extended\_ReLU & (7,7,960) & 0 & Extended\_ReLU & (7,79,60) & 0 \\ Depthwise\_Conv & (7,7,960) & 8640 & Depthwise\_Conv & (7,7,960) & 8640 \\ Depthwise\_BN & (7,7,960) & 3840 & Depthwise\_BN & (7,7,960) & 3840 \\ Depthwise\_ReLU & (7,7,960) & 0 & Depthwise\_ReLU & (7,79,60) & 0 \\ Convolution2D & (7,7,160) & 153,600 & Convolution2D & (7,7,320) & 307,200 \\ Batch Normalization & (7,7,160) & 640 & Batch Normalization & (7,7,320) & 1280 \\ Add & (7,7,160) & 0 & & & \\ \hline Base:Layers Name & Output size & Parameters used & & \\ \hline Convolution2D\_Conv1 & (7,7,1280) & 409,600 & & & \\ Batch Normalization\_Conv1 & (7,7,1280) & 5120 & & & \\ ReLU\_Out & (7,7,1280) & 0 & & & \\ \hline
**AveragePooling2D** & **(1,1,1280)** & **0** & & & \\ **Flatten** & **(1280)** & **0** & & & \\ **Dense** & **(128)** & **163,968** & & & \\ **Dropout** & **(128)** & **0** & & & \\ **Dense\_1 & **(2)** & **258** & & & \\ \hline \end{tabular}  
* Total parameters: 2,422,210
* **Trainable parameters: 164,226** Non-trainable parameters: 2,257,984  
\end{table} 
Table 2: Architecture of the Proposed Methodology-1(b). horizontally \(D_{P}\) times. Therefore, the total number of multiplications per convolution was \(D_{P}\times D_{P}\times N\). The normal or standard operation cost or the complexity of convolution operations is given in the Equation (1). \[SC_{cost}=(D_{K}\times D_{K}\times M)(D_{P}\times D_{P}\times N)=D_{P}{}^{2} \times D_{K}{}^{2}\times M\times N. \tag{1}\]  
Now coming to depthwise separable convolution (DWSC). This procedure is divided into two steps: depthwise convolution (DWC) and pointwise convolution (PWC). In contrast to standard convolution, which performs convolution on all \(M\) channels at the same time, DWC operations only apply convolution to one channel at a time. As a result, the filters or kernels in this case will be \(D_{K}\times D_{K}\times 1\). It follows that \(M\) of these filters are needed because there are \(M\) channels in the input data.