DualTransAttNet: A Hybrid Model with a Dual Attention Mechanism for Corn Seed Classification

Varietal purity is a critical quality indicator for seeds, yet various production processes can lead to the mixing of seeds from different varieties. Consequently, seed variety classification is an essential step in seed production. Existing classification algorithms often suffer from limitations su...

Full description

Saved in:
Bibliographic Details
Main Authors: Fei Pan, Dawei He, Pengjun Xiang, Mengdie Hu, Daizhuang Yang, Fang Huang, Changmeng Peng
Format: Article
Language:English
Published: MDPI AG 2025-01-01
Series:Agronomy
Subjects:
Online Access:https://www.mdpi.com/2073-4395/15/1/200
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1832589392141615104
author Fei Pan
Dawei He
Pengjun Xiang
Mengdie Hu
Daizhuang Yang
Fang Huang
Changmeng Peng
author_facet Fei Pan
Dawei He
Pengjun Xiang
Mengdie Hu
Daizhuang Yang
Fang Huang
Changmeng Peng
author_sort Fei Pan
collection DOAJ
description Varietal purity is a critical quality indicator for seeds, yet various production processes can lead to the mixing of seeds from different varieties. Consequently, seed variety classification is an essential step in seed production. Existing classification algorithms often suffer from limitations such as reliance on single information sources, constrained feature extraction capabilities, time consumption, low accuracy, and the potential to cause irreversible damage to seeds. To address these challenges, this paper proposes a fast and non-destructive classification method for corn seeds, named DualTransAttNet, based on multi-source image information and hybrid feature extraction. High-resolution hyperspectral images of various corn varieties were collected, and a sliding sampling approach was employed to capture feature information across all spectral bands, resulting in the construction of a hyperspectral dataset for corn seed classification. Hyperspectral and RGB image data were then integrated to complement one another’s information and mitigate the insufficient feature diversity caused by single-source data. The proposed method leverages the strengths of convolutional neural networks (CNNs) and transformers to extract both local and global features, effectively capturing spectral and image characteristics. The experimental results demonstrate that the DualTransAttNet model can achieve a compact size of only 1.758 MB and an inference time of 0.019 ms. Compared to typical machine learning and deep learning models, the proposed model exhibits superior performance with an overall accuracy, F1-score, and Kappa coefficient of 90.01%, 88.9%, and 88.4%, respectively. The model’s rapid inference capability and low parameter count make it an excellent technical solution for agricultural automation and intelligent systems, thereby enhancing the efficiency and profitability of agricultural production.
format Article
id doaj-art-3ccae240ce4f4b36a1a094e370e496ba
institution Kabale University
issn 2073-4395
language English
publishDate 2025-01-01
publisher MDPI AG
record_format Article
series Agronomy
spelling doaj-art-3ccae240ce4f4b36a1a094e370e496ba2025-01-24T13:17:09ZengMDPI AGAgronomy2073-43952025-01-0115120010.3390/agronomy15010200DualTransAttNet: A Hybrid Model with a Dual Attention Mechanism for Corn Seed ClassificationFei Pan0Dawei He1Pengjun Xiang2Mengdie Hu3Daizhuang Yang4Fang Huang5Changmeng Peng6College of Information Engineering, Sichuan Agricultural University, Ya’an 625014, ChinaCollege of Information Engineering, Sichuan Agricultural University, Ya’an 625014, ChinaCollege of Information Engineering, Sichuan Agricultural University, Ya’an 625014, ChinaCollege of Information Engineering, Sichuan Agricultural University, Ya’an 625014, ChinaCollege of Information Engineering, Sichuan Agricultural University, Ya’an 625014, ChinaCollege of Information Engineering, Sichuan Agricultural University, Ya’an 625014, ChinaCollege of Information Engineering, Sichuan Agricultural University, Ya’an 625014, ChinaVarietal purity is a critical quality indicator for seeds, yet various production processes can lead to the mixing of seeds from different varieties. Consequently, seed variety classification is an essential step in seed production. Existing classification algorithms often suffer from limitations such as reliance on single information sources, constrained feature extraction capabilities, time consumption, low accuracy, and the potential to cause irreversible damage to seeds. To address these challenges, this paper proposes a fast and non-destructive classification method for corn seeds, named DualTransAttNet, based on multi-source image information and hybrid feature extraction. High-resolution hyperspectral images of various corn varieties were collected, and a sliding sampling approach was employed to capture feature information across all spectral bands, resulting in the construction of a hyperspectral dataset for corn seed classification. Hyperspectral and RGB image data were then integrated to complement one another’s information and mitigate the insufficient feature diversity caused by single-source data. The proposed method leverages the strengths of convolutional neural networks (CNNs) and transformers to extract both local and global features, effectively capturing spectral and image characteristics. The experimental results demonstrate that the DualTransAttNet model can achieve a compact size of only 1.758 MB and an inference time of 0.019 ms. Compared to typical machine learning and deep learning models, the proposed model exhibits superior performance with an overall accuracy, F1-score, and Kappa coefficient of 90.01%, 88.9%, and 88.4%, respectively. The model’s rapid inference capability and low parameter count make it an excellent technical solution for agricultural automation and intelligent systems, thereby enhancing the efficiency and profitability of agricultural production.https://www.mdpi.com/2073-4395/15/1/200corn seed classificationnon-destructive seed detectiondeep learningattention mechanism
spellingShingle Fei Pan
Dawei He
Pengjun Xiang
Mengdie Hu
Daizhuang Yang
Fang Huang
Changmeng Peng
DualTransAttNet: A Hybrid Model with a Dual Attention Mechanism for Corn Seed Classification
Agronomy
corn seed classification
non-destructive seed detection
deep learning
attention mechanism
title DualTransAttNet: A Hybrid Model with a Dual Attention Mechanism for Corn Seed Classification
title_full DualTransAttNet: A Hybrid Model with a Dual Attention Mechanism for Corn Seed Classification
title_fullStr DualTransAttNet: A Hybrid Model with a Dual Attention Mechanism for Corn Seed Classification
title_full_unstemmed DualTransAttNet: A Hybrid Model with a Dual Attention Mechanism for Corn Seed Classification
title_short DualTransAttNet: A Hybrid Model with a Dual Attention Mechanism for Corn Seed Classification
title_sort dualtransattnet a hybrid model with a dual attention mechanism for corn seed classification
topic corn seed classification
non-destructive seed detection
deep learning
attention mechanism
url https://www.mdpi.com/2073-4395/15/1/200
work_keys_str_mv AT feipan dualtransattnetahybridmodelwithadualattentionmechanismforcornseedclassification
AT daweihe dualtransattnetahybridmodelwithadualattentionmechanismforcornseedclassification
AT pengjunxiang dualtransattnetahybridmodelwithadualattentionmechanismforcornseedclassification
AT mengdiehu dualtransattnetahybridmodelwithadualattentionmechanismforcornseedclassification
AT daizhuangyang dualtransattnetahybridmodelwithadualattentionmechanismforcornseedclassification
AT fanghuang dualtransattnetahybridmodelwithadualattentionmechanismforcornseedclassification
AT changmengpeng dualtransattnetahybridmodelwithadualattentionmechanismforcornseedclassification