Intelligent recognition method for abnormal foraging behaviors of chickens under environmental stress
By constructing an intelligent recognition model for abnormal feeding behavior of chickens under environmental stress and using a multi-perspective deep vision system and multi-parameter sensors to collect data, the problem of insufficient recognition of abnormal feeding behavior of chickens caused by environmental interference in three-dimensional cage farming scenarios is solved, and accurate behavior recognition and stable model expression are achieved.
Patent Information
- Application Number
- CN202510891757.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-30
- Publication Date
- 2025-10-14
AI Technical Summary
Existing technologies have failed to effectively solve the problem of identifying abnormal feeding behavior of chickens caused by environmental stress in three-dimensional cage farming scenarios. There are problems such as lack of environmental interference modeling, limited accuracy of two-dimensional image methods, poor robustness of point sequence disturbances, and weak multi-scale structure fusion capabilities.
A multi-perspective deep vision system is used to collect depth videos and convert them into three-dimensional point cloud sequence data. Combined with multi-parameter environmental data, an intelligent recognition model for abnormal feeding behavior of chickens under environmental stress is constructed, including multi-layer feature extraction, point sequence transformation perception, resolution collaborative enhancement and dynamic feedback control modules. The model is trained and supervised through training sets to achieve accurate capture of key feature points and behavior recognition range and time series modeling.
It improves the recognition stability and accuracy in occluded scenes, realizes the accurate recognition of abnormal feeding behavior of chickens, improves the robustness of the model and the expression ability of multi-scale structures, and solves the recognition deficiency problem in existing technologies.
Smart Images

Figure CN120783389A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of artificial intelligence cross technology, and particularly relates to an intelligent identification method for abnormal feeding behavior of chickens under environmental stress. BACKGROUND
[0002] With the rapid development of intelligent livestock and poultry breeding technology, non-contact behavior monitoring has become an important technical means to ensure chicken health, improve feeding efficiency and achieve precise management. In modern high-density three-dimensional cage poultry houses, timely identification of abnormal feeding behavior of chickens is of great significance for environmental stress warning, abnormal feeding intervention and feeding strategy optimization. However, in the actual breeding scene, there are various dynamic environmental factors in the poultry house, such as temperature, humidity, ammonia, carbon dioxide, light, etc. When these environmental variables approach or exceed the physiological tolerance threshold of the chickens, it will constitute an environmental stress state, which will significantly interfere with the feeding rhythm of the chickens, and show abnormal feeding behaviors such as pecking feathers and anal pecking. Therefore, environmental stress factors are not only the inducing mechanism of abnormal feeding behavior of chickens, but also auxiliary discriminant features in the behavior recognition process, which can enhance the perception ability of the model to the abnormal feeding state.
[0003] Although the current behavior recognition method based on two-dimensional images has made certain progress, it still faces the following challenges in the three-dimensional cage breeding scene: 1) Lack of environmental interference modeling: The environmental factors in the poultry house not only change the feeding behavior pattern of the chickens, but also interfere with the visual acquisition quality, affecting key point detection and behavior judgment. The existing methods generally do not include the environmental stress state in the modeling category, resulting in insufficient accuracy and explainability of behavior recognition in the case of visual quality fluctuation or frequent behavior changes; 2) Limited recognition accuracy of two-dimensional images in occlusion scenarios: In the cage environment where chickens are stacked on top of each other and space is severely compressed, chicken head and beak occlusion or visual dead angles in the feeding area often occur, making it difficult to accurately extract features of key parts, especially for micro-motion recognition; 3) High sensitivity to the order disturbance of point cloud input: In the case of dense chicken aggregation and severe occlusion, inconsistent point cloud input order will lead to unstable feature extraction, and the existing model lacks effective point sequence modeling mechanism, affecting the robustness of structure expression; 4) Insufficient multi-scale local structure modeling capability: The feeding behavior of chickens is mainly driven by small amplitude actions such as head, neck and beak. If the model cannot effectively fuse the multi-scale geometric structure features of the micro-motion area, it will be difficult to accurately identify abnormal behaviors such as pecking, which limits the generalization ability and adaptability of the model. SUMMARY
[0004] In order to overcome the shortcomings of the prior art, the purpose of the present application is to provide an intelligent identification method for abnormal feeding behavior of chickens under environmental stress, which solves the problems of ignoring environmental interference factors, limited accuracy of two-dimensional image method, poor robustness of point sequence disturbance, and weak multi-scale structure fusion capability in the prior art.
[0005] To achieve the above object, the present application provides the following scheme:
[0006] An intelligent identification method for abnormal feeding behavior of chickens under environmental stress, comprising:
[0007] Collecting chicken behavior video and internal multi-parameter environmental data of a poultry house in a three-dimensional cage;
[0008] Using the trained chicken abnormal feeding behavior identification model to identify the on-site chicken behavior video and the internal multi-parameter environmental data of the poultry house, obtaining the chicken abnormal feeding behavior identification result; the training process of the chicken abnormal feeding behavior identification model comprises:
[0009] Defining key feature points and behavior identification range; the key feature points include: crown apex, eye, beak tip, neck, trunk center point, back middle point, abdomen, tail feather base, wing and foot end; the behavior identification range includes: abnormal feeding speed, feeding foreign matter, pecking feather, pecking anus, pecking toe and pecking egg;
[0010] A depth vision system based on multi-view arrangement continuously collects depth video of chickens in the three-dimensional cage poultry house at a horizontal view angle and a downward view angle, and converts the depth video into three-dimensional point cloud sequence data;
[0011] Using multi-parameter sensors to collect internal multi-parameter environmental data of the poultry house; the internal multi-parameter environmental data of the poultry house includes: temperature, humidity, ammonia, carbon dioxide and light intensity;
[0012] Pretreating the three-dimensional point cloud sequence data, and labeling and data set dividing the pretreated three-dimensional point cloud sequence data and the internal multi-parameter environmental data of the poultry house according to the key feature points and the behavior identification range, obtaining a training set;
[0013] Constructing an intelligent identification model for abnormal feeding behavior of chickens under environmental stress; the chicken abnormal feeding behavior identification model comprises: a first multi-layer feature extraction module, a first point sequence transformation perception module, a second multi-layer feature extraction module, a second point sequence transformation perception module, a resolution collaborative enhancement module, a dynamic feedback control module and a behavior identification module connected in turn; the first multi-layer feature extraction module and the second multi-layer feature extraction module both comprise: a point cloud sample selection submodule, a domain construction submodule and a local feature and environmental feature encoding submodule connected in turn;
[0014] Using the training set to train the chicken abnormal feeding behavior identification model, and using a classification label error measurement function to supervise the identification result output by the chicken abnormal feeding behavior identification model in the training process and the real behavior label, obtaining the trained chicken abnormal feeding behavior identification model.
[0015] Preferably, the three-dimensional point cloud sequence data is preprocessed, and the preprocessed three-dimensional point cloud sequence data is labeled and dataset divided according to the key feature points and the behavior recognition range, to obtain a training set, including:
[0016] A joint anomaly score function based on statistical characteristics and spatial density is constructed; the expression of the joint anomaly score function is: Wherein, Ψ (p i ) is a joint anomaly score; β1 and β2 are respectively a first influence weight and a second influence weight; is the average neighborhood distance of point p i ; μ and σ are respectively the mean and standard deviation of ; |N r (p i ) | is the number of neighbor points within a radius r of point p i ; N max is the maximum value of the radius neighbor number;
[0017] The joint anomaly score function is used to calculate the points of each frame in the three-dimensional point cloud sequence data to obtain an anomaly score value, and the three-dimensional point cloud sequence data is determined and removed according to the anomaly score value and a preset anomaly point threshold, to obtain the preprocessed three-dimensional point cloud sequence data.
[0018] Preferably, the training set is used to train a chicken abnormal feeding behavior recognition model, and a classification label error measurement function is used to supervise the recognition result output by the chicken abnormal feeding behavior recognition model in the training process and the real behavior label, to obtain the trained chicken abnormal feeding behavior recognition model, including:
[0019] According to the space distribution balanced point selection strategy, the point cloud sample selection submodule initially randomly selects a point as a starting point, selects the points closest to the starting point to form a point set, selects the point with the maximum minimum distance to any point in the point set as a new sampling point, and updates the new sampling point to the point set for iteration to obtain a selected sample set;
[0020] The domain construction submodule constructs a spatial neighborhood region with a radius of r with each sampling center point of the selected sample set as the center, selects at most K points in each spatial neighborhood region, and obtains a local domain point set corresponding to the sampling center point;
[0021] The local feature and environment feature encoding submodule performs coordinate centering processing and environment feature extraction on the points in the local domain point set to obtain relative coordinates and environment variables, and performs joint splicing and multi-layer nonlinear expression mapping on the relative coordinates and the environment variables respectively, to obtain structure and environment local features.
[0022] Preferably, the chicken abnormal feeding behavior recognition model is trained using the training set, and the recognition results output by the chicken abnormal feeding behavior recognition model during the training process are supervised using a classification label error measurement function and real behavior labels to obtain the trained chicken abnormal feeding behavior recognition model, comprising:
[0023] The input unordered point cloud is converted into an ordered point sequence, and each ordered point sequence is mapped to a high-dimensional feature vector using a multi-layer nonlinear expression mapping structure;
[0024] The high-dimensional feature vector is mapped to a fixed-resolution three-dimensional voxel grid, and the points in the three-dimensional voxel grid are merged to obtain a spatial sparse representation;
[0025] The multi-parameter environment data inside the poultry house corresponding to the ordered point sequence is extracted to obtain an environment embedding vector;
[0026] Relative position encoding is injected into the disordered structure and environment joint local feature;
[0027] The injected structure and environment joint local feature is subjected to channel-by-channel standardization processing, weight matching, multi-layer nonlinear expression mapping, and residual connection to obtain an information residual integration sequence;
[0028] The information residual integration sequence is iterated several times to obtain a multi-scale feature.
[0029] Preferably, the chicken abnormal feeding behavior recognition model is trained using the training set, and the recognition results output by the chicken abnormal feeding behavior recognition model during the training process are supervised using a classification label error measurement function and real behavior labels to obtain the trained chicken abnormal feeding behavior recognition model, comprising:
[0030] The multi-scale feature is divided into a coarse-scale point cloud feature set and a fine-scale point cloud feature set, and the coarse-scale point cloud feature set and the fine-scale point cloud feature set are mapped to first and second encoding vector representations using multi-layer nonlinear expression mapping structure transformations, respectively. A first guide vector is fused into the first encoding vector representation, and a second guide vector is fused into the second encoding vector representation;
[0031] Any of the first and second encoding vector representations is assigned as a query vector, and the vector representation different from the query vector in the first and second encoding vector representations is assigned as a key-value pair;
[0032] The query vector and the key-value pair are cross-modeled to obtain first and second fusion representations; the expression of the cross-modeling is: wherein, K = W K · X (S) ; V = W K · X (S) ; wherein, f(Q, K, V) is the output of the cross modeling; B(·) is a normalization function; is the first guide vector; X (S) is the second encoding vector representation incorporating the second guide vector; W Q , W K , W K are respectively a first linear transformation matrix, a second linear transformation matrix, a third linear transformation matrix; Q is the query vector; K, V are respectively a key vector and a value vector in the key-value pair;
[0033] The first fusion representation and the coarse-scale point cloud feature set are spliced to obtain a first category encoding vector unit, the second fusion representation and the coarse-scale point cloud feature set are spliced to obtain a second category encoding vector unit, and the first category encoding vector unit and the second category encoding vector unit are spliced to obtain a global feature.
[0034] Preferably, the chicken abnormal feeding behavior recognition model is trained using the training set, and the recognition result output by the chicken abnormal feeding behavior recognition model in the training process is supervised using a classification label error measurement function and a real behavior label to obtain the trained chicken abnormal feeding behavior recognition model, including:
[0035] The global feature is arranged in time window order to obtain a time series feature tensor;
[0036] The time series feature tensor is input into a time series modeling structure;
[0037] The output result of the time series modeling structure is input into a full connection layer to generate a prediction probability vector of each type of abnormal feeding behavior;
[0038] The class index with the maximum probability value in the prediction probability vector is determined as the chicken abnormal feeding behavior recognition result in the corresponding time window.
[0039] Preferably, the chicken abnormal feeding behavior recognition model is trained using the training set, and the recognition result output by the chicken abnormal feeding behavior recognition model in the training process is supervised using a classification label error measurement function and a real behavior label to obtain the trained chicken abnormal feeding behavior recognition model, including:
[0040] constructing a feedback control mechanism; the feedback control mechanism comprises: re-executing the feature extraction and recognition process and locally resampling the current area point cloud;
[0041] using the dynamic feedback control module to perform confidence threshold discrimination, when the maximum behavior category confidence of the model output is lower than a preset threshold, triggering the feedback control mechanism;
[0042] using the dynamic feedback control module to monitor the frequency fluctuation of feeding behavior, when the identification frequency of the target abnormal feeding behavior deviates from the historical statistical range by more than a preset threshold, triggering the feedback control mechanism;
[0043] using the dynamic feedback control module to perform key behavior missing analysis, when feeding behavior is not detected or the feeding duration is abnormally short in a continuous preset number of identification cycles, triggering the feedback control mechanism.
[0044] Preferably, the chicken abnormal feeding behavior recognition model is trained using the training set, and the recognition results output by the chicken abnormal feeding behavior recognition model during the training process are supervised using a classification label error measurement function and real behavior labels, to obtain the trained chicken abnormal feeding behavior recognition model, comprising:
[0045] constructing the classification label error measurement function; the expression of the classification label error measurement function is: wherein, is the output of the classification label error measurement function; y i is the independent activation label vector of the real label; is the behavior category probability output by the model; N is the number of samples;
[0046] The chicken abnormal feeding behavior recognition model is iteratively trained using the classification label error measurement function and an adaptive momentum weight update algorithm, to obtain the trained chicken abnormal feeding behavior recognition model.
[0047] Preferably, the chicken abnormal feeding behavior recognition model is trained using the training set, and the recognition results output by the chicken abnormal feeding behavior recognition model during the training process are supervised using a classification label error measurement function and real behavior labels, to obtain the trained chicken abnormal feeding behavior recognition model, further comprising:
[0048] constructing a model performance evaluation index; the model performance evaluation index comprises overall accuracy and average intersection over union; the expression of the overall accuracy formula is:
[0049]
[0050] wherein, OA is the output of the overall accuracy expression; pii represents the number of time windows in which the i-th abnormal feeding behavior is correctly recognized; p ij represents the number of time windows in which the i-th abnormal feeding behavior is misclassified as the j-th abnormal feeding behavior; p ji represents the number of time windows in which the j-th abnormal feeding behavior is misclassified as the i-th abnormal feeding behavior; k is the total number of abnormal feeding behavior categories;
[0051] The overall accuracy and the average intersection over union are used to evaluate the performance of the trained chicken abnormal feeding behavior recognition model, and model performance evaluation data are obtained.
[0052] When the model performance evaluation data meet the preset performance range, the trained chicken abnormal feeding behavior recognition model is output.
[0053] Preferably, an intelligent chicken abnormal feeding behavior recognition system under environmental stress comprises:
[0054] A data acquisition module is configured to acquire chicken behavior videos and internal multi-parameter environment data of a poultry house in a three-dimensional cage.
[0055] A data recognition module is configured to recognize the on-site chicken behavior videos and the internal multi-parameter environment data of the poultry house by using the trained chicken abnormal feeding behavior recognition model, and obtain a chicken abnormal feeding behavior recognition result.
[0056] The present application discloses the following technical effects:
[0057] The present application provides an intelligent chicken abnormal feeding behavior recognition method under environmental stress, which uses a depth camera to acquire depth videos in a three-dimensional cage environment, and constructs a continuous three-dimensional point cloud behavior sequence, thereby solving the problem of ambiguous semantics of chicken abnormal feeding behavior and difficulty in accurately expressing micro-motions in the prior art, and achieving accurate capture of key dynamic behavior features within a time window and time sequence modeling. BRIEF DESCRIPTION OF DRAWINGS
[0058] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings needed in the embodiments. Obviously, the drawings described below only constitute some embodiments of the present application, and for those skilled in the art, other drawings can also be obtained without creative labor on the basis of these drawings.
[0059] Figure 1 The intelligent identification process diagram of chicken abnormal feeding behavior under environmental stress provided by the embodiment of the present application is as shown in
[0060] Figure 2 The poultry key point diagram provided by the embodiment of the present application is as shown in
[0061] Figure 3 The network structure diagram of the chicken abnormal feeding behavior identification model provided by the embodiment of the present application is as shown in DETAILED DESCRIPTION
[0062] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments only constitute some embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of protection of the present application.
[0063] The purpose of the present application is to provide an intelligent identification method of chicken abnormal feeding behavior under environmental stress, to solve the problems of ignoring environmental interference factors, limited precision of two-dimensional image method, poor robustness of point sequence disturbance, and weak multi-scale structure fusion capability in the prior art.
[0064] In order to make the above-mentioned purposes, features and advantages of the present application more apparent and easy to understand, the present application will be further described in detail below with reference to the drawings and specific embodiments.
[0065] Figure 1 The intelligent identification process diagram of chicken abnormal feeding behavior under environmental stress provided by the embodiment of the present application is as shown in Figure 1 The present application provides an intelligent identification method of chicken abnormal feeding behavior under environmental stress, which comprises:
[0066] Step 100: collecting chicken behavior video and internal multi-parameter environment data of poultry house in a three-dimensional cage;
[0067] Step 200: using the trained chicken abnormal feeding behavior identification model to identify the on-site chicken behavior video and the internal multi-parameter environment data of the poultry house, to obtain the chicken abnormal feeding behavior identification result; the training process of the chicken abnormal feeding behavior identification model comprises:
[0068] Step 201: Define key feature points and behavior recognition ranges; the key feature points include: the crest apex, eyes, beak tip, neck, trunk center, back midpoint, abdomen, tail feather base, wings, and foot tips; the behavior recognition range includes: abnormal feeding speed, feeding on foreign objects, feather pecking, anus pecking, toe pecking, and egg pecking; the above abnormal feeding behaviors are comprehensively identified through continuous dynamic features in the three-dimensional point cloud behavior segments within a certain time window;
[0069] Step 202: The depth vision system based on the multi-view layout continuously collects depth videos of the chickens in the three-dimensional cage poultry house from a horizontal perspective and a top-down perspective, and converts the depth videos into three-dimensional point cloud sequence data;
[0070] Step 203: using a multi-parameter sensor to collect multi-parameter environmental data inside the poultry house; the multi-parameter environmental data inside the poultry house includes: temperature, humidity, ammonia, carbon dioxide and light intensity;
[0071] Step 204: pre-processing the three-dimensional point cloud sequence data, and labeling and dividing the pre-processed three-dimensional point cloud sequence data and the multi-parameter environmental data inside the poultry house according to the key feature points and the behavior recognition range to obtain a training set;
[0072] Step 205: Constructing an intelligent recognition model for abnormal feeding behavior of chickens under environmental stress; the abnormal feeding behavior recognition model for chickens includes: a first multi-layer feature extraction module, a first point sequence transformation perception module, a second multi-layer feature extraction module, a second point sequence transformation perception module, a resolution collaborative enhancement module, a dynamic feedback control module, and a behavior recognition module, which are connected in sequence; the first multi-layer feature extraction module and the second multi-layer feature extraction module each include: a point cloud sample selection submodule, a domain construction submodule, and a local feature and environmental feature encoding submodule, which are connected in sequence;
[0073] Step 206: Use the training set to train the chicken abnormal feeding behavior recognition model, and use the classification label error measurement function to supervise the recognition results output by the chicken abnormal feeding behavior recognition model during the training process and the true behavior label to obtain the trained chicken abnormal feeding behavior recognition model.
[0074] Specifically, the three-dimensional point cloud sequence data is preprocessed, and the preprocessed three-dimensional point cloud sequence data is labeled and divided into data sets according to the key feature points and the behavior recognition range to obtain a training set, including:
[0075] Construct a joint anomaly score function based on statistical characteristics and spatial density; the expression of the joint anomaly score function is: Among them, Ψ(p i) is a joint anomaly score; β1, β2 are the first and second influence weights, respectively; is the average neighborhood distance of point p i ; μ, σ are the mean and standard deviation, respectively; |N r (p i )| is the number of neighbor points within a radius r of point p i ; N max is the maximum value of the radius neighbor number;
[0076] The joint anomaly score function is used to calculate the points in each frame of the three-dimensional point cloud sequence data to obtain an anomaly score value, and the three-dimensional point cloud sequence data is determined and removed according to the anomaly score value and a preset anomaly point threshold value. The three-dimensional point cloud sequence data after preprocessing is obtained.
[0077] Further, the chicken abnormal feeding behavior recognition model is trained using the training set, and the recognition result output by the chicken abnormal feeding behavior recognition model during the training process is supervised using a classification label error measurement function and a real behavior label to obtain the trained chicken abnormal feeding behavior recognition model, including:
[0078] According to the space distribution balanced point selection strategy, the point cloud sample selection submodule initially randomly selects a point as a starting point, selects the points closest to the starting point to form a point set, selects the point with the maximum minimum distance to any point in the point set as a new sampling point, and updates the new sampling point to the point set for iteration to obtain a selected sample set.
[0079] The domain construction submodule uses each sampling center point of the selected sample set as the center of a sphere to construct a spatial neighborhood region with a radius of r, and selects at most K points in each spatial neighborhood region to obtain a local domain point set corresponding to the sampling center point.
[0080] The local feature and environment feature encoding submodule performs coordinate centering processing and environment feature extraction on the points in the local domain point set to obtain relative coordinates and environment variables, and performs joint splicing and multi-layer nonlinear expression mapping on the relative coordinates and the environment variables, respectively, to obtain structure and environment local features.
[0081] Specifically, the chicken abnormal feeding behavior recognition model is trained using the training set, and the recognition result output by the chicken abnormal feeding behavior recognition model during the training process is supervised using a classification label error measurement function and a real behavior label to obtain the trained chicken abnormal feeding behavior recognition model, including:
[0082] Convert the input unordered point cloud into an ordered point sequence, and use a multi-layer nonlinear expression mapping structure to map each of the ordered point sequences into a high-dimensional feature vector;
[0083] Mapping the high-dimensional feature vector to a three-dimensional voxel grid with a fixed resolution, and merging points within the three-dimensional voxel grid to obtain a spatial sparse representation;
[0084] Extracting the multi-parameter environmental data inside the poultry house corresponding to the ordered point sequence to obtain an environmental embedding vector;
[0085] injecting relative position codes into the scrambled structure and environment joint local features;
[0086] The injected structure and environment joint local features are subjected to channel-by-channel normalization, weight matching, multi-layer nonlinear expression mapping and residual connection to obtain an information residual integration sequence;
[0087] The information residual integration sequence is iterated several times to obtain multi-scale features.
[0088] Furthermore, the training set is used to train the abnormal feeding behavior recognition model for chickens, and the classification label error measurement function is used to supervise the recognition results output by the abnormal feeding behavior recognition model for chickens and the true behavior labels during the training process, thereby obtaining the trained abnormal feeding behavior recognition model for chickens, including:
[0089] Dividing the multi-scale features into a coarse-scale point cloud feature set and a fine-scale point cloud feature set, mapping the coarse-scale point cloud feature set and the fine-scale point cloud feature set into a first encoding vector representation and a second encoding vector representation using a multi-layer nonlinear expression mapping structure transformation, integrating a first guide vector into the first encoding vector representation, and integrating a second guide vector into the second encoding vector representation;
[0090] Assigning any vector representation of the first encoded vector representation and the second encoded vector representation as a query vector, and assigning a vector representation of the first encoded vector representation and the second encoded vector representation that is different from the query vector as a key-value pair;
[0091] Cross-modeling is performed on the query vector and the key-value pair to obtain a first fused representation and a second fused representation; the expression of the cross-modeling is: in, K=W K ·X (S) ; V = W K ·X (S) ; Wherein, f(Q,K,V) is the output of the cross modeling; B(·) is the normalization function; is the first guiding vector; X(S) the second encoding vector representing the second guide vector; W Q , W K , W K are respectively a first linear transformation matrix, a second linear transformation matrix, and a third linear transformation matrix; Q is the query vector; K and V are respectively a key vector and a value vector in the key-value pair;
[0092] stitching the first fusion representation and the coarse-scale point cloud feature set to obtain a first category encoding vector unit, stitching the second fusion representation and the coarse-scale point cloud feature set to obtain a second category encoding vector unit, and stitching the first category encoding vector unit and the second category encoding vector unit to obtain a global feature.
[0093] Specifically, the chicken abnormal feeding behavior recognition model is trained using the training set, and the recognition result output by the chicken abnormal feeding behavior recognition model in the training process is supervised using a classification label error measurement function and a true behavior label to obtain the trained chicken abnormal feeding behavior recognition model, including:
[0094] arranging the global feature in a time window order to obtain a time series feature tensor;
[0095] inputting the time series feature tensor into a time series modeling structure;
[0096] inputting an output result of the time series modeling structure into a full connection layer to generate a prediction probability vector of each type of abnormal feeding behavior;
[0097] determining a class index with the maximum probability value in the prediction probability vector as the chicken abnormal feeding behavior recognition result of the chicken in the corresponding time window.
[0098] Further, the chicken abnormal feeding behavior recognition model is trained using the training set, and the recognition result output by the chicken abnormal feeding behavior recognition model in the training process is supervised using a classification label error measurement function and a true behavior label to obtain the trained chicken abnormal feeding behavior recognition model, including:
[0099] a feedback control mechanism is constructed; the feedback control mechanism includes: re-executing a feature extraction and recognition process and locally resampling a current region point cloud;
[0100] confidence threshold discrimination is performed using the dynamic feedback control module, and when the maximum behavior class confidence of the model output is lower than a preset threshold, the feedback control mechanism is triggered;
[0101] The dynamic feedback control module is used for monitoring the frequency fluctuation of feeding behavior. When the identification frequency of the target abnormal feeding behavior deviates from the historical statistical range by more than a preset threshold, the feedback control mechanism is triggered.
[0102] The dynamic feedback control module is used for key behavior missing analysis. When feeding behavior is not detected or the feeding duration is abnormally short within a continuous preset number of identification cycles, the feedback control mechanism is triggered.
[0103] Specifically, the chicken abnormal feeding behavior identification model is trained using the training set, and the identification results output by the chicken abnormal feeding behavior identification model during the training process are supervised using a classification label error measurement function and real behavior labels, to obtain the trained chicken abnormal feeding behavior identification model, which includes:
[0104] The classification label error measurement function is constructed. The expression of the classification label error measurement function is: Wherein, is the output of the classification label error measurement function; y i is an independent activation label vector of the real label; is the behavior class probability output by the model; N is the number of samples;
[0105] The chicken abnormal feeding behavior identification model is iteratively trained using the classification label error measurement function and an adaptive momentum weight update algorithm, to obtain the trained chicken abnormal feeding behavior identification model.
[0106] Further, the chicken abnormal feeding behavior identification model is trained using the training set, and the identification results output by the chicken abnormal feeding behavior identification model during the training process are supervised using a classification label error measurement function and real behavior labels, to obtain the trained chicken abnormal feeding behavior identification model, which further includes:
[0107] A model performance evaluation index is constructed. The model performance evaluation index includes overall accuracy and average intersection over union. The expression of the overall accuracy formula is:
[0108]
[0109] Wherein, OA is the output of the overall accuracy expression; p ii represents the number of time windows in which the i-th abnormal feeding behavior is correctly identified; p ij represents the number of time windows in which class i is misclassified as class j; p ji represents the number of time windows in which class j is misclassified as class i; k is the total number of abnormal feeding behavior classes;
[0110] The average intersection-over-union index is used to measure the label coincidence degree of the predicted category and the real category in the time window segment, and the expression is:
[0111]
[0112] wherein, IoU avg is the output of the average intersection-over-union expression;
[0113] The overall accuracy and the average intersection-over-union are used to evaluate the performance of the trained chicken abnormal feeding behavior recognition model, and model performance evaluation data is obtained;
[0114] When the model performance evaluation data meets the preset performance range, the trained chicken abnormal feeding behavior recognition model is output.
[0115] Preferably, an intelligent chicken abnormal feeding behavior recognition system under environmental stress includes:
[0116] A data acquisition module is configured to acquire chicken behavior videos and internal multi-parameter environment data of a poultry house in a three-dimensional cage;
[0117] A data recognition module is configured to recognize the on-site chicken behavior videos and the internal multi-parameter environment data of the poultry house by using the trained chicken abnormal feeding behavior recognition model, and obtain a chicken abnormal feeding behavior recognition result.
[0118] Specifically, the embodiment provides an intelligent chicken abnormal feeding behavior recognition method under environmental stress, which includes:
[0119] Key feature points and behavior recognition range are defined;
[0120] A chicken abnormal feeding behavior dataset is made;
[0121] An intelligent chicken abnormal feeding behavior recognition model under environmental stress is constructed, which includes a multi-layer feature extraction module, a point sequence transformation perception module, a resolution collaborative enhancement module, a dynamic feedback control module, and a behavior recognition module;
[0122] The model is trained and a chicken abnormal feeding behavior recognition result is output;
[0123] The performance of the chicken abnormal feeding behavior recognition model is evaluated.
[0124] Further, the key feature points and behaviors of chickens are defined, the behaviors of chickens directly reflect the health status of the chickens, and are an important reference for evaluating the growth and development and welfare level of the chickens. The key feature points and behaviors of the chickens can be scientifically determined according to published literatures, expert opinions, and field observation results. In the embodiment, the chickens studied include broilers and laying hens. Figure 2As shown, the present embodiment defines the key feature points related to the feeding behavior of broilers and laying hens as the crown vertex, eye, beak tip, neck, trunk center point, back midpoint, abdomen, tail base, wing, and foot end. The abnormal feeding behavior of the chickens studied in the present embodiment includes abnormal feeding speed, feeding of foreign matter, pecking of feathers, anal pecking, toe pecking, and egg pecking. The above abnormal feeding behavior is comprehensively identified by the continuous dynamic features in the three-dimensional point cloud behavior segment within a certain time window. Figure 2 The numerals represent the following meanings: 1 is the crown vertex; 2 is the eye; 3 is the beak tip; 4 is the neck; 5 is the trunk center point; 6 is the back midpoint; 7 is the abdomen; 8 is the tail base; 9 is the wing; and 10 is the foot end.
[0125] Optionally, the environmental stress refers to the stress effect on the abnormal feeding behavior pattern of the chickens when the environmental factors in the poultry house approach or exceed the tolerance threshold of the chickens; the environmental factors in the poultry house include temperature, relative humidity, ammonia concentration, carbon dioxide concentration, and light intensity; the environmental stress state includes but is not limited to the following threshold conditions: temperature below 15°C or above 25°C, relative humidity below 40% or above 70%, ammonia concentration above 20 ppm, carbon dioxide concentration above 2000 ppm, sleep time light intensity above 10 lux, and feeding time light intensity less than 10 lux or greater than 30 lux.
[0126] Further, the internal environment data of the poultry house is collected in real time using a multi-parameter sensor, including temperature, relative humidity, ammonia concentration, carbon dioxide concentration, and light intensity. The environmental stress state will interfere with or change the behavior pattern of the chickens, resulting in changes in behavior such as reduced feeding and frequent restlessness. During the collection stage, the light intensity has a significant impact on the reconstruction accuracy of the depth camera, and local noise and occlusion artifacts may occur in the point cloud under extremely low light. The multi-parameter sensor module described in the present example includes a temperature and humidity sensor, an ammonia sensor, a carbon dioxide sensor, and a light intensity sensor, which are installed at different vertical levels (upper, middle, and lower) and spatial distribution areas (front, middle, and rear) of the poultry house to ensure uniformity of the air layer covering multiple cage layers. The sampling period of each sensor is set to 30 seconds per time. The collected environmental data is synchronized and aligned with the image frames of the depth video through time stamping, and is bound to the corresponding point cloud data frames to form joint multi-modal training samples.
[0127] Optionally, the abnormal feeding behavior of the chickens is divided into six categories, and to improve the real-time and accuracy of identification, the present embodiment uses a 5-second time window to uniformly analyze the abnormal feeding behavior of the chickens. In each window, the key point dynamic features, spatial position changes, and time sequence behavior patterns are extracted, and the behavior is classified and determined according to the following rules (see Table 1 for details). The thresholds can be adaptively fine-tuned during the model deployment stage to adapt to the differences of different breeding scenarios.
[0128] Table 1
[0129]
[0130] Specifically, a chicken abnormal feeding behavior dataset is made. Data collection: In this embodiment, a Kinectv2 depth camera is used to continuously collect the behavior of chickens in a high-density three-dimensional cage poultry house environment. The depth camera is installed vertically on the poultry house ceiling beam through a top-hanging structure, and the collection angle is mainly a downward angle and a part of an oblique angle. The camera lens is arranged downward to form a downward view, which can cover multiple cage layer areas and adapt to the complex environment of chickens stacked up and down and densely blocked in a three-dimensional cage raising scene. Multiple cameras can be symmetrically arranged along the length direction of the poultry house to form a multi-angle observation array, supporting the compensation and fusion of multi-view point cloud frames to improve the structure restoration ability and behavior integrity perception in the blocked area. The horizontal distance between each camera and the three-dimensional chicken cage is about 0.6 meters to 1.5 meters, which is maintained within the best distance measurement range of the Kinectv2 depth imaging to ensure the point cloud density and measurement accuracy; the sampling frame rate is set to 30 fps to meet the time resolution required for behavior analysis. The corresponding RGB video stream is saved synchronously with each depth video for subsequent key point labeling and behavior label labeling tasks.
[0131] Preferably, data conversion: for the collected depth video data, this embodiment uses a three-dimensional reconstruction tool to process it frame by frame and converts it into a continuous three-dimensional point cloud sequence. Specifically, the following steps are included:
[0132] Depth images are extracted from the depth video frame by frame; based on the intrinsic parameters of the Kinectv2 camera, each depth pixel is converted into the corresponding three-dimensional space coordinates through pixel back projection to form single-frame point cloud data. The point clouds of each frame are combined in chronological order to construct a continuous point cloud time sequence.
[0133] For multi-view input, according to the timestamp synchronization and extrinsic parameter calibration, the point clouds collected at different angles are spatially registered and fused to improve the structural integrity and restoration ability in the blocked area.
[0134] The collected depth video is converted into a continuous three-dimensional point cloud sequence data by a three-dimensional reconstruction tool, and each frame of point cloud data contains spatial three-dimensional coordinate information.
[0135] Further, point cloud preprocessing: the preprocessing method constructs a joint anomaly score function based on statistical features and spatial density, and considers the neighborhood distance deviation and local spatial sparsity of points to realize the determination and elimination of abnormal points, specifically:
[0136] For each point p i ∈P, define the joint anomaly score function:
[0137]
[0138] wherein, is the average neighborhood distance of point p i , the calculation formula is N k (p i ) is the k nearest neighbors of point p i , k is the number of nearest neighbors of each point used to calculate the average neighborhood distance, which is a positive integer; μ and σ are the mean and standard deviation of the average neighborhood distance, respectively, and the calculation formulas are n is the total number of points in the point cloud set P; r is the set field search radius, used to control the size of the radius neighborhood, |N r (p i )| is the number of neighbor points within the radius r of point p i , the calculation formula is: N r (p i ) = {p q ∈ P | ||p q -p i || < r}, N max is the maximum value of the number of radius neighbors among all points; β1, β2 ∈ [0, 1] satisfy β1+ β2 = 1, which is used to control the influence weight of the two types of indicators; Ψ(p i ) is the joint anomaly score, the larger the value, the more abnormal the point. Set the anomaly point threshold Ψ th , if Ψ(p i )> Ψ th , then the point p i is determined as an abnormal point and is removed.
[0139] Preferably, data labeling. In order to improve the structural semantic understanding ability of the model to the abnormal feeding behavior of the chicken, the continuous three-dimensional point cloud sequence data is manually labeled frame by frame based on three-dimensional visualization interactive software. In the labeling process, first, the training personnel manually selects the key feature points of the chicken in the visualization interface according to the morphological structure experience of the chicken, including but not limited to the crown top point, the eye, the beak tip, the neck, the trunk center point, the back middle point, the abdomen, the tail feather base, the wing and the foot end, etc., and then determines the abnormal feeding behavior category label corresponding to the current time period in combination with the dynamic motion trajectory of the chicken in the time window and the original behavior video shot synchronously. The abnormal feeding behavior category is defined according to the preset template, including typical behaviors such as abnormal feeding speed, feeding foreign matter, pecking feathers, pecking anus, pecking toes, pecking eggs, etc., and the system supports adding, merging or renaming the category. The labeling process adopts a double-person cross-auditing mechanism, and each piece of labeling data is independently completed by two labelers and is compared for consistency by the system; if there is a conflict label, it is submitted to expert review, and the professional personnel finally confirm to ensure the accuracy and consistency of the data labeling.
[0140] Furthermore, the dataset is divided. After the annotation is completed and passes the quality review, the fully annotated dataset is divided into a training set, a validation set, and a test set in a ratio of 8:1:1. The division process follows the following principles:
[0141] 1) Ensure that all types of abnormal feeding behavior are covered in the three subsets to avoid uneven distribution of categories;
[0142] 2) Continuous behavioral segments of the same chicken in adjacent time windows must not appear in both the training set and the test set to prevent the model from overfitting due to individual leakage or behavior repetition;
[0143] 3) A random segmentation strategy of video clips based on time windows is adopted to ensure sample diversity and improve the generalization ability of the model.
[0144] After the division is completed, each subset is saved as a structured data unit, including: point cloud frame sequence, key point coordinates, behavior category labels and synchronized environment parameter information corresponding to each time window, which is used for subsequent model training and tuning to participate in the performance evaluation process.
[0145] Specifically, an intelligent recognition model for abnormal feeding behavior of chickens under environmental stress is constructed. Figure 3 As shown, the chicken abnormal feeding behavior recognition model includes a multi-layer feature extraction module, a point sequence transformation perception module, a resolution collaborative enhancement module, a behavior recognition module, and a dynamic feedback control module. The multi-layer feature extraction module is used to extract the geometric structure of the point cloud in layers to achieve cage layer resolution and target individual separation; the point sequence transformation perception module enhances the adaptability to point sequence disturbances and improves the recognition stability of the model in occluded scenes; the resolution collaborative enhancement module integrates multi-resolution features, strengthens boundary modeling, and achieves enhanced expression of multi-scale boundary features of key parts such as the head and beak; the dynamic feedback control module sets the trigger threshold based on the recognition result and automatically executes the "recognition-response-re-recognition" feedback strategy; the behavior recognition module outputs the recognition result of the abnormal feeding behavior category of the chicken.
[0146] Furthermore, the multi-layer feature extraction module includes a sample selection module, a domain construction module, and a local feature and environmental feature encoding submodule (local feature + environmental feature encoding submodule). The sample selection module selects several points from the point cloud as the center points of the local area through a spatial distribution balanced point selection strategy; the domain construction module constructs a radius neighborhood area for each center point based on the Euclidean distance and selects a fixed number of domain point sets; the local feature + environmental feature encoding submodule converts the point coordinates in the area into relative coordinates to obtain the feature representation vector of the local area. Specifically:
[0147] Perform two multi-layer feature extractions on the input point cloud (N, d+C), where N is the number of points in the original point cloud, d is the spatial coordinate dimension of each point, and C is the additional feature dimension of each point;
[0148] The spatially balanced point selection strategy is implemented iteratively, initially randomly selecting a point as the starting point. Each subsequent round selects the point with the greatest minimum distance to any point in the currently selected point set as the new sampling point, thereby achieving uniform distribution and representative coverage across the entire point cloud space. The sample selection module selects N1 representative center points from the N points in the input point cloud, and the output is (N1, d + C). This layer does not change the feature dimension, but only reduces the number of points.
[0149] The domain construction module is for each sampling center point x c ∈P, construct a spatial neighborhood area N with its center and radius r c , the field is defined as: N c ={x i ∈P||x i -x c ||2≤r}. Among them, x i is the neighborhood point to be selected in the point cloud, x c is the spatial coordinate of the current center point, ||x i -x c ||2 is point x i Relative to the center point x c The Euclidean distance of c Select up to K points to form the local domain point set corresponding to the center point, which is used for subsequent local feature + environmental feature encoding and structural expression. The domain construction module makes each center point selected in the previous step have a small local area of K points, and the output is (N1, K, d+C);
[0150] The local feature + environmental feature encoding submodule first performs coordinate centering processing on all points in the neighborhood area constructed by each sampling center point, and expresses the spatial position of the point as a local coordinate system relative to the center point. The centralization expression is: Where, Represents the coordinates of the i-th domain point in the j-th dimension; represents the coordinates of the center point in the jth dimension; K is the data of the neighborhood midpoint; d is the spatial dimension. Then, the relative coordinate x i -x c , the additional feature f of this point i ∈ Embedded feature vector with the internal environment of the poultry house Perform feature splicing and nonlinear transformation to obtain the local representation of each neighborhood point: h i =A([xi -x c |f i |e env ]). Where A(·) is a multi-layer nonlinear expression mapping structure, which consists of several linear transformation and nonlinear activation units, e env =[T,RH,CO2,N3,LUX] represents the environmental state vector collected synchronously in the current point cloud frame, which is applicable to all neighboring points in the current point domain. Given an input vector The multi-layer nonlinear expression mapping structure includes l layers, and the calculation formula of the lth layer is: h (l) =σ(W (l) h (l-1) +b (l) ), l=1,2,…,L. Where, σ(·) is the nonlinear response function; is the learnable parameter matrix of the lth layer; is the offset adjustment factor; is the output feature vector of the lth layer. Finally, the features of all neighborhood points are aggregated through the local aggregation mechanism to obtain the local structural feature vector of the neighborhood of the current center point. The local feature + environmental feature encoding submodule eliminates the translation dependency of the point cloud through relative coordinate centralization, introduces environmental perception features and spatial position and additional attributes for fusion modeling, realizes nonlinear spatial mapping with the help of multi-layer nonlinear expression mapping structure, and adopts local feature aggregation mechanism to realize invariant feature extraction. This module can extract discriminative geometric structure representations in local areas. After processing, the domain construction module forms a C1-dimensional feature output for each local area, and the output is (N1, d+C1);
[0151] After two multi-layer feature extractions, the output is (N2, d + C2). The multi-layer feature extraction module is suitable for high-density three-dimensional caged poultry houses where birds are stacked up and severely blocked. It can improve the resolution of point cloud structures between different cage layers and the accuracy of local feature extraction.
[0152] Specifically, the point sequence transformation perception module includes an initialization phase and an encoding phase. This module designs an efficient feature encoder based on point cloud sequence modeling to alleviate the occlusion interference and arrangement inconsistency problems of poultry point clouds in high-density three-dimensional cage poultry houses, so as to improve the spatial dependency modeling capability and expression robustness of points. The initialization phase is used to convert the disordered point cloud into an input format suitable for sequence modeling. Specifically, it includes: Perform spatial traversal encoding to generate an ordered point sequence, and map each point p through a multi-layer nonlinear expression mapping structure. i Mapped to a high-dimensional feature vector: e i =A(p i ).
[0153] Furthermore, the encoding stage is used to capture the contextual dependency information between points and enhance perception. It includes the following steps: 1) Spatial voxel sparsification: Map the point cloud to a fixed-resolution 3D voxel grid and merge the points in the grid to obtain a spatial sparse representation. 2) Sequence perturbation: disrupt the sequence order to prevent the model from overfitting to the fixed point order structure and improve generalization ability. 3) Cross position encoding: inject relative position encoding into the perturbed sequence, expressed as: Where φ(·) is the cross-position embedding function calculated based on the grid center and point location. 4) Information Residual Integration Unit (repeated N times): Each unit includes channel-by-channel normalization, a weight matching module, a multi-layer nonlinear expression mapping structure, and a residual connection module. 5) Multi-layer Perception Stacking: The above modules are repeated S times to construct a deep point sequence modeling network, enhancing the abstraction capability of feature representation.
[0154] Preferably, the point sequence transformation perception module receives the poultry point cloud feature tensor output by the multi-layer feature extraction module in the previous stage. The module internally constructs a spatial structure embedding and local sequence modeling structure, introducing a point sequence modeling mechanism to enhance point sequence sensitivity and spatial context modeling capabilities. The input is mapped to a spatial representation vector of a unified dimension F, and the output feature dimension is (N2, F), where F is the unified embedding feature dimension after point sequence modeling.
[0155] Specifically, the resolution collaborative enhancement module is used to fuse spatial features extracted at multiple resolutions, thereby addressing the structural differences and behavioral boundary ambiguity of poultry point clouds at different scales in high-density three-dimensional cage poultry houses, thereby improving the model's ability to fuse multi-scale features and the accuracy of global semantic modeling. This module includes the following steps: 1) Multi-scale grouping and feature representation: The input multi-scale features are divided into a coarse-scale point cloud feature set. and fine-scale point cloud feature sets The multi-layer nonlinear expression mapping structure is transformed into the encoding vector unit representation, and the category guide vector is added. Splicing to form sequence output: Where C(·) is the concatenation function. 2) Resolution Collaborative Enhancement Module: The class encoding vector units of one scale (for example, the coarse scale) are used as the query vector, and all encoding vector units of the other scale are used as key-value pairs to participate in the weight calculation. The cross-modeling is performed on the relationship between the two scales, which can be expressed as: K=W K ·X (S) ,V=W K ·X (S) Among them, W Q , W K , W Kis a learnable linear transformation matrix. The schematic formula of the weight matching module is: where d k is the query-key feature matching dimension, and B(·) represents a normalization function. After obtaining the fused representation is spliced with the original local feature unit to form The same operation can be performed on the fine-scale branch to complete the information cross. 3) Fusion and classification: the class encoding vector units obtained by the two branches (fused ) are spliced to obtain the global feature and output: The module can improve the robustness of feature representation and enhance the global semantic modeling ability of the model for point cloud structure by introducing a cross-scale feature matching mechanism between different scales. The module can improve the robustness of feature representation and enhance the global semantic modeling ability of the model for point cloud structure by introducing a cross-scale feature matching mechanism between different scales. The output of the module is where F is a unified feature dimension set by the model.
[0156] Specifically, the behavior recognition module performs a chicken abnormal feeding behavior classification task based on the input global point cloud feature sequence, and includes a time series modeling structure and a classification output mechanism. The module includes the following steps: 1) Time series modeling: arrange the global features in time window order to construct a time series feature tensor, and input the time series feature tensor into the time series modeling structure to mine the evolution law and dependency relationship of abnormal feeding behavior in the time dimension; the expression of the time series feature tensor is where h t is the final time series feature representation of the t-th frame, and are the forward and backward hidden states of the bidirectional gated recurrent unit, respectively, GRU fwd and GRU bwd are forward / backward bidirectional gated recurrent unit functions for extracting time series features, f t is the global point cloud feature vector of the t-th frame within the time window; 2) Classification output: input the output result of the time series modeling structure into a fully connected layer to generate a prediction probability vector for each type of abnormal feeding behavior; the expression of the prediction probability vector is where W is the output weight matrix, b is the bias vector, is a normalized activation function, and outputs the confidence distribution of each category. 3) Abnormal behavior recognition result output: the index of the category with the maximum probability value in the prediction probability vector is determined as the recognition result of the abnormal feeding behavior of the chicken in the corresponding time window; the index of the category with the maximum probability value in the prediction probability vector is expressed as where k * is the index of the recognized abnormal feeding behavior category.
[0157] Further, the dynamic feedback control module is located between the model multi-layer neural connection unit and the output layer, and is used for real-time monitoring and dynamic response control of the chicken abnormal feeding behavior recognition result. The feedback trigger threshold is set based on the following multiple indicators of the classification output result: 1) confidence threshold judgment: when the probability confidence of the maximum behavior category in the prediction result is less than 0.6, the feedback is triggered; 2) behavior frequency abnormality monitoring: a short period recognition sequence of 6 consecutive 5-second sliding windows (30 seconds in total) is used to count the frequency of abnormal feeding behavior (such as feeding too fast) in the period; if the frequency is significantly higher than twice the historical average or lower than 0.5 times the historical average, it is judged that the feeding behavior rhythm is abnormal, and the feedback is triggered; 3) key behavior loss monitoring: if no feeding behavior category is recognized in the continuous 3 sliding windows (15 seconds in total), or the feeding duration is always less than the set threshold (such as 2 seconds) in the continuous windows, the system determines that there is a feeding chain loss or recognition abnormality, and the feedback is triggered. In order to improve the response sensitivity of the system, the feedback mechanism adopts a single condition trigger strategy, that is, when any of the above judgment conditions is met, the feedback operation process is triggered. The feedback control mechanism includes the following operations: the feedback information is returned to the sample selection module of the first multi-layer feature extraction module, the recent point cloud frame sequence is retrieved back, and the feature extraction and recognition process is re-executed; the current region point cloud is locally resampled to enhance the spatial feature expression, forming a “recognition-response-re-recognition” closed loop mechanism, thereby improving the robustness and stability of the system in the case of serious occlusion or ambiguous behavior.
[0158] Preferably, the model is trained and the chicken abnormal feeding behavior recognition result is output. In the training process, a classification label error measurement function is used to supervise the recognition result and the true behavior label, and the overall precision and the average intersection over union are used to measure the recognition effect of the model. The classification label error measurement function is in the following form:
[0159]
[0160] where y i is an independent activation label vector of the true label, is the behavior category probability output by the model.
[0161] During the optimization process, an adaptive momentum weight update algorithm is used. The initial update step size is set to 0.001, and a parameter update step size adjustment mechanism is introduced to improve the convergence performance. The parameter update step size adjustment strategy is as follows:
[0162]
[0163] Among them, η0 is the initial update step size, γ is the step size reduction coefficient, T is the update step size adjustment period, and t is the number of update rounds of current model training.
[0164] Furthermore, the performance of the chicken abnormal feeding behavior recognition model was evaluated. In the performance evaluation, the overall accuracy reflects the degree of consistency between the predicted label and the true label, and the calculation formula is:
[0165]
[0166] The average intersection-over-union ratio is used to measure the label overlap between the predicted category and the true category within the time window segment. The calculation formula is as follows:
[0167]
[0168] Among them, p ii represents the number of time windows in which the i-th type of abnormal feeding behavior is normally identified, p ij represents the number of time windows that class i is incorrectly classified into class j; p ji represents the number of time windows that incorrectly classify category j into category i; k is the total number of abnormal feeding behavior categories.
[0169] Furthermore, experimental results show that on a self-constructed dataset of abnormal chicken feeding behavior, the method of this embodiment can achieve the following recognition performance: an overall accuracy of over 93%, an average intersection-over-union ratio of over 83%, and good discrimination between similar behaviors such as feather pecking and anus pecking; especially in complex scenes with large occlusions and posture changes, the model still maintains stable recognition accuracy and exhibits strong robustness.
[0170] The beneficial effects of the present invention are as follows:
[0171] (1) The present invention constructs a structurally and semantically complete dataset of abnormal feeding behavior of chickens. It uses a depth camera to collect videos of chickens in three-dimensional cage poultry houses, generates a three-dimensional point cloud sequence within a time window, and combines key point annotation with a time period behavior label binding mechanism to support the accurate annotation of multiple categories of abnormal feeding behaviors, enriching the multimodal behavior recognition data resources in high-density poultry house scenarios.
[0172] (2) The application constructs a deep visual recognition model suitable for high-density cage environment, which integrates multi-layer feature extraction, point sequence transformation perception, resolution collaborative enhancement and dynamic feedback control modules, and has strong robustness to bird body occlusion, behavior overlap and point cloud disturbance; The application comprehensively considers the dual influence of environmental stress variables (including temperature, relative humidity, ammonia concentration, carbon dioxide concentration and light intensity) on chicken abnormal feeding behavior changes and visual perception interference: on the one hand, the modeling environmental changes adjust the behavior pattern, improve the accuracy and adaptability of behavior recognition; On the other hand, the introduction of environmental features compensates for the recognition error caused by point cloud quality fluctuation, which improves the accuracy, explainability and cross-scene generalization ability of the recognition model.
[0173] (3) The application has good engineering implementability and industrial application prospect, the method provided by the application does not need to wear any equipment, is suitable for simultaneous recognition of abnormal feeding behaviors of multiple chickens in a poultry house, has the advantages of low invasion, high adaptation, strong real-time performance, etc., and can be widely applied to the fields of intelligent livestock and poultry breeding, agricultural robot behavior perception, agricultural AI vision and the like.
[0174] The embodiments in the specification are described in a progressive manner, and each embodiment focuses on the difference from other embodiments, and the same or similar parts between the embodiments can be referred to each other. For the system disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple, and the related parts can be referred to the method part.
[0175] In this paper, specific examples are used to illustrate the principles and implementation modes of the application, and the above embodiment description is only used to help understand the method and core idea of the application; At the same time, for those skilled in the art, according to the idea of the application, the specific implementation mode and application range will be changed. In view of the above, the content of the specification should not be understood as a limitation of the application.
Claims
1. An intelligent method for identifying abnormal feeding behavior of chickens under environmental stress, characterized in that: include: Collect chicken behavior videos and multi-parameter environmental data inside three-dimensional cage poultry houses; Using the trained chicken abnormal feeding behavior recognition model to identify the on-site chicken behavior video and the multi-parameter environmental data inside the poultry house, to obtain a chicken abnormal feeding behavior recognition result; The training process of the abnormal chicken feeding behavior recognition model includes: Define key feature points and behavior recognition ranges; key feature points include: crown apex, eyes, beak tip, neck, trunk center, back midpoint, abdomen, tail feather base, wings, and foot tips; behavior recognition ranges include: abnormal feeding speed, feeding on foreign objects, feather pecking, anus pecking, toe pecking, and egg pecking; A multi-view depth vision system continuously captures depth videos of the chickens in the three-dimensional cage poultry house from a horizontal perspective and a top-down perspective, and converts the depth videos into three-dimensional point cloud sequence data; Using a multi-parameter sensor to collect multi-parameter environmental data inside the poultry house; the multi-parameter environmental data inside the poultry house includes: temperature, humidity, ammonia, carbon dioxide and light intensity; Preprocessing the three-dimensional point cloud sequence data, and annotating and dividing the preprocessed three-dimensional point cloud sequence data and the multi-parameter environmental data inside the poultry house according to the key feature points and the behavior recognition range to obtain a training set; Construct an intelligent recognition model for abnormal feeding behavior of chickens under environmental stress; the abnormal feeding behavior recognition model for chickens includes: a first multi-layer feature extraction module, a first point sequence transformation perception module, a second multi-layer feature extraction module, a second point sequence transformation perception module, a resolution collaborative enhancement module, a dynamic feedback control module, and a behavior recognition module connected in sequence; the first multi-layer feature extraction module and the second multi-layer feature extraction module each include: a point cloud sample selection submodule, a domain construction submodule, and a local feature and environmental feature encoding submodule connected in sequence; The training set is used to train the abnormal feeding behavior recognition model of chickens, and the classification label error measurement function is used to supervise the recognition results output by the abnormal feeding behavior recognition model of chickens and the true behavior labels during the training process to obtain the trained abnormal feeding behavior recognition model of chickens.
2. The intelligent identification method for abnormal feeding behavior of chickens under environmental stress according to claim 1, characterized in that: Preprocessing the three-dimensional point cloud sequence data, and labeling and dividing the preprocessed three-dimensional point cloud sequence data into data sets according to the key feature points and the behavior recognition range to obtain a training set, including: Construct a joint anomaly score function based on statistical characteristics and spatial density; the expression of the joint anomaly score function is: Among them, Ψ(p i ) is the joint anomaly score; β1 and β2 are the first influence weight and the second influence weight respectively; For point p i The average neighborhood distance of The mean and standard deviation of |N r (p i )| is point p i The number of neighbor points within radius r; N max is the maximum number of neighbors within the radius; The joint anomaly score function is used to calculate the points in each frame of the three-dimensional point cloud sequence data to obtain an anomaly score value, and the three-dimensional point cloud sequence data is judged and eliminated based on the anomaly score value and a preset anomaly point threshold to obtain the preprocessed three-dimensional point cloud sequence data.
3. The intelligent identification method for abnormal feeding behavior of chickens under environmental stress according to claim 2, characterized in that: The training set is used to train the abnormal feeding behavior recognition model of chickens, and the classification label error measurement function is used to supervise the recognition results output by the abnormal feeding behavior recognition model of chickens and the true behavior label during the training process to obtain the trained abnormal feeding behavior recognition model of chickens, including: According to the spatial distribution balanced point selection strategy, the point cloud sample selection submodule initially randomly selects a point as a starting point, selects the point closest to the starting point to form a point set, selects the point with the largest minimum distance to any point in the point set as a new sampling point, and updates the new sampling point to the point set for iteration to obtain a selected sample set; Using the domain construction submodule, taking each sampling center point of the selected sample set as the sphere center, constructing a spatial neighborhood region with a radius r, selecting at most K points in each of the spatial neighborhood regions, and obtaining a local domain point set corresponding to the sampling center point; The local feature and environmental feature encoding submodule is used to perform coordinate centering processing and environmental feature extraction on the points in the local area point set to obtain relative coordinates and environmental variables. The relative coordinates and environmental variables are respectively combined and mapped with multi-layer nonlinear expression to obtain structural and environmental local features.
4. The intelligent identification method for abnormal feeding behavior of chickens under environmental stress according to claim 3, characterized in that: The training set is used to train the abnormal feeding behavior recognition model of chickens, and the classification label error measurement function is used to supervise the recognition results output by the abnormal feeding behavior recognition model of chickens and the true behavior label during the training process to obtain the trained abnormal feeding behavior recognition model of chickens, including: Convert the input unordered point cloud into an ordered point sequence, and use a multi-layer nonlinear expression mapping structure to map each of the ordered point sequences into a high-dimensional feature vector; Mapping the high-dimensional feature vector to a three-dimensional voxel grid with a fixed resolution, and merging points within the three-dimensional voxel grid to obtain a spatial sparse representation; Extracting multi-parameter environmental data inside the poultry house corresponding to the ordered point sequence to obtain an environmental embedding vector; Perform weighted fusion on the environment embedding vector and the spatial sparse representation to obtain the joint local features of structure and environment disrupting the sequence order of the structure and the local features of the environment; injecting relative position codes into the scrambled structure and environment joint local features; The injected structure and environment joint local features are subjected to channel-by-channel normalization, weight matching, multi-layer nonlinear expression mapping and residual connection to obtain an information residual integration sequence; The information residual integration sequence is iterated several times to obtain multi-scale features.
5. The intelligent identification method for abnormal feeding behavior of chickens under environmental stress according to claim 4, characterized in that: The training set is used to train the abnormal feeding behavior recognition model of chickens, and the classification label error measurement function is used to supervise the recognition results output by the abnormal feeding behavior recognition model of chickens and the true behavior label during the training process to obtain the trained abnormal feeding behavior recognition model of chickens, including: Dividing the multi-scale features into a coarse-scale point cloud feature set and a fine-scale point cloud feature set, mapping the coarse-scale point cloud feature set and the fine-scale point cloud feature set into a first encoding vector representation and a second encoding vector representation using a multi-layer nonlinear expression mapping structure transformation, integrating a first guide vector into the first encoding vector representation, and integrating a second guide vector into the second encoding vector representation; Assigning any vector representation of the first encoded vector representation and the second encoded vector representation as a query vector, and assigning a vector representation of the first encoded vector representation and the second encoded vector representation that is different from the query vector as a key-value pair; Cross-modeling is performed on the query vector and the key-value pair to obtain a first fused representation and a second fused representation; the expression of the cross-modeling is: in, K=W K ·X (S) ; V=W K ·X (S) ; Wherein, f(Q,K,V) is the output of the cross modeling; B(·) is the normalization function; is the first guiding vector; (S) W is the second encoding vector representation incorporated into the second guide vector; Q 、W K 、W K are the first linear transformation matrix, the second linear transformation matrix, and the third linear transformation matrix respectively; Q is the query vector; K and V are the key vector and value vector in the key-value pair respectively; The first fused representation and the coarse-scale point cloud feature set are spliced to obtain a first category coding vector unit, the second fused representation and the coarse-scale point cloud feature set are spliced to obtain a second category coding vector unit, and the first category coding vector unit and the second category coding vector unit are spliced to obtain global features.
6. The intelligent identification method for abnormal feeding behavior of chickens under environmental stress according to claim 5, characterized in that: The training set is used to train the abnormal feeding behavior recognition model of chickens, and the classification label error measurement function is used to supervise the recognition results output by the abnormal feeding behavior recognition model of chickens and the true behavior label during the training process to obtain the trained abnormal feeding behavior recognition model of chickens, including: Arrange the global features in the order of time windows to obtain a time series feature tensor; Inputting the time series feature tensor into a time series modeling structure; Inputting the output of the temporal modeling structure into a fully connected layer to generate a predicted probability vector for each type of abnormal feeding behavior; The category index with the largest probability value in the predicted probability vector is determined as the abnormal feeding behavior recognition result of the chicken in the corresponding time window.
7. The intelligent identification method for abnormal feeding behavior of chickens under environmental stress according to claim 6, characterized in that: The training set is used to train the abnormal feeding behavior recognition model of chickens, and the classification label error measurement function is used to supervise the recognition results output by the abnormal feeding behavior recognition model of chickens and the true behavior label during the training process to obtain the trained abnormal feeding behavior recognition model of chickens, including: Constructing a feedback control mechanism; the feedback control mechanism includes: re-executing the feature extraction and recognition process and performing local resampling on the current area point cloud; The dynamic feedback control module is used to perform confidence threshold judgment, and when the maximum behavior category confidence of the model output is lower than the preset threshold, the feedback control mechanism is triggered; The dynamic feedback control module is used to monitor the frequency fluctuation of feeding behavior. When the recognition frequency of the target abnormal feeding behavior deviates from the historical statistical range and exceeds a preset threshold, the feedback control mechanism is triggered; The dynamic feedback control module is used to perform key behavior loss analysis, and when no feeding behavior is detected or the feeding duration is abnormally short within a preset number of consecutive recognition cycles, the feedback control mechanism is triggered.
8. The intelligent identification method for abnormal feeding behavior of chickens under environmental stress according to claim 7, characterized in that: The training set is used to train the abnormal feeding behavior recognition model of chickens, and the classification label error measurement function is used to supervise the recognition results output by the abnormal feeding behavior recognition model of chickens and the true behavior label during the training process to obtain the trained abnormal feeding behavior recognition model of chickens, including: Construct the classification label error measurement function; the expression of the classification label error measurement function is: in, is the output of the classification label error metric function; i is the independent activation label vector of the true label; is the probability of the behavior category output by the model; N is the number of samples; The abnormal chicken feeding behavior recognition model is iteratively trained using the classification label error metric function and the adaptive momentum weight update algorithm to obtain the trained abnormal chicken feeding behavior recognition model.
9. The intelligent identification method for abnormal feeding behavior of chickens under environmental stress according to claim 8, characterized in that: The abnormal feeding behavior recognition model of chickens is trained using the training set, and the recognition results output by the abnormal feeding behavior recognition model of chickens and the true behavior labels are supervised using a classification label error measurement function during the training process to obtain the trained abnormal feeding behavior recognition model of chickens, further comprising: Construct a model performance evaluation index; the model performance evaluation index includes overall accuracy and average intersection-over-union ratio; the overall accuracy formula is expressed as: Wherein, OA is the output of the overall accuracy expression; p ii represents the number of time windows in which the i-th type of abnormal feeding behavior is normally identified; p ij represents the number of time windows that class i is incorrectly classified into class j; p ji represents the number of time windows that incorrectly classify category j into category i; k is the total number of abnormal feeding behavior categories; Using the overall accuracy and the average intersection-union comparison to perform performance evaluation on the trained chicken abnormal feeding behavior recognition model to obtain model performance evaluation data; When the model performance evaluation data meets the preset performance range, the trained chicken abnormal feeding behavior recognition model is output.
10. An intelligent recognition system for abnormal feeding behavior of chickens under environmental stress, characterized by: include: Data acquisition module, used to collect chicken behavior videos in three-dimensional cage poultry houses and multi-parameter environmental data inside the poultry houses; The data recognition module is used to use the trained chicken abnormal feeding behavior recognition model to identify the on-site chicken behavior video and the multi-parameter environmental data inside the poultry house to obtain the chicken abnormal feeding behavior recognition result.
Citation Information
Cited By
Live animal behavior anomaly detection method and system based on deep learning
CN121148021A
