A pig weight estimation method based on traditional video recording equipment

By using traditional video recording equipment and TSDF technology to carry out three-dimensional reconstruction of pigs and combining deep learning network to predict pig weight, the problem of time-consuming and laborious and cost-effective traditional pig weight estimation is solved, and efficient and accurate pig weight estimation is achieved.

CN119779457AInactive Publication Date: 2025-04-08珠海市云晓智联科技有限公司 +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411846762.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-16
Publication Date
2025-04-08
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Traditional pig weight estimation methods rely on manual measurement or expensive depth camera equipment, which has problems such as time-consuming, costly and inconvenient.

Method used

Pig videos are recorded using traditional video recording equipment, and three-dimensional reconstruction is carried out through TSDF technology, features are extracted and pre-trained heavy-estimated network is input to predict the weight of pigs.

Benefits of technology

It realizes efficient and accurate pig weight estimation, reduces hardware costs, improves the accuracy and reliability of weight estimation, and is suitable for large-scale use.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119779457A_ABST
    Figure CN119779457A_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of pig weight estimation, and in particular to a pig weight estimation method based on traditional video recording equipment. The technical solution includes the following steps: first, a traditional video recording device is used to record a pig video; based on the TSDF technology, the recorded pig video is three-dimensionally reconstructed to obtain a three-dimensional model of the pig; features are extracted from the reconstructed three-dimensional model of the pig, and the features are the spatial relationship of points; the extracted features are input into a pre-trained weight estimation network, and the network can predict the weight of the pig based on the input features; the weight estimation network outputs the weight of the pig to complete the weight estimation process. The present invention improves the accuracy of pig weight estimation, greatly reduces hardware costs, greatly improves production efficiency, and is easy to popularize and promote.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of pig weight estimation, and in particular to a pig weight estimation method based on traditional video recording equipment. Background Art

[0002] In traditional animal husbandry, pig weight estimation usually relies on manual measurement or the use of simple weighing equipment. However, these methods have many shortcomings, such as manual measurement is time-consuming and labor-intensive, and weighing equipment is expensive and not portable. With the development of computer vision and artificial intelligence technology, some pig weight estimation methods based on image and video processing have gradually emerged, but these methods often rely on depth cameras, have high requirements for equipment, are expensive, and are not suitable for large-scale use. To this end, we propose a pig weight estimation method based on traditional video equipment. Summary of the invention

[0003] The purpose of the present invention is to address the problems existing in the background technology and to propose a pig weight estimation method based on traditional video recording equipment.

[0004] The technical solution of the present invention is a method for estimating the weight of pigs based on traditional video recording equipment, comprising the following steps:

[0005] S1, firstly, use traditional video equipment to record the video of the pigs;

[0006] S2, reconstructing the recorded pig video in three dimensions based on TSDF technology to obtain a three-dimensional model of the pig;

[0007] S3, extracting features from the reconstructed three-dimensional model of the pig, where the features are the spatial relationships of the points;

[0008] S4, inputting the extracted features into a pre-trained weight estimation network, which can predict the weight of the pig based on the input features;

[0009] S5. The weight estimation network outputs the weight of the pig, completing the weight estimation process.

[0010] Preferably, the video recorded in S1 requires the video recording device to surround the pig in a circle to ensure that all angles and body characteristics of the pig can be captured.

[0011] Preferably, the TSDF in S2 is a numerical function used to approximate the distance between a point in three-dimensional space and the surface of the nearest object. In TSDF, the three-dimensional space is divided into a regular voxel grid, and each voxel contains two variables: a TSDF value for generating a reconstructed surface and an RGB value for reconstructing the surface texture.

[0012] Preferably, S2 comprises the following steps:

[0013] S21, key frame selection;

[0014] S22, input sequence;

[0015] S23, fragment reconstruction;

[0016] S24, global synthesis.

[0017] Preferably, S23 comprises the following steps:

[0018] S231, initial low-resolution reconstruction;

[0019] S232, iterative update: TSDF value + weight value;

[0020] S233, refine layer by layer.

[0021] Preferably, the S24 comprises the following steps:

[0022] S241, the network starts with a low-resolution voxel grid reconstruction. At this level, the features of each voxel are inferred from multi-view images in the image sequence, and the feature vectors of multiple images are added and averaged to determine the preliminary feature vector of the voxel;

[0023] S242. In the TSDF estimation of each layer, the ConvGRU mechanism is used to recursively update the voxel features;

[0024] S243, after being processed by 3D CNN, the features enter the multi-layer perceptron module to estimate the TSDF value;

[0025] S244, increasing resolution layer by layer;

[0026] S245. Based on the features of the obtained image and the internal and external parameters of the captured image, each voxel established can be projected to a certain position in each image by calculating the reverse projection, and the features of each image are extracted, added and averaged to obtain the final feature value.

[0027] Preferably, the steps of S3 are as follows:

[0028] S31, randomly select point P0 as the starting point, obtain the initial set S = {P0}, and define the initial distance matrix D, where D[i] records the farthest distance from each point Pi in the set to the point in the set S;

[0029] S32, calculate the distance from the point in the point cloud to P0, update the distance matrix D[i], select the point P1 corresponding to the maximum value of D[i] to add to the set, S = {P0, P1};

[0030] Loop S32 until the number of points in the set in S reaches the set value.

[0031] Preferably, the S4 inputs the sampled point cloud set into the deep learning model, extracts the spatial relationship and geometric shape relationship between the points through the convolution layer and pooling layer structure, accesses the connection layer and the graph neural network to further learn the distance relationship, adjacency relationship, and similarity relationship between the points, and uses the weight of the feature information mapping as the output.

[0032] Compared with the prior art, the present invention has the following beneficial technical effects:

[0033] 1. By using TSDF technology for three-dimensional reconstruction and feature extraction, the present invention can more accurately reflect the body shape and shape of pigs, thereby improving the accuracy of weight estimation;

[0034] 2. Compared with the traditional weight estimation method, the present invention uses traditional video equipment and computer vision technology, does not require expensive hardware equipment, and reduces costs;

[0035] 3. Through the pre-trained weight estimation network, the present invention can quickly and accurately obtain the weight of the pigs;

[0036] 4. Traditional recording equipment has the characteristics of low cost and easy operation, so the present invention is easier to popularize and promote in animal husbandry. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] Figure 1 It is a schematic diagram of the processing flow of the present invention;

[0038] Figure 2 Schematic diagram of point cloud feature sampling;

[0039] Figure 3 It is a schematic diagram of the characteristic relationship between points;

[0040] Figure 4 is a schematic diagram of the voxel network;

[0041] Figure 5 Schematic diagram of the common viewing area;

[0042] Figure 6 Schematic diagram of voxel resolution refinement. DETAILED DESCRIPTION

[0043] The technical solution of the present invention is further described below in conjunction with the accompanying drawings and specific embodiments.

[0044] Example

[0045] like Figure 1-6 As shown, the present invention proposes a pig weight estimation method based on traditional video recording equipment, comprising the following steps:

[0046] S1. First, traditional video recording equipment is used to record the video of pigs. Traditional recording equipment, such as video cameras, cameras, etc., usually has a low cost, which enables livestock producers to estimate the weight of pigs with lower economic investment, thus reducing production costs;

[0047] The video recorded in S1 requires the video equipment to surround the pigs in a circle to ensure that all angles and body characteristics of the pigs can be captured.

[0048] S2. Perform 3D reconstruction on the recorded pig video based on TSDF technology to obtain a 3D model of the pig. The full name of TSDF is Truncated Signed Distance Function.

[0049] TSDF in S2 is a numerical function used to approximate the distance between a point in three-dimensional space and the nearest object surface. In TSDF, the three-dimensional space is divided into a regular voxel grid, such as Figure 4 As shown in the figure, each voxel contains two variables: the TSDF value used to generate the reconstructed surface and the RGB value used to reconstruct the surface texture. A neural network is used to reconstruct the local surface of the sparse TSDF volume of each frame, and then all voxel results are obtained after fragment fusion, and then spliced ​​into a three-dimensional model;

[0050] S2 includes the following steps:

[0051] S21, key frame selection, the selection of key frames must meet the common viewing area, such as Figure 5 As shown;

[0052] S22, input sequence, based on the internal and external parameters of the camera, helps the network determine the position of each image in the three-dimensional space;

[0053] S23, fragment reconstruction, these images will be divided into multiple batches, each batch represents a fragment, in each fragment, the network infers the depth map from multi-view images and estimates the local TSDF;

[0054] S23 includes the following steps:

[0055] S231, initial low-resolution reconstruction;

[0056] S232, iterative update: TSDF value + weight value;

[0057] S233, layer by layer refinement;

[0058] S24, global synthesis, gradually constructs a complete 3D scene by fusing multiple local TSDFs;

[0059] S24 includes the following steps:

[0060] S241, the network starts with a low-resolution voxel grid reconstruction. At this level, the features of each voxel are inferred from multi-view images in the image sequence, and the feature vectors of multiple images are added and averaged to determine the preliminary feature vector of the voxel;

[0061] S242. In the TSDF estimation of each layer, the ConvGRU mechanism is used to recursively update the voxel features, which is used to fuse the voxel features of the previous layer with the information of the current layer, retain useful information, and improve it layer by layer. This mechanism ensures the consistency of features between different layers and the process of gradual refinement;

[0062] S243, after being processed by 3D CNN, the features enter the multi-layer perceptron module to estimate the TSDF value. In this step, the network infers the TSDF value of each voxel, which indicates the distance of the voxel from the true surface;

[0063] S244, increasing resolution layer by layer, e.g. Figure 6 As shown in the figure, after the first layer is completed, the network will gradually increase the resolution of voxels in the following layers, which means that the number of voxels will increase, thereby extracting more details. In each layer, the ConvGRU mechanism will ensure that the feature information of the previous layer is refined and retained at the new resolution. In order to align the voxel grids of different resolutions, the TSDF generated by the previous layer will be upsampled;

[0064] S245, according to the features of the obtained picture and the internal and external parameters of the captured picture, each voxel established can be projected to a certain position in each picture by calculating the reverse projection, and the features of each picture are extracted, added and averaged to obtain the final feature value;

[0065] The projection formula is:

[0066]

[0067] Among them, K and P are the intrinsic and extrinsic parameters of the camera, which actually realize the conversion from the world coordinate system to the pixel coordinate system through the camera coordinate system. At each refinement stage, the features of the voxels will be fused across levels, so that the final TSDF generated is more accurate in terms of detail level. The network fuses multi-view image features at different resolutions to ensure the consistency of voxel features. Through multi-layer calculations and layer-by-layer refinement, a high-resolution TSDF is finally generated. This TSDF value can be used to represent the reconstructed 3D scene. The final TSDF is obtained by gradually improving and fusing features. It captures the geometric details and depth information of the scene and displays the final reconstructed 3D scene. The scene presents a coherent and detailed model in 3D space by fusing multiple images and camera pose information.

[0068] S3. Extract features from the reconstructed three-dimensional model of the pig, where the features are the spatial relationship of the points. Render the reconstructed model in the form of points, and perform point cloud spatial feature extraction in the following manner, thereby reducing the number of point cloud data points, reducing the computational complexity, and retaining the shape features of the point cloud as much as possible;

[0069] The steps for S3 are as follows:

[0070] S31, randomly select point P0 as the starting point, obtain the initial set S = {P0}, and define the initial distance matrix D, where D[i] records the farthest distance from each point Pi in the set to the point in the set S;

[0071] S32, calculate the distance from the point in the point cloud to P0, update the distance matrix D[i], select the point P1 corresponding to the maximum value of D[i] to add to the set, S = {P0, P1};

[0072] Loop S32 until the number of points in the set in S reaches the set value;

[0073] Taking the number of extracted feature points as 1024, the visualization results are as follows Figure 2 As shown;

[0074] S4, inputting the extracted features into a pre-trained weight estimation network, which can predict the weight of the pig based on the input features;

[0075] S4 inputs the sampled point cloud set into the deep learning model, extracts the spatial relationship and geometric shape relationship between points through the convolution layer and pooling layer structure, connects to the connection layer and graph neural network to further learn the distance relationship, adjacency relationship, and similarity relationship between points, and outputs the weight of the feature information mapping;

[0076] S5, the weight estimation network outputs the weight of the pig, completing the weight estimation process;

[0077] The present invention cleverly utilizes traditional recording equipment to record pig videos as the main means of data collection. This innovative data collection method not only reduces hardware costs, but also makes the data collection process more flexible and convenient.

[0078] After collecting the pig video, the advanced TSDF technology is further combined to perform three-dimensional reconstruction to obtain a three-dimensional model of the pig. By extracting key features from the three-dimensional model and combining the weight estimation network trained with advanced technologies such as deep learning to predict weight, the present invention achieves efficient and accurate pig weight estimation, which not only overcomes the limitations of traditional weight estimation methods, but also improves the accuracy and reliability of weight estimation.

[0079] Traditional recording equipment is usually used for simple functions such as monitoring and recording in animal husbandry. The present invention innovatively applies it to the field of pig weight estimation, realizing in-depth exploration and efficient utilization of traditional recording equipment. It not only expands the application scope of traditional recording equipment, but also provides new impetus and opportunities for its popularization and promotion in animal husbandry.

[0080] In this embodiment, a traditional video recording device is first used to record a video of the pig. During the video recording, it is necessary to ensure that the device surrounds the pig in a circle so as to capture various angles and body characteristics of the pig. After obtaining the video sequence of the shot object, the TSDF is used to perform three-dimensional reconstruction of the pig to obtain a three-dimensional model of the pig. Features are then extracted from the reconstructed three-dimensional model of the pig, where the features are the spatial relationships of points. The extracted features are then input into a pre-trained weight estimation network, and finally the weight of the pig is output through the weight estimation network, thereby completing the weight estimation process of the pig.

[0081] The above specific embodiment is only a preferred embodiment of the present invention. Based on the technical solution of the present invention and the relevant inspiration of the above embodiment, those skilled in the art can make various alternative improvements and combinations to the above specific embodiment.

Claims

1. A method for estimating pig weight based on traditional video recording equipment, characterized in that: The steps include: S1, firstly, use traditional video equipment to record the video of the pigs; S2, reconstructing the recorded pig video in three dimensions based on TSDF technology to obtain a three-dimensional model of the pig; S3, extracting features from the reconstructed three-dimensional model of the pig, where the features are the spatial relationships of the points; S4, inputting the extracted features into a pre-trained weight estimation network, which can predict the weight of the pig based on the input features; S5. The weight estimation network outputs the weight of the pig, completing the weight estimation process.

2. A method for estimating pig weight based on traditional video recording equipment according to claim 1, characterized in that: The video recorded in S1 requires the video recording device to surround the pig in a circle to ensure that all angles and body characteristics of the pig can be captured.

3. A method for estimating pig weight based on traditional video recording equipment according to claim 1, characterized in that: The TSDF in S2 is a numerical function used to approximate the distance between a point in three-dimensional space and the nearest object surface. In TSDF, the three-dimensional space is divided into a regular voxel grid, and each voxel contains two variables: a TSDF value for generating a reconstructed surface and an RGB value for reconstructing the surface texture.

4. A method for estimating pig weight based on traditional video recording equipment according to claim 1, characterized in that: The S2 comprises the following steps: S21, key frame selection; S22, input sequence; S23, fragment reconstruction; S24, global synthesis.

5. A method for estimating pig weight based on traditional video recording equipment according to claim 4, characterized in that: The S23 comprises the following steps: S231, initial low-resolution reconstruction; S232, iterative update: TSDF value + weight value; S233, refine layer by layer.

6. A method for estimating pig weight based on traditional video recording equipment according to claim 4, characterized in that: The S24 comprises the following steps: S241, the network starts with a low-resolution voxel grid reconstruction. At this level, the features of each voxel are inferred from multi-view images in the image sequence, and the feature vectors of multiple images are added and averaged to determine the preliminary feature vector of the voxel; S242. In the TSDF estimation of each layer, the ConvGRU mechanism is used to recursively update the voxel features; S243, after being processed by 3D CNN, the features enter the multi-layer perceptron module to estimate the TSDF value; S244, increasing resolution layer by layer; S245. Based on the features of the obtained image and the internal and external parameters of the captured image, each voxel established can be projected to a certain position in each image by calculating the reverse projection, and the features of each image are extracted, added and averaged to obtain the final feature value.

7. A method for estimating pig weight based on traditional video recording equipment according to claim 1, characterized in that: The steps of S3 are as follows: S31, randomly select point P0 as the starting point, obtain the initial set S = {P0}, and define the initial distance matrix D, where D[i] records the farthest distance from each point Pi in the set to the point in the set S; S32, calculate the distance from the point in the point cloud to P0, update the distance matrix D[i], select the point P1 corresponding to the maximum value of D[i] to add to the set, S = {P0, P1}; Loop S32 until the number of points in the set in S reaches the set value.

8. A method for estimating pig weight based on traditional video recording equipment according to claim 1, characterized in that: The S4 inputs the sampled point cloud set into the deep learning model, extracts the spatial relationship and geometric shape relationship between the points through the convolution layer and pooling layer structure, accesses the connection layer and the graph neural network to further learn the distance relationship, adjacency relationship, and similarity relationship between the points, and outputs the weight of the feature information mapping.