Abstract:
Poultry egg crack detection is often required for low missed detection of the minor cracks. Manual feature engineering is also limited to complicated interference environments. In this study, an accurate and rapid detection method was proposed for poultry egg cracks using multi-scale acoustic feature integration and an attention residual network. A four-channel synchronous acquisition was developed, where some eggs were vibrated with the synchronized excitation on two poles on both the longitudinal axis and the equatorial plane. Each egg was treated as a single sample. Simultaneously, its two poles and equatorial plane were excited to capture the crack-related acoustic responses. According to the standard impact force of 8.5 N and a sampling rate of 48 kHz, the spatially distributed acoustic signals were recorded and then organized into a 4 × 4 800 matrix of raw signals. A sixth-order Butterworth band-pass filter was utilized to cut the raw data, in order to preserve the primary vibration frequency region of 2 000~8 000 Hz. Data augmentation approaches were used, such as time shift-offset, frequency domain masking, and harmonic enhancement. A dataset was created with a total of 2,000 samples from 200 brown and white-shelled duck eggs, including 4 levels of crack severity. In feature engineering, the cross-domain feature extraction was undertaken through time-domain, frequency-domain, and time-frequency extraction. In the time domain, 9-dimensional transient impact features were taken, such as root mean square, zero-crossing rate, and skewness. In the frequency domain, 10 features were taken, such as the peak frequency, spectral entropy, and energy in key frequency bands. In time-frequency, various features were recorded, including spectrogram non-uniformity and the variance of the Morlet wavelet. Therefore, a five-dimensional feature space was obtained using a 1 024-point short-time Fourier transform (STFT). A total of 24 features were extracted from each channel. A total of 96-dimensional features were obtained over the four channels. The initial high quantified dimensionality tensor was reduced to 50 highly informative features. A two-stage dimensionality reduction was utilized after Mutual Information (MI) analysis and Recursive Feature Elimination (RFE). The computational complexity was minimized for the classification performance. A case study showed that three indicators of cracks were highly sensitive to the crack presence, including time-domain skewness, spectral entropy, and wavelet variance. A Dynamic Residual Network with Mixed Head Attention (DRSN-MHA) model was established to advance the extraction and discriminative features. The DRSN was focused on the informative feature in order to improve the detection and ultimately its accuracy. The static hyperparameters of neural networks were adaptively tuned to speed the convergence using Bayesian optimization. An Adaptive Weighted Focal Loss (AWFL) function was used to reduce the sample imbalance during training. The experimental findings showed that a multi-class and multi-information extraction model exceeded the performance of the single-feature models. The high accuracy was obtained to save the detection time. The detection model was combined with the DRSN-MHA with AWFL. An overall accuracy of 99.1% was produced with the recall performance rates of 98.1%, indicating the high detection and robustness. Furthermore, the finding can fully meet the real-time processing requirement of seven eggs per second on the production line. This discovery can offer a reliable solution to the economic loss due to eggs with undetected cracks in the shells.