## 4 Framework
### HPA-C Framework
While certain datasets may have different properties, our strategy was designed to maintain a uniform approach that preserves the quality of images while introducing variations that are beneficial for training. We ensured that augmentation operations were applied in a controlled manner, preventing excessive transformations that could distort critical features. An essential first step in utilizing pre-trained architectures based on deep learning for effective representation learning is feature extraction. DenseNet-201 was used in this investigation, with its average pooling layer used to extract features. The densely connected design of DenseNet-201, which encourages feature reuse and addresses the vanishing gradient issue, justifies its adoption as a very effective method for image classification problems. As high-level representations of the input images, the recovered feature vectors capture complex texture-related and spatial properties that help with precise categorization. Following feature extraction, five feature selection algorithms (RelieFF, PSO, GA, GWO, and the suggested HPA-C) are applied to the extracted features. The most pertinent features that have a major impact on classification performance are chosen by each algorithm. The purpose of HPA-C is to increase selection efficiency by utilizing the advantages of ABC, GWO, and BA. The classification model then receives the selected best features (BFs). We performed feature selection analysis across agricultural datasets and found three dominant categories: texture features, color-based features, and shape-based features. Texture features like GLCM contrast and entropy capture surface irregularities. These are crucial for plant disease and soil condition assessment. Color features like mean RGB and HSV histograms helpe evaluate fruit ripeness and plant health by detecting pigmentation changes. Shape features like aspect ratio and compactness are necessary for distinguishing weeds from crops and classifying plant species. The selected features align with key agricultural indicators, emphasizing their biological relevance and consistency across datasets. To validate feature importance, we analyzed selection frequency across datasets. Table 6 summarizes the most frequently chosen features. These results confirm that HPA-C consistently selects biologically meaningful features. After feature selection, a customized convolutional neural network is designed and uses pre-selected high-dimensional features instead of raw images. This reduces computational complexity without sacrificing classification effectiveness. With different convolutional layers, batch normalization, activation functions, and fully connected layers, the CNN architecture is designed to maximize learning and classification accuracy. The efficiency of the model is increased overall because the integration of the chosen features guarantees that only the most discriminative data are used in the classification process. Several performance indicators, like accuracy, macro precision, macro recall, and macro F1 score, are calculated to assess the model's efficacy. Additionally, accuracy is used as a critical criterion in statistical analysis to confirm the superiority of the suggested HPA-C feature selection method. The resilience of HPA-C in maximizing classification performance is confirmed by comparative analysis against alternative feature selection strategies, reaffirming its appropriateness for intelligent agricultural applications. ## 5 Results

The research work was carried out on a PC with an Intel Core i7 processor, 32 GB RAM, and NVIDIA Tesla K40 GPU, and Microsoft Windows 10 Operating System. The framework was implemented using MATLAB 2022A. We calculated performance metrics, specifically accuracy, macro precision, macro recall, and macro F1 score, in order to assess the framework.