Abstract:The soft-yolk preserved eggs (SYP eggs) and hard-yolk preserved eggs (HYP eggs) each possess distinct textures and flavors, captivating their respective discerning consumers. Presently, artisans can only discern whether an egg is a soft-yolk or hard-yolk preserved egg based on the duration of the brining process, a method that not only demands their extensive expertise but also entails a high rate of misjudgment. To address this issue, the design of infrared imaging and visible/near-infrared spectroscopy acquisition devices was introduced, alongside a classification model for SYP eggs and HYP eggs. Utilizing gathered infrared image data, an enhanced model, ResNet_MLCA, was crafted by incorporating a mixed local channel attention (MLCA) module into the ResNet18 framework, achieving a noteworthy classification accuracy of 95.0% in distinguishing SYP eggs from HYP eggs. Furthermore, leveraging visible/near-infrared spectroscopy data, a one-dimensional residual module was designed, and through its stacking, the 1D_ResNet model for feature extraction and classification of visible/near-infrared spectroscopy data was developed, yielding an identical accuracy of 95.0% in discriminating SYP eggs from HYP eggs. In a bid to further augment detection accuracy, the infrared image features extracted by the ResNet_MLCA model and the visible/near-infrared spectroscopy features extracted by the 1D_ResNet were amalgamated. The resultant fusion model, ResNet_OP, achieved an outstanding classification accuracy of 98.3% in distinguishing SYP eggs from HYP eggs. In summary, this research can offer a novel, cost-effective, and high-precision classification model for SYP eggs and HYP eggs, which held significant implications for guiding preserved egg production and enhancing its quality. Additionally, the proposed method offered a theoretical reference for enhancing the performance of classification models for other agricultural products, aiming to further increase their accuracy and reduce the number of parameters in the fusion model.