# Compact Spatial Pyramid Pooling Deep Convolutional Neural Network Based Hand Gestures Decoder
## 4 The Proposed Methodology
### Practical DCNN Architecture Selection and Pruning Strategy for Optimal Node Selection  
Although SPP is not a modern concept in relation to DCNN, the use of both node pruning and transformation from a classical DCNN to an SPP-based DCNN has not yet been thoroughly researched. Additionally, we accomplish single image-based decoding by using traditional methods in a new manner; our technique makes the most of other approaches that have until now not been practical to deploy in real-life settings. Figure 5 demonstrates the simplicity of the proposed method. Almost all general feature selection-based classifiers carry out resizing and transformation from red, green, blue (RGB)-scale to gray-scale for classification, whereas the DCNN with SPP only requires a dimension-invariant input image for classification. The proposed DCNN architecture was constructed based on research by Oxford's Vision Geometry Group (VGG) [34]. Their proposed model DCNN has several versions for deployment. We started with the smallest DCNN in VGGnet and pruned from that architecture, as our original dataset contains far fewer labels than the Imagenet dataset used to train VGGnet. The main goal of this pruning is optimization and creation of a compact model that is less computationally intensive. The smallest original VGGnet model is the VGGnet-11. The numeral eleven \((11)\) represents the total number of hidden convolutional and fully connected layers. Figure 6 shows the full network structure and node/filter for each layer. The input layer of the DCNN takes a fixed \((224,224)\) RGB input, and it is followed by the first convolutional layer, with 64 units/filters. Then, a \((2\times 2)\) max-pooling layer is used to reduce the number of parameters. This is followed by 2 (two) more convolutional layers with 128 units/filters and the same max-pooling process. There are then 2 more convolutional layers with 256 units/filters with max-pooling and, finally, 4 more convolutional layers with 512 units/filters. All of the convolutional layers were given individual batch normalization layers to reduce the over-fitting of the altered proposed VGGnet [35]. The output of the last convolutional layer is then passed through 2 (two) fully connected (FC) layers or dense layers. This is followed by an output layer of 29 nodes with Softmax output for gesture classification. This model has a total of 11 hidden layers and the input dimension of \((224,224)\) makes this DCNN model capable of processing a total of 22,506,781 learnable parameters. Figure 4: Spatial pyramid pooling in a DCNN. (**A**) A block diagram input is subjected to (**B**) convolutional feature pooling, then (**C**) max-pooled spatial pyramid pooling (SPP) with (**D**) a fixed number of bins; the result is finally transferred to (**E**) the fully connected (FC) layer, which (**F**) classifies the results. The pruning strategy for the DCNN only works in the hidden layers. Neural network node pruning is a basic process, in which nodes are naked in order to prune them. [PERSON] et al. (2018) explored sparsity inactivation for network pruning. The exponential linear unit (ReLU) ([PERSON] et al., 2014) activation function imposes sparsity during inference, and the average percentage of positive activation in the output can determine the importance of the neuron. L1 normalization is useful for the estimation of the saliency of feature maps in a given layer. This idea can be used to rank the filters in each layer. The trained neural network is then pruned to make it more compact in size while retaining accuracy to produce the correct results with less computational overhead. The proposed pruning of the new DCNN takes place in 2 steps. First, the model is trained with the proper dataset. Subsequently, the trained model undergoes a comparison based on validation accuracy to establish the baseline. Later model pruning is done based on the filter and nodes \(l1\)-normalized rankings. The pruned compact network is then retrained to give the same or higher accuracy with a reduced computational workload.