Small sample abnormal crowing sound recognition method for white feather broiler based on transfer learning and feature fusion
Patent Information
- Application Number
- CN202610895620.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-22
- Publication Date
- 2026-09-25
AI Technical Summary
[0008]本发明目的是为了解决在小样本类别不平衡条件下,白羽肉鸡异常鸣叫声识别方法准确度、效率和泛化能力低的技术问题,提供了基于迁移学习和特征融合的小样本白羽肉鸡异常鸣叫声识别方法
[0038]本发明提出了基于声学特征约束的差异化数据增强策略,根据不同类别原始样本在频谱质心与有效时长维度的统计分布,设定差异化的增强参数与声学特征约束阈值,对生成样本进行质量筛选,在有效扩充训练样本规模的同时保证了生成样本的物理合理性和声学真实性,解决了现有技术中增强样本容易失真、缺乏声学合理性验证的问题。
Smart Images

Figure CN122821999A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the fields of smart farming and agricultural information technology, and in particular to the recognition of abnormal calls of broiler chickens. Background Technology
[0002] my country is one of the world's largest broiler producers, with white-feathered broilers accounting for over 80% of the country's total broiler output. However, the scale of production is limited, with small and medium-sized farmers accounting for over 60%, and disease monitoring capabilities are weak. Acoustic monitoring offers advantages such as being non-contact and real-time, and can provide early warnings of respiratory diseases by identifying abnormal sounds such as coughing and wheezing. However, the complex noise environment in farms and the extremely high cost of collecting and labeling abnormal sound samples result in a much smaller amount of actually usable labeled data compared to the needs of conventional deep learning.
[0003] There are already several existing technologies for identifying abnormal calls in broiler chickens.
[0004] Chinese patent CN115410711B, published on November 29, 2022, discloses a method for monitoring the health of broiler chickens based on sound signal features and random forests. After initial noise reduction using bandpass filtering and spectral subtraction, Wiener filtering is used for deep noise reduction to extract artificial acoustic features such as short-time energy and short-time zero-crossing rate. A parameter-optimized random forest multi-classification model is then used for frame-by-frame classification, and the proportion of abnormal frames is statistically analyzed to assess health status. The limitation of this approach is that its recognition relies entirely on a single, manually designed feature. The representational power of these features is limited by the designer's prior knowledge. When the number of labeled samples is limited, such pre-defined statistical features cannot fully characterize the subtle acoustic differences in abnormal calls such as coughs and snoring, thus limiting the model's feature discrimination ability.
[0005] Chinese patent CN115546679B, published on December 30, 2022, discloses a non-contact automatic identification method for sick chickens in cages. It uses short-time Fourier transform to convert audio into a spectrogram, which is then input into a first target detection network to locate the vocalization region. Each vocalization region is then segmented and input into a convolutional neural network for voiceprint classification. The limitations of this method are: feature extraction relies on a single spectral modality; the convolutional neural network is trained from a randomly initialized state, and the parameters of the feature extractor are entirely learned from the farm's own data, without incorporating prior parameters pre-trained on a large-scale audio dataset. This results in a high requirement for the number of labeled samples, making it difficult to achieve good generalization performance under small sample conditions; furthermore, this method uses isolated single spectrogram regions as processing units, failing to extract temporal context information from multiple consecutive frames and thus unable to utilize the correlation between abnormal vocalizations.
[0006] Chinese patent CN117975972A, published on May 3, 2024, discloses a method for detecting abnormal vocalizations throughout the entire life cycle of caged broiler chickens based on deep learning. The method involves collecting audio data from caged broiler chickens, preprocessing it to extract sound features, and then using a convolutional neural network classification model built on PyTorch for anomaly identification. Recognition models are constructed and trained separately for datasets from three different growth stages: 10-19 days old, 20-29 days old, and after 30 days old. The limitations of this approach are: firstly, feature extraction relies on single spectral features, and the published document does not disclose the use of multi-scale spectral features for fusion representation; secondly, the convolutional neural network is trained from a randomly initialized state, without incorporating prior parameters pre-trained on a large-scale audio dataset, making it difficult for a deep network trained from scratch to learn robust acoustic feature representations under conditions of scarce labeled samples; and thirdly, the published document does not disclose the use of temporal context information, using independent audio frames as processing units, thus failing to utilize the contextual relationships between abnormal vocalizations.
[0007] In summary, the existing solutions mentioned above, when faced with practical applications where labeled samples are scarce, suffer from inherent limitations in feature representation capabilities, temporal modeling integrity, and prior knowledge utilization, making it difficult to simultaneously achieve high recognition accuracy and strong generalization ability. Therefore, there is an urgent need to propose a method for recognizing abnormal calls of broiler chickens that possesses both high recognition accuracy and strong generalization ability under small sample conditions. Summary of the Invention
[0008] The purpose of this invention is to solve the technical problems of low accuracy, efficiency and generalization ability of abnormal calls of broiler chickens under the condition of small sample class imbalance, and to provide a small sample abnormal call recognition method for broiler chickens based on transfer learning and feature fusion.
[0009] The technical solution adopted by this invention to solve the above problems is: a method for identifying abnormal calls of broiler chickens in a small sample based on transfer learning and feature fusion, the method comprising:
[0010] Step 1: Provide audio signals for the broiler chicken farming environment, which include four types of sounds: normal chirping, coughing, snoring, and wing flapping.
[0011] Step 2: Obtain the statistical analysis results of the mean of the spectral centroid, the standard deviation of the spectral centroid, the mean of the effective duration, and the standard deviation of the effective duration for each category of the audio signal;
[0012] Step 3: Based on the statistical analysis results of Step 2, set differentiated data augmentation transformation parameter ranges and acoustic feature constraint thresholds for different categories, and perform data augmentation operations on the original training set samples to generate augmented samples; the data augmentation operations include at least one of pitch shifting, time stretching, and background noise injection;
[0013] Step 4: Perform quality screening on the generated augmented samples, add the qualified augmented samples to the training set to obtain the expanded training set, so that the number of samples of each category in the expanded training set is balanced and consistent.
[0014] Step 5: Denoise the training set audio and extract the linear and logarithmic Mel spectrum features of each frame of audio. Concatenate the two features in the feature dimension to obtain the handcrafted spectrum features. Use a pre-trained VGGish network as a fixed feature extractor to extract the deep embedding features of each frame of audio.
[0015] Step 6: Concatenate the hand-crafted spectral features and deep embedding features at the frame level to obtain frame-level fused features; perform temporal statistical aggregation on the frame-level fused features to generate fixed-dimensional audio-level global aggregated features;
[0016] Step 7: Calculate the importance score of each dimension in the audio-level global aggregated features based on the random forest algorithm, sort them from high to low importance scores, and select the top K dimensions to form the optimal feature subset, where K is a positive integer;
[0017] Step 8: Based on the optimal feature subset, train Support Vector Machine, Random Forest, and XGBoost classifiers respectively as the first classifier based on the feature transfer learning strategy; simultaneously, fine-tune the spectrogram using a pre-trained ResNet50 network to train the second classifier based on the model transfer learning strategy; the fine-tuning process of the second classifier includes: removing the original ResNet50 classification layer, adding a fully connected layer with an output dimension of 4 after the global average pooling layer, using the Softmax activation function, freezing the feature extractor parameters and training only the classification head during training, and then unfreezing some residual blocks for joint fine-tuning;
[0018] Step 9: Evaluate the changes in classification performance before and after data augmentation. The classification performance includes accuracy, precision, recall, F1 score, and weighted average F1 score. At the same time, calculate and evaluate the classification accuracy and generalization gap of each classifier in the first classifier and the second classifier on the independent test set. The generalization gap is the difference between the training set accuracy and the test set accuracy, which is used to quantify the model's generalization ability.
[0019] Step 10: Analyze the evaluation results of Step 9, compare the classification performance and generalization gap of the two strategies, feature transfer learning and model transfer learning, and select the random forest classifier as the final classification model after comprehensive evaluation. Use the final classification model to classify and identify the calls of white-feathered broilers to be identified, and output the identification results.
[0020] Furthermore, the method for setting the range of data augmentation transformation parameters in step three specifically includes:
[0021] The pitch shift range of snoring is [-4, 4] semitones, the time stretch ratio is [0.8, 1.1], and the signal-to-noise ratio is [25, 35] dB; the pitch shift range of coughing is [-3, 3] semitones, the time stretch ratio is [0.9, 1.1], and the signal-to-noise ratio is [25, 35] dB; the pitch shift range of normal sound is [-2, 2] semitones, the time stretch ratio is [0.95, 1.05], and the signal-to-noise ratio is [25, 35] dB; the pitch shift range of flapping wings is [-6, 6] semitones, the time stretch ratio is [0.6, 1.6], and the signal-to-noise ratio is [20, 35] dB.
[0022] Furthermore, the method for setting the acoustic feature constraint threshold in step three specifically includes:
[0023] The acoustic feature constraint thresholds include duration constraint thresholds and spectral centroid constraint thresholds, wherein: the duration constraint threshold for snoring is 0.8 and the spectral centroid constraint threshold is 0.5; the duration constraint threshold for coughing is 0.8 and the spectral centroid constraint threshold is 0.5; the duration constraint threshold for normal sound is 0.15 and the spectral centroid constraint threshold is 0.1; and the duration constraint threshold for wing flapping sound is 0.4 and the spectral centroid constraint threshold is 0.2.
[0024] Furthermore, in step four, the quality screening specifically includes:
[0025] Calculate the spectral centroid and effective duration of each enhanced sample. When the relative deviation between the effective duration of the enhanced sample and the mean effective duration of the original samples in the same category exceeds a preset duration constraint threshold, or when the relative deviation between the spectral centroid of the enhanced sample and the mean spectral centroid of the original samples in the same category exceeds a preset spectral centroid constraint threshold, the enhanced sample is removed as an unqualified sample.
[0026] Furthermore, in step five, the method for obtaining the hand-crafted spectral features specifically includes:
[0027] Let the short-time Fourier transform power spectrum of frame t be P(k,t). The linear-scale Mel spectrum feature M(f,t) is obtained by passing a 40th-order Mel filter. Natural logarithmic compression is applied to M(f,t), i.e., L(f,t)=ln(M(f,t)+ε), where ε=10^-10, thereby obtaining the logarithmic Mel spectrum feature and generating the logarithmic Mel spectrum. The 40-dimensional linear-scale Mel spectrum feature and the 40-dimensional logarithmic Mel spectrum feature are concatenated along the feature dimension to obtain an 80-dimensional handcrafted spectral feature vector for each frame.
[0028] Further, in step five, the method for extracting the deep embedding features specifically includes: extending the log-Mel spectrogram to a 64-dimensional Mel frequency dimension through linear interpolation; using a sliding window strategy, extracting an audio segment with a duration of 0.96s corresponding to 96 frames centered on the current frame, converting it into a 96×64 single-channel log-Mel spectrogram, inputting it into the VGGish network, and extracting 128-dimensional deep embedding features.
[0029] Furthermore, step six specifically includes:
[0030] For frame t, the 80-dimensional handcrafted spectral features and the 128-dimensional deep embedding features are concatenated at the frame level to obtain a 208-dimensional fused feature vector.
[0031] Let the frame-level fusion feature matrix of a single audio segment be F∈R T×208 , where T is the total number of frames; for the first 80 dimensions corresponding to the hand-crafted spectral features, the mean, standard deviation, maximum and minimum values are calculated respectively; for the last 128 dimensions corresponding to the deep embedding features, only the mean is calculated; all statistics are concatenated in dimensional order to obtain the final audio-level global aggregated features, with a dimension of 80×4+128×1=448 dimensions.
[0032] Furthermore, step nine, which involves evaluating the classification accuracy and generalization gap of each classifier and the second classifier in the first classifier on the independent test set, includes: calculating the accuracy of each classifier on the training set and the accuracy on the test set, and taking the difference between the two as the generalization gap; and comprehensively comparing the test accuracy and generalization gap of each classifier, wherein the smaller the generalization gap, the better the generalization stability of the model.
[0033] Furthermore, the classifier with the highest test accuracy and the generalization gap meeting the preset stability threshold is selected as the final classification model.
[0034] Secondly, the present invention provides a small-sample abnormal call sound recognition system for broiler chickens based on transfer learning and feature fusion. The system has a program module corresponding to the steps of the small-sample abnormal call sound recognition method for broiler chickens based on transfer learning and feature fusion described above. When running, the system executes the steps in the small-sample abnormal call sound recognition method for broiler chickens based on transfer learning and feature fusion.
[0035] Thirdly, the present invention provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor runs the computer program stored in the memory, it performs the steps of a method for identifying abnormal calls of small-sample white-feathered broiler chickens based on transfer learning and feature fusion as described above.
[0036] Fourthly, the present invention provides a computer-readable storage medium for storing a computer program that executes a method for identifying abnormal calls of small-sample broiler chickens based on transfer learning and feature fusion as described above.
[0037] The beneficial effects of this invention are:
[0038] This invention proposes a differentiated data augmentation strategy based on acoustic feature constraints. According to the statistical distribution of different categories of original samples in the dimensions of spectral centroid and effective duration, differentiated augmentation parameters and acoustic feature constraint thresholds are set to screen the quality of generated samples. While effectively expanding the scale of training samples, the physical rationality and acoustic authenticity of generated samples are guaranteed, solving the problems of easy distortion of augmented samples and lack of acoustic rationality verification in the prior art.
[0039] This invention constructs a multi-dimensional fusion feature representation of handcrafted spectral features and deep embedding features. The handcrafted spectral features include linear Mel spectral features and log Mel spectral features, while the deep features are extracted using a pre-trained VGGish network. After frame-level concatenation, the two are aggregated through differential temporal statistics to generate a fixed-dimensional audio-level representation, which fully combines the physical interpretability of handcrafted features with the abstract representation capability of deep features.
[0040] This invention systematically compares the classification performance of two transfer learning strategies—feature transfer and model transfer—in small sample scenarios, and obtains the optimal feature subset after dimensionality reduction by using random forest feature importance screening, thereby improving classification performance while reducing computational complexity.
[0041] This invention introduces the generalization gap as a core evaluation indicator and uses an independent test set to quantify the performance degradation of the model during the training and testing phases. This makes up for the shortcomings of existing research that uses the accuracy of a single test as the evaluation basis, and provides an effective quantitative means to comprehensively measure the model's generalization ability and the reliability of engineering deployment.
[0042] This invention achieves high recognition accuracy and strong generalization ability for identifying abnormal calls in broiler chickens under conditions of small sample class imbalance through data-enhanced acoustic rationality verification, system comparison of transfer learning strategies, and quantitative evaluation of model generalization ability. Experimental results show that the method of this invention can achieve a recognition accuracy of 97.14% on an independent test set, with a generalization gap controlled at 2.86%. It outperforms existing technologies in both classification performance and generalization stability, providing a reusable technical framework for small-sample agricultural acoustic recognition and engineering support for early warning of respiratory diseases in broiler chickens.
[0043] This invention is applicable to health monitoring of broiler chickens under conditions of scarce labeled samples, and is used for early warning and health monitoring of respiratory diseases in broiler chicken farms. Attached Figure Description
[0044] To more clearly illustrate the technical solution of this application, the drawings used in the embodiments will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0045] Figure 1 This is a flowchart of the overall process of the method of the present invention.
[0046] Figure 2 The time-domain waveforms of the sound signals of four types of white-feathered broiler chickens after noise reduction.
[0047] Figure 3 Logarithmic Mel spectrograms of four types of broiler chicken vocal signals.
[0048] Figure 4 This is a comparison of the linear Mel-Meel spectrum and Log-Mel spectrum characteristics of a cough sound signal.
[0049] Figure 5 This is a comparison chart of t-SNE feature distributions before and after feature selection.
[0050] Figure 6 Box plots showing the spectral centroids and effective durations of the original and enhanced samples.
[0051] Figure 7 This is a two-dimensional feature space scatter plot of the original sample and the enhanced sample.
[0052] Figure 8 A comparison chart showing the accuracy of various audio signals before and after data augmentation.
[0053] Figure 9 A comparison chart of recall rates for various audio signals before and after data augmentation.
[0054] Figure 10 A comparison chart of F1 values for various audio signals before and after data augmentation.
[0055] Figure 11 A comparison chart of weighted average indicators for various audio signals before and after data augmentation.
[0056] Figure 12 This is the confusion matrix of the random forest model on the test set in a preferred embodiment of the present invention. Detailed Implementation
[0057] The specific implementation method described herein, a small-sample abnormal call sound recognition method for broiler chickens based on transfer learning and feature fusion, includes:
[0058] Step 1: Provide audio signals for the broiler chicken farming environment, which include four types of sounds: normal chirping, coughing, snoring, and wing flapping.
[0059] Step 2: Perform statistical analysis on the spectral centroids and effective durations of various categories of audio signals to obtain the mean, standard deviation, mean, and standard deviation of the spectral centroids, effective durations, and effective durations for each category;
[0060] Step 3: Based on the statistical analysis results, set differentiated data augmentation transformation parameter ranges and acoustic feature constraint thresholds for different categories, and perform data augmentation operations on the original training set samples to generate augmented samples; the data augmentation operations include at least one of pitch shifting, time stretching, and background noise injection;
[0061] Step 4: Quality screening of the generated augmented samples: Calculate the spectral centroid and effective duration of each augmented sample. When the relative deviation of the effective duration of an augmented sample from the mean effective duration of the original samples in that category exceeds a preset duration constraint threshold, or when the relative deviation of the spectral centroid of an augmented sample from the mean spectral centroid of the original samples in that category exceeds a preset spectral centroid constraint threshold, the augmented sample is discarded as a non-compliant sample. The qualified augmented samples are added to the training set to obtain the expanded training set, ensuring that the number of samples in each category in the expanded training set is balanced and consistent.
[0062] Step 5: Denoise the training set audio and extract the linear and logarithmic Mel spectrum features of each frame of audio. Concatenate the two features in the feature dimension to obtain the handcrafted spectrum features. Use a pre-trained VGGish network as a fixed feature extractor to extract the deep embedding features of each frame of audio.
[0063] Step Six: Concatenate the hand-crafted spectrogram features and the deep embedding features at the frame level to obtain frame-level fused features; perform temporal statistical aggregation on the frame-level fused features to generate fixed-dimensional audio-level global aggregated features; the temporal statistical aggregation includes: calculating the mean, standard deviation, maximum value, and minimum value for the dimensions corresponding to the hand-crafted spectrogram features; and calculating only the mean for the dimensions corresponding to the deep embedding features.
[0064] Step 7: Calculate the importance score of each dimension in the audio-level global aggregated features based on the random forest algorithm, sort them from high to low importance scores, and select the top K dimensions to form the optimal feature subset, where K is a positive integer;
[0065] Step 8: Based on the optimal feature subset, train support vector machine, random forest and XGBoost classifiers respectively as the first classifier based on feature transfer learning strategy; at the same time, use pre-trained ResNet50 network to fine-tune the spectrogram and train the second classifier as the classifier based on model transfer learning strategy.
[0066] Step 9: Evaluate the changes in classification performance before and after data augmentation. The classification performance includes accuracy, precision, recall, F1 score, and weighted average F1 score. At the same time, calculate and evaluate the classification accuracy and generalization gap of each classifier in the first classifier and the second classifier on the independent test set. The generalization gap is the difference between the training set accuracy and the test set accuracy, which is used to quantify the model's generalization ability.
[0067] Step 10: Analyze the evaluation results of Step 9, compare the classification performance and generalization gap of the two strategies, feature transfer learning and model transfer learning, and select the random forest classifier as the final classification model after comprehensive evaluation. Use the final classification model to classify and identify the calls of white-feathered broilers to be identified, and output the identification results.
[0068] Through the above steps, we can achieve the rationality verification of data-enhanced acoustics in small sample scenarios, the comparison and selection of dual transfer learning strategies, and the quantitative evaluation of the model's generalization ability, thus completing the high-precision identification of abnormal calls of broiler chickens.
[0069] Furthermore, the statistical analysis results described in step two include: the mean centroid of the snoring sound spectrum is 8004±1268Hz, and the mean effective duration is 0.064±0.057s; the mean centroid of the cough sound spectrum is 9772±757Hz, and the mean effective duration is 0.024±0.008s; the mean centroid of the normal sound spectrum is 9338±954Hz, and the mean effective duration is 0.031±0.012s; and the mean centroid of the wing flapping sound spectrum is 5804±1526Hz, and the mean effective duration is 0.408±0.233s.
[0070] Furthermore, the differential data augmentation transformation parameters described in step three are as follows: the pitch shift range for snoring is [-4, 4] semitones, the time stretching ratio is [0.8, 1.1], and the signal-to-noise ratio is [25, 35] dB; the pitch shift range for coughing is [-3, 3] semitones, the time stretching ratio is [0.9, 1.1], and the signal-to-noise ratio is [25, 35] dB; the pitch shift range for normal sound is [-2, 2] semitones, the time stretching ratio is [0.95, 1.05], and the signal-to-noise ratio is [25, 35] dB; and the pitch shift range for flapping wings is [-6, 6] semitones, the time stretching ratio is [0.6, 1.6], and the signal-to-noise ratio is [20, 35] dB.
[0071] Furthermore, the acoustic feature constraint thresholds mentioned in step three include duration constraint thresholds and spectral centroid constraint thresholds, wherein: the duration constraint threshold for snoring is 0.8 and the spectral centroid constraint threshold is 0.5; the duration constraint threshold for coughing is 0.8 and the spectral centroid constraint threshold is 0.5; the duration constraint threshold for normal sound is 0.15 and the spectral centroid constraint threshold is 0.1; and the duration constraint threshold for wing flapping sound is 0.4 and the spectral centroid constraint threshold is 0.2.
[0072] Furthermore, the number of enhanced samples generated and screened in steps three and four is configured as follows: 40 enhanced samples are generated per original sample for snoring, 60 enhanced samples are generated per original sample for coughing, 8 enhanced samples are generated per original sample for normal sound, and 250 enhanced samples are generated per original sample for flapping wings; after quality screening, the number of samples of each category in the expanded training set reaches the preset balance value.
[0073] Furthermore, the handcrafted spectral feature mentioned in step five has a dimension of 80, which is formed by concatenating 40-dimensional linear Mel spectral features and 40-dimensional logarithmic Mel spectral features; the deep embedding feature has a dimension of 128; the frame-level fusion feature mentioned in step six has a dimension of 208, and the audio-level global aggregation feature has a dimension of 448.
[0074] Furthermore, the extraction process of the deep embedding features in step five is as follows: the preprocessed log-Mel spectrogram is extended to a 64-dimensional Mel frequency dimension through linear interpolation; a sliding window strategy is adopted to extract an audio segment with a duration of 0.96s and corresponding to 96 frames centered on the current frame, which is converted into a 96×64 single-channel log-Mel spectrogram and input into the VGGish network to extract 128-dimensional deep embedding features.
[0075] Furthermore, the feature importance score in step seven is calculated as follows: the out-of-bag error err1 of each decision tree in the random forest is calculated using out-of-bag data; noise interference is added to a certain feature of the sample in the out-of-bag data, and then the out-of-bag error err2 is calculated; the feature importance score is the average value obtained by summing (err2-err1) of all decision trees and dividing by the number of decision trees N.
[0076] Furthermore, in step seven, the value of K is 80, which means that the 448-dimensional audio-level global aggregated features are compressed into an 80-dimensional optimal feature subset.
[0077] Furthermore, the fine-tuning process of the second classifier in step eight includes: removing the original ResNet50 classification layer, adding a fully connected layer with an output dimension of 4 after the global average pooling layer, using the Softmax activation function, freezing the feature extractor parameters and training only the classification head during training, and then unfreezing some residual blocks for joint fine-tuning.
[0078] Furthermore, step nine, which involves evaluating the classification accuracy and generalization gap of each classifier and the second classifier in the first classifier on the independent test set, includes: calculating the accuracy of each classifier on the training set and the accuracy on the test set, and taking the difference between the two as the generalization gap; and comprehensively comparing the test accuracy and generalization gap of each classifier, wherein the smaller the generalization gap, the better the generalization stability of the model.
[0079] The classification accuracy and generalization gap of each classifier and the second classifier in the first classifier on the independent test set are as follows: Support Vector Machine test accuracy 85.71%, generalization gap 14.29%; Random Forest test accuracy 97.14%, generalization gap 2.86%; XGBoost test accuracy 94.29%, generalization gap 5.71%; Second Classifier test accuracy 88.57%, generalization gap 4.55%.
[0080] Furthermore, the comprehensive analysis and evaluation results in step ten include: selecting the classifier with the highest test accuracy and the generalization gap meeting the preset stability threshold as the final classification model.
[0081] The random forest classifier achieved the highest accuracy on the test set with a generalization gap of 2.86%, demonstrating the best overall classification performance and generalization stability. Therefore, the random forest classifier was selected as the final classification model.
[0082] This embodiment describes a method for identifying abnormal calls in broiler chickens using small-sample data. To address the issues of insufficient acoustic validation of data augmentation, lack of systematic comparison of transfer learning strategies, and lack of quantitative indicators for generalization ability in small-sample scenarios, this invention provides four types of audio signals: normal calls, coughs, wheezing, and wing flapping. Based on the statistical distribution of the spectral centroids and effective durations of each category, differentiated data augmentation parameters and acoustic feature constraint thresholds are set, and an expanded training set is obtained after quality screening. Linear Mel-spectrum features, log-Mel-spectrum features, and VGGish deep embedding features are extracted, and fused features are obtained through frame-level splicing and differential temporal statistical aggregation. The optimal feature subset is then obtained through random forest importance screening. A first classifier based on feature transfer and a second classifier based on model transfer are trained separately. The classification performance and generalization gap before and after data augmentation are evaluated. After comprehensive analysis, random forest is selected as the final classification model for automatic classification and identification of the audio signals. This invention is used for early warning and health monitoring of respiratory diseases in broiler chicken farms.
[0083] Example:
[0084] like Figure 1As shown in the figure, the abnormal call sound recognition method for broiler chickens based on transfer learning and feature fusion provided in this embodiment includes the following steps:
[0085] 1. Data Augmentation and Preprocessing
[0086] Step 1: Providing Audio Signal
[0087] The experimental data came from a large-scale broiler chicken farm, using broiler chickens within their growth cycle as the experimental subjects. The collected vocal signals included four categories: normal calls, coughs, wheezing, and wing flapping sounds, resulting in 113 labeled original samples. A stratified random sampling strategy was used to divide the original dataset into a training set (70%) and a test set (30%). Data augmentation was performed only on the training set to increase the sample size, while the test set remained unchanged for unbiased evaluation of subsequent model performance.
[0088] Step 2: Statistical Analysis of Acoustic Features
[0089] Statistical analysis was performed on the acoustic characteristics of each category in the original training set to obtain the mean and standard deviation of the spectral centroid and the mean and standard deviation of the effective duration for each category. Statistical analysis revealed significant differences in the distribution of the spectral centroid and effective duration for the four sound categories; specific parameters are shown in Table 1.
[0090] Table 1. Statistical Analysis and Constraint Parameters of Acoustic Characteristics for Each Category
[0091]
[0092] As shown in Table 1, although the wing-flapping sound category has only 4 original samples, its mean effective duration (0.408s) is significantly longer than the other three categories, and its mean spectral centroid (5804Hz) is significantly lower, indicating significant differences in both time and frequency domain characteristics. Simultaneously, its standard deviation of duration (0.233s) is relatively large, reflecting the diversity of intra-class variation. Therefore, the highest number of single-sample generation and the widest range of transformation parameters are assigned to it to fully cover its true acoustic feature distribution while expanding the sample size. The snoring sound has 20 samples, and its standard deviation of effective duration is 0.057 seconds, with a much larger intra-class dispersion than the cough sound's 0.008 seconds. Therefore, a wider range of transformation parameters is set to preserve its inherent diversity. The normal sound sample size is relatively sufficient and its distribution is concentrated; therefore, the most conservative transformation parameters are used to maintain its feature compactness. Although the cough sound sample size is limited, its feature distribution is highly concentrated; therefore, the number of single-sample generation is appropriately increased to increase effective variants.
[0093] At the feature constraint level, normal sound samples are plentiful and concentrated, so the strictest duration and centroid constraints are adopted to maintain the compactness of the feature space. Snoring has significant intraclass variation, while coughing, due to the objective need to expand diversity, both are subject to relatively loose constraints. Although the constraint values for wing flapping are 0.4 and 0.2, due to its large original duration and centroid base, the actual allowable absolute fluctuation range is still the largest among the four classes. These values are set to prevent the generation of physically infeasible distorted samples.
[0094] Step 3: Enhance Differentiated Data
[0095] To address the issues of limited training sample size and imbalanced class distribution, this embodiment employs a differential data augmentation method based on acoustic feature boundary constraints. The augmentation operation consists of three types of random transformations: pitch shift, time stretching, and background noise injection. The parameter ranges for each type of differential transformation are shown in Table 2.
[0096] Table 2 Differentiation Enhancement and Sample Balancing Strategies for Each Category
[0097]
[0098] Step 4: Quality Screening
[0099] After the augmented samples are generated, quality screening is performed according to the constraints in Table 1. The spectral centroid and effective duration of each augmented sample are calculated. If the relative deviation of the effective duration of an augmented sample from the mean effective duration of the original samples in that category exceeds the duration constraint threshold, or if the relative deviation of the spectral centroid of an augmented sample from the mean spectral centroid of the original samples in that category exceeds the spectral centroid constraint threshold, then the augmented sample is discarded as a non-compliant sample. If the number of qualified samples after screening for a certain category exceeds the preset target value, 200 samples are randomly selected from the qualified candidate pool to form the final training set. The final training set contains 800 samples, with a balanced sample size across all categories.
[0100] 2. Audio preprocessing
[0101] Step 5: Noise Reduction and Spectrogram Generation
[0102] A standardized preprocessing workflow was applied to the enhanced audio. First, Wiener filtering was used for noise reduction, effectively suppressing interference from ventilation fan noise and flock activity noise in the poultry farming environment while preserving the core characteristics of broiler vocalizations to the greatest extent possible. The time-domain waveforms of the four types of sound signals after noise reduction are as follows: Figure 2 As shown.
[0103] The denoised audio was converted into a log-Mel spectrogram. The audio signal was divided into frames with a frame length of 25ms and a frame shift of 10ms, and a Hamming window was added to suppress spectral leakage. A short-time Fourier transform was performed on each frame to obtain the power spectrum. Log-energy compression was then applied after processing through 40 Mel filter banks. The log-Mel spectrograms for the four sound types are shown below. Figure 3 As shown.
[0104] 3. Feature Extraction and Fusion
[0105] Step Six: Extraction of Hand-crafted Spectral Features and Deep Embedding Features
[0106] (1) Manual Spectrum Feature Extraction
[0107] Let the short-time Fourier transform power spectrum of frame t be P(k,t). The linear-scale Mel spectrum energy M(f,t) is obtained by passing it through 40 Mel filters. The linear Mel spectrum directly preserves the linear scale of M(f,t); the logarithmic Mel spectrum applies a natural logarithmic compression to M(f,t), i.e., L(f,t) = ln(M(f,t) + ε), where ε = 10^-10, to avoid numerical computation issues. The two spectral features are concatenated along their feature dimensions to obtain an 80-dimensional handcrafted spectral feature vector for each frame.
[0108] Figure 4 This paper presents a comparison of two Mel-spectral features of a cough sound signal. The linear-scale Mel-spectrum preserves the original amplitude, highlighting high-energy signals while almost completely masking weak signals. The Log-Mel-spectrum, using a logarithmic dB scale, compresses high-energy signals and amplifies low-energy signals, fully revealing the overall time-frequency energy distribution of the signal. These two spectral features, at different amplitude scales (logarithmic / linear), characterize the time-frequency structure of the sound signal, forming a complementary and effective information exchange.
[0109] (2) Deep embedding feature extraction
[0110] A feature-based transfer learning strategy was adopted, utilizing the VGGish network pre-trained on a large-scale audio dataset (AudioSet) to extract deep features. The VGGish network structure is shown in Table 3, with its input being a 96×64 pixel single-channel log-Mel spectrogram and its output being a 128-dimensional embedding feature.
[0111] Table 3 Vggish Network Structure
[0112]
[0113] The preprocessed 40-dimensional log-Mel spectrogram was extended to a 64-dimensional Mel frequency dimension through linear interpolation to adapt to the network input requirements. In the time dimension, a sliding window strategy was adopted to extract an audio segment of 0.96 seconds (corresponding to 96 frames) centered on the current frame, which was then converted into a 96×64 single-channel log-Mel spectrogram and input into the VGGish network to extract 128-dimensional deep embedding features.
[0114] Step 7: Feature Fusion and Temporal Statistical Aggregation
[0115] First, frame-by-frame feature fusion is performed: For frame t, the 80-dimensional hand-crafted spectral features and the 128-dimensional deep embedding features are concatenated at the frame level to obtain a 208-dimensional fused feature vector.
[0116] Because the varying audio durations result in variable frame counts, which cannot meet the fixed-length input requirements of traditional machine learning classifiers, this embodiment employs a differentiated temporal aggregation strategy. Let the frame-level fusion feature matrix of a single audio segment be F∈R. T×208 Where T is the total number of frames. For the first 80 dimensions corresponding to the hand-crafted spectral features, the mean, standard deviation, maximum, and minimum values are calculated respectively; for the last 128 dimensions corresponding to the deep embedding features, only the mean is calculated. All statistics are concatenated in dimensional order to obtain the final audio-level global aggregated features, with a dimension of 80×4 + 128×1 = 448 dimensions. This aggregation method not only eliminates the problem of variable input dimensions caused by inconsistent audio durations, but also retains key temporal statistical information while compressing dimensions.
[0117] 4. Feature Filtering
[0118] Step 8: Feature Importance Screening
[0119] To reduce the dimensionality of fused features and improve classification performance, this embodiment uses feature importance ranking based on random forest for feature selection. The feature importance is calculated as follows: the out-of-bag error err1 of each decision tree in the random forest is calculated using out-of-bag data; noise interference is added to a certain feature of the sample in the out-of-bag data, and then the out-of-bag error err2 is calculated; the feature importance score is the average value obtained by summing (err2-err1) of all decision trees and dividing by the number of decision trees N.
[0120] Features were sorted from highest to lowest importance score, and the top 80 features were selected as the subset through experimental search. The test accuracies of three classifiers—Support Vector Machine, Random Forest, and XGBoost—were compared before and after selection using default parameters. t-SNE was used to visualize the dimensionality reduction of features before and after selection, observing changes in class separability. Experimental results are shown in Table 4 and... Figure 5 As shown.
[0121] Table 4 Comparison of test accuracy of each classifier before and after feature selection
[0122]
[0123] As shown in Table 4, the accuracy of Random Forest and XGBoost after filtering remained the same as before filtering, at 94.12% and 91.18% respectively, indicating that the tree model has strong robustness to redundant features; the accuracy of SVM increased from 85.29% to 88.24%, indicating that after removing some low-importance features, the discriminative structure of the feature space was optimized, which is beneficial for the distance-based model to construct the classification hyperplane.
[0124] Figure 5 The comparison of t-SNE feature distribution before and after feature selection is shown. Before selection, the overlap between categories was quite serious; after selection, the intra-class cohesion of normal sound increased, the inter-class overlap decreased, and the separability was significantly improved.
[0125] After screening, the feature dimension was compressed from 448 dimensions to 80 dimensions, with a compression rate of 82.14%. This significantly reduced the computational complexity while improving the recognition performance of SVM, and maintained the best accuracy of Random Forest and XGBoost. Therefore, the 80-dimensional features were used in subsequent steps.
[0126] 5. Transfer Learning Classifiers and Performance Evaluation
[0127] Step Nine: Transfer Learning Classifier Training
[0128] Based on the selected 80-dimensional optimal feature subset, support vector machine (SVM), random forest (RF), and XGBoost classifiers were trained respectively, serving as the first classifier based on the feature transfer learning strategy.
[0129] Simultaneously, a model transfer learning-based strategy was employed to train the second classifier. A ResNet50 pre-trained on ImageNet was selected as the base model. Its original classification layer was removed, and a fully connected layer with an output dimension of 4 was added after the global average pooling layer, using the Softmax activation function. Training employed a phased strategy: first, the feature extractor parameters were frozen, and only the newly added classifier head was trained; then, the last few residual blocks of the feature extractor were unfrozen, and fine-tuned jointly with the classifier head. Dropout regularization and weight decay were introduced during training to prevent overfitting, and early stopping was used to monitor validation set performance.
[0130] Step 10: Performance Evaluation
[0131] This embodiment evaluates the model from two dimensions.
[0132] (1) Validation of data augmentation effectiveness
[0133] From a signal analysis perspective, the distribution of each type of sample before and after enhancement in terms of spectral centroid and effective duration is compared as follows: Figure 6 and Figure 7 As shown. Figure 6 The distribution of median and interquartile range in the two acoustic dimensions before and after enhancement for each category is shown. It can be seen that the median, interquartile range, and whisker range of each category after enhancement are highly consistent with the original samples, and no significant center shift or abnormal dispersion is observed. Calculations show that the centroid deviation of the spectrum for each category is controlled within 2.3%, and the effective duration deviation is controlled within 16.1%, with all deviations far below the preset constraint threshold. Figure 7 This further demonstrates that the augmented samples closely follow the distribution of the original samples of each category in the two-dimensional feature space, without any cross-category confusion or serious deviation from the cluster center.
[0134] From a recognition perspective, the comparison of the test accuracy of each model before and after enhancement is shown in Table 5.
[0135] Table 5 Comparison of test accuracy of each model before and after data augmentation
[0136]
[0137] As shown in Table 5, the accuracy of all models was improved after enhancement, with the support vector machine (SVM) based on feature transfer showing the most significant improvement, reaching 25.71%.
[0138] Figures 8 to 11 The changes in precision, recall, F1 score, and weighted average index of each model before and after enhancement are shown for the four types of sound signals. After enhancement, the precision and recall of minority classes such as cough and snoring are significantly improved, and the differences between classes are significantly reduced.
[0139] (2) Comparison of transfer learning strategies and assessment of generalization ability
[0140] To accurately compare the generalization performance of each model, this section adopts a two-stage hyperparameter tuning scheme: The first stage uses 80 original small samples to complete grid hyperparameter optimization and determine the optimal hyperparameter combination. This stage is only used to screen hyperparameters, and the corresponding accuracy is not used as a performance evaluation criterion. In the second stage, the optimized hyperparameters are kept unchanged, and the model is formally trained using 800 augmented data samples. The generalization gap is calculated using the training set accuracy and test set accuracy output by the model in the second stage. The generalization gap = training accuracy - test accuracy. The smaller the generalization gap, the lower the model overfit and the better the generalization performance.
[0141] First, the model's native maximum probability argmax classification rule is adopted without adding a specific threshold for the cough category. The classification performance of each model after two-stage parameter tuning is shown in Table 6.
[0142] Table 6. Comparison of generalization performance of various models in threshold-free optimization
[0143]
[0144] As shown in Table 6, the generalization gap of SVM based on feature transfer is 14.29%, indicating a significant overfitting problem. Random Forest and XGBoost have the same generalization gap of 5.71%. Combined with Figure 7 showing the distribution of spectral centroids and effective duration scatter points in the two-dimensional feature space, there is a large overlap between cough sounds and normal sounds, indicating high similarity in acoustic features in both the time and frequency domains. Furthermore, the original dataset has a scarcity of natural cough samples, with only 17 original effective cough samples. After splitting, the training set has 12 original cough samples, which are expanded to 200 after data augmentation. Only 5 cough samples remain in the test set, further increasing the difficulty of model classification due to the small sample size. Affected by these two factors, both models under the default classification rules resulted in 2 cough samples being missed as normal in the test set, indicating a high rate of missed detections and a significant risk of disease under-screening. The ResNet50 generalization gap is negative -4.68%, indicating insufficient model fitting and underfitting, suggesting that the model failed to fully learn the sample features during training.
[0145] To address the technical shortcoming of feature transfer models in easily missing cough samples, this invention, based on the equal probability benchmark of 1 / 4 = 0.25 in the single-class theory of four-class classification tasks, proposes an independent probability threshold determination strategy for cough categories: when the model outputs a sample with a cough probability ≥ 0.25, it is directly classified as a cough sample; other samples are classified using the original maximum probability criterion. The hyperparameters and training datasets of each model remain completely unchanged; only the 0.25 threshold rule is introduced during the inference stage to optimize the classification logic. For ResNet50, the same cough threshold determination rule is introduced simultaneously in the inference stage. The performance of all optimized models is shown in Table 7.
[0146] Table 7 Comparison of generalization performance of various models after optimization with a cough probability threshold of 0.25
[0147]
[0148] Comparing the experimental data in Tables 6 and 7, we can conclude that:
[0149] After incorporating a 0.25 cough probability threshold optimization strategy into Random Forest and XGBoost using feature transfer, the number of missed cough samples was reduced from 2 to 1, effectively halving the missed diagnosis rate and significantly reducing the risk of disease underscores. Specifically, the accuracy of Random Forest improved from 94.29% to 97.14%, and the generalization gap narrowed from 5.71% to 2.86%, demonstrating significant improvements in overall recognition accuracy and generalization stability. XGBoost effectively optimized cough underscores at the acceptable cost of only generating a very small number of false positives for non-disease-related snore samples.
[0150] After introducing the same threshold constraint, ResNet50 effectively improved the underfitting problem of the model, significantly improved the fitting degree of the training set, increased the training accuracy from 86.75% to 93.13%, and corrected the generalization gap from negative -4.68% to positive +4.55%, completely eliminating the abnormal underfitting defect of the model, with only a small normal fluctuation in the test accuracy.
[0151] Due to its inherent classification mechanism, SVM cannot optimize the missed detection problem through category threshold strategies, and the performance indicators remain basically the same before and after optimization.
[0152] Comprehensive analysis reveals that, due to inherent experimental limitations such as the high similarity between cough sounds and normal sounds, and the scarcity of original cough samples, it is impossible to completely eliminate missed cough detections in this scenario. This invention sets a dedicated cough judgment threshold of 0.25 based on a four-category equal probability benchmark. Without significantly increasing the cost of false positives, it minimizes the probability of missed disease diagnoses, greatly improves the reliability of the model's livestock screening, and aligns with the engineering design principles of prioritizing strict control of missed diagnoses and tolerating a small number of traceable misjudgments in livestock and poultry disease identification.
[0153] Step 11: Comprehensive analysis and determination of the final model
[0154] Combining the original metrics in Table 6 and the metrics after threshold optimization in Table 7: the Random Forest, after threshold improvement of 0.25, achieved a test accuracy of 97.14%, the best among all models, with a generalization gap of only 2.86% and the fewest misclassified cough samples. Random Forest can model based on the selected 80-dimensional features, making the model lightweight, easy to deploy, and the contribution of each feature can be quantified and interpreted. While ResNet50 optimization eliminated underfitting, it resulted in decreased test accuracy, reliance on GPU hardware, and the model was a black box and uninterpretable. XGBoost suffered from additional misclassifications of snoring. SVM had overall low accuracy and severe overfitting. Considering classification accuracy, generalization stability, and practical applicability, the threshold-optimized Random Forest was selected as the final classification model for this solution.
[0155] Figure 12The confusion matrix of the random forest model on the test set is shown. Only one misclassified sample appeared among the four types of sound signals, demonstrating excellent class discrimination ability. This final classification model is then used to classify and identify the calls of white-feathered broiler chickens, and the recognition results are output.
[0156] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Those skilled in the art can make various improvements and modifications to the present invention without departing from its principles and spirit, and these improvements and modifications should also be considered to fall within the protection scope of the present invention.
Claims
1. A method for identifying abnormal calls in small-sample broiler chickens based on transfer learning and feature fusion, characterized in that, The method includes: Step 1: Provide audio signals from the broiler chicken farming environment, which include four types of sounds: normal chirping, coughing, snoring, and wing flapping. Step 2: Obtain the statistical analysis results of the mean of the spectral centroid, the standard deviation of the spectral centroid, the mean of the effective duration, and the standard deviation of the effective duration for each category of the audio signal; Step 3: Based on the statistical analysis results of Step 2, set differentiated data augmentation transformation parameter ranges and acoustic feature constraint thresholds for different categories, and perform data augmentation operations on the original training set samples to generate augmented samples; the data augmentation operations include at least one of pitch shifting, time stretching, and background noise injection; Step 4: Perform quality screening on the generated augmented samples, add the qualified augmented samples to the training set to obtain the expanded training set, so that the number of samples of each category in the expanded training set is balanced and consistent. Step 5: Denoise the training set audio and extract the linear and logarithmic Mel spectrum features of each frame of audio. Concatenate the two features in the feature dimension to obtain the handcrafted spectrum features. Use a pre-trained VGGish network as a fixed feature extractor to extract the deep embedding features of each frame of audio. Step 6: Concatenate the hand-crafted spectral features and deep embedding features at the frame level to obtain frame-level fused features; perform temporal statistical aggregation on the frame-level fused features to generate fixed-dimensional audio-level global aggregated features; Step 7: Calculate the importance score of each dimension in the audio-level global aggregated features based on the random forest algorithm, sort them from high to low importance scores, and select the top K dimensions to form the optimal feature subset, where K is a positive integer; Step 8: Based on the optimal feature subset, train Support Vector Machine, Random Forest, and XGBoost classifiers respectively as the first classifier based on the feature transfer learning strategy; simultaneously, fine-tune the spectrogram using a pre-trained ResNet50 network to train the second classifier based on the model transfer learning strategy; the fine-tuning process of the second classifier includes: removing the original ResNet50 classification layer, adding a fully connected layer with an output dimension of 4 after the global average pooling layer, using the Softmax activation function, freezing the feature extractor parameters and training only the classification head during training, and then unfreezing some residual blocks for joint fine-tuning; Step 9: Evaluate the changes in classification performance before and after data augmentation. The classification performance includes accuracy, precision, recall, F1 score, and weighted average F1 score. At the same time, calculate and evaluate the classification accuracy and generalization gap of each classifier in the first classifier and the second classifier on the independent test set. The generalization gap is the difference between the training set accuracy and the test set accuracy, which is used to quantify the model's generalization ability. Step 10: Analyze the evaluation results of Step 9, compare the classification performance and generalization gap of the two strategies, feature transfer learning and model transfer learning, and select the random forest classifier as the final classification model after comprehensive evaluation. Use the final classification model to classify and identify the calls of white-feathered broilers to be identified, and output the identification results.
2. The method for identifying abnormal calls of broiler chickens based on transfer learning and feature fusion in a small sample, as described in claim 1, is characterized in that: The method for setting the range of data augmentation transformation parameters in step three specifically includes: The pitch shift range of snoring is [-4, 4] semitones, the time stretch ratio is [0.8, 1.1], and the signal-to-noise ratio is [25, 35] dB; the pitch shift range of coughing is [-3, 3] semitones, the time stretch ratio is [0.9, 1.1], and the signal-to-noise ratio is [25, 35] dB; the pitch shift range of normal sound is [-2, 2] semitones, the time stretch ratio is [0.95, 1.05], and the signal-to-noise ratio is [25, 35] dB; the pitch shift range of flapping wings is [-6, 6] semitones, the time stretch ratio is [0.6, 1.6], and the signal-to-noise ratio is [20, 35] dB.
3. The method for identifying abnormal calls of broiler chickens based on transfer learning and feature fusion in a small sample, as described in claim 1, is characterized in that: The method for setting the acoustic feature constraint threshold in step three specifically includes: The acoustic feature constraint thresholds include duration constraint thresholds and spectral centroid constraint thresholds, wherein: the duration constraint threshold for snoring is 0.8 and the spectral centroid constraint threshold is 0.5; the duration constraint threshold for coughing is 0.8 and the spectral centroid constraint threshold is 0.5; the duration constraint threshold for normal sound is 0.15 and the spectral centroid constraint threshold is 0.1; and the duration constraint threshold for wing flapping sound is 0.4 and the spectral centroid constraint threshold is 0.
2.
4. The method for identifying abnormal calls of broiler chickens based on transfer learning and feature fusion in a small sample, as described in claim 1, is characterized in that: Step four, the quality screening specifically includes: Calculate the spectral centroid and effective duration of each enhanced sample. When the relative deviation between the effective duration of the enhanced sample and the mean effective duration of the original samples in the same category exceeds a preset duration constraint threshold, or when the relative deviation between the spectral centroid of the enhanced sample and the mean spectral centroid of the original samples in the same category exceeds a preset spectral centroid constraint threshold, the enhanced sample is removed as an unqualified sample.
5. The method for identifying abnormal calls of broiler chickens based on transfer learning and feature fusion in a small sample, as described in claim 1, is characterized in that: Step five, the method for obtaining the hand-crafted spectral features, specifically includes: Let the short-time Fourier transform power spectrum of frame t be P(k,t). The linear-scale Mel spectrum feature M(f,t) is obtained by passing a 40th-order Mel filter. Natural logarithmic compression is applied to M(f,t), i.e., L(f,t)=ln(M(f,t)+ε), where ε=10^-10, thereby obtaining the logarithmic Mel spectrum feature and generating the logarithmic Mel spectrum. The 40-dimensional linear-scale Mel spectrum feature and the 40-dimensional logarithmic Mel spectrum feature are concatenated along the feature dimension to obtain an 80-dimensional handcrafted spectral feature vector for each frame.
6. The method for identifying abnormal calls of broiler chickens based on transfer learning and feature fusion in a small sample, as described in claim 5, is characterized in that: In step five, the method for extracting the deep embedding features specifically includes: extending the log-Mel spectrogram to a 64-dimensional Mel frequency dimension through linear interpolation; using a sliding window strategy, extracting an audio segment with a duration of 0.96s corresponding to 96 frames centered on the current frame, converting it into a 96×64 single-channel log-Mel spectrogram, inputting it into the VGGish network, and extracting 128-dimensional deep embedding features.
7. The method for identifying abnormal calls of broiler chickens based on transfer learning and feature fusion in a small sample, as described in claim 1, is characterized in that: Step six specifically includes: For frame t, the 80-dimensional handcrafted spectral features and the 128-dimensional deep embedding features are concatenated at the frame level to obtain a 208-dimensional fused feature vector. Let the frame-level fusion feature matrix of a single audio segment be F∈R T×208 , where T is the total number of frames; for the first 80 dimensions corresponding to the hand-crafted spectral features, the mean, standard deviation, maximum and minimum values are calculated respectively; for the last 128 dimensions corresponding to the deep embedding features, only the mean is calculated; all statistics are concatenated in dimensional order to obtain the final audio-level global aggregated features, with a dimension of 80×4+128×1=448 dimensions.
8. The method for identifying abnormal calls of broiler chickens based on transfer learning and feature fusion in a small sample, as described in claim 1, is characterized in that: Step nine, which evaluates the classification accuracy and generalization gap of each classifier and the second classifier in the first classifier on the independent test set, includes: calculating the accuracy of each classifier on the training set and the accuracy on the test set, and taking the difference between the two as the generalization gap; and comprehensively comparing the test accuracy and generalization gap of each classifier, wherein the smaller the generalization gap, the better the generalization stability of the model.
9. The method for identifying abnormal calls of broiler chickens based on transfer learning and feature fusion in a small sample, as described in claim 1, is characterized in that: The classifier with the highest test accuracy and the generalization gap that meets the preset stability threshold is selected as the final classification model.
10. A small-sample abnormal call sound recognition system for broiler chickens based on transfer learning and feature fusion, characterized in that: The system has a program module corresponding to the steps of any one of claims 1-9, and executes the steps in the method for identifying abnormal calls of small-sample white-feathered broiler chickens based on transfer learning and feature fusion when it is run.
Citation Information
Patent Citations
A Health Monitoring Method for Broiler Chickens Based on Sound Signal Features and Random Forest
CN115410711B
A non-contact automatic identification method and system for sick chickens in cages
CN115546679B
Deep learning-based cage rearing broiler whole life cycle abnormal sounding detection method
CN117975972A