Intelligent black goat body size and weight measuring device and method based on multi-source data fusion
By using multi-source data fusion technology, the problem of high-precision integrated measurement of body size and weight of black goats and full-process digital management has been solved. This has enabled high-precision measurement and intelligent decision-making in dynamic scenarios, reduced stress interference in goats, and improved the efficiency and scientific nature of breeding management.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SOUTH CHINA AGRICULTURAL UNIVERSITY
- Filing Date
- 2026-05-08
- Publication Date
- 2026-06-05
AI Technical Summary
Existing technologies are insufficient to achieve high-precision integrated measurement and full-process digital management of body size and weight of black goats in dynamic scenarios, especially in areas such as the lack of depth information for dark-wool goats, dynamic weighing error compensation, and intelligent decision-making transformation.
A multi-source data fusion method was adopted, including collecting black goat identification information, weight data and 3D point cloud data. Through multi-level denoising, deep repair, multi-stage registration and fusion and semantic segmentation, body size parameters were generated, and combined with the health condition evaluation system, breeding decision suggestions were output.
It enables high-precision integrated measurement of body size and weight of black goats in dynamic scenarios, reduces stress interference in sheep, improves the real-time performance and integrity of data, supports full-process digital management, and enhances the scientificity and accuracy of breeding decisions.
Smart Images

Figure CN122155887A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of sheep body measurement technology, specifically relating to an intelligent measurement device and method for body size and weight of black goats based on multi-source data fusion. Background Technology
[0002] Currently, sheep farming is rapidly developing towards large-scale and intensive operations. Body size and weight data, as core indicators for assessing sheep growth status, breeding value, disease prevention and control, and production performance, directly impact key farming decisions such as breed selection, feeding optimization, and market readiness, and are crucial for improving farming efficiency. Traditional sheep body size and weight measurements mainly rely on manual operation, using tools such as measuring tapes, measuring sticks, and electronic scales to collect data manually. This is not only time-consuming, labor-intensive, and inefficient, making it difficult to meet the batch measurement needs of large-scale farming, but also easily triggers stress reactions in sheep, affecting their health. Furthermore, the subjectivity of manual measurement, differences in operating techniques, and problems such as non-standard data recording and difficulty in traceability lead to significant data errors, severely restricting the precision management level of large-scale farming. With technological advancements, contactless and automated measurement solutions have emerged, but significant limitations remain, making it difficult to fully adapt to the actual needs of complex livestock farming scenarios. Some devices rely on mechanical structures (such as clamping plates and fixed fences) to restrict sheep movement, which, while improving measurement stability, has poor adaptability to sheep of different sizes and ages. Young sheep are easily startled, and adult sheep may suffer limb injuries from struggling, and the maintenance costs of mechanical structures are high. Some visual measurement algorithms are only applicable to sheep with a single viewpoint (such as a one-sided two-dimensional image) or specific static postures. In dynamic farming environments, the movement, turning back, and posture changes of sheep can lead to insufficient measurement robustness, especially for dark-wool breeds such as black goats, where the strong absorption of light by dark object surfaces can cause the reflected signals received by the depth camera to be inaccurate. The data is weak, easily leading to large-area loss of depth information, point cloud voids, and blurred edges, severely affecting the measurement accuracy of body size parameters and the integrity of 3D reconstruction. Some solutions have limited measurement parameters, only able to obtain basic indicators such as body height, body length, and weight, lacking key body condition parameters such as chest circumference, abdominal circumference, and ischial tuberosity. Moreover, the data processing flow is complex, requiring high hardware computing power, resulting in high deployment costs in farms and difficulty in widespread adoption. In addition, most existing technologies lack the ability to fuse multi-source data, failing to effectively integrate multi-dimensional information such as visual data, RFID identity data, and environmental data, and cannot form a closed-loop management of "data collection-analysis-decision-execution". They can only output raw data and lack data-based intelligent farming suggestions, making it difficult to truly assist farmers in optimizing management strategies.
[0003] To improve the current state of measurement, researchers have developed various related technologies, but significant shortcomings remain. For example, Chinese patent document CN221055862U discloses an intelligent sheep body weight measurement device. This device requires mechanical constraints to achieve accurate measurement. While fixing the sheep with a clamping plate and collecting data using a rangefinder reduces movement interference, the mechanical constraints easily trigger stress in the sheep. Furthermore, it lacks adaptability to sheep at different growth stages, and the measurement parameters only cover basic indicators, failing to meet the needs of comprehensive vital sign monitoring. Another example is Chinese patent document CN210293405U, which discloses an automatic measurement device integrating RFID identification, a weighing panel, and a tape measure storage structure, improving operational convenience. However, body weight measurement still requires manual assistance, resulting in low automation. It also lacks intelligent data analysis and multi-terminal collaborative management functions, making real-time data synchronization and traceability impossible. Chinese patent document CN118657824A discloses a measurement method and device based on 3D point clouds, which achieves multi-parameter measurement through multi-channel point cloud filtering, registration, and segmentation. However, this solution does not involve automated point cloud data repair technology, making it difficult to solve the problem of severe loss of depth information caused by light absorption in dark-wool sheep. In actual breeding scenarios, irregular holes often appear in the point cloud of black goats' bodies, making automatic supplementation and repair extremely difficult. The existing technology lacks corresponding depth completion algorithms, directly leading to incomplete 3D model reconstruction and seriously affecting the accuracy and robustness of body size measurement. In addition, its data processing flow is complex, requiring high hardware computing power, and its real-time performance needs improvement.
[0004] In summary, existing technologies have failed to effectively address core issues such as multi-source data synchronization in dynamic scenarios, lack of depth information for dark-wool sheep, dynamic weighing error compensation, and intelligent decision-making transformation. They are unable to achieve high-precision integrated measurement of body size and weight and full-process digital management, and a comprehensive solution adapted to complex breeding environments is urgently needed. Summary of the Invention
[0005] To address the aforementioned shortcomings in existing technologies, the intelligent measurement device and method for body size and weight of black goats based on multi-source data fusion provided by this invention solves the problem that existing technologies struggle to achieve high-precision integrated measurement of body size and weight and full-process digital management.
[0006] To achieve the aforementioned objectives, the technical solution adopted by this invention is: an intelligent method for measuring the body size and weight of black goats based on multi-source data fusion, comprising the following steps:
[0007] S1. Collect the black goat's identity information, direction of entry and exit, and weight data;
[0008] S2. Collect 3D point cloud data of black goats, perform multi-level denoising, depth repair, multi-stage registration and fusion and semantic segmentation to generate body size parameters of black goats;
[0009] S3. Integrate the body size parameters, weight data, identity information, and breeding environment data of the black goats, input them into the health status evaluation system, and obtain breeding decision-making suggestions.
[0010] Furthermore: In S1, the method for collecting the black goat's identity information is specifically as follows: the black goat's identity information is identified by collecting the black goat's RFID ear tag signal;
[0011] The method for collecting the direction of entry and exit of black goats is as follows: the direction of entry and exit of goats is determined by calculating the order in which black goats enter different antenna sensing areas and the time they stay.
[0012] Furthermore, in S1, collecting the weight data of the black goats includes the following steps:
[0013] S11. Continuously collect high-frequency body weight sequences of black goats during their passage;
[0014] S12. Perform double-layer threshold filtering on the high-frequency weight sequence to obtain the effective weight sequence;
[0015] S13. Perform gait-velocity joint classification feature engineering on the effective weight sequence, calculate the core features reflecting the motion state, input the core features and the effective weight sequence into the ResNet18-CBAM-TCN model based on the improved ResNet18, and output the gait classification label.
[0016] S14. Perform multi-strategy progressive weight feature extraction based on gait classification labels and effective weight sequences to generate a five-dimensional weight feature vector.
[0017] S15. Obtain the weight data of the black goat based on the gait classification label and the five-dimensional weight feature vector.
[0018] Furthermore: In S11, high-frequency body weight sequences The specific expression is:
[0019]
[0020] In the formula, For time High-frequency body weight sequence signal, The start time, The termination time is, where, , , For entry time, This is the amount of pre-delay. For playing time, To bring forward the deadline;
[0021] In S12, the method for performing double-layer threshold filtering on high-frequency weight sequences is as follows: based on historical weight... Set dynamic effective range To accommodate individual differences, and to remove zero-point drift and outliers from high-frequency weight sequences, preliminary screening sequences were obtained. ,based on Median Calculation of Dynamic Threshold According to dynamic threshold Secondary fluctuation removal yields an effective weight sequence;
[0022]
[0023] In the formula, It is a median function;
[0024] In S13, the core feature includes the rate of weight change. mean Sharpness of rate of change High-value platform proportion Ratio of peak arrival time The ResNet18-CBAM-TCN model, which is an improvement on ResNet18, consists of an input layer, a ResNet18 residual backbone, a CBAM attention embedding layer, a TCN temporal enhancement layer, and an MLP classification head, which are connected in sequence.
[0025] S14 includes the following steps:
[0026] S141. A high-value platform detection strategy is adopted, based on gait classification labels. Adaptively set platform thresholds, extract continuous stable segments from effective weight sequences, and calculate the pruned mean. And determine whether the high-value platform detection strategy is effective. If so, then the mean value will be... Save to the core valid dataset and proceed to S144; otherwise, proceed to S142; where the platform threshold is set. The specific expression is:
[0027]
[0028] In the formula, For effective weight sequence The maximum value, The gait-specific proportional coefficients are set as follows: slow gait label is set to 0.75, normal gait label is set to 0.82, fast gait label is set to 0.88, and wandering gait label is set to 0.90.
[0029] The high-value platform detection strategy is deemed effective only when the following conditions are met; otherwise, the high-value platform detection strategy is deemed ineffective.
[0030] From effective weight sequence The continuous stable segments obtained through screening have a number of valid data points that reach the minimum length threshold set for the corresponding gait label: 30 points for slow gait label, 20 points for normal gait label, 14 points for fast gait label, and 10 points for wandering gait label.
[0031] S142. Using the stable interval method, based on gait-specific fluctuation thresholds. Stable segments are extracted from the effective weight sequence, the optimal interval is selected, and high quantile features are calculated. And determine whether the stable interval method is effective; if so, then use the high quantile features. Save to the core valid dataset and proceed to S144; otherwise, proceed to S143. The stable interval method is deemed valid if the following conditions are met; otherwise, the stable interval method is deemed invalid.
[0032] Within the stable sub-segment, the relative fluctuations of all adjacent weight values do not exceed the gait-specific fluctuation threshold. Furthermore, the length of this stable segment reaches the minimum stable length threshold set by the corresponding gait label, where... The value is set by the slow gait label. The value is 0.02, which is the setting for the normal gait label. The value is set to 0.05 for the fast gait label. The value is set to 0.08 for the loitering gait label. It is 0.12;
[0033] S143. Using a fallback fusion strategy, after sorting the effective weight sequences in descending order, select the top... Find the highest value and calculate the median of the high values to obtain the output bottom-line weight feature. The bottom line is the weight characteristics. Save to the core valid dataset and proceed to S144;
[0034] S144. Based on the core effective dataset, calculate the maximum value, median, mode, mean of local maxima, and overall mean to construct a five-dimensional weight feature vector. , The maximum weight in the core valid dataset. The median weight in the core valid dataset. The mode of body weight in the core effective dataset. The mean of local maxima in the core effective dataset. The overall mean weight in the core valid dataset;
[0035] S15 specifically refers to:
[0036] Based on the gait classification label, a corresponding specific regression equation is matched. The specific regression equation is then used to evaluate the five-dimensional body weight feature vector according to the feature weight coefficients under different gait states. Weighted summation and intercept correction are performed to eliminate the systematic interference of gait impact on body weight, and the body weight data of the black goats is output. .
[0037] Furthermore, S2 includes the following sub-steps:
[0038] S21. Obtain the depth image and RGB image of the black goat, convert the data to obtain three-dimensional point cloud data, preprocess the three-dimensional point cloud data, and generate a pure goat body point cloud.
[0039] S22. Based on the pure sheep body point cloud, a point cloud completion method that integrates multimodal semantic prompts and lightweight dynamic modulation is used to perform high-precision 3D reconstruction of local hole regions and generate high-precision completed point clouds.
[0040] S23. Based on high-precision point cloud completion, a registration strategy of coarse to fine and regional optimization is adopted to perform point cloud registration fusion and surface reconstruction to generate a closed triangular mesh model.
[0041] S24. Based on a closed triangular mesh model, an automated measurement method based on geometric slicing and residual learning is used to extract body size parameters and correct errors, thereby generating body size parameters for black goats.
[0042] Furthermore: S21 includes the following sub-steps:
[0043] S211. Convert the depth image and RGB image of the black goat into 3D point cloud data. , For the Nth point in a 3D point cloud, outlier filtering based on local neighborhood statistical characteristics and adaptive radius is performed according to the 3D point cloud data: First, a spatial index is established using a KD-Tree, and the distance from each point to its surrounding area is calculated. The average distance between the nearest neighbors The mean of the global distance distribution and standard deviation Eliminate those that meet the requirements outliers To adjust the coefficients, the average nearest neighbor distance of the point cloud is then calculated. Set adaptive search radius Output denoised point cloud ;
[0044]
[0045] In the formula, This is the radius scaling factor. Minimum filter radius;
[0046] S212, Denoising point clouds Ground segmentation based on normal-constrained RANSAC and bimodal height modeling is performed: First, an improved RANSAC algorithm is used, introducing normal vector constraints during the iterative sampling process, requiring the candidate plane normal vector to be... The angle with the global vertical direction must be less than the second preset threshold. Then, combining the known coordinate range of the device's background panel, a preliminary cropping of the search space is performed to remove non-target areas outside the channel; finally, the denoised point cloud is calculated. Height relative to the optimal plane Construct a height distribution histogram. If the distribution exhibits bimodal characteristics, then use the bimodal mean method or Gaussian mixture model to solve for the adaptive segmentation threshold. This leads to the removal of foreground cloud features from the ground. ;
[0047]
[0048] In the formula, Relative height refers to the first The vertical height of each point from the fitted ground plane is used to segment the ground and the sheep's body. For denoising point clouds The i-th point in the middle;
[0049] S213. Perform density-based connected component clustering and subject extraction on the foreground point cloud: The DBSCAN density clustering algorithm is used to cluster the foreground point cloud. The two core control parameters of this algorithm are the neighborhood radius ε and the minimum number of samples MinPts. If the number of points contained in the ε-neighborhood of a point is greater than or equal to MinPts, then the point is determined to be a core point. Based on the density accessibility and density reachability relationship, the foreground point cloud is divided into several independent clusters. Based on prior knowledge, sparse clusters of fence remnants, ground debris, and floating discrete noise with fewer than a preset threshold are removed. Among the remaining clusters, the cluster with the most points is selected as the sheep body object. If there are multiple clusters with a point difference less than the preset threshold, the cluster with the highest average density is further selected. Finally, the pure sheep body point cloud is output using the following formula. :
[0050]
[0051] In the formula, Indicates the first The number of points contained in a cluster Indicates the first Clusters, Indicates the first Clusters, This indicates the cluster that maximizes the expression within the parentheses;
[0052] S22 includes the following steps:
[0053] S221. Multimodal semantic perception and missing region localization: Using a 3D-SAM model to analyze the point cloud of a pure sheep body. Perform semantic segmentation to generate a three-dimensional semantic mask that includes "hair region - limb region - head region". ;Calculate three-class 3D semantic masks based on local point density analysis Each point in The nearest neighbor density will be lower than the adaptive threshold. The points are marked as boundary points, and the cavity areas to be repaired are delineated by fitting closed curves based on the boundary points. And generate a hole mask. ;
[0054] S222, Cross-modal feature extraction and gating fusion: Extracting pure sheep body point clouds coordinate data With color data The input Point-MobileViT lightweight backbone network is concatenated, and multi-scale features are extracted stepwise through multi-layer Set Abstraction to generate a geometric feature flow. and texture feature flow Geometric attention based on normal consistency is computed using a geometry-texture gating unit. and texture attention based on color similarity Then, the adaptive complementary fusion features are calculated. ;
[0055]
[0056] In the formula, For Hadamah accumulation;
[0057] S223, HT-DM Dynamic Modulation and Cascade Generation: Three-Class Three-Dimensional Semantic Masks Input to the HT-DM module, and utilize three-class three-dimensional semantic masks within the HT-DM module. Feature points are divided into different anatomical regions, and texture modulation and geometric modulation operators are applied respectively to generate modulated feature vectors adapted to the characteristics of different anatomical regions of the black goat. ;
[0058]
[0059] In the formula, This is the dynamic scaling factor. The global mean of the fused features. The global standard deviation of the fused features. This is the dynamic bias coefficient;
[0060] Based on fused features, three-class 3D semantic masks, hole masks, and clean sheep body point clouds, a cascaded folding strategy is employed to generate sparse skeleton point clouds using MLP decoding. Then, FoldingNet is used to fold the 2D mesh into a local 3D space to generate a dense, completed point cloud. ;
[0061] S224, Geometry-Texture Joint Post-Processing Optimization: Using Moving Least Squares Method to Complete the Point Cloud Geometric fitting was performed; a kNN-based color transfer algorithm was used to refine the pure sheep body point cloud. Searching for The nearest neighbor points are used to calculate the dense complete point cloud through inverse distance weighting. The RGB values of the completed points are used to ultimately output a high-precision completed point cloud. ;
[0062] S23 includes the following steps:
[0063] S231. Complete the point cloud with high precision based on different viewpoints or different time frames. Establish source cloud Target point cloud was acquired using a top depth camera. For source cloud With target point cloud Performing fine point-to-surface ICP registration based on normal vector constraints: using KD-Tree in the target point cloud Searching for the source cloud various points in the middle nearest neighbor Using nearest neighbor Eigenvalues of the covariance matrix are estimated by eigendecomposition of its normal vector. Construct the total error function for point-to-surface ICP registration. Minimize the projection distance along the normal of the target point after the source point transformation;
[0064]
[0065] In the formula, It is a 3×3 orthogonal rotation matrix. It is a 3×1 translation vector. The total number of points in the point cloud. It is the transpose symbol. This is the Huber kernel function, used to suppress false matches;
[0066] Using Lie algebra For rotation matrix A first-order Taylor expansion is performed to transform the nonlinear optimization into a linear least squares problem;
[0067]
[0068] In the formula, Let be the Jacobian matrix of the registration error function with respect to pose increment, and be the first derivative matrix of the error function. Both have dimensions N×6 and are used to transform the nonlinear registration optimization problem into a linear least squares problem. Given the pose increment; solve for the pose increment. Output the point cloud after rigid registration. .
[0069] S232. Based on the point cloud after rigid registration Non-rigid fine-tuning and iterative optimization based on semantic region segmentation: Utilizing the principal axis projection and height quantile features of the point cloud, the sheep body is automatically segmented into the head. ,trunk and limbs of Each semantic region is processed using an iterative strategy of "partition fine-tuning - incremental accumulation". Independent calculation of fine-tuning transformation At the same time, through The function controls the step size coefficient for each round of transformation. A regularization term is introduced to constrain the consistency of transformations in adjacent regions, based on the total optimization loss function of non-rigid fine-tuning. Perform multiple iterations to output the fused complete point cloud. ;
[0070]
[0071] In the formula, For the first A collection of point clouds representing semantic regions For area code, These are regularization weighting coefficients for ensuring consistency of transformations in adjacent regions. This is a function for calculating Euclidean distance in three-dimensional space. To register the reference target point cloud, A set of indices for adjacent semantic regions. , These correspond to the numbers of two semantic regions that are spatially adjacent. For the number The 4×4 homogeneous fine-tuning transformation matrix corresponding to the semantic region. For the number The 4×4 homogeneous fine-tuning transformation matrix corresponding to the semantic region. It is the Frobenius norm;
[0072] S233, Complete point cloud Performing Poisson surface reconstruction and meshing: Computing complete point clouds Oriented normal vector field Find indicator functions To make the divergence of its gradient equal to the divergence of the vector field, the Marching Cubes algorithm is used to extract... The isosurfaces are used to generate a closed triangular mesh model. ;
[0073] S24 includes the following steps:
[0074] S241, Transform the triangular mesh model The corresponding point cloud input is used for multi-part semantic segmentation based on the DAG-PointNet++ model, which is an improvement on the PointNet++ model. The DAG-PointNet++ model outputs the probability of the part to which each segmented point belongs. Based on the segmentation results, each point is assigned a semantic label corresponding to the part, generating semantically labeled point cloud data. ;
[0075]
[0076] In the formula, Triangular mesh model The corresponding original black goat 3D point cloud set, This is a semantic tag set for eight body parts of the black goat, including chest, abdomen, rump, left forelimb, right forelimb, left hindlimb, right hindlimb, and others. Points output by the DAG-PointNet++ model Belongs to the Predicted probability of type of body part For point The optimal semantic label is the part category with the highest predicted probability;
[0077] S242. For point cloud data with semantic labels PCA-based pose normalization and slice extraction are performed: The torso point cloud is extracted, the covariance matrix is calculated and eigenvalue decomposition is performed to obtain the body principal axis direction, and a rotation matrix is constructed to align the principal axis to the Y-axis, with the Z-axis as the height direction, thus achieving pose normalization; the chest, abdomen, and buttocks are separated based on semantic labels, and the extreme points of each part are located using quantile statistics; at specific percentage positions along the body length axis of each part, slices are taken perpendicular to the spine, with a thickness equal to half the thickness of the point cloud slice. Point cloud slices ;
[0078] S243, Slicing point clouds Perform convex hull-based girth calculation: Project the sliced point cloud onto the XZ plane, calculate the convex hull of the two-dimensional projected points, and then calculate the perimeter of the convex hull as a geometric girth measurement. Simultaneously, based on the robust statistical range of the sliced point cloud, the slice width and depth are calculated, and a set of geometric measurement values is output.
[0079]
[0080] In the formula, The convex hull contour closed boundary generated by projecting point cloud slices onto the XZ plane. Let be the arc length parameter of the convex hull profile. Let be the arc length of the infinitesimal element of the convex hull profile. The first two-dimensional convex hull The planar coordinate vectors of the vertices, The first two-dimensional convex hull The planar coordinate vectors of the vertices, Let be the total number of vertices of the two-dimensional convex hull. Let L2 be the norm of a two-dimensional vector;
[0081] S244. Perform nonlinear error correction based on machine learning on the set of geometric measurements: combine the body size indices obtained from all geometric measurements to form body size parameters. ,in Body size parameters The Middle The original geometric measurements of the body size indicators specifically include the core body size parameters of the black goat: shoulder height, body length, chest width, chest depth, chest circumference, abdominal width, abdominal depth, abdominal circumference, hip height, hip width, hip depth, and hip circumference. Given the total number of body size indicators, a pre-trained random forest regression model is used to fit the relative error ratio between the geometric measurements and the artificial true values using the following formula. ;
[0082]
[0083] In the formula, This is a pre-trained random forest regression model;
[0084] The geometric girth measurements are compensated based on the relative error ratio. The systematic deviation caused by hair thickness and geometric approximation is eliminated by the following formula, and the corrected body size parameters of the black goat are output. ;
[0085] .
[0086] Furthermore, S3 includes the following sub-steps:
[0087] S31. Multi-source data fusion: Obtaining the body size parameters of black goats. Weight data Individual age and aquaculture environment data Temporal alignment and format standardization were performed to construct normalized individual multidimensional feature vectors of black goats. This forms a multidimensional feature database for individuals;
[0088] S32. Health Status Assessment: This involves analyzing an individual's multidimensional feature vector. Input a large language model based on the Transformer architecture deployed on a PC and finely tuned by instructions to calculate an individual's health status score. ;
[0089]
[0090] In the formula, It is the Sigmoid activation function. For developmental matching, Instantaneous growth rate For body symmetry, The weighting coefficients for the developmental matching evaluation item. The weighting coefficient for the instantaneous growth rate evaluation item. The weighting coefficient for the body shape symmetry evaluation item. This is the bias term of the health scoring function;
[0091] S33. Scoring based on individual health status Automatically generate aquaculture decision-making suggestions in text form based on the area it falls into;
[0092] S34. Based on aquaculture decision-making recommendations, conduct multi-terminal collaborative management and build a three-in-one collaborative management system of "cloud-PC-Android mobile terminal" to realize a digital closed loop of the entire process of data collection, analysis, decision-making and execution.
[0093] The intelligent measurement device for body size and weight of black goats based on multi-source data fusion includes: an entrance RFID reading module, an exit RFID reading module, a top depth camera, a left depth camera, a right depth camera, a dynamic weighing platform, front and rear guide baffles, a passage side guardrail, and a background enclosure wall.
[0094] The front and rear guide baffles are arranged symmetrically in a funnel shape at both ends of the passage to regulate the black goat's passage queue. The side railings of the passage are connected to the guide baffles and arranged symmetrically on the left and right to limit the effective walking path of the black goats. The background fence is symmetrically arranged outside the side railings to shield against interference from the complex external environment.
[0095] The dynamic weighing platform is embedded in the ground recess below the passage and flush with the ground; the entrance RFID reading module and the exit RFID reading module are respectively installed at the entrance and exit positions of the side guardrails of the passage, and are deployed with dual antennas in a longitudinal differential configuration; the top depth camera, the left depth camera and the right depth camera are respectively fixed above the passage and above the guardrails on both sides.
[0096] The beneficial effects of this invention are as follows:
[0097] (1) Non-contact whole body vital sign acquisition structure based on three-dimensional vision, RFID radio frequency identification and dynamic weighing platform: The present invention constructs a stereo vision perception network composed of three depth cameras on the top and two sides, combined with front and rear dual-antenna differential RFID identification modules and dynamic weighing platform to form an all-round non-destructive acquisition space. The three-view complementary view effectively eliminates the visual blind spots and occlusion problems under single view, ensuring the acquisition of the complete body surface point cloud of the black goat; the dual-antenna differential layout accurately determines the direction of entry and exit through timing logic, solving the problem of misreading of traditional single antennas; the overall structure does not require mechanical restraint, minimizing stress interference to the goats and realizing high-precision vital sign measurement under natural passage conditions.
[0098] (2) High-performance collaborative acquisition of multi-source heterogeneous data: The innovative dual mechanism of "hardware synchronizer star triggering + software multi-thread pool concurrent scheduling" is adopted to achieve sub-millisecond synchronization of depth camera, RFID reader and dynamic weighing platform. By managing each acquisition unit in parallel through thread pool, the system latency caused by high bandwidth point cloud flow is completely eliminated, ensuring the integrity, real-time performance and accurate timestamp alignment of multi-source data in large-scale breeding scenarios, perfectly meeting the core requirements of continuous measurement of batch sheep.
[0099] (3) Non-contact individual identification and dynamic inventory based on pure time-series logic: Abandoning unstable algorithms that rely on signal strength, a pure software time-series logic determination method based on the order in which RFID signals enter the antenna sensing area is proposed. Combined with dwell time verification and continuity analysis, it accurately distinguishes between entry and exit status and multi-target passage, effectively solving the problem of miscounting caused by sheep turning back and congestion. At the same time, the passage identification results are compared with the registered list in real time to realize dynamic asset management and on-site early warning as entry and exit occur, completely solving the industry problems of individual identity association, quantity statistics and accurate inventory in non-contact scenarios.
[0100] (4) High-precision repair and enhancement of point cloud in complex environment: To address the pain points of missing depth information and blurred edges caused by the dark wool of black goats, HT-DM dynamic modulation and MobileViT-Edge lightweight repair network are introduced. Combined with the multimodal guidance of HSV spatial features of RGB image and semantic mask of SAM model, adaptive high-precision filling of missing areas of depth map is achieved, which effectively solves the problem of point cloud holes caused by wool scattering and uneven illumination, and provides a high-quality three-dimensional point cloud foundation for subsequent precision body size measurement.
[0101] (5) Highly adaptable semantic segmentation for livestock and poultry physical characteristics: The PointNet++ model is improved by adopting Density-Adaptive O-FPS sampling and Attention-KD-IDW feature propagation mechanism to achieve high-precision segmentation of core parts such as the chest, abdomen, buttocks, and limbs of black goats. The algorithm adapts to the non-rigid motion characteristics of sheep in dynamic scenes, completely solving the problem of part recognition caused by uneven point cloud density and blurred edges, and laying a solid algorithmic foundation for accurate extraction of body size.
[0102] (6) High-precision integrated measurement of body size and weight in dynamic scenarios: The body size measurement end uses a three-level algorithm of PCA posture normalization, geometric slice convex hull calculation and random forest regression correction to eliminate systematic deviations caused by hair thickness and posture shift; The weight measurement end combines ResNet18-CBAM-TCN gait classification, multi-strategy progressive feature extraction and dedicated regression equation compensation to accurately eliminate gait impact interference during the target object's passage, and realize integrated measurement of body size and weight with near-static measurement accuracy in uncontrolled dynamic environments.
[0103] (7) Multimodal Intelligent Health Assessment and Decision Generation Based on a Large Model: Integrating multi-source data such as body size and weight, RFID identification, age, and breeding environment, a comprehensive health condition evaluation system is constructed using a Transformer architecture large language model with fine-tuned instructions. This system automatically calculates health scores, identifies potential risks such as growth retardation and body asymmetry, and outputs personalized feeding formulas, disease warnings, and slaughter time predictions. Compared to existing technologies that only output raw data, this represents a value leap from "data collection" to "intelligent decision-making," significantly improving the scientific rigor and accuracy of breeding decisions.
[0104] (8) Multi-terminal collaborative digital management throughout the entire life cycle: Construct a three-in-one collaborative management system of "cloud-PC-Android mobile terminal" to realize the full-process digital archiving of black goats from birth, disease prevention, growth to trade, closed-loop recording of breeding events, and heat map analysis of group status. The multi-level linkage early warning engine can realize the instant reminder of abnormal status. Multi-terminal data is synchronized in two directions in real time, which greatly reduces the cost of manual recording and management threshold, and realizes the full-process digital closed loop of data collection-analysis-decision-execution.
[0105] (9) Strong environmental adaptability and cross-scenario scalability: The algorithm framework has been optimized for lightweight operation and can run stably in harsh breeding environments such as dynamic lighting, extreme temperature, and dust. No mechanical constraints (support plates, fixed fences) are required throughout the process. The channel design guides sheep to pass naturally, minimizing stress response. It is also suitable for the measurement needs of black goats of different sizes and ages without the need to adjust equipment parameters. The hardware adopts a modular design to support smooth upgrades. The algorithm has good cross-species transfer capabilities and can be widely used for intelligent vital sign measurement of small and medium-sized livestock and poultry such as sheep and Hu sheep, significantly reducing the deployment and maintenance costs of farms. Attached Figure Description
[0106] Figure 1 This is a flowchart of the intelligent measurement method for body size and weight of black goats based on multi-source data fusion, as described in this invention.
[0107] Figure 2 This is a schematic diagram of the intelligent measurement device for body size and weight of black goats based on multi-source data fusion according to the present invention.
[0108] Among them: 1-a, entrance RFID reading module; 1-b, exit RFID reading module; 2-a, top depth camera; 2-b, left depth camera; 2-c, right depth camera; 3, dynamic weighing platform; 4, front and rear guide baffles; 5, passage side guardrails; 6, background enclosure wall. Detailed Implementation
[0109] The specific embodiments of the present invention are described below to enable those skilled in the art to understand the present invention. However, it should be understood that the present invention is not limited to the scope of the specific embodiments. For those skilled in the art, various changes are obvious as long as they are within the spirit and scope of the present invention as defined and determined by the appended claims. All inventions utilizing the concept of the present invention are protected.
[0110] This invention addresses the challenge of achieving high-precision integrated measurement of body size and weight, and the difficulty of implementing end-to-end digital management in existing technologies. It provides an intelligent body size and weight measurement device and method for black goats based on multi-source data fusion. This solution innovatively constructs a three-in-one architecture of "sensing and acquisition - core algorithm - management and application," focusing on non-contact, non-destructive measurement and high-precision data restoration. Addressing the pain point of missing depth information due to light absorption by the dark body surface of black goats, this invention proposes a point cloud completion method that integrates multimodal semantic prompts and lightweight dynamic modulation. It utilizes RGB image texture to guide the adaptive filling of depth map holes, achieving high-precision reconstruction of the 3D model without manual intervention. To address gait interference during dynamic weighing, a gait classification and multi-strategy progressive feature extraction algorithm based on ResNet18-CBAM-TCN is designed to accurately eliminate abnormal fluctuations. This invention minimizes stress on the goats while achieving a fully digital closed loop encompassing identification, automated inventory, accurate integrated measurement of body size and weight, and intelligent decision generation, significantly improving asset management efficiency and decision-making scientific rigor in large-scale farming.
[0111] like Figure 1 As shown, in one embodiment of the present invention, the intelligent measurement method for body size and weight of black goats based on multi-source data fusion includes the following steps:
[0112] S1. Collect the black goat's identity information, direction of entry and exit, and weight data;
[0113] S2. Collect 3D point cloud data of black goats, perform multi-level denoising, depth repair, multi-stage registration and fusion and semantic segmentation to generate body size parameters of black goats;
[0114] S3. Integrate the body size parameters, weight data, identity information, and breeding environment data of the black goats, input them into the health status evaluation system, and obtain breeding decision-making suggestions.
[0115] In S1, the specific method for collecting the black goat's identity information is as follows: the black goat's identity information is identified by collecting the black goat's RFID ear tag signal;
[0116] The method for collecting the entry and exit directions of black goats is as follows: the entry and exit directions of the goats are determined by calculating the order in which they enter the sensing areas of different antennas and the duration of their stay. In this embodiment, if the inlet antenna identifies the goat first and the outlet antenna identifies it later, and the time stamp interval between the two identifications is within a set reasonable range, the algorithm logic determines it as "exiting"; if the outlet antenna identifies the goat first and the inlet antenna identifies it later, and the timing continuity requirement is met, the algorithm logic determines it as "entering". Signal separation technology is used to distinguish between concurrent identification scenarios of multiple goats approaching simultaneously. Individual IDs are assigned according to the antenna identification order to ensure that the counting is not confused and to adapt to single-channel passage requirements. When frequent backtracking of the same ID, continuous signal loss, or excessive signal overlap within the channel indicating congestion are detected, alarm information is automatically pushed to the management terminal to assist staff in timely handling.
[0117] In S1, collecting the weight data of the black goats includes the following steps:
[0118] S11. Continuously collect high-frequency body weight sequences of black goats during their passage;
[0119] S12. Perform double-layer threshold filtering on the high-frequency weight sequence to obtain the effective weight sequence;
[0120] S13. Perform gait-velocity joint classification feature engineering on the effective weight sequence, calculate the core features reflecting the motion state, input the core features and the effective weight sequence into the ResNet18-CBAM-TCN model based on the improved ResNet18, and output the gait classification label.
[0121] S14. Perform multi-strategy progressive weight feature extraction based on gait classification labels and effective weight sequences to generate a five-dimensional weight feature vector.
[0122] S15. Obtain the weight data of the black goat based on the gait classification label and the five-dimensional weight feature vector.
[0123] In S11, high-frequency body weight sequence The specific expression is:
[0124]
[0125] In the formula, For time High-frequency body weight sequence signal, The start time, The termination time is, where, , , For entry time, This is the amount of pre-delay. For playing time, To bring forward the deadline;
[0126] In S12, the method for performing double-layer threshold filtering on high-frequency weight sequences is as follows: based on historical weight... Set dynamic effective range To accommodate individual differences, and to remove zero-point drift and outliers from high-frequency weight sequences, preliminary screening sequences were obtained. ,based on Median Calculation of Dynamic Threshold According to dynamic threshold Secondary fluctuation removal yields an effective weight sequence;
[0127]
[0128] In the formula, Median function, dynamic threshold It is the core secondary filtering parameter in the two-layer threshold filtering process of high-frequency weight sequence of black goats, used to remove low-amplitude fluctuation noise remaining after the initial screening and extract real and effective weight data.
[0129] In S13, the core feature includes the rate of weight change. mean Sharpness of rate of change High-value platform proportion Ratio of peak arrival time The ResNet18-CBAM-TCN model, an improvement on ResNet18, embeds a CBAM hybrid attention mechanism (fusion of channel attention (CAM) and spatial attention (SAM)) into the ResNet18 residual structure to achieve accurate capture of waveform frequency domain features and key temporal regions (such as peaks and abrupt changes) in two dimensions. At the same time, it uses a TCN-MLP hybrid classifier to replace the traditional classifier head, expands the receptive field through causal dilated convolution to extract long temporal dependencies, and finally determines the motion state into one of four categories: "fast, slow, normal, and wandering", and outputs gait classification labels.
[0130] The ResNet18-CBAM-TCN model, which is an improvement on ResNet18, consists of an input layer, a ResNet18 residual backbone, a CBAM attention embedding layer, a TCN temporal enhancement layer, and an MLP classification head, connected in sequence. The internal structure of the ResNet18-CBAM-TCN model is shown in Table 1.
[0131] Table 1. ResNet18-CBAM-TCN Model Structure
[0132]
[0133] The ResNet18 residual backbone is used for temporal feature extraction, and it specifically includes:
[0134] Initial convolution and pooling: A 7×7 convolution is performed on the input tensor to increase the feature dimension from 6 to 64, and the output shape is... Then, after 3×3 max pooling for dimensionality reduction, the output shape is obtained. Compress redundant spatiotemporal information;
[0135] Residual block stacking learning: sequentially passing through Conv2_x (2 residual blocks), Conv3_x (2), Conv4_x (2), and Conv5_x (2), each residual block is processed through... By learning residual information from features such as "weight waveform change rate and peak plateau percentage", the feature dimension is gradually increased to 512, and the output shape is determined. ,in For the first Output feature map of layer residual blocks For the first Input feature map of the layer residual block, For the first Nonlinear mapping function of layer residual blocks;
[0136] Global pooling dimensionality reduction: Global average pooling is performed on the residual output to compress the spatiotemporal dimension into a temporal sequence, resulting in an output shape... ( ), retaining core temporal features;
[0137] The CBAM attention embedding layer is used for precise selection of dual-channel features, and it specifically includes:
[0138] Channel Attention (CAM): Global average pooling / max pooling is performed on the residual feature maps respectively, and the results are summed after MLP mapping to generate channel weights. (shape) );pass Suppress noise-dominated channels (such as meaningless baseline fluctuation channels) and enhance channels corresponding to key features such as "peaks" and "abrupt transitions." The input is the original residual feature map. This is the feature map after channel attention weighting. This is a broadcast-style element-by-element multiplication;
[0139] Spatial Attention (SAM): for Average / max pooling is performed along the channel dimension and concatenated, then spatial weights are generated by 7×7 convolution. (shape) );pass By locating key time-series regions such as "peak arrival periods" and "high-value plateau segments," the characteristics of noise periods are weakened. This is the final feature map after channel + spatial dual attention weighting;
[0140] Output: High-discrimination temporal features (shape) obtained after dual-channel filtering. );
[0141] The TCN temporal enhancement layer is used for long temporal dependency extraction, and it specifically includes:
[0142] Causal dilated convolution calculation: 3-layer dilation coefficient Causal dilated convolution processes the feature sequence sequentially. Capture short-term time dependencies (weight changes between adjacent sampling points) Capture mid-range dependence (rate of change trend) Capture long-range dependencies (complete gait cycle) and output. ,in For time Causal dilated convolution output features For the first The weight parameters of each convolutional kernel, The spatial length of the convolution kernel. is the dilation coefficient (void ratio) of dilated convolution. For the first Input features over time (causal convolution only uses historical information and does not reveal future data). This is the bias term for the convolutional layer. It is the ReLU activation function;
[0143] Temporal residual stability: Each layer With input Add ( This prevents gradient vanishing in deep networks and preserves original features while fusing long-term temporal dependencies; among which For time The output characteristics of the time-series residual block. For time Input features of temporal residual blocks; Output: A sequence fused with multi-scale temporal features (shape) ).
[0144] The MLP classification head is used for gait label output, and it specifically includes:
[0145] Feature flattening: Flattening the temporal features output by TCN into a one-dimensional vector (shape) );
[0146] Fully connected layer mapping: The first fully connected layer (1024 neurons, ReLU) maps high-dimensional features to intermediate features, and the second fully connected layer (4 neurons) outputs the raw scores of the four gait categories;
[0147] Softmax normalization: through The raw scores are converted into a probability distribution (e.g., fast-paced 0.85, slow-paced 0.05, normal 0.08, and neutral 0.02); where The output feature sequence of the TCN layer. This is the weight matrix of the first fully connected layer. This is the weight matrix of the second fully connected layer. This is the bias vector of the first fully connected layer. This is the bias vector for the second fully connected layer. The feature flattening operation maps two-dimensional temporal features into one-dimensional vectors;
[0148] Decision and Verification: Select the category with the highest probability as the initial label, and then combine it with a joint classification decision rule (such as a fast class). After secondary verification, the final output includes four gait classification labels: "fast / slow / normal / wandering".
[0149] In this embodiment, the ResNet18-CBAM-TCN model is a lightweight classification model designed for the temporal features of livestock and poultry dynamic weight waveforms. Its core is to deeply integrate the residual feature extraction of ResNet18, the dual-channel attention screening of CBAM, the long temporal dependency modeling of TCN, and the MLP classification decision, adapting to the characteristics of weight waveforms that are "strongly temporal and localized with key features (peaks / abrupt segments)".
[0150] S14 includes the following steps:
[0151] S141. A high-value platform detection strategy is adopted, based on gait classification labels. Adaptively set platform thresholds, extract continuous stable segments from effective weight sequences, and calculate the pruned mean. And determine whether the high-value platform detection strategy is effective. If so, then the mean value will be... Save to the core valid dataset and proceed to S144; otherwise, proceed to S142; where the platform threshold is set. The specific expression is:
[0152]
[0153] In the formula, For effective weight sequence The maximum value, The gait-specific proportional coefficients are set as follows: slow gait label is set to 0.75, normal gait label is set to 0.82, fast gait label is set to 0.88, and wandering gait label is set to 0.90.
[0154] The high-value platform detection strategy is deemed effective only when the following conditions are met; otherwise, the high-value platform detection strategy is deemed ineffective.
[0155] From effective weight sequence The continuous stable segments obtained through screening have a number of valid data points that reach the minimum length threshold set for the corresponding gait label: 30 points for slow gait label, 20 points for normal gait label, 14 points for fast gait label, and 10 points for wandering gait label.
[0156] S142. Using the stable interval method, based on gait-specific fluctuation thresholds. Stable segments are extracted from the effective weight sequence, the optimal interval is selected, and high quantile features are calculated. And determine whether the stable interval method is effective; if so, then use the high quantile features. Save to the core valid dataset and proceed to S144; otherwise, proceed to S143. The stable interval method is deemed valid if the following conditions are met; otherwise, the stable interval method is deemed invalid.
[0157] Within the stable sub-segment, the relative fluctuations of all adjacent weight values do not exceed the gait-specific fluctuation threshold. There are no drastic jumps, and the length of this stable segment reaches the minimum stable length threshold set by the corresponding gait label. The value is set by the slow gait label. The value is 0.02, which is the setting for the normal gait label. The value is set to 0.05 for the fast gait label. The value is set to 0.08 for the loitering gait label. It is 0.12;
[0158] S143. Using a fallback fusion strategy, after sorting the effective weight sequences in descending order, select the top... Find the highest value and calculate the median of the high values to obtain the output bottom-line weight feature. The bottom line is the weight characteristics. Save to the core valid dataset and proceed to S144;
[0159] S144. Based on the core effective dataset, calculate the maximum value, median, mode, mean of local maxima, and overall mean to construct a five-dimensional weight feature vector. , The maximum weight in the core valid dataset. The median weight in the core valid dataset. The mode of body weight in the core effective dataset. The mean of local maxima in the core effective dataset. The overall mean weight in the core valid dataset;
[0160] S15 specifically refers to:
[0161] Based on the gait classification label, a corresponding specific regression equation is matched. The specific regression equation is then used to evaluate the five-dimensional body weight feature vector according to the feature weight coefficients under different gait states. Weighted summation and intercept correction are performed to eliminate the systematic interference of gait impact on body weight, and the body weight data of the black goats is output. .
[0162] S2 includes the following steps:
[0163] S21. Obtain the depth image and RGB image of the black goat, convert the data to obtain three-dimensional point cloud data, preprocess the three-dimensional point cloud data, and generate a pure goat body point cloud.
[0164] S22. Based on the pure sheep body point cloud, a point cloud completion method that integrates multimodal semantic prompts and lightweight dynamic modulation is used to perform high-precision 3D reconstruction of local hole regions and generate high-precision completed point clouds.
[0165] S23. Based on high-precision point cloud completion, a registration strategy of coarse-to-fine and region-based optimization is adopted to perform point cloud registration fusion and surface reconstruction, generating a closed triangular mesh model to solve the ghosting problem caused by inconsistent poses of multiple camera views and non-rigid motion of the sheep body.
[0166] S24. Based on a closed triangular mesh model, an automated measurement method based on geometric slicing and residual learning is used to extract body size parameters and correct errors, eliminating systematic deviations caused by hair thickness and geometric approximation, and generating body size parameters of black goats.
[0167] S21 includes the following steps:
[0168] S211. Convert the depth image and RGB image of the black goat into 3D point cloud data. , For the Nth point in a 3D point cloud, outlier filtering based on local neighborhood statistical characteristics and adaptive radius is performed according to the 3D point cloud data: First, a spatial index is established using a KD-Tree, and the distance from each point to its surrounding area is calculated. The average distance between the nearest neighbors The mean of the global distance distribution and standard deviation Eliminate those that meet the requirements outliers To adjust the coefficients, the average nearest neighbor distance of the point cloud is then calculated. Set adaptive search radius Further, remove points whose local point cloud density is below a first preset threshold. The fine, isolated noise is output as a denoised point cloud. ;
[0169]
[0170] In the formula, This is the radius scaling factor, used to dynamically adjust the filtering search radius based on the global average nearest neighbor distance of the point cloud, adapting to point cloud scenarios of different densities. The minimum filtering radius is used to limit the lower limit of the filtering search radius, so as to avoid the search radius being too small and the effective points of the sheep body being mistakenly removed due to excessive local sparsity of the point cloud.
[0171] S212, Denoising point clouds Ground segmentation based on normal-constrained RANSAC and bimodal height modeling is performed: First, an improved RANSAC algorithm is used, introducing normal vector constraints during the iterative sampling process, requiring the candidate plane normal vector to be... The angle with the global vertical direction must be less than the second preset threshold. To prevent lateral fences or barriers from being misidentified as the ground, the search space is initially trimmed based on the known coordinate range of the device's background panel, eliminating non-target areas outside the passageway. Finally, a denoised point cloud is calculated. Height relative to the optimal plane Construct a height distribution histogram. If the distribution exhibits bimodal characteristics (ground peak and sheep body peak), then use the bimodal mean method or Gaussian mixture model (GMM) to solve for the adaptive segmentation threshold. This leads to the removal of foreground cloud features from the ground. ;
[0172]
[0173] In the formula, Relative height refers to the first The vertical height of each point from the fitted ground plane is used to segment the ground and the sheep's body. For denoising point clouds The i-th point in the middle;
[0174] S213. Perform density-based connected component clustering and subject extraction on the foreground point cloud: The DBSCAN density clustering algorithm is used to cluster the foreground point cloud. The two core control parameters of this algorithm are the neighborhood radius ε and the minimum number of samples MinPts. ε is the spherical neighborhood search radius centered at a point, which in this embodiment ranges from 0.02m to 0.03m. MinPts is the minimum number of points in the ε-neighborhood required to determine a core point. If the number of points in the ε-neighborhood of a point is greater than or equal to MinPts, then the point is determined to be a core point. Based on the density accessibility and density reachability relationships, the foreground point cloud is divided into several independent clusters. Based on prior knowledge, sparse clusters of fence remnants, ground debris, and floating discrete noise with fewer than a preset threshold are removed. Among the remaining clusters, the cluster with the most points is selected as the sheep body object. If there are multiple clusters with a point difference less than the preset threshold, the cluster with the highest average density is further selected. Finally, the pure sheep body point cloud is output using the following formula. :
[0175]
[0176] In the formula, Indicates the first The number of points contained in a cluster Indicates the first Clusters, Indicates the first Clusters, This indicates the cluster that maximizes the expression within the parentheses. In this sheep point cloud processing scenario, the above parameters can effectively distinguish between dense clusters of the sheep body and various sparse, noisy clusters, ensuring that the final retained clusters are complete sheep objects.
[0177] S22 includes the following steps:
[0178] S221. Multimodal semantic perception and missing region localization: Using a 3D-SAM model to analyze the point cloud of a pure sheep body. Perform semantic segmentation to generate a three-dimensional semantic mask that includes "hair region - limb region - head region". ;Calculate three-class 3D semantic masks based on local point density analysis Each point in The nearest neighbor density will be lower than the adaptive threshold. The points are marked as boundary points, and the cavity areas to be repaired are delineated by fitting closed curves based on the boundary points. And generate a hole mask. ;
[0179] S222, Cross-modal feature extraction and gating fusion: Extracting pure sheep body point clouds coordinate data With color data The input Point-MobileViT lightweight backbone network is concatenated, and multi-scale features are extracted stepwise through multi-layer Set Abstraction to generate a geometric feature flow. and texture feature flow Geometric attention based on normal consistency is computed using a geometry-texture gating unit. and texture attention based on color similarity Then, the adaptive complementary fusion features are calculated. ;
[0180]
[0181] In the formula, For Hadamah accumulation;
[0182] S223, HT-DM Dynamic Modulation and Cascade Generation: Three-Class Three-Dimensional Semantic Masks Input to the HT-DM module, and utilize three-class three-dimensional semantic masks within the HT-DM module. Feature points are divided into different anatomical regions, and texture modulation operators (to enhance fur details) and geometric modulation operators (to strengthen surface constraints) are applied respectively to generate modulated feature vectors adapted to the characteristics of different anatomical regions of the black goat. ;
[0183]
[0184] In the formula, This is the dynamic scaling factor. This is the global mean of the fused features, used to standardize the fused features and eliminate the distribution shift caused by differences in feature amplitudes. This is the global standard deviation of the fused features, used to standardize the fused features and unify the distribution scale of the features. For dynamic bias coefficients, which are based on three-dimensional semantic masks. The generated adaptive bias parameters, which match the anatomical regions to which the feature points belong, are used to compensate for the region-specific information lost during feature standardization and enhance the feature discrimination of different anatomical regions.
[0185] Based on fused features, three-class 3D semantic masks, hole masks, and clean sheep body point clouds, a cascaded folding strategy is employed to generate sparse skeleton point clouds using MLP decoding. Then, FoldingNet is used to fold the 2D mesh into a local 3D space to generate a dense, completed point cloud. ;
[0186] Among them, fusion features It is a cascaded folding strategy to generate sparse skeleton point clouds The core input is a three-class 3D semantic mask. With hole mask Used to define the spatial extent of the completed region and the corresponding anatomical characteristics, constraining the region and morphology of the point cloud generation, and producing a pure sheep body point cloud. Provides the original geometric and textural reference for point cloud completion, ensuring consistency between the completed point cloud and the original point cloud.
[0187] S224, Geometry-Texture Joint Post-Processing Optimization: Using Moving Least Squares (MLS) to complete the point cloud. Geometric fitting was performed to eliminate outliers caused by generation errors and ensure the continuity of the body surface curvature; a kNN-based color transfer algorithm was used on the pure sheep body point cloud. Searching for The nearest neighbor points are used to calculate a dense complete point cloud using inverse distance weighted (IDW) calculation. The RGB values of the completed points are used to ensure a natural color transition between the repaired area and the surrounding hair, ultimately outputting a high-precision completed point cloud. ;
[0188] S23 includes the following steps:
[0189] S231. Complete the point cloud with high precision based on different viewpoints or different time frames. Establish source cloud The target point cloud was acquired using the top depth camera 2-a. For source cloud With target point cloud Performing fine point-to-surface ICP registration based on normal vector constraints: using KD-Tree in the target point cloud Searching for the source cloud various points in the middle nearest neighbor Using nearest neighbor Eigenvalues of the covariance matrix are estimated by eigendecomposition of its normal vector. Construct the total error function for point-to-surface ICP registration. Minimize the projection distance along the normal of the target point after the source point transformation;
[0190]
[0191] In the formula, Let be the total error function for point-to-area ICP registration, and let be the core optimization objective of the registration process. By minimizing this function value, precise spatial alignment between the source point cloud and the target point cloud can be achieved. It is a 3×3 orthogonal rotation matrix used to perform rotation transformations on the source point cloud to match the spatial pose of the target point cloud. This is a 3×1 translation vector used to perform a translation transformation on the source point cloud to match the spatial position of the target point cloud. The total number of points in the point cloud. It is the transpose symbol. The Huber kernel function is used to suppress false matches. The specific expression for the Huber kernel function is:
[0192]
[0193] In the formula, The piecewise critical threshold for the Huber kernel function is used to distinguish between standard interior and exterior points, with a value ranging from 0.01m to 0.02m, and a preferred value of 0.015m. When the absolute value of the residual is less than or equal to this threshold, L2 norm optimization is used to ensure convergence accuracy; when the absolute value of the residual is greater than this threshold, L1 norm optimization is used to reduce the interference of mismatches. The registration residual from point to surface represents the projection distance of the source point along the normal of the target point after transformation, and is the core metric for registration error.
[0194] Using Lie algebra For rotation matrix A first-order Taylor expansion is performed to transform the nonlinear optimization into a linear least squares problem;
[0195]
[0196] In the formula, Let be the Jacobian matrix of the registration error function with respect to pose increment, and be the first derivative matrix of the error function. Both have dimensions N×6 and are used to transform the nonlinear registration optimization problem into a linear least squares problem. Given the pose increment; solve for the pose increment. Output the point cloud after rigid registration. .
[0197] S232. Based on the point cloud after rigid registration Non-rigid fine-tuning and iterative optimization based on semantic region segmentation: Utilizing principal axis projection (PCA) and height quantile features of point clouds, the sheep body is automatically segmented into the head. ,trunk and limbs of Each semantic region is processed using an iterative strategy of "partition fine-tuning - incremental accumulation". Independent calculation of fine-tuning transformation At the same time, through The function controls the step size coefficient for each round of transformation. By introducing a regularization term to constrain the consistency of transformations in adjacent regions, and performing multiple iterations using the following formula, local ghosting caused by sheep breathing or slight swaying is eliminated, achieving non-rigid pose compensation, and outputting the fused complete point cloud. ;
[0198]
[0199] In the formula, The total optimization loss function, which is non-rigid fine-tuning, is the core objective of multi-round iterative optimization. It consists of two parts: a region registration error term and a neighboring region consistency regularization term. By minimizing this function, we achieve local non-rigid precise alignment of the sheep body point cloud while ensuring the overall geometric continuity of the sheep body model. For the first The point cloud set of semantic regions corresponds to the anatomical regions of the sheep, such as the head, trunk, and limbs, segmented by PCA principal axis projection and height quantile features. For area code, This is a regularization weight coefficient for ensuring consistency in transformations between adjacent regions. Its value ranges from 0.01 to 0.05. It is used to constrain the difference in transformation magnitude between adjacent regions, preventing geometric distortions such as tearing and discontinuity in the sheep model caused by local fine-tuning. This is a 3D Euclidean distance calculation function used to calculate the nearest neighbor distance from the transformed source point to the target point cloud, quantifying the registration error of a single region. The reference target point cloud is used for registration, and the top-view reference sheep body point cloud after rigid registration serves as a unified spatial reference for registration and alignment of all semantic regions. It is a dimensionless set of indexes for adjacent semantic regions, containing all pairs of regions that have spatial adjacency relationships, such as head-torso, torso-limbs. A pair of indexes for adjacent semantic regions. , These correspond to the numbers of two semantic regions that are spatially adjacent. For the number The 4×4 homogeneous fine-tuning transformation matrix corresponding to the semantic region. For the number The 4×4 homogeneous fine-tuning transformation matrix corresponding to the semantic region. The Frobenius Norm is used to quantify the degree of difference between two transformation matrices. The smaller the value, the more consistent the transformations of the two adjacent regions, which can ensure the smoothness and continuity of the sheep's body surface.
[0200] S233, Complete point cloud Performing Poisson surface reconstruction and meshing: Computing complete point clouds Oriented normal vector field Find indicator functions To make the divergence of its gradient equal to the divergence of the vector field, the equations are discretized on an octree grid. For sparse linear systems And solve it. It is a sparse vector. Let be the coefficient matrix of the sparse linear system, i.e., the discrete Laplace matrix. It is a symmetric positive definite sparse matrix, obtained by discretizing the Laplace operator Δ in the Poisson equation on an octree grid. It is used to transform continuous Poisson partial differential equations into a numerically solvable system of sparse linear equations. It is the Hamiltonian differential operator (Nabla operator). This is the discretized vector of unknown solutions for the indicator function. Each element in the vector corresponds to the value of the indicator function χ for a node in the octree mesh. Solving this vector yields the distribution of indicator functions for all mesh nodes in 3D space, providing core data for subsequent isosurface extraction. Given the right-hand side vector of a sparse linear system; the Marching Cubes algorithm is used to extract... The isosurfaces are used to generate a closed triangular mesh model. ;
[0201] S24 includes the following steps:
[0202] S241, Transform the triangular mesh model The corresponding point cloud input is used for multi-part semantic segmentation based on the DAG-PointNet++ model, an improvement on the PointNet++ model. This model maintains the core hierarchical architecture of PointNet++'s "Sampling Grouping (SA) + Feature Propagation (FP)," and upgrades core modules to suit the physical characteristics of black goats: it replaces the original FPS with Density-Adaptive Octree Farthest Point Sampling (D-FPS) to address uneven sampling distribution caused by dense hair; it introduces Attention-Enhanced KD-Tree Inverse Distance Weighted Interpolation (Attention-KD-IDW) to fuse semantic and geometric features and strengthen the distinction of blurred boundaries; and it integrates multi-scale feature fusion and noise suppression modules to effectively eliminate cross-part feature aliasing. Ultimately, it achieves efficient and accurate segmentation of eight body parts of the black goat: chest, abdomen, rump, left forelimb, right forelimb, left hindlimb, right hindlimb, and others. The DAG-PointNet++ model outputs the probability of each segmented point belonging to its corresponding body part and assigns semantic labels to each point based on the segmentation results, generating semantically labeled point cloud data. ;
[0203]
[0204] In the formula, Triangular mesh model The corresponding original black goat 3D point cloud set, For the point cloud set Three-dimensional coordinate points , This is a semantic tag set for eight body parts of the black goat, including chest, abdomen, rump, left forelimb, right forelimb, left hindlimb, right hindlimb, and others. Points output by the DAG-PointNet++ model Belongs to the Predicted probability of type of body part For point The optimal semantic label is the part category with the highest predicted probability;
[0205] S242. For point cloud data with semantic labels PCA-based pose normalization and slice extraction are performed: Torso point cloud is extracted, covariance matrix is calculated and eigenvalue decomposition is performed to obtain the principal axis direction. A rotation matrix is constructed to align the principal axis to the Y-axis (body length direction), with the Z-axis representing the height direction, thus achieving pose normalization. Chest, abdomen, and buttocks are separated based on semantic labels, and extreme points (e.g., shoulder height and hip height) are located using quantile statistics (e.g., 99th percentile). At specific percentage positions along the body length axis (Y-axis) of each part (e.g., 20%-80% of chest circumference), slices are extracted perpendicular to the spine with a thickness of [missing information]. Point cloud slices ;
[0206] S243, Slicing point clouds Perform convex hull-based girth calculation: Project the sliced point cloud onto the XZ plane (perpendicular to the volume major axis), calculate the convex hull of the two-dimensional projected points, and then calculate the perimeter of the convex hull as a geometric girth measurement. Simultaneously, based on the robust statistical range (1%-99th percentile) of the sliced point cloud, the slice width and depth are calculated, and a set of geometric measurement values are output.
[0207]
[0208] In the formula, The convex hull contour closed boundary generated by projecting point cloud slices onto the XZ plane. Let be the arc length parameter of the convex hull profile. Let be the arc length of a infinitesimal element of the convex hull profile, used for calculating the girth length in continuous form. The first two-dimensional convex hull The planar coordinate vectors of the vertices correspond to the discrete vertices of the convex hull contour on the XZ plane. The first two-dimensional convex hull The planar coordinate vectors of the vertices, and Let be two adjacent vertices on the convex hull profile. The convex hull is a closed profile. The total number of vertices of the two-dimensional convex hull is determined by the spatial distribution of the two-dimensional projection points of the slice point cloud. The L2 norm of a two-dimensional vector is used to calculate the straight-line distance between two adjacent vertices of the convex hull. By summing the distances of all adjacent vertices, the total perimeter of the convex hull can be obtained, which is the geometric girth measurement of the corresponding part of the sheep's body.
[0209] S244. Perform non-linear error correction based on machine learning on the set of geometric measurements: combine all the body size indicators (shoulder height, body length, chest circumference, waist circumference, etc.) obtained from the geometric measurements to form body size parameters. ,in Body size parameters The Middle The raw geometric measurements of the body size indicators specifically include 12 core body size parameters of the black goat: shoulder height, body length, chest width, chest depth, chest circumference, abdominal width, abdominal depth, abdominal circumference, hip height, hip width, hip depth, and hip circumference. Given the total number of body size indicators, a pre-trained random forest regression model is used to fit the relative error ratio between the geometric measurements and the artificial true values using the following formula. ;
[0210]
[0211] In the formula, This is a pre-trained random forest regression model. The model uses body size parameters... As input, output the ratio of the relative error between the geometrically measured value and the true value measured manually. The model was trained using a labeled dataset of measured body size of black goats. It can accurately fit the systematic measurement bias caused by the thickness of the hair on the body surface of black goats and the geometric approximation of the point cloud, providing a data-driven error compensation basis for subsequent correction of body size values.
[0212] The geometric girth measurements are compensated based on the relative error ratio. The systematic deviation caused by hair thickness and geometric approximation is eliminated by the following formula, and the corrected body size parameters of the black goat are output. ;
[0213]
[0214] S3 includes the following steps:
[0215] S31. Multi-source data fusion: Obtaining the body size parameters of black goats. Weight data Individual age and aquaculture environment data Temporal alignment and format standardization were performed to construct normalized individual multidimensional feature vectors of black goats. This forms a multidimensional feature database for individuals;
[0216]
[0217] S32. Health Status Assessment: This involves analyzing an individual's multidimensional feature vector. Input a large language model based on the Transformer architecture deployed on a PC and finely tuned by instructions to calculate an individual's health status score. ;
[0218]
[0219] In the formula, It is the Sigmoid activation function. To ensure developmental consistency, a pre-defined growth standard database is used to calculate the deviation between an individual's current weight and body size parameters, identifying the risk of "false obesity" or "stunted growth." For instantaneous growth rate, the average daily gain (ADG) over the past 7 days is calculated, reflecting an individual's short-term metabolic health and feeding status. For body symmetry, based on complete point clouds Calculate the volume symmetry score on both sides of the trunk midline to assess muscle development uniformity or identify potential gait abnormalities and injury risks. The weighting coefficients for the developmental matching evaluation item. The weighting coefficient for the instantaneous growth rate evaluation item. The weighting coefficient for the body shape symmetry evaluation item. This is the bias term of the health scoring function;
[0220] S33. Scoring based on individual health status The system automatically generates text-based aquaculture decision-making suggestions based on the range in which the fish falls, for example, Warning of sub-health This is normal. For good, For individuals with poor growth, the system automatically recommends formulas that increase the proportion of concentrated feed, and pushes veterinary clinical examination instructions for individuals with abnormal body symmetry. It also combines body size parameters, weight data and growth rate to predict the time to market.
[0221] S34. Based on aquaculture decision-making recommendations, multi-terminal collaborative management is implemented to construct a three-in-one collaborative management system of "cloud-PC-Android mobile terminal" to achieve a full-process digital closed loop of data collection, analysis, decision-making, and execution. One implementation method of this embodiment is as follows:
[0222] Android Mobile App: Focusing on agile on-site operations and multi-dimensional data management, the app is divided into three core modules: statistical analysis, goat records, and data management center. It utilizes a Bluetooth (BLE) cascaded RFID handheld reader to automatically retrieve and match chip ear tags. It supports digital record-keeping for individual black goats, covering core fields such as chip ear tag, sex, paternal / maternal pedigree, birth / entry date, pen status, and responsible operator, constructing a complete individual identity benchmark. It integrates 13 business entry points, including feeding (feeding amount), disinfection, vaccination, medication, quality anomalies, and inventory loss verification, enabling real-time data collection and quantification throughout the breeding process. The system provides statistics covering breeding records, ram semen collection (quantity and viability), and ewe abortion abnormality records, ensuring the continuity and integrity of breeding pedigree information. It also records changes in procurement, sales, and inventory, enabling refined tracking of breeding cost flow and asset status. Furthermore, it supports complete backup of all files and records to local mobile storage (SQLite) and features one-click import and recovery, addressing the pain point of data loss due to unstable network coverage or equipment failure at the breeding site. It achieves bidirectional synchronization (upload / download) between local and server via timestamp-based JSON data packets, supporting data sharing and logical consistency maintenance across multiple terminals such as mobile phones and tablets.
[0223] PC-based management backend: Focusing on big data mining and intelligent early warning, it uses Gompertz or Logistic nonlinear models to fit the entire historical data set, dynamically updates the ideal growth trajectory of individuals, and calculates the residual between the actual trajectory and the model prediction. Automatically generates group heat maps based on "building-pen" units, identifies developmental uniformity through statistical means, standard deviation, and coefficient of variation (CV), providing a scientific basis for group management; activates a multi-level linkage early warning engine, which triggers early warnings when an individual's health status score... Less than or equal to the critical threshold of individual health status Or a sudden drop in growth rate greater than When a red alert (immediate intervention) is triggered, the PC monitoring screen flashes an alarm, and a high-priority notification is simultaneously pushed to the farm manager and the corresponding person in charge via their APP; when an individual's growth deviates from the average of its age by more than one standard deviation, a yellow alert (attention suggestion) is triggered, the system generates a watchlist, and includes it in the next day's inspection plan; a distributed database cluster is used to structure and associate massive point cloud data, weighing waveforms, and management records, supporting one-click export of quality traceability reports by batch.
[0224] Among them, the growth rate suddenly dropped. The specific expression is:
[0225]
[0226] In the formula, Using the baseline growth rate, a Gompertz or Logistic nonlinear model is used to fit the individual's full historical body weight data, dynamically updating the ideal growth trajectory to obtain the theoretical baseline growth rate for period t. The actual growth rate is obtained by calculating the actual daily weight gain rate in adjacent measurement periods.
[0227]
[0228] in, For the first Actual weight measured during the cycle, For the first Actual weight measured during the cycle, The measurement period;
[0229] The baseline growth rate is determined by fitting the individual's complete historical weight data using the Gompertz or Logistic nonlinear model mentioned in this invention, dynamically updating its ideal growth trajectory, and obtaining the first... Theoretical baseline growth rate of the cycle Alternatively, the individual's average growth rate over the past four weeks can be used as a short-term benchmark. If the growth rate drops suddenly, it is considered a sudden drop. To avoid misjudgment due to a single measurement error, the system will continuously monitor for two measurement cycles. Only if the continuous decline reaches the standard will a red warning be triggered.
[0230] like Figure 2 As shown, in one embodiment of the present invention, the intelligent measurement device for body size and weight of black goats based on multi-source data fusion includes: an entrance RFID reading module 1-a, an exit RFID reading module 1-b, a top depth camera 2-a, a left depth camera 2-b, a right depth camera 2-c, a dynamic weighing platform 3, front and rear guide baffles 4, a channel side guardrail 5, and a background enclosure wall 6.
[0231] The front and rear guide baffles 4 are symmetrically arranged in a funnel shape at both ends of the passage to regulate the black goat's passage queue and prevent multiple targets from walking side by side. The side guardrails 5 of the passage are connected to the guide baffles and arranged symmetrically on the left and right to limit the effective walking path of the black goats. The background fence 6 is symmetrically arranged outside the side guardrails to shield the complex external environment and provide a uniform gray background.
[0232] The dynamic weighing platform 3 is embedded in the ground groove below the passage and flush with the ground; the entrance RFID reading module 1-a and the exit RFID reading module 1-b are respectively installed at the entrance and exit positions of the side guardrail 5 of the passage, and are deployed with dual antennas in a longitudinal differential configuration; the top depth camera 2-a, the left depth camera 2-b and the right depth camera 2-c are respectively fixed above the passage and above the guardrails on both sides, forming a three-view collaborative sensing network.
[0233] Each hardware module is connected to the embedded industrial computer via USB 3.2 (depth camera), Ethernet (RFID reader) and RS485 (dynamic weighing platform) transmission links, and the trigger interfaces of the three depth cameras are connected via a star-shaped hardware synchronizer to achieve nanosecond-level synchronous triggering.
[0234] In this embodiment, the embedded industrial computer establishes communication with the RFID reader via a network cable, initializes the configuration, and sets a reasonable identification time interval for the sampling frequency, signal strength threshold, and adaptive channel length. It filters out instantaneous interference signals to ensure stable identification of the RFID ear tags. The RFID reader collects signals from the black goat RFID ear tags through the inlet and outlet antennas. The embedded industrial computer runs a preset signal timing processing program to analyze the original identification records. It calculates the goat's entry and exit direction based on the order of entry into the sensing areas of different antennas and the dwell time: if the inlet antenna identifies first and the outlet antenna identifies later, and the timestamp interval between the two identifications is within a set reasonable range, the algorithm logic determines it as "exit"; if the outlet antenna identifies first and the inlet antenna identifies later, and the timing continuity requirement is met, the algorithm logic determines it as "entry".
[0235] In the description of this invention, the above are merely preferred embodiments and are not intended to limit the scope of protection of this invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this invention should be included within the scope of protection of this invention.
Claims
1. A method for intelligent measurement of body size and weight of black goats based on multi-source data fusion, characterized in that, Includes the following steps: S1. Collect the black goat's identity information, direction of entry and exit, and weight data; S2. Collect 3D point cloud data of black goats, perform multi-level denoising, depth repair, multi-stage registration and fusion and semantic segmentation to generate body size parameters of black goats; S3. Integrate the body size parameters, weight data, identity information, and breeding environment data of the black goats, input them into the health status evaluation system, and obtain breeding decision-making suggestions.
2. The intelligent measurement method for body size and weight of black goats based on multi-source data fusion according to claim 1, characterized in that, In S1, the specific method for collecting the black goat's identity information is as follows: the black goat's identity information is identified by collecting the black goat's RFID ear tag signal; The method for collecting the direction of entry and exit of black goats is as follows: the direction of entry and exit of goats is determined by calculating the order in which black goats enter different antenna sensing areas and the time they stay.
3. The intelligent measurement method for body size and weight of black goats based on multi-source data fusion according to claim 1, characterized in that, In S1, collecting the weight data of the black goats includes the following steps: S11. Continuously collect high-frequency body weight sequences of black goats during their passage; S12. Perform double-layer threshold filtering on the high-frequency weight sequence to obtain the effective weight sequence; S13. Perform gait-velocity joint classification feature engineering on the effective weight sequence, calculate the core features reflecting the motion state, input the core features and the effective weight sequence into the ResNet18-CBAM-TCN model based on the improved ResNet18, and output the gait classification label. S14. Perform multi-strategy progressive weight feature extraction based on gait classification labels and effective weight sequences to generate a five-dimensional weight feature vector. S15. Obtain the weight data of the black goat based on the gait classification label and the five-dimensional weight feature vector.
4. The intelligent measurement method for body size and weight of black goats based on multi-source data fusion according to claim 3, characterized in that, In S11, high-frequency body weight sequence The specific expression is: In the formula, For time High-frequency body weight sequence signal, The start time, The termination time is, where, , , For entry time, This is the amount of pre-delay. For playing time, To bring forward the deadline; In S12, the method for performing double-layer threshold filtering on high-frequency weight sequences is as follows: based on historical weight... Set dynamic effective range To accommodate individual differences, and to remove zero-point drift and outliers from high-frequency weight sequences, preliminary screening sequences were obtained. ,based on Median Calculation of Dynamic Threshold According to dynamic threshold Secondary fluctuation removal yields an effective weight sequence; In the formula, It is a median function; In S13, the core feature includes the rate of weight change. mean Sharpness of rate of change High-value platform proportion Ratio of peak arrival time The ResNet18-CBAM-TCN model, which is an improvement on ResNet18, consists of an input layer, a ResNet18 residual backbone, a CBAM attention embedding layer, a TCN temporal enhancement layer, and an MLP classification head, which are connected in sequence. S14 includes the following steps: S141. A high-value platform detection strategy is adopted, based on gait classification labels. Adaptively set platform thresholds, extract continuous stable segments from effective weight sequences, and calculate the pruned mean. And determine whether the high-value platform detection strategy is effective. If so, then the mean value will be... Save to the core valid dataset and proceed to S144; otherwise, proceed to S142; where the platform threshold is set. The specific expression is: In the formula, For effective weight sequence The maximum value, The gait-specific proportional coefficients are set as follows: slow gait label is set to 0.75, normal gait label is set to 0.82, fast gait label is set to 0.88, and wandering gait label is set to 0.
90. The high-value platform detection strategy is deemed effective only when the following conditions are met; otherwise, the high-value platform detection strategy is deemed ineffective. From effective weight sequence The continuous stable segments obtained through screening have a number of valid data points that reach the minimum length threshold set for the corresponding gait label: 30 points for slow gait label, 20 points for normal gait label, 14 points for fast gait label, and 10 points for wandering gait label. S142. Using the stable interval method, based on gait-specific fluctuation thresholds. Stable segments are extracted from the effective weight sequence, the optimal interval is selected, and high quantile features are calculated. And determine whether the stable interval method is effective; if so, then use the high quantile features. Save to the core valid dataset and proceed to S144; otherwise, proceed to S143. The stable interval method is deemed valid if the following conditions are met; otherwise, the stable interval method is deemed invalid. Within the stable sub-segment, the relative fluctuations of all adjacent weight values do not exceed the gait-specific fluctuation threshold. Furthermore, the length of this stable segment reaches the minimum stable length threshold set by the corresponding gait label, where... The value is set by the slow gait label. The value is 0.02, which is the setting for the normal gait label. The value is set to 0.05 for the fast gait label. The value is set to 0.08 for the loitering gait label. It is 0.12; S143. Using a fallback fusion strategy, after sorting the effective weight sequences in descending order, select the top... Find the highest value and calculate the median of the high values to obtain the output bottom-line weight feature. The bottom line is the weight characteristics. Save to the core valid dataset and proceed to S144; S144. Based on the core effective dataset, calculate the maximum value, median, mode, mean of local maxima, and overall mean to construct a five-dimensional weight feature vector. , The maximum weight in the core valid dataset. The median weight in the core valid dataset. The mode of body weight in the core effective dataset. The mean of local maxima in the core effective dataset. The overall mean weight in the core valid dataset; S15 specifically refers to: Based on the gait classification label, a corresponding specific regression equation is matched. The specific regression equation is then used to evaluate the five-dimensional body weight feature vector according to the feature weight coefficients under different gait states. Weighted summation and intercept correction are performed to eliminate the systematic interference of gait impact on body weight, and the body weight data of the black goats is output. .
5. The intelligent measurement method for body size and weight of black goats based on multi-source data fusion according to claim 4, characterized in that, S2 includes the following steps: S21. Obtain the depth image and RGB image of the black goat, convert the data to obtain three-dimensional point cloud data, preprocess the three-dimensional point cloud data, and generate a pure goat body point cloud. S22. Based on the pure sheep body point cloud, a point cloud completion method that integrates multimodal semantic prompts and lightweight dynamic modulation is used to perform high-precision 3D reconstruction of local hole regions and generate high-precision completed point clouds. S23. Based on high-precision point cloud completion, a registration strategy of coarse to fine and regional optimization is adopted to perform point cloud registration fusion and surface reconstruction to generate a closed triangular mesh model. S24. Based on a closed triangular mesh model, an automated measurement method based on geometric slicing and residual learning is used to extract body size parameters and correct errors, thereby generating body size parameters for black goats.
6. The intelligent measurement method for body size and weight of black goats based on multi-source data fusion according to claim 5, characterized in that, S21 includes the following steps: S211. Convert the depth image and RGB image of the black goat into 3D point cloud data. , For the Nth point in a 3D point cloud, outlier filtering based on local neighborhood statistical characteristics and adaptive radius is performed according to the 3D point cloud data: First, a spatial index is established using a KD-Tree, and the distance from each point to its surrounding area is calculated. The average distance between the nearest neighbors The mean of the global distance distribution and standard deviation Eliminate those that meet the requirements outliers To adjust the coefficients, the average nearest neighbor distance of the point cloud is then calculated. Set adaptive search radius Output denoised point cloud ; In the formula, This is the radius scaling factor. Minimum filter radius; S212, Denoising point clouds Ground segmentation based on normal-constrained RANSAC and bimodal height modeling is performed: First, an improved RANSAC algorithm is used, introducing normal vector constraints during the iterative sampling process, requiring the candidate plane normal vector to be... The angle with the global vertical direction must be less than the second preset threshold. Then, combining the known coordinate range of the device's background panel, a preliminary cropping of the search space is performed to remove non-target areas outside the channel; finally, the denoised point cloud is calculated. Height relative to the optimal plane Construct a height distribution histogram. If the distribution exhibits bimodal characteristics, then use the bimodal mean method or Gaussian mixture model to solve for the adaptive segmentation threshold. This leads to the removal of foreground cloud features from the ground. ; In the formula, Relative height refers to the first The vertical height of each point from the fitted ground plane is used to segment the ground and the sheep's body. For denoising point clouds The i-th point in the middle; S213. Perform density-based connected component clustering and subject extraction on the foreground point cloud: The DBSCAN density clustering algorithm is used to cluster the foreground point cloud. The two core control parameters of this algorithm are the neighborhood radius ε and the minimum number of samples MinPts. If the number of points contained in the ε-neighborhood of a point is greater than or equal to MinPts, then the point is determined to be a core point. Based on the density accessibility and density reachability relationship, the foreground point cloud is divided into several independent clusters. Based on prior knowledge, sparse clusters of fence remnants, ground debris, and floating discrete noise with fewer than a preset threshold are removed. Among the remaining clusters, the cluster with the most points is selected as the sheep body object. If there are multiple clusters with a point difference less than the preset threshold, the cluster with the highest average density is further selected. Finally, the pure sheep body point cloud is output using the following formula. : In the formula, Indicates the first The number of points contained in a cluster Indicates the first Clusters, Indicates the first Clusters, This indicates the cluster that maximizes the expression within the parentheses; S22 includes the following steps: S221. Multimodal semantic perception and missing region localization: Using a 3D-SAM model to analyze the point cloud of a pure sheep body. Perform semantic segmentation to generate a three-dimensional semantic mask that includes "hair region - limb region - head region". ;Calculate three-class 3D semantic masks based on local point density analysis Each point in The nearest neighbor density will be lower than the adaptive threshold. The points are marked as boundary points, and the cavity areas to be repaired are delineated by fitting closed curves based on the boundary points. And generate a hole mask. ; S222, Cross-modal feature extraction and gating fusion: Extracting pure sheep body point clouds coordinate data With color data The input Point-MobileViT lightweight backbone network is concatenated, and multi-scale features are extracted stepwise through multi-layer Set Abstraction to generate a geometric feature flow. and texture feature flow Geometric attention based on normal consistency is computed using a geometry-texture gating unit. and texture attention based on color similarity Then, the adaptive complementary fusion features are calculated. ; In the formula, For Hadamah accumulation; S223, HT-DM Dynamic Modulation and Cascade Generation: Three-Class Three-Dimensional Semantic Masks Input to the HT-DM module, and utilize three-class three-dimensional semantic masks within the HT-DM module. Feature points are divided into different anatomical regions, and texture modulation and geometric modulation operators are applied respectively to generate modulated feature vectors adapted to the characteristics of different anatomical regions of the black goat. ; In the formula, This is the dynamic scaling factor. The global mean of the fused features. The global standard deviation of the fused features. This is the dynamic bias coefficient; Based on fused features, three-class 3D semantic masks, hole masks, and clean sheep body point clouds, a cascaded folding strategy is employed to generate sparse skeleton point clouds using MLP decoding. Then, FoldingNet is used to fold the 2D mesh into a local 3D space to generate a dense, completed point cloud. ; S224, Geometry-Texture Joint Post-Processing Optimization: Using Moving Least Squares Method to Complete the Point Cloud Geometric fitting was performed; a kNN-based color transfer algorithm was used to refine the pure sheep body point cloud. Searching for The nearest neighbor points are used to calculate the dense complete point cloud through inverse distance weighting. The RGB values of the completed points are used to ultimately output a high-precision completed point cloud. ; S23 includes the following steps: S231. Complete the point cloud with high precision based on different viewpoints or different time frames. Establish source cloud Target point cloud was acquired using a top depth camera. For source cloud With target point cloud Performing fine point-to-surface ICP registration based on normal vector constraints: using KD-Tree in the target point cloud Searching for the source cloud various points in the middle nearest neighbor Using nearest neighbor Eigenvalues of the covariance matrix are estimated by eigendecomposition of its normal vector. Construct the total error function for point-to-surface ICP registration. Minimize the projection distance along the normal of the target point after the source point transformation; In the formula, It is a 3×3 orthogonal rotation matrix. It is a 3×1 translation vector. The total number of points in the point cloud. It is the transpose symbol. This is the Huber kernel function, used to suppress false matches; Using Lie algebra For rotation matrix A first-order Taylor expansion is performed to transform the nonlinear optimization into a linear least squares problem; In the formula, Let be the Jacobian matrix of the registration error function with respect to pose increment, and be the first derivative matrix of the error function. Both have dimensions N×6 and are used to transform the nonlinear registration optimization problem into a linear least squares problem. Given the pose increment; solve for the pose increment. Output the point cloud after rigid registration. ; S232. Based on the point cloud after rigid registration Non-rigid fine-tuning and iterative optimization based on semantic region segmentation: Utilizing the principal axis projection and height quantile features of the point cloud, the sheep body is automatically segmented into the head. ,trunk and limbs of Each semantic region is processed using an iterative strategy of "partition fine-tuning - incremental accumulation". Independent calculation of fine-tuning transformation At the same time, through The function controls the step size coefficient for each round of transformation. A regularization term is introduced to constrain the consistency of transformations in adjacent regions, based on the total optimization loss function of non-rigid fine-tuning. Perform multiple iterations to output the fused complete point cloud. ; In the formula, For the first A collection of point clouds representing semantic regions For area code, These are regularization weighting coefficients for ensuring consistency of transformations in adjacent regions. This is a function for calculating Euclidean distance in three-dimensional space. To register the reference target point cloud, A set of indices for adjacent semantic regions. , These correspond to the numbers of two semantic regions that are spatially adjacent. For the number The 4×4 homogeneous fine-tuning transformation matrix corresponding to the semantic region. For the number The 4×4 homogeneous fine-tuning transformation matrix corresponding to the semantic region. It is the Frobenius norm; S233, Complete point cloud Performing Poisson surface reconstruction and meshing: Computing complete point clouds Oriented normal vector field Find indicator functions To make the divergence of its gradient equal to the divergence of the vector field, the Marching Cubes algorithm is used to extract... The isosurfaces are used to generate a closed triangular mesh model. ; S24 includes the following steps: S241, Transform the triangular mesh model The corresponding point cloud input is used for multi-part semantic segmentation based on the DAG-PointNet++ model, which is an improvement on the PointNet++ model. The DAG-PointNet++ model outputs the probability of the part to which each segmented point belongs. Based on the segmentation results, each point is assigned a semantic label corresponding to the part, generating semantically labeled point cloud data. ; In the formula, Triangular mesh model The corresponding original black goat 3D point cloud set, This is a semantic tag set for eight body parts of the black goat, including chest, abdomen, rump, left forelimb, right forelimb, left hindlimb, right hindlimb, and others. Points output by the DAG-PointNet++ model Belongs to the Predicted probability of type of body part For point The optimal semantic label is the part category with the highest predicted probability; S242. For point cloud data with semantic labels Perform PCA-based pose normalization and slice extraction: extract torso point cloud, calculate covariance matrix and perform eigenvalue decomposition, obtain body principal axis direction, construct rotation matrix to align principal axis to Y-axis, Z-axis as height direction, and realize pose normalization; separate chest, abdomen and buttocks based on semantic labels, and use quantile statistics to locate extreme points of each part; At specific percentage points along the body's long axis at various locations, cut sections perpendicular to the spine, with a thickness equal to half the thickness of a point cloud slice. Point cloud slices ; S243, Slicing point clouds Perform convex hull-based girth calculation: Project the sliced point cloud onto the XZ plane, calculate the convex hull of the two-dimensional projected points, and then calculate the perimeter of the convex hull as a geometric girth measurement. Simultaneously, based on the robust statistical range of the sliced point cloud, the slice width and depth are calculated, and a set of geometric measurement values is output. In the formula, The convex hull contour closed boundary generated by projecting point cloud slices onto the XZ plane. Let be the arc length parameter of the convex hull profile. Let be the arc length of the infinitesimal element of the convex hull profile. The first two-dimensional convex hull The planar coordinate vectors of the vertices, The first two-dimensional convex hull The planar coordinate vectors of the vertices, Let be the total number of vertices of the two-dimensional convex hull. Let L2 be the norm of a two-dimensional vector; S244. Perform nonlinear error correction based on machine learning on the set of geometric measurements: combine the body size indices obtained from all geometric measurements in the set of geometric measurements to form body size parameters. ,in Body size parameters The Middle The original geometric measurements of the body size indicators specifically include the core body size parameters of the black goat: shoulder height, body length, chest width, chest depth, chest circumference, abdominal width, abdominal depth, abdominal circumference, hip height, hip width, hip depth, and hip circumference. Given the total number of body size indicators, a pre-trained random forest regression model is used to fit the relative error ratio between the geometric measurements and the artificial true values using the following formula. ; In the formula, This is a pre-trained random forest regression model; The geometric girth measurements are compensated based on the relative error ratio. The systematic deviation caused by hair thickness and geometric approximation is eliminated by the following formula, and the corrected body size parameters of the black goat are output. ; 。 7. The intelligent measurement method for body size and weight of black goats based on multi-source data fusion according to claim 6, characterized in that, S3 includes the following steps: S31. Multi-source data fusion: Obtaining the body size parameters of black goats. Weight data Individual age and aquaculture environment data Temporal alignment and format standardization were performed to construct normalized individual multidimensional feature vectors of black goats. This forms a multidimensional feature database for individuals; S32. Health Status Assessment: This involves analyzing an individual's multidimensional feature vector. Input a large language model based on the Transformer architecture deployed on a PC and finely tuned by instructions to calculate an individual's health status score. ; In the formula, It is the Sigmoid activation function. For developmental matching, Instantaneous growth rate For body symmetry, The weighting coefficients for the developmental matching evaluation item. The weighting coefficient for the instantaneous growth rate evaluation item. The weighting coefficient for the body shape symmetry evaluation item. This is the bias term of the health scoring function; S33. Scoring based on individual health status Automatically generate aquaculture decision-making suggestions in text form based on the area it falls into; S34. Based on aquaculture decision-making recommendations, conduct multi-terminal collaborative management and build a three-in-one collaborative management system of "cloud-PC-Android mobile terminal" to realize a digital closed loop of the entire process of data collection, analysis, decision-making and execution.
8. A smart measurement device for body size and weight of black goats based on multi-source data fusion, applied to the smart measurement method for body size and weight of black goats based on multi-source data fusion as described in any one of claims 1 to 7, characterized in that, include: Entrance RFID reading module, exit RFID reading module, top depth camera, left depth camera, right depth camera, dynamic weighing platform, front and rear guide baffles, channel side guardrails and background enclosure wall; The front and rear guide baffles are arranged symmetrically in a funnel shape at both ends of the passage to regulate the black goat's passage queue. The side railings of the passage are connected to the guide baffles and arranged symmetrically on the left and right to limit the effective walking path of the black goats. The background fence is symmetrically arranged outside the side railings to shield against interference from the complex external environment. The dynamic weighing platform is embedded in the ground recess below the passage and flush with the ground; the entrance RFID reading module and the exit RFID reading module are respectively installed at the entrance and exit positions of the side guardrails of the passage, and are deployed with dual antennas in a longitudinal differential configuration; the top depth camera, the left depth camera and the right depth camera are respectively fixed above the passage and above the guardrails on both sides.