# A Systematic Deep Learning Based Overhead Tracking and Counting System Using RGB-D Remote Cameras
## 3 The Proposed System Methodology
### Head Tracking Using Convolution Neural Network  
All the local and global features extracted from the above mentioned feature extraction methods (See Section 3.3) are then passed through CNN, resulting in the accurate tracking of heads over the three benchmark datasets. CNN always promised to give better results than other deep learning techniques in both RGB and RGB-D image and video based features [48; 49; 50; 51; 52; 53]. Figure 9 illustrates the overall architecture of our proposed 1D CNN over the PCDS dataset.  
Figure 7: Fused intra-inter silhouette trajectories over the MICC dataset.  
1D CNN is proposed for the first time for the accurate tracking of heads in both indoor and outdoor complex environments. The PCDS dataset contains 10,500 feature sets in 4500 videos. The proposed CNN consists of three convolution layers, three max_poolinglayers and one fully connected layer. Each layer has its own specific purpose. The first layer is the convolution layer \(C_{1}\) and contains the input matrix. This layer is convolved with 32 kernels each having a size of \(1\times 13\). As a result a matrix of 4500 \(\times\) 10,488 \(\times\) 32 is produced. The convolution matrix can be calculated as [54];  
\[C_{n}^{(m-1)}(a,b)=ReLU(x) \tag{14}\]  
\[ReLU(x)=\sum_{u=1}^{y}\Omega\bigg{(}a,\bigg{(}b-u+\frac{y+1}{2}\bigg{)}\bigg{)} W_{n}^{m}(u)+\alpha_{n}^{m} \tag{15}\]  
where \(C_{n}^{(m-1)}\)\((a,b)\) generates the results of the convolution layer for the coordinates \((a,b)\) of the \((m-1)\) layer with the \(n\)th convolution map. \(\Omega\) represents the previous layer map and the size of the kernel is represented as \(x\). \(W_{n}^{m}\) is the \(m\)th convolution kernel for the layer \(n\)th. \(\alpha_{n}^{m}\) is the \(m\)th bias of the \(n\)th layer.  
Figure 8: Illustration of the Apriori-Association graph of the accuracy of all three datasets across three feature extraction techniques.  
The result of the first convolution layer is passed through the first max_pooling layer \(P_{1}\). A ReLU activation function is used between each convolution and max_pooling layer containing the sum of weights and bias of the previous layer passed to the next layer. The max_pooling layer downsamples the result obtained by the convolution layer by using a sliding window of size \(1\times 2\). Thus the pooling results of the \((p-1)\)th layer, \(q\) kernel and \(x\) row and \(y\) column can be calculated as [55; 56; 57; 58];  
\[P_{n}^{(m-1)}(x,y)=max(C_{n}^{m}(x,((y-1)\times(p+q))) \tag{16}\]  
where \(1\leq p\leq q\) and \(n\) is the pooling window size. The result obtained by the first pooling layer is passed through the second convolution layer C2, convolved with 64 kernels and then the result is passed through the second pooling layer P2. The same procedure is repeated for the third convolution layer convolved with 128 kernels. Finally, a fully connected layer \(FC\) result is obtained as;  
\[FC_{v}^{(m+1)}=ReLU(\sum_{i}x_{i}^{m}W_{mp}^{m}+\alpha_{v}^{m}) \tag{17}\]  
where \(W_{iv}^{m}w_{iv}^{m}\) represents the matrix having weights from the \(i\)th node of the \(m\)th layer to the \(v\)th node of the \((m+1)\)th layer. \(x_{i}^{m}\) represents the content of the \(m\)th node at \(i\)th layer. Figure 10 represents the convergence plot of the CNN using 250 epochs of all three benchmark datasets.  
Figure 9: Illustration of the overall architecture of our proposed 1D CNN over PCDS dataset.