# Apple varieties, diseases, and distinguishing between fresh and rotten through deep learning approaches

**Authors:** Tao Zhang, Mustafa Mhamed, Qu Zhang, Liling Yang, Z.H.A.O. Xiaohui, Gu Haiyan, Zhao Zhang

PMC · DOI: 10.1371/journal.pone.0322586 · PLOS One · 2025-05-15

## TL;DR

This paper introduces new datasets and a deep learning model to identify apple varieties, detect rot, and diagnose diseases, improving automation in apple farming.

## Contribution

The paper introduces three new datasets and a novel deep learning model with a custom loss function for improved apple classification and disease detection.

## Key findings

- The proposed model achieved 93.85% accuracy in identifying apple varieties.
- It detected rotten apples with 98.28% accuracy and apple diseases with 99.66% accuracy.
- The model outperformed existing baselines in apple classification tasks.

## Abstract

Apples are one of the most productive fruits in the world, in addition to their nutritional and health advantages for humans. Even with the continuous development of AI in agriculture in general and apples in particular, automated systems continue to encounter challenges identifying rotten fruit and variations within the same apple category, as well as similarity in type, color, and shape of different fruit varieties. These issues, in addition to apple diseases, substantially impact the economy, productivity, and marketing quality. In this paper, we first provide a novel comprehensive collection named Apple Fruit Varieties Collection (AFVC) with 29,750 images through 85 classes. Second, we distinguish fresh and rotten apples with Apple Fruit Quality Categorization (AFQC), which has 2,320 photos. Third, an Apple Diseases Extensive Collection (ADEC), comprised of 2,976 images with seven classes, was offered. Fourth, following the state of the art, we develop an Optimized Apple Orchard Model (OAOM) with a new loss function named measured focal cross-entropy (MFCE), which assists in improving the proposed model’s efficiency. The proposed OAOM gives the highest performance for apple varieties identification with AFVC; accuracy was 93.85%. For the apples rotten recognition with AFQC, accuracy was 98.28%. For the identification of the diseases via ADEC, it was 99.66%. OAOM works with high efficiency and outperforms the baselines. The suggested technique boosts apple system automation with numerous duties and outstanding effectiveness. This research benefits the growth of apple’s robotic vision, development policies, automatic sorting systems, and decision-making enhancement.

## Full-text entities

- **Diseases:** AFD (MESH:D007409), OAOM-VT (MESH:D014786), ADEC (MESH:D002292), plant (MESH:D010939), TEN (MESH:C564021), Apple brown rot (MESH:D005535), OAOM (MESH:D004195), fungal infections (MESH:D009181)
- **Species:** Homo sapiens (human, species) [taxon 9606], Malus domestica (apple, species) [taxon 3750]
- **Mutations:** C - 19 C

## Full text

_Full body text omitted from this summary view._ Fetch the complete paper as Markdown: https://tomesphere.com/paper/PMC12080815/full.md

## Figures

19 figures with captions in the complete paper: https://tomesphere.com/paper/PMC12080815/full.md

## References

83 references — full list in the complete paper: https://tomesphere.com/paper/PMC12080815/full.md

---
Source: https://tomesphere.com/paper/PMC12080815