*3.2. Wavelet Scattering Transform Features*

Based on the settings described above, a wavelet scattering network was constructed to extract the wavelet scattering characteristics of the microcurrent signal. After the signal input network, the wavelet scattering transformation was carried out layer by layer, and the 0th scattering output was the convolution coefficient of the original signal and scale function. Figure 7 shows the partial scattering results obtained from the cracked egg sample in

Figure 3e and the intact egg sample in Figure 3f and the scattering coefficient of 8 time windows, respectively.

**Figure 7.** Comparison of wavelet scattering characteristics of cracked eggs and intact eggs. (**a**) The 0th scattering output of Figure 3e of cracked egg sample. (**b**) The 0th scattering output of Figure 3f of intact egg sample. (**c**) Scattering coefficients for 8 time windows of Figure 3e of cracked egg sample. (**d**) Scattering coefficients for 8 time windows of Figure 3f of intact egg sample.

The scattering feature of the cracked egg signal maintains the undulation information at the crack, and the scattering feature of the intact egg signal clarifies the small deformation in the original signal process and maintains the elastic deformation stability of the signal. The feature matrix extracted by the wavelet scattering network maintains the stability of the signal feature while ensuring that the information is not lost so that the cracked egg and intact egg signal features extracted by wavelet scattering transformation have an apparent distinction. The first and second order output a matrix of wavelet scattering coefficients, the dimensions of which represent the scattering path and wavelet scale, respectively. A current signal with a data size of 450 × 1 is input to the wavelet scattering network to extract the wavelet scattering feature with a data size of 64 × 8, where each row and column correspond to one scattering path and one time window, respectively.

#### *3.3. Comparison of Experimental Results and Analysis*

#### 3.3.1. Experimental Results

Based on the optimal hyperparameters, we constructed and trained the wavelet scattering convolutional network to classify the microcurrent signals. In addition, we also used the previously studied methods to classify the microcurrent signals. The resulting comparison of the final classification is shown in Table 2. By comparing the five models, it can be found that WST+1DCNN gets higher results on index *ACC* (99.4393%), *F*1 (99.4357%) and *MCC* (98.8819%). WST+GRU and WST+1DCNN get higher results on *R* (99.6226%) index, WST+Bi-LSTM obtains higher results on index *P* (99.6154%). In general, the detection effects of WST+LSTM, WST+Bi-LSTM, WST+GRU, and WST+1DCNN based on the wavelet scattering convolutional network are superior to existing methods [14]. The algorithm based on WST+1DCNN has the best recognition effect and can effectively and accurately detect cracked eggs. The accuracy is 2.0561% higher than the accuracy of the existing method [14]. In terms of the real-time implementation of the method, the training time of the previous method is faster, being almost half of that of the method studied in this paper. Considering that all models can be pre-trained, the research in this paper is acceptable in terms of

training time. We found that all five methods were able to keep the reasoning time within 0.01 s, with the previous research method processing the fastest at 0.0009 s. In contrast, previous studies used machine learning to extract manual features, while this study uses deep learning to implement, which requires the integration of multiple convolutional blocks, so the network architecture is deep and the time is relatively long. However, the results obtained in this study have met the requirements of industrial real-time detection of egg cracks, and the processing speed is faster than other microcrack detection techniques; see Table 3 for details. In conclusion, the method proposed in this paper can detect cracked eggs effectively and accurately and is acceptable in practical application.

**Table 2.** Experimental results of electrical signal classification algorithm based on wavelet scattering transformation feature.


**Table 3.** Comparison of inference time between the proposed method and other crack detection techniques.


To further verify the validity of the method proposed in this paper, we re-experimented on the dataset used in the existing method [14] and conducted a comparative study. A total of 770 egg signals were collected, including 367 intact egg signals and 403 cracked egg signals. The final results are shown in Table 4. Compared with the existing egg microcrack classification algorithm based on the electrical characteristics model, our proposed method has improved the accuracy rate by 0.3478% in the dataset . Considering the results above, the results obtained in this study on the detection of microcracks based on the electrical characteristics of eggs are better than those obtained by the preliminary experimental methods. It mainly considers feature extraction and classification algorithm. In the aspect of feature extraction, the existing method extracted the time domain feature, frequency domain feature and wavelet feature of the micro-current signal. A specific function calculates the features extracted by the manual design-based feature extraction method, so the extracted features will ignore the changes in detail, resulting in some of the distinguishing representative features being ignored, such as the cracked egg feature shown in Figure 8a, where the crack changes are subtle. The features extracted by traditional manual design methods focus on the general information of the signal and therefore struggle to capture the variations in detail. The wavelet scattering transform used in this paper extracts invariant and small deformation-stable features to extract multi-scale high-frequency feature vectors. The features extracted from the sample in Figure 8a using the wavelet scattering transform are shown in Figure 8b, which is significantly different from the regular intact egg signal features shown in Figure 8c. It can maintain the undulation information at the crack so that the features at the crack can have a clear representation in the whole feature matrix for classification and differentiation. In the aspect of classification algorithm, the machine learning method was used for classification in the previous experiment. Compared with the

machine learning algorithm, the deep learning algorithm used in this study can effectively capture the correlation between long sequences and has a good effect in the processing of time sequences, feature dimensions, and scales and can carry out the comprehensive learning of features. Therefore, the method proposed in this paper can improve the performance of the model according to the electrical characteristics of eggs and can be used online in the detection of microcracked eggs in industrial applications.

**Table 4.** Comparison of the results of the dataset used in the existing method [14].


**Figure 8.** Comparison of sample features extracted using wavelet scattering transform. (**a**) Variation in detail of hard-to-capture microcrack sample signals. (**b**) Extraction of 8 time windows of feature information for such cracked eggs using WST, where eight different colors lines in the figure represent the information of the eight time windows. (**c**) Extraction of 8 time windows of feature information for intact eggs using WST, where eight different colors lines in the figure represent the information of the eight time windows.
