## 3 Proposed Methodology
### Study of Binary Masking Based Compressed Domain Learning  
The database used for this work consists of RGB images of dimension M \(\times\) N belonging to two categories, with 2000 training images and 500 test images. All the images belonging to the dataset are resized to standard \(256\times 256\) images in our scheme. The binary sensing matrix, which is a structured matrix, is contrasted to the Primitive Walsh-Hadamard (PWH) matrix, which is essentially a random matrix. Binary Sensing Matrices of \(256\times 256\) size are implemented to use only a few elements of the original image; these matrices are used as a sieve model at a certain moment. Applying binary matrix and primitive Walsh-Hadamard matrix with original image retains only P% of its pixels and drastically reduces the number of pixels to be transmitted/stored. But it is also a fact that this process will significantly reduce the classifying accuracy due to distraction of the image.  
Let us consider a typical image classification problem, say the widely used cat dog classification problem in which an image I under a test has to be transmitted to a server where CNN models are deployed. There is a need for compression of this test image I to obtain the compressed image T to reduce the communication time. One of the effective and fast ways of compressing is by CS. The CS is applied by multiplying a known binary mask. Mask with the image will force many pixels to zero and retains only P% of pixels for which the mathematical model is given by T = L*Mask whereas Ti is the image used in Training/Testing.  
The best binary mask that retains the perceptual quality of image is Hadamard. We conducted an experiment by applying Hadamard binary mask to a test set which retains 50% of the pixels for a CNN-based image classification for the dataset [43]. The basic functional parameters used to configure the CNN for our experiment is shown in Table 1 and the network architecture of CNN is shown in Figure 1. For this case of retaining 50% of pixels, we found that the training accuracy of CNN is good enough whereas validation accuracy falls much lower than 70%. The reason is because the training set includes unmasked complete images whereas the test set includes masked images. When the experiment is repeated with masked training set, the validation accuracy improves to 75%.We further studied by decreasing the number of retained pixels by arbitrarily throwing the pixels of the PWH mask.  
Figure 2 illustrates the masking process executed on the dataset images in the proposed algorithm and its outcome for various levels of pixels retaining. Figure 2a depicts the case of 100% pixel retained and the cases of images with pixels retained 50%, 25%, 15%, and 10% by applying PWH is depicted in Figure 2b-e.  
Using the same CNN architecture of parameter shown in Table 1,we conducted the learning experiment in two different ways: (i) by using complete images in training (100% pixels retained) and PWH masking (retaining 50%, 25%, 15%, 10%) the test set and (ii) by using both training and testing set masked. The experimental results are tabulated in  
\begin{table}
\begin{tabular}{c c c c} \hline \hline \multicolumn{2}{c}{**Percentage of Pixels Retained**} & \multicolumn{1}{c}{**Training Accuracy**} & \multicolumn{1}{c}{**Validation Accuracy**} \\ \hline
**Training Dataset** & **Testing Dataset** & & \\ \hline
100\% & 100\% & 97\% & 76\% \\
100\% & 50\% & 97\% & 62\% \\
100\% & 25\% & 97\% & 59\% \\
100\% & 15\% & 97\% & 52\% \\
100\% & 10\% & 96\% & 49\% \\
50\% & 50\% & 95\% & 73\% \\
25\% & 25\% & 87\% & 67\% \\
15\% & 15\% & 84\% & 65\% \\
10\% & 10\% & 77\% & 61\% \\ \hline \hline \end{tabular}
\end{table}
Table 2: Training and validation accuracy comparison of the CNN on different percentage of pixel retained.  
Figure 2: Sample masked images of the dataset after PWH masking process with P% pixels retained (**a**) P = 100 (**b**) P = 50 (**c**) P = 25 (**d**) P = 15 (**e**) P = 10.