Abstract:Aiming at the problems of invasiveness, low efficiency and reliance on single-time-point data in traditional hatching egg sex identification methods, to realize non-destructive and high-precision sex detection of hatching eggs during incubation, taking Jingfen No. 1 breeding eggs as the research object, a method integrating hyperspectral imaging and deep learning was proposed, and a multi-stage temporal dynamic detection system was constructed. A dual-channel hyperspectral acquisition system was independently developed to collect data in the 400~1000nm band on the 4th, 7th, 10th, and 13th days of incubation. The central region of interest (ROI) of the egg body was extracted via ellipse fitting. After preprocessing, including Savitzky-Golay smoothing, principal component analysis (PCA) dimensionality reduction and data augmentation, an improved ResNet-18 model incorporating the squeeze-and-excitation (SE) attention module was constructed, and multi-stage temporal feature fusion was realized by combining the long short-term memory (LSTM) module. The results showed that the 10th day of incubation was the optimal detection window, with the sex identification accuracy of the single-period model reaching 82.99%. The accuracy of the temporal fusion model was further improved to 85.2%, 3.3 percentage points higher than that of the standard ResNet-18. The improved model had only 9.9×10? parameters and an inference time of 47 ms per sample, balancing detection accuracy and efficiency. The proposed method overcame the lag and invasiveness defects of traditional technologies, and provided a reliable technical scheme for the intelligent and green development of poultry breeding.