## 4 Results and Discussions
### Experimental Findings  
In general, the complexity of the CNN model mainly depends on the depth of the network and number of learnable parameters involved. In this study, two shallow CNN models (ConvNet-18 and ConvNet-24) are developed to extract the primitive characteristics from meat images. Classification of meat images into fresh and spoiled classes is performed by ConvNet-18, whereas multi-class classification is performed by ConvNet-24. Both the models are implemented and investigated in three configurations (Conf1, Conf2, and Conf3). Each configuration differs in the type of optimizer employed for updating the learnable parameters. The Adam, SGDM, and RmsProp optimizers are used in Conf1, Conf2, and Conf3, respectively. In all configurations, models are trained with 80% of images and tested with unseen 20% of the images. Performance metrics such as classification accuracy (_Acc_), sensitivity, specificity, precision, and F-1 score are used to evaluate the efficacy of models. The description of the metrics are discussed below.  
Accuracy: It is the ratio of the number of correct predictions to total predictions and is represented in Equation (10) as  
\[Accuracy(Acc)=\frac{tp+tn}{tp+tn+fp+fn}, \tag{10}\]  
where \(tp\) is the true positives which represent the number of fresh meat images correctly predicted by the model. True negatives (\(tn\)) denote the number of spoiled meat images correctly identified by the model. The number of spoiled meat images misclassified as fresh meat by the model is denoted by false positives (\(fp\)). The term \(fn\) represents false negatives, which is defined as the number of fresh meat images mispredicted as spoiled meat by the model.  
Sensitivity: It refers to the percentage of fresh meat images correctly identified by the algorithm. It is given in Equation (11) as  
\[Sensitivity(Sen)=\frac{tp}{tp+fn}. \tag{11}\]  
Specificity: It is the ratio of true negatives to the sum of true negatives and false positives. It represents the percentage of spoiled meat images correctly identified by the algorithm. It is defined in Equation (12) as  
\[Specificity(Spe)=\frac{tn}{tn+fp}. \tag{12}\]  
Precision: It indicates the ratio of correct predictions to all predictions for a particular class and is given by Equation (13)  
\[Precision(Pre)=\frac{tp}{tp+fp}. \tag{13}\]  
F1-score: It represents the harmonic mean between precision and sensitivity and is defined in Equation (14) as  
\[F1\text{-}score=\frac{2\times Recall\times Precision}{Recall+Precision}. \tag{14}\]  
These metrics are computed from the confusion matrix, and Figure 5 depicts the sample confusion matrix obtained by the ConvNet-18 model. The numbers inside green box represents true positives and true negatives. False positives and false negatives are represented inside the pink color boxes.  
Proper selection of the hyperparameters allows us to achieve faster convergence. For the selection of initial learning rate and batch size, a two-stage tuning method [28] is used in this work. The model can converge or diverge if the initial learning rate is too small or too high. Therefore, for the various values of the initial learning rate (1 \(\times\) 10\({}^{-2}\) to 1 \(\times\) 10\({}^{-9}\)), the model classification accuracy is noted in the first stage. When the initial learning rate ranges from 1 \(\times\) 10\({}^{-3}\) to 1 \(\times\) 10\({}^{-5}\), the results improve. In the second stage, an appropriate batch size is determined. Different batch sizes are used, including 16, 32, 64, and 100. Performance metrics are noted for each batch size by varying the initial values of the learning rate (1 \(\times\) 10\({}^{-3}\) to 1 \(\times\) 10\({}^{-5}\)). The classification of fresh and spoiled meat images is better with a batch size equal to 32 and an initial learning rate of 1 \(\times\) 10\({}^{-3}\). A batch size of 32 and an initial learning rate of 1 \(\times\) 10\({}^{-4}\) produces better results for the multi-class classification task.