PMT-GAN: Pineapple maturity transformation GAN for enhanced classification network
Accurate identification of pineapple maturity is of paramount significance for enhancing its market value and consumer satisfaction, and it also aids fruit growers in pinpointing the optimal harvesting time. However, in real-world cultivation settings, fluctuations in environmental factors such as light, temperature, and humidity give rise to high variability in the maturity characteristics of pineapple fruits. This results in an extremely limited amount of data for certain maturity stages of pineapple and, consequently, a highly uneven distribution of data across different maturity stages. These factors collectively impede the generalization capability of traditional convolutional neural network-based object detection. To enhance the accuracy and generalization performance of pineapple maturity classification algorithms, this paper introduces an improved Generative Adversarial Network (GAN) model, namely the Pineapple Maturity Transformation GAN (PMT-GAN). By optimizing the generator architecture and incorporating a multiscale feature extraction module, the model’s performance in handling substantial geometric transformations is significantly bolstered. Additionally, the integration of the Swin Transformer module further augments the model’s explicit semantic modeling capabilities. Moreover, the adoption of the SSIM as the cycle consistency loss effectively preserves the structural coherence of images. Experimental results demonstrate that the optimized cycle consistency loss is markedly lower than the conventional loss, with reduced oscillation amplitude. Through UMAP and Grad-CAM visualization techniques, a high degree of similarity between original and generated pineapple images is observed. Compared to the original CycleGAN network, PMT-GAN achieves a maximum reduction of 30.43 percentage points in FID and 38.29 percentage points in KID. Furthermore, the network exhibits commendable generalization performance in maturity transformation experiments with other fruit species. Ultimately, the dataset size for the four maturity stages of pineapple is successfully expanded, with sample numbers becoming more balanced across stages (Stage 1: 1787 images, Stage 2: 1847 images, Stage 3: 1848 images, Stage 4: 1825 images). Detection network experiments based on the expanded dataset indicate that the expanded dataset outperforms the original dataset in key performance metrics such as precision, recall, and mAP. Research findings confirm that PMT-GAN effectively enhances the generation of pineapple maturity data, possesses robust generalization capabilities, and generates data that better serve detection networks. This provides an important methodological reference for the fine-grained classification of fruit maturity and the generation and recognition of relevant data. • PMT-GAN balances 4-stage pineapple data, cuts FID 30.4%, lifts detection mAP to 99%. • Swin-SSIM boosts fruit realism, KID drops 22%, training stabilizes. • Lightweight YOLOv8n on field robot harvests at 92% precision.
Authors
- Shan Zeng (ORCID: https://orcid.org/0000-0002-2497-3363)
- Xiwen Luo
- Yaowen Liu
- Jiahuan Lu
- C.L. Philip Chen
- Chenguang Yang
- Jiehao Li
Institutions
- South China Agricultural University (CN)
- University of Liverpool (GB)
- South China University of Technology (CN)
Publication Details
- Journal
- Computers and Electronics in Agriculture
- Published
- 2026-01-16
- DOI
- https://doi.org/10.1016/j.compag.2026.111435
- Primary Topic
- Smart Agriculture and AI
- Type
- article
- Field-Weighted Citation Impact
- 0.00