Fruit Freshness Classification and Detection Based on the ResNet-101 Network and Non-Local Attention Mechanism

Fruit freshness monitoring represents one of the key research foci in the quality control of fruits and vegetables. Traditional manual inspection methods are characterized by subjectivity and inefficiency, which renders them unsuitable for large-scale and real-time detection demands. Automated detec...

Full description

Saved in:
Bibliographic Details
Main Authors: Yuan Shu, Jipeng Zhang, Yihan Wang, Yangyang Wei
Format: Article
Language:English
Published: MDPI AG 2025-06-01
Series:Foods
Subjects:
Online Access:https://www.mdpi.com/2304-8158/14/11/1987
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1850128971731042304
author Yuan Shu
Jipeng Zhang
Yihan Wang
Yangyang Wei
author_facet Yuan Shu
Jipeng Zhang
Yihan Wang
Yangyang Wei
author_sort Yuan Shu
collection DOAJ
description Fruit freshness monitoring represents one of the key research foci in the quality control of fruits and vegetables. Traditional manual inspection methods are characterized by subjectivity and inefficiency, which renders them unsuitable for large-scale and real-time detection demands. Automated detection methods based on deep learning have increasingly attracted attention. In this study, a fruit freshness classification method based on the ResNet-101 network and a Non-local Attention mechanism is proposed. By embedding a Non-local Attention module into ResNet-101, subtle surface feature variations of the fruit are captured, thereby enhancing the model’s capacity to identify rotten areas and detect variations in color under complex backgrounds. Experimental results show that the improved model achieves a precision of 94.7%, a recall of 94.24%, and an F1-score of 94.24%, outperforming conventional ResNet-101, ResNet-50, and VGG-16 models. In particular, under complex environmental conditions, the model demonstrates significantly improved robustness in image processing. The combination of the Non-local Attention mechanism with the ResNet-101 model can substantially enhance the accuracy and stability of fruit freshness detection, which is applicable to real-time monitoring tasks in intelligent agriculture and smart logistics.
format Article
id doaj-art-e93d1f3872d94e52bc43de2eae0ef6d7
institution OA Journals
issn 2304-8158
language English
publishDate 2025-06-01
publisher MDPI AG
record_format Article
series Foods
spelling doaj-art-e93d1f3872d94e52bc43de2eae0ef6d72025-08-20T02:33:08ZengMDPI AGFoods2304-81582025-06-011411198710.3390/foods14111987Fruit Freshness Classification and Detection Based on the ResNet-101 Network and Non-Local Attention MechanismYuan Shu0Jipeng Zhang1Yihan Wang2Yangyang Wei3Architecture and Design College, Nanchang University, Nanchang 330031, ChinaArchitecture and Design College, Nanchang University, Nanchang 330031, ChinaSchool of Art, Wuhan Business University, Wuhan 430056, ChinaArchitecture and Design College, Nanchang University, Nanchang 330031, ChinaFruit freshness monitoring represents one of the key research foci in the quality control of fruits and vegetables. Traditional manual inspection methods are characterized by subjectivity and inefficiency, which renders them unsuitable for large-scale and real-time detection demands. Automated detection methods based on deep learning have increasingly attracted attention. In this study, a fruit freshness classification method based on the ResNet-101 network and a Non-local Attention mechanism is proposed. By embedding a Non-local Attention module into ResNet-101, subtle surface feature variations of the fruit are captured, thereby enhancing the model’s capacity to identify rotten areas and detect variations in color under complex backgrounds. Experimental results show that the improved model achieves a precision of 94.7%, a recall of 94.24%, and an F1-score of 94.24%, outperforming conventional ResNet-101, ResNet-50, and VGG-16 models. In particular, under complex environmental conditions, the model demonstrates significantly improved robustness in image processing. The combination of the Non-local Attention mechanism with the ResNet-101 model can substantially enhance the accuracy and stability of fruit freshness detection, which is applicable to real-time monitoring tasks in intelligent agriculture and smart logistics.https://www.mdpi.com/2304-8158/14/11/1987ResNet-101Non-local Attentionfruit freshness detectiondeep learningimage processingintelligent agriculture
spellingShingle Yuan Shu
Jipeng Zhang
Yihan Wang
Yangyang Wei
Fruit Freshness Classification and Detection Based on the ResNet-101 Network and Non-Local Attention Mechanism
Foods
ResNet-101
Non-local Attention
fruit freshness detection
deep learning
image processing
intelligent agriculture
title Fruit Freshness Classification and Detection Based on the ResNet-101 Network and Non-Local Attention Mechanism
title_full Fruit Freshness Classification and Detection Based on the ResNet-101 Network and Non-Local Attention Mechanism
title_fullStr Fruit Freshness Classification and Detection Based on the ResNet-101 Network and Non-Local Attention Mechanism
title_full_unstemmed Fruit Freshness Classification and Detection Based on the ResNet-101 Network and Non-Local Attention Mechanism
title_short Fruit Freshness Classification and Detection Based on the ResNet-101 Network and Non-Local Attention Mechanism
title_sort fruit freshness classification and detection based on the resnet 101 network and non local attention mechanism
topic ResNet-101
Non-local Attention
fruit freshness detection
deep learning
image processing
intelligent agriculture
url https://www.mdpi.com/2304-8158/14/11/1987
work_keys_str_mv AT yuanshu fruitfreshnessclassificationanddetectionbasedontheresnet101networkandnonlocalattentionmechanism
AT jipengzhang fruitfreshnessclassificationanddetectionbasedontheresnet101networkandnonlocalattentionmechanism
AT yihanwang fruitfreshnessclassificationanddetectionbasedontheresnet101networkandnonlocalattentionmechanism
AT yangyangwei fruitfreshnessclassificationanddetectionbasedontheresnet101networkandnonlocalattentionmechanism