Parallel Hybrid CNN-KELM and Attention-Guided Pyramid Transformer Networks for Efficient Fruit Image Classification and Segmentation
摘要
Fruit recognition systems are rapidly growing areas in computer vision for segmentation and classification. The pioneering fruit recognition systems are insufficient for accurately and quantitatively analyzing fruit segmentation and classification, and their computational and generalization efficiencies are also not optimal. In this paper, a novel segmentation approach called Attention-Guided Pyramid Transformer Network (Atn-PTNet) and a classification mechanism termed Fine-tuned Hybrid Parallel Convolutional Neural Network-Kernel Extreme Learning Machine (Ft-HPCNN-KELM) are employed to optimize the segmentation and categorization of fruit images in a fruit recognition system. In the segmentation process, transformer self-attention and feature pyramid attention are incorporated to develop a self-aware attention mechanism that effectively learns extensive and valuable contextual data between encoding characteristics, thereby enhancing the accuracy of image segmentation and the stability of feature maps. Additionally, the Progressive Enhancement Module applies two distinct convolutional procedures, multi-scale dilated convolution, and gated convolution, to produce the gate maps, achieving more detailed data and a higher receptive field. Further extra multi-scale skip connections across decoder blocks are employed to combine features that are upsampled with various semantic scales. Finally, the segmentation quality of fruit images is improved by the proposed Atn-PTNet, which successfully reduces information loss caused by bilinear upsampling. Two distinct kernel functions, global and local, are fused to create a hybrid kernel or hybrid KELM, indicating the classification process to achieve high learning and generalization capacity. Most discriminative information is extracted using parallel CNN and fed into a hybrid KELM for fruit classification. The hyper-parameters of the parallel CNN and hybrid KELM are optimized using the PSO algorithm. Overall, Atn-PTNet achieves 98.86% accuracy, precision of 98.32%, and MAE of 0.855, significantly superior to existing approaches. The Ft-HPCNN-KELM system attains 98.91% accuracy, 97.76% precision, and a Matthews correlation coefficient of 0.931, demonstrating that the proposed fruit recognition system delivers excellent results compared to pioneering mechanisms. The proposed method outperforms both segmentation and classification in all evaluation metrics, highlighting its effectiveness and reliability in accurately recognizing and segmenting various fruit types.