# Stacked Ensembles Powering Smart Farming for Imbalanced Sugarcane Disease Detection
## 2 Methodology
### Image Embedding and Feature Extraction  
We employed a range of embedding techniques to extract the numerical feature representations of the images. The embedding process utilized several pre-trained DL models, as illustrated in Table 1. InceptionV3 [42] is a DL architecture that was developed by Google Brain Research as part of the Inception DL architecture family. InceptionV3 integrates many framework refinements to enhance the accuracy and computational efficiency. SqueezeNet [43] is a lightweight neural network architecture designed for resource-constrained environments. The accuracy of SqueezeNet is similar to that of AlexNet but with significantly reduced parameters. DeepLoc [44] is a DL algorithm for the prediction of proteins' subcellular localization, demonstrating high accuracy in the bioinformatics field.  
The embedding process using InceptionV3, SqueezeNet, and DeepLoc involves passing each image through the respective model to effectively convert them into numerical representations. Additional attributes, such as the size, height, and width, are created to provide additional contextual information. The flowchart in Figure 1 illustrates the complete process. It starts with employing the raw images, which are resized to \(512\times 512\) pixels. Stratified sampling is also used to maintain a class balance. Embedding techniques are then applied to extract numerical features, including the size, width, and length, using the pre-trained models from InceptionV3, SqueezeNet, and DeepLoc. Finally, the new feature set is trained by the conventional and ensemble ML models. The ML algorithms used here are RF, SVMs, ANNs, KNN, and the stacking of the aggregated results from all methods. On the other hand, a CNN architecture as a standalone framework is also employed in this work to directly classify the images as healthy and unhealthy. Moreover, we consider a multi-classification task for the detection of sugarcane diseases, and the results are compared with those of other DL tools, such as the GRU, RNN, and LSTM.  
\begin{table}
\begin{tabular}{l l l} \hline \hline
**Model** & **Description** & **Feature Layer Used** \\ \hline InceptionV3 & \begin{tabular}{l} CNN developed by Google, pre-trained on \\ ImageNet. \\ \end{tabular} & \
\begin{tabular}{l} Penultimate layer \\ Compact and efficient model trained on \\ ImageNet. \\ \end{tabular} &
\begin{tabular}{l} Pre-softmax layer \\ Network trained on yeast cell images for \\ localization. \\ \end{tabular} \\ \hline \hline \end{tabular}
\end{table}
Table 1: Details of embedding models used for feature extraction.  
The CNN comprises six convolution blocks, followed by fully connected layers. Each convolution block utilizes filters of size \(3\times 3\) with ReLU activation and the same padding to extract spatial features. MaxPooling layers with \(2\times 2\) pooling operations are applied after each block to reduce the spatial dimensions. Dropout layers with rates progressively increasing from 0.2 to 0.5 are included to mitigate overfitting. The hyperparameters were optimized for stability and performance. The learning rate was set to 0.0001 for the ADAM optimizer, ensuring smooth convergence. Training was conducted with a batch size of 32.