欢迎您访问《智慧农业(中英文)》官方网站! English

Smart Agriculture

• •    

基于空间分辨光谱的鲜食玉米含水率和硬度MaMoNet 检测模型

许敏1, 赵鑫1, 陈艳萍2, 朱启兵1, 黄敏1()   

  1. 1. 江南大学,轻工过程先进控制教育部重点实验室,江苏 无锡 214122,中国
    2. 江苏省农业科学院粮食作物研究所,江苏 南京 210014,中国
  • 收稿日期:2025-12-26 出版日期:2026-03-13
  • 作者简介:

    许 敏,硕士研究生,研究方向为光学检测技术,E-mail:

  • 通信作者:
    黄 敏,教授,博士生导师,研究方向为先进光学检测技术、复杂工业过程建模与智能控制,E-mail:

MaMoNet-Based Detection Model for Moisture Content and Hardness of Fresh Corn Using Spatially Resolved Spectroscopy

XU Min1, ZHAO Xin1, CHEN Yanping2, ZHU Qibing1, HUANG Min1()   

  1. 1. Key Laboratory of Advanced Process Control for Light Industry (Ministry of Education), Jiangnan University, Wuxi 214122, China
    2. Institute of Food Crops, Jiangsu Academy of Agricultural Sciences, Nanjing 210014, China
  • Received:2025-12-26 Online:2026-03-13
  • Foundation items:Jiangsu Provincial Agricultural Science and Technology Independent Innovation Fund (CX [23] 3129)
  • About author:

    XU Min, E-mail:

  • Corresponding author:
    HUANG Min, E-mail:

摘要:

【目的/意义】 含水率和硬度是评价鲜食玉米品质的两个重要参数。传统的基于单点测量的近红外光谱分析技术难以实现对含苞叶鲜食玉米含水率和硬度的高精度检测。 【方法 针对这一问题,以带苞叶鲜食玉米为研究对象,构建多通道可见光-近红外空间分辨光谱采集系统,获取玉米样本的多通道光谱数据,并提出一种融合Mamba状态空间模型与多门专家混合(Multi-gate Mixture-of-Experts, MMoE)机制的多任务预测网络——MaMoNet(Mamba-MMoE Network)。模型首先通过一维卷积结构进行局部特征提取,然后基于Mamba的多尺度特征提取模块捕捉光谱随波段变化的长程依赖特征,随后引入MMoE模块实现籽粒含水率与硬度预测任务间的特征自适应分配。 【结果和讨论】 结果表明:MaMoNet在测试集上玉米籽粒含水率预测的决定系数R²达到了0.93,硬度预测R²达到了0.86,均优于对比模型。消融实验进一步证明Mamba模块在建模光谱长程依赖关系方面具有显著优势,以及MMoE机制能够有效缓解多任务学习中任务间特征竞争问题。 【结论】 MaMoNet模型能够充分利用空间分辨光谱信息,实现带苞叶鲜食玉米籽粒含水率和硬度的高精度同步预测,为鲜食玉米品质的快速、无损检测提供了一种高效可行的方案,具有良好的应用潜力。

关键词: 鲜食玉米, 多通道可见光-近红外光谱, Mamba, 多任务学习, 品质预测

Abstract:

[Objective] Moisture content and kernel hardness are key indicators for evaluating the eating quality and harvest maturity of fresh corn. Accurate and simultaneous prediction of these parameters is essential for quality grading and post-harvest management. However, conventional near-infrared spectroscopy (NIRS) methods are mostly based on single-point measurements, which are easily affected by husk shielding and kernel heterogeneity, resulting in limited prediction accuracy, especially for multi-attribute estimation. Spatially resolved spectroscopy, by acquiring spectral information from multiple measurement channels, can better reflect internal quality differences of corn kernels. Nevertheless, the high dimensionality and strong correlation of spatially resolved spectral data, together with the heterogeneity between different prediction tasks, pose significant challenges to traditional modeling approaches. Therefore, the purpose is to develop an effective multi-task prediction model that can fully exploit spatially resolved spectral information while balancing feature sharing and task specificity for moisture content and kernel hardness prediction in husked fresh corn. [Methods] Husk-on Fresh corn samples were collected across different maturity stages to ensure sufficient variability in moisture content and kernel hardness. A multi-channel visible-near infrared spatially resolved spectroscopy system was constructed to acquire spectral signals from four spatial measurement channels at different source-detector distances. Each corn ear was segmented into multiple positions, and spectral data were collected from different spatial locations to comprehensively capture internal quality information. In total, 500 valid spectral samples were obtained and randomly divided into training, validation, and test sets at a ratio of 7:1:2. Before modeling, the raw spectral data were preprocessed using z-score standardization to eliminate scale differences among channels and wavelengths and to improve numerical stability during training. The proposed MaMoNet (Mamba-MMoE Network) model is composed of three main modules: a one-dimensional convolutional neural network (1D-CNN) for local feature extraction, a Mamba-based sequence modeling module for global dependency learning, and a Multi-gate Mixture-of-Experts (MMoE) module for task-adaptive feature allocation. First, the 1D-CNN module was employed to extract low-level local spectral patterns and reduce feature redundancy. The input spectral data were processed by two successive one-dimensional convolutional layers and down sampling was then applied to compress the spectral length, resulting in a more compact representation and reducing the computational burden for subsequent sequence modeling. Next, the compressed spectral features were fed into the Mamba module to capture long-range dependencies along the spectral dimension. Mamba is a selective state space model that enables efficient modeling of long spectral sequences by dynamically updating hidden states, allowing global spectral evolution patterns to be effectively learned with linear computational complexity. Finally, the output features of the Mamba module were input into an MMoE module to support multi-task learning of moisture content and kernel hardness. Multiple expert networks were shared across tasks, and task-specific gating networks were used to adaptively weight expert outputs, enabling flexible feature sharing and task-specific representation learning. The task-specific features were then passed to individual regression heads to generate the final predictions for moisture content and kernel hardness. To comprehensively evaluate the effectiveness of the proposed approach, MaMoNet was compared with several representative multi-task convolutional neural network models. In addition, ablation experiments were conducted by selectively removing the Mamba module or the MMoE module to analyze their individual contributions to overall performance. [Results and Discussions] Experimental results demonstrated that the proposed MaMoNet model consistently outperformed all comparison models on the test set for both prediction tasks. For moisture content prediction, MaMoNet achieved a coefficient of determination (R2) of 0.93, a root mean square error (RMSE) of 4.66%, and a residual predictive deviation (RPD) of 3.82, indicating excellent predictive accuracy and robustness. For kernel hardness prediction, the corresponding R², RMSE, and RPD values reached 0.86, 4.22 N, and 2.69, respectively, which also surpassed those of the benchmark models. The ablation study further verified the rationality of the proposed model design. Removing both the Mamba and MMoE modules resulted in the poorest performance, whereas introducing either module individually led to noticeable improvements. The best prediction results were achieved when both modules were jointly employed, indicating that their combination is critical for achieving optimal multi-task prediction performance. These results indicated that moisture content and kernel hardness, although correlated, emphasize different spectral characteristics. The flexible feature-sharing mechanism enabled by MMoE allows the model to balance information sharing and task specificity, while the Mamba module ensures effective utilization of long-range spectral information. Together, they contribute to improved generalization performance under limited sample conditions. [Conclusions] This study proposes a MaMoNet model that integrates Mamba-based state space modeling with an MMoE-based multi-task learning strategy for simultaneous prediction of moisture content and kernel hardness in husked fresh corn using spatially resolved spectroscopy. The proposed approach effectively overcomes the limitations of conventional single-point spectral analysis and rigid parameter-sharing multi-task models. Experimental comparisons and ablation analyses confirm that MaMoNet achieves improved accuracy, robustness, and generalization capability. The results demonstrate the potential of the proposed framework for rapid and non-destructive quality assessment of fresh corn and provide useful methodological insights for multi-attribute prediction based on high-dimensional spectral data.

Key words: fresh corn, multi-channel Vis-NIR spectroscopy, Mamba, multi-task learning, quality prediction

中图分类号: