# DeepSOCIAL: Social Distancing Monitoring and Infection Risk Assessment in COVID-19 Pandemic
## 3 Methodology
### People Detection
#### 3.1.1 Inputs and Training Datasets  
In order to have a robust detector, we would require a set of rich training datasets. This should include people with a variety in gender and age (man, women, boy, girl) with millions of accurate annotation and labelling. We selected two large datasets of MS COCO and Google Open Image dataset  
\begin{table}
\begin{tabular}{l|l l l l|l l} \hline \hline \multicolumn{2}{c}{**Input**} & \multicolumn{4}{c|}{**Detection Core \(\rightarrow\)**} & \multicolumn{2}{c}{**Head \(\rightarrow\) Output**} \\ \hline
**Augmentation** & **Activation** & **Backbone** & **Neck** & **Regularisation** & **Dense** & **Sparse** \\ \hline CutOut [56] & ReLU [57] & VGG [58] & SPP [59] & L1, L2 [60] & YOLO [50]\({}^{*}\) & R-CNN [46]\({}^{*}\) \\ MixUp [61] & Leaky-ReLU [62] & ResNet [63] & ASPP [64] & DropOut (DO) [65] & SSD [49]\({}^{*}\) & Fast-RCNN [47]\({}^{*}\) \\ CutMix [66] & Param-ReLU [67] & Spinest [68] & PAN [69] & DropPath [70] & RetinaNet [71]\({}^{*}\) & Faster-RCNN [48]\({}^{*}\) \\ Mosaic [53] & ReLU [72] & CSRResNetX50 [73] & FPN [74] & Spatial DO [75] & RPN [48]\({}^{*}\) & Libra R-CNN [48]\({}^{*}\) \\  & SBLU [77] & CSPDarketetS5 [73] & BFFN [78] & DropBlock [53] & CornerNet [79]\({}^{+}\) & Mask R-CNN [80]\({}^{*}\) \\  & Swish [81] & EfficientNet [82] & ASF [83] & MatrixNet [84]\({}^{+}\) & CenterNet [85]\({}^{+}\) \\  & Mish [86] & DarkNet53 [52] & RFB [87] & R-FCNN [88]\({}^{*}\) & RepPoints [89]\({}^{+}\) \\  & & Inception [90, 91] & SFAM [92] & FCOS [93]\({}^{+}\) & \\  & & NAS-FPN [94] & & & \\ \hline \hline \end{tabular}  
* Anchor-based; \({}^{+}\) Anchor-free.  
\end{table}
Table 1: State-of-the-art options and techniques to design a Convolutional Neural Network (CNN) based model. From left to right: input towards the output.  
Figure 4: Stage 1—The overall structure of the people detection module.  
that satisfy the above-mentioned expectations, by providing more than 3.7 million annotated people. Further, details will be provided in Section 4 (Model Training and Experimental Results).  
In YOLOv4, the authors have dealt with two categories of training options for different parts of the network: \"Bag of Freebies\", which includes a set of methods to alter the model's training strategy with the aim of increasing the generalisation; and \"Bag of Specials\" which includes a set of modules that can significantly improve the object detection accuracy in exchange for a small increase in training costs.  
Among various techniques of Bag of Freebies, we used the Mosaic data augmentations [53] which integrates four images into one, to increase the size of the input data without requiring to increase the batch size.  
On the other hand, in batch normalisation, the batch size reduction causes noisy estimation of mean and variance. To address this issue, we considered the normalised values of the previous \(k\) iterations instead of a single mini-batch. This is similar to Cross-Iteration Batch Normalisation (CBM) [95].  
A set of possible activation functions for BoF are listed in Table 1. We also investigated the performance of our model against ReLU, Leaky ReLU, SELU, Swish, Parametric RELU, and Mish. Our preliminary evaluations confirmed the same results provided by Misra [86] for our human detection application. The Mish (Equation (1)) activation function converged towards the minimum loss, faster than Swish and ReLU, with higher accuracy. The result was consistent especially for diversity of parameter initialisers, regularisation methods, and lower learning rate values. Mish:  
\[\begin{split} f(x)&=x.\text{tanh}(\text{softplus}(x ))\\ &=x.\text{tanh}(ln(1+e^{x}))\end{split} \tag{1}\]  
with derivations:  
\[f^{\prime}(x)=\frac{e^{x}\omega}{\delta^{2}} \tag{2}\]  
as a self regularised non-monotonic activation function, where  
\[\omega=4(x+1)+4e^{2x}+e^{3x}+(4x+6) \tag{3}\]  
and  
\[\delta=2e^{x}+e^{2x}+2. \tag{4}\]