Live pig weight estimation method based on semantic key point guidance and three-dimensional morphological feature fusion

By introducing a semantic anchor-guided orthogonal truncation mechanism and 3D morphological feature fusion, the problems of projection error and non-rigid deformation in non-contact pig weight measurement are solved, and high-precision pig weight estimation is achieved.

CN122049548APending Publication Date: 2026-05-15HENAN AGRICULTURAL UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HENAN AGRICULTURAL UNIVERSITY
Filing Date
2025-12-31
Publication Date
2026-05-15

AI Technical Summary

Technical Problem

Existing technologies for non-contact pig weight measurement suffer from projection errors and non-rigid deformation interference, especially when pigs are standing at an angle, bending, or swinging their heads, leading to inaccurate weight estimation.

Method used

An orthogonal truncation mechanism guided by semantic anchors is adopted to construct an adaptive rigid collar through key points at the ear roots. The truncation boundary is dynamically adjusted and perpendicular to the spinal axis. Combined with three-dimensional morphological feature fusion, including dorsal groove depth features, the weight of pigs is estimated.

Benefits of technology

It improves the consistency and accuracy of weight estimation under non-standard postures, effectively eliminates interference from non-rigid deformations such as large head twisting or head lowering in pigs, and realizes high-precision weight measurement in complex group environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122049548A_ABST
    Figure CN122049548A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of smart animal husbandry and computer vision, and discloses a live pig weight estimation method based on semantic key point guidance and three-dimensional morphological feature fusion, which comprises the following steps: step 1, joint perception and semantic decoupling; step 2, space mapping and point cloud cleaning; step 3, carrying out self-adaptive attitude normalization; 4, orthogonally intercepting the rigid trunk; step 5, deep extraction of morphological characteristics; and step 6, intelligent regression prediction. According to the invention, a common fixed-proportion excision method or a neck positioning method depending on geometric depression in the prior art is abandoned; by introducing an orthogonal truncation mechanism guided by a semantic anchor point (ear root), a virtual'adaptive rigid collar 'is constructed on a front-end truncation plane, and the truncation boundary can be dynamically adjusted along with swinging of the head of a pig and is always perpendicular to the spine axis. According to the mechanism, interference of non-rigid deformation such as large-amplitude head torsion and head lowering of the pig on trunk volume calculation is eliminated in principle, and the stability of effective trunk point cloud is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of smart animal husbandry and computer vision technology, specifically to a method for high-precision monitoring of pig weight and body condition under non-contact conditions using 3D point cloud analysis technology. Background Technology

[0002] In large-scale pig farming, body weight is a core indicator for assessing growth performance, adjusting feed formulation, and determining the time to market. Traditional weighbridge methods are time-consuming, labor-intensive, and prone to causing stress to pigs. With the development of machine vision technology, non-contact weight estimation has become a research hotspot.

[0003] However, existing technologies still have significant drawbacks: current 2D image-based techniques for area estimation cannot address projection errors caused by pigs standing at an angle or bending. While some 3D methods incorporate point clouds, they typically employ fixed-ratio cut-off methods or "geometric concavity and convexity detection methods" (finding the minimum value of the neck width) when removing head interference. Summary of the Invention

[0004] To address the aforementioned deficiencies in existing technologies, this invention aims to provide an optical flow estimation method based on dynamic masking and adaptive cross-modal distillation, abandoning the commonly used "fixed-ratio truncation method" or the "neck localization method" relying on geometric concavity. By introducing an orthogonal truncation mechanism guided by semantic anchor points (ear roots), the front-end truncation plane constructs a virtual "adaptive rigid collar" that can dynamically adjust the truncation boundary according to the pig's head movement and always remain perpendicular to the spinal axis. This mechanism fundamentally eliminates the interference of non-rigid deformations such as large head twists and tilts on trunk volume calculation, ensuring the stability of the effective trunk point cloud and significantly improving the consistency of weight estimation under non-standard postures.

[0005] A method for estimating pig weight based on semantic key point guidance and 3D morphological feature fusion includes the following steps:

[0006] S1 Joint perception and semantic decoupling: Acquire top-view RGB-D data of the target pig; use a deep neural network to infer the RGB data and output the pig instance mask and anatomical key points; the key points include at least the ear root key points and tail root key points with rigid positional attributes;

[0007] S2 Spatial Mapping and Point Cloud Cleaning: Using the instance mask as a region of interest (ROI) filter, the corresponding depth data is extracted from the depth image, and the original 3D point cloud of the pig is generated by back-projection using camera intrinsic parameters.

[0008] S3 Attitude Decoupling and Coordinate Reconstruction: Based on the original 3D point cloud of the pig, principal component analysis (PCA) is used to calculate the principal direction vector of the point cloud, and a self-local coordinate system with the spine direction as the X-axis and the cross-sectional direction as the Y-axis is constructed.

[0009] S4 Rigid Torso Orthogonal Cut-off: The ear root key points are mapped to the three-dimensional space of the local coordinate system as head cut-off anchor points; a front cut-off plane passing through the head cut-off anchor points and perpendicular to the X-axis, and a rear cut-off plane passing through the tail root key points and perpendicular to the X-axis are constructed; the two cut-off planes are used to remove non-rigid deformation regions of the head and tail to extract effective torso point cloud;

[0010] S5 Morphological Feature Depth Extraction: Geometric calculation and topological scanning are performed on the effective trunk point cloud to construct a multimodal feature vector containing basic geometric features and back groove depth features. The basic geometric features include trunk volume, surface area, and axial length. The back groove depth is defined as the degree of topological concavity of the spine position relative to the longissimus dorsi muscle bulges on both sides in the cross-sectional profile.

[0011] S6 Adaptive Density Weight Estimation: Based on the volumetric features of the effective trunk points, and using the dorsal groove depth features, a dynamic density correction coefficient is generated; the volumetric features and the dynamic density correction coefficient are fused, and the predicted weight of the pig is output through a regression model.

[0012] Furthermore, the specific method for determining the "head truncation anchor point" in step S3 has an adaptive fault-tolerant mechanism, specifically including:

[0013] If the deep neural network detects the left ear root point and the right ear root point, it calculates the midpoint of the two points in the local coordinate system and defines the midpoint as the head truncation anchor point.

[0014] If only one ear root point is detected due to occlusion, the three-dimensional coordinates of the ear root point on one side in the local coordinate system are obtained and directly defined as the head truncation anchor point, or it is projected onto the spinal axis as the head truncation anchor point based on the prior symmetry of the pig body.

[0015] Furthermore, the construction logic of the "front-end truncation plane" in step S3 is as follows: Let the three-dimensional coordinates of the head truncation anchor point be... The X-axis direction vector of the self-local coordinate system is The equation of the front truncation plane is defined as follows: The plane dynamically shifts as the pig's head moves and the position of its ear roots changes, but always remains orthogonal to the axis of the spine.

[0016] Furthermore, the specific steps for extracting the "dorsal groove depth feature" in step S4 include:

[0017] Along the X-axis of the spine, extract multiple orthogonal cross-sectional point cloud slices with a preset step size; smooth each slice of point cloud and search for local maxima and local minima in the Z-axis direction;

[0018] If two significant local maxima are detected sandwiching a local minima, forming a "W" shaped topology, the Euclidean distance from the midpoint of the line connecting the two maxima to the minima is calculated and recorded as the back trench depth of the cross section. If only one local maximum is detected, forming a "U" shaped topology, the back trench depth of the cross section is set to zero.

[0019] The weighted average of the dorsal groove depth of all slices was calculated to quantify the lean meat percentage and muscle density of pigs.

[0020] Furthermore, the method also includes extracting continuous curvature spectrum features: performing quadratic polynomial fitting on the back contour of each cross-sectional point cloud slice. Extract the absolute value of the coefficient of the quadratic term. Construct a curvature variation sequence distributed along the spinal axis; calculate the mean and variance of the sequence and incorporate them into the feature vector.

[0021] This invention also provides an intelligent monitoring system for the body condition of pigs, comprising:

[0022] The heterogeneous feature perception module is used to acquire the top-view RGB-D data of the target pig and use a deep neural network to infer the RGB data, outputting the pig instance mask and anatomical key points;

[0023] Spatial mapping and point cloud cleaning: Using the instance mask as a region of interest (ROI) filter, the corresponding depth data is extracted from the depth image, and combined with camera intrinsic parameters for back projection to generate the original 3D point cloud of the pig;

[0024] The attitude decoupling module is used to construct a local coordinate system with the spine direction as the X-axis based on the original 3D point cloud of the pig using principal component analysis (PCA).

[0025] The rigid cut-off module is used to map the key points of the ear root to three-dimensional space as head cut-off anchor points, construct a front cut-off plane perpendicular to the X-axis to remove non-rigid areas of the head, and extract effective torso point cloud.

[0026] The morphological feature extraction module is used to scan the effective torso point cloud and extract multimodal feature vectors containing geometric volume and dorsal groove depth.

[0027] The intelligent weight estimation module is used to input the multimodal feature vector into the regression model and output the predicted weight of the pig.

[0028] The present invention also provides an electronic device, including a memory and a processor, wherein the memory is used to store a computer program, and the processor runs the computer program to enable the electronic device to perform the above-described method for estimating the weight of pigs.

[0029] The present invention also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described method for estimating the weight of pigs.

[0030] Compared with the prior art, the beneficial effects of the present invention are:

[0031] 1. Extremely high posture robustness: This invention abandons the commonly used "fixed-ratio truncation method" or the "neck positioning method" relying on geometric concavity in existing technologies. By introducing an orthogonal truncation mechanism guided by semantic anchor points (ear roots), the front truncation plane constructs a virtual "adaptive rigid collar" that can dynamically adjust the truncation boundary according to the pig's head swing and always remain perpendicular to the spinal axis. This mechanism eliminates the interference of non-rigid deformations such as large head twists and head drops on trunk volume calculation in principle, ensuring the stability of the effective trunk point cloud and significantly improving the consistency of weight estimation under non-standard postures.

[0032] 2. Breakthrough in Multimodal Feature Fusion Based on Single Geometric Dimension: Addressing the poor generalization ability of traditional methods that rely solely on low-dimensional geometric features such as length, width, and volume, this invention innovatively introduces spinal topological features (dorsal groove depth). This feature, as a high-dimensional descriptor orthogonal to volume, effectively characterizes the cross-sectional morphological complexity of pigs. By fusing this topological feature with basic geometric features and inputting it into a nonlinear regression model, this invention successfully constructs a dynamic density correction mechanism. This not only solves the weight estimation drift caused by differences in muscle rate but also exhibits strong anti-interference ability against volume inflation caused by abdominal sagging (pregnancy or overeating), achieving a dual breakthrough in weight estimation accuracy and stability in complex population environments. Attached Figure Description

[0033] Figure 1 This is a flowchart of the method proposed in this invention;

[0034] Figure 2 This is a diagram of the intelligent monitoring system for pig body condition proposed in this invention;

[0035] Figure 3 This is a diagram of an electronic device proposed in this invention;

[0036] Figure 4 This is a diagram of the computer-readable storage medium proposed in this invention. Detailed Implementation

[0037] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0038] Example 1

[0039] Example 1 provides a method for estimating the weight of pigs based on semantic key point guidance and fusion of three-dimensional morphological features. For example... Figure 1 As shown, the method includes the following detailed steps:

[0040] S1, Joint perception and semantic decoupling

[0041] Multimodal data acquisition and spatiotemporal alignment:

[0042] By deploying an RGB-D depth camera directly above the pigsty, top-down RGB images of the pig herd are simultaneously acquired. and depth images .

[0043] Spatiotemporal registration: Using the camera's intrinsic parameter matrix K and extrinsic parameter matrix T, the pixel coordinate system of the depth image is strictly aligned to the RGB image coordinate system, ensuring that for any pixel... Its color information and depth information have spatial consistency.

[0044] Preprocessing: Temporal filtering is applied to the depth image to eliminate sensor flicker noise, and an effective depth threshold is set. It includes a range of 0.5m to 2.0m, filtering out background interference from the ground and high altitudes.

[0045] Multi-branch Deep Neural Network Construction and Inference: A multi-task joint perception network (named YOLO-Seg-Pose) based on an improved YOLO architecture is constructed. This network uses the shared backbone network of CSP-Darknet to extract multi-scale features and branches out three parallel and decoupled prediction heads after the feature fusion layer (Neck):

[0046] Input layer: RGB image normalized to 640×640 resolution.

[0047] Object detection branch: Outputs the bounding box coordinates and class confidence scores for each pig.

[0048] Instance segmentation branch: Output prototype mask coefficients, convolved with the feature map to generate a binary instance mask of the same size as the input. This enables pixel-level foreground segmentation.

[0049] Keypoint regression branch: Analyzes the anatomical features of pigs from the feature map. This embodiment preferably uses a direct coordinate regression strategy based on anchor points;

[0050] Output anatomical key point set The pixel coordinates corresponding to the left ear root, right ear root, and tail root, respectively. And its confidence score.

[0051] Training strategy: Employ a multi-task joint loss function End-to-end training is performed, with OKS (Object Keypoint Similarity) Loss used for keypoint regression to improve localization accuracy.

[0052] S2, Spatial Mapping and Point Cloud Cleaning

[0053] Point cloud backprojection and cleaning: using instance masks As a region of interest (ROI) filter, only depth data of the pig region is extracted. Combined with camera internal parameters The pixel coordinates are back-projected into three-dimensional space to generate the original point cloud set. :

[0054]

[0055] Noise cleaning: for Perform Statistical Outlier Removal (SOR) filtering. Calculate the distance from each point to its nearest neighbor. The average distance between nearest neighbors is used to remove noise points exceeding the standard deviation threshold σ, including edge shadows caused by pig movement and dust in the air, to obtain clean point cloud data.

[0056] S3, Attitude Decoupling and Coordinate Reconstruction

[0057] PCA Coordinate System Construction and Attitude Normalization: To address the inconsistency in coordinate systems caused by pigs standing randomly in their pens, Principal Component Analysis (PCA) was performed.

[0058] Covariance matrix calculation: Calculate the centroid of the denoised point cloud. and covariance matrix C:

[0059]

[0060] Eigenvalue decomposition: Perform singular value decomposition (SVD) on C to obtain three eigenvalues. and its corresponding unit eigenvector .

[0061] Local coordinate system definition: Definition (The direction of maximum variance) is the spinal axis (X-axis). The width axis of the cross-section (Y-axis). This is the gravity axis (Z-axis).

[0062] Coordinate transformation: Constructing the rotation matrix Map the original point cloud to its own local coordinate system:

[0063]

[0064] S4, Rigid Trunk Orthogonal Cut-off

[0065] This step aims to use semantic anchors to eliminate the interference of non-rigid deformation at the head and tail on volume measurement.

[0066] Head truncation anchor point established:

[0067] Map 2D keypoints to a 3D local coordinate system and execute an adaptive strategy based on detection confidence:

[0068] Binaural Visible Mode: If the confidence scores of both the left and right ear root points are higher than the threshold, then calculate the geometric midpoint of the two points in space:

[0069]

[0070] This midpoint can effectively offset the displacement error caused by the left and right deflection of the pig's head.

[0071] Single-ear visible mode: If only one ear root is detected due to occlusion, including the left ear, the coordinates of that point are directly taken as the anchor point, or the point is projected onto the spinal axis based on the prior of left-right symmetry of the pig body.

[0072] Dynamic truncation plane construction:

[0073] In the local coordinate system, the normal vector of the anterior truncation plane is defined as the direction of the spinal axis. Constructing anchor points The plane equation:

[0074]

[0075] in A physiological buffer distance (30mm-50mm in this embodiment) is used to avoid the neck folds behind the ear roots. Similarly, the tail root point is used to construct the posterior cutoff plane.

[0076] Effective torso extraction: The point cloud is cropped using the two planes mentioned above, preserving... Within the data range, the head and tail are removed to obtain a morphologically stable and effective torso point cloud. .

[0077] S5. Deep Extraction of Morphological Features

[0078] This step constructs multimodal feature vectors from both geometric and topological dimensions.

[0079] Basic geometric feature extraction:

[0080] 3D volume: Calculation of torso volume using voxelized mesh method Calculate the surface area using Poisson reconstruction. ;

[0081] One-dimensional / two-dimensional features: Calculating the length of the torso axis Average width and the eccentricity of the fitted ellipse ;

[0082] Back groove depth feature extraction

[0083] Differential slicing and reconstruction: extraction along the X-axis at a preset step size, including 10mm. Each cross section is an orthogonal cross section. A Savitzky-Golay filter is applied to each cross section profile for smooth reconstruction.

[0084] Topology analysis: Search for local maxima (peaks) and local minima (troughs) along the Z-axis.

[0085] If the topology is "W" shaped (double muscle feature): calculate the vertical distance from the midpoint of the line connecting the two crests to the trough, and record it as the dorsal groove depth. .

[0086] If it presents a "U"-shaped topology (fatty characteristics): Let .

[0087] Feature aggregation: Calculate the weighted mean of the back groove depth for all slices. It is used to quantify the muscle density of pigs.

[0088] Vector construction:

[0089] Normalize the above features to construct a multimodal feature vector:

[0090]

[0091] S6, Adaptive Density Estimation

[0092] Model construction: The XGBoost (eXtreme Gradient Boosting) algorithm was used to construct a nonlinear regression model.

[0093] Implicit density correction:

[0094] eigenvectors Input model. The model automatically learns the dorsal groove depth using the feature interaction mechanism of decision trees. Non-linear relationship with body weight:

[0095]

[0096] When the input shows a large back groove depth, the model will automatically match a higher density coefficient. This allows for a higher predicted weight value than a simple volume model, enabling accurate differentiation between "puffy" and "sturdy" individuals.

[0097] Output result: Predicted weight of pigs (kg)

[0098] Example 2: Intelligent Monitoring System for Pig Body Condition

[0099] To implement the method corresponding to Embodiment 1 above, Embodiment 2 provides an intelligent monitoring system for pig body condition. For example... Figure 2 As shown, the system includes:

[0100] Heterogeneous feature perception module: used to perform step S1, collect RGB-D data and use a deep neural network to output a mask and key points.

[0101] Spatial mapping and cleaning module: used to execute step S2, complete point cloud back projection and outlier point denoising.

[0102] Attitude decoupling module: used to execute step S3, using the PCA algorithm to construct a local coordinate system and achieve attitude normalization.

[0103] Rigid cut-off module: used to execute step S4, construct an orthogonal cut-off plane based on semantic anchor points, and extract the effective torso.

[0104] Morphological feature extraction module: used to perform step S5, to perform slice scanning of the torso and extract multimodal feature vectors containing geometric volume and dorsal groove depth.

[0105] Intelligent weight estimation module: used to execute step S6, input the feature vector into the regression model, and output the predicted weight value.

[0106] Example 3: Electronic Equipment

[0107] Example 3 provides an electronic device. For example... Figure 3 As shown, the electronic device includes a memory and a processor. The memory stores computer programs, and the processor runs the computer programs to enable the electronic device to perform the pig weight estimation method provided in Embodiment 1.

[0108] Electronic devices are edge computing terminals deployed at the aquaculture site, including NVIDIA Jetson series or cloud servers. Processors include, but are not limited to, CPUs, GPUs, FPGAs, or NPUs (neural network processors).

[0109] Example 4: Computer-readable storage medium

[0110] Based on the description of Embodiment 3, Embodiment 4 of the present invention provides a computer-readable storage medium, such as... Figure 4 As shown, a computer program is stored thereon, which, when executed by a processor, implements the pig weight estimation method of Embodiment 1. The medium includes non-volatile memory, including Flash, SSD, or volatile memory, including DRAM.

[0111] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus.

[0112] The above description is merely a preferred embodiment of the present invention and does not constitute any limitation on the present invention. Although embodiments of the present invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions, and variations can be made to these embodiments without departing from the principles and spirit of the present invention, the scope of which is defined by the appended claims and their equivalents.

Claims

1. A method for estimating the weight of pigs based on semantic key point guidance and fusion of three-dimensional morphological features, characterized in that, The method includes the following steps: Step 1, Joint perception and semantic decoupling: Obtain top-view RGB images and aligned depth images of the pig group; use a deep learning network to infer from the RGB images, and output the instance mask and anatomical key points of each pig; the key points include at least the ear root point and the tail root point; Step 2, Spatial Mapping and Point Cloud Cleaning: Using the instance mask as a region of interest filter, the corresponding depth data is extracted from the depth image, and the original 3D point cloud of the pig is generated by back-projection using camera intrinsic parameters. Step 3, Adaptive posture normalization: Based on the original 3D point cloud of the pig, principal component analysis is used to calculate the principal direction vector of the point cloud, and a self-local coordinate system is constructed with the spine direction as the X-axis and the cross-sectional direction as the Y-axis. Step 4, Rigid Torso Orthogonal Extraction: Map the ear root key points to the three-dimensional space of the local coordinate system as head truncation anchor points; construct a front truncation plane passing through the head truncation anchor points and perpendicular to the X-axis, and a rear truncation plane passing through the tail root key points and perpendicular to the X-axis; use the two truncation planes to remove non-rigid deformation regions of the head and tail, and extract the effective torso point cloud; Step 5, morphological feature depth extraction: Perform geometric calculation and topological scanning on the effective trunk point cloud to construct a multimodal feature vector containing basic geometric features and back groove depth features; the back groove depth is defined as the degree of topological concavity of the spine position in the cross-sectional contour relative to the bulges of the longissimus dorsi muscles on both sides. Step 6, Intelligent Regression Prediction: Input the multimodal feature vector into the pre-trained regression model, and use the nonlinear mapping mechanism within the model to implicitly correct the body weight density under the same volume based on the dorsal groove depth feature, and directly output the predicted weight of the pig.

2. The method for estimating pig weight based on semantic key point guidance and 3D morphological feature fusion according to claim 1, characterized in that, The specific method for determining the "head truncation anchor point" in step S4 has an adaptive fault-tolerant mechanism, including: Binaural Visibility Mode: If the deep learning network detects the left ear root point and the right ear root point, it calculates the midpoint of the two points in the local coordinate system and defines the midpoint as the head truncation anchor point. Single ear visible mode: If only one ear root point is detected due to occlusion, the three-dimensional coordinates of the single ear root point in the local coordinate system are obtained and directly defined as the head truncated anchor point, or it is projected onto the spinal axis as the head truncated anchor point based on the pig body symmetry prior. The above mechanism ensures that the cutting plane is always positioned at the junction of the cervical and thoracic vertebrae, eliminating cutting errors caused by the pig's head swinging left and right or being blocked by one side.

3. The method for estimating pig weight based on semantic key point guidance and 3D morphological feature fusion according to claim 1, characterized in that, The construction logic of the "front-end truncation plane" in step S4 is as follows: Let the three-dimensional coordinates of the head truncated anchor point be... The X-axis direction vector of the self-local coordinate system is ; The equation of the front truncation plane is defined as follows: ; The plane dynamically translates as the pig's head moves and the position of its ear roots changes, but always remains orthogonal to the spine axis of the trunk, thus dividing the non-rigid pig into an unstable head point cloud and a stable rigid trunk point cloud.

4. The method for estimating pig weight based on semantic key point guidance and 3D morphological feature fusion according to claim 1, characterized in that, The specific steps for extracting the "dorsal groove depth feature" in step S5 include: Along the X-axis of the spine, extract multiple orthogonal cross-sectional point cloud slices with a preset step size; Polynomial smoothing is performed on each slice point cloud, and local maxima (muscle peaks) and local minima (spinal valleys) in the Z-axis direction are searched. Feature discrimination: If two significant local maxima points are detected sandwiching a local minima point, forming a "W" shaped topology, then the Euclidean distance from the midpoint of the line connecting the two maxima points to the minima point is calculated and recorded as the back trench depth of the cross section; if only one local maxima point is detected, forming a "U" shaped topology, then the back trench depth of the cross section is set to zero. The weighted average of the dorsal groove depth of all slices was calculated to quantify the lean meat percentage and muscle density of pigs.

5. The method for estimating pig weight based on semantic key point guidance and 3D morphological feature fusion according to claim 1, characterized in that, Step S5 also includes extracting continuous curvature spectrum features; Perform quadratic polynomial fitting on the back contour of each cross-sectional point cloud slice. ; Extract the absolute value of the coefficient of the quadratic term. Construct a curvature variation sequence distributed along the spinal axis; The mean and variance of the sequence are calculated and incorporated into the multimodal feature vector.

6. The method for estimating pig weight based on semantic key point guidance and 3D morphological feature fusion according to claim 1, characterized in that, Step S5 further includes extracting one-dimensional linear features, two-dimensional projection features, and three-dimensional volume features: One-dimensional Linear features: Calculate the X-axis projection length of the effective torso point cloud in its own local coordinate system as the rigid torso length, and the Y-axis projection length as the torso width; Two-dimensional projection features: Project the effective torso point cloud onto the XY plane, fit the best ellipse, and extract the major axis, minor axis, projected area, and eccentricity of the ellipse; 3D volumetric features: The volume and surface area of ​​the effective torso point cloud are calculated using the voxelization mesh method or the convex hull algorithm.

7. The method for estimating pig weight based on semantic key point guidance and 3D morphological feature fusion according to claim 1, characterized in that, The regression model in step S6 adopts an ensemble learning algorithm based on gradient boosting decision trees, including XGBoost and CatBoost. In the model training stage, a feature importance screening mechanism is introduced to assign nonlinear weights to the dorsal groove depth feature and curvature feature in order to correct the weight estimation deviation of pigs with different body conditions under the same volume.

8. A smart monitoring system for pig body condition that implements the method of any one of claims 1 to 7, characterized in that, include: Sensing unit: An RGB-D depth camera positioned above the pigpen for real-time image data acquisition; Edge computing unit: It is equipped with a trained instance segmentation and key point detection model to perform the inference task described in step S1 in real time; Processing unit: used to execute the point cloud coordinate reconstruction, orthogonal truncation and morphological feature extraction algorithms described in steps S2 to S5; Decision unit: Used to perform the regression prediction described in step S6 and output the weight of the pig.