Non-contact yak body weight measurement method and device based on yak body edge parameter extraction and deep learning algorithm
By applying the yolov8 model and image processing algorithm to extract the ruler parameters in yak breeding, establish a regression model for weight prediction, solve the problem of traditional measurement difficulties and automated measurement efficiency, achieve rapid and accurate yak weight measurement, improve the breeding breeding benefit.
Patent Information
- Application Number
- CN202411371516.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-29
- Publication Date
- 2025-01-28
AI Technical Summary
In the yak breeding industry, traditional manual measurement of yak weight is difficult and time-consuming. The existing contactless measurement methods have problems such as large data transmission and high network requirements, making it difficult to achieve fast and accurate automated measurements.
Adopt the Yolov8 -based gesture recognition model and individual recognition model, combine the background reduction and edge extraction algorithm, extract the body ruler parameters on the back and side of the yak, and establish a regression model for weight prediction.
The rapid and accurate yak weight measurement is achieved, the return model has excellent performance indicators, and the prediction of prediction and actual weight average error is extremely low, which reduces the workload of farmers and improves breeding benefits.
Smart Images

Figure CN119379762A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of non-contact detection of yak weight targets, and in particular relates to a non-contact yak weight measurement method and equipment based on yak body edge parameter extraction and deep learning algorithm. Background Art
[0002] In the yak breeding industry, live body weight (LBW) is one of the most important parameters for monitoring livestock growth and development. Yaks live in a harsh environment, and timely understanding of their weight changes is extremely important in ensuring the healthy growth of yaks and improving the economic benefits of breeding. Yaks are wild and strong, and traditional manual measurement is difficult. With the development of machine vision and sensors, deep learning and image analysis can provide a feasible solution for stress-free and non-contact yak weight measurement. However, since most machine vision algorithm models need to run on the cloud or on computers, the data transmission volume is large and the network requirements are high, therefore, a faster and more accurate automated measurement system has been developed to measure and count the weight of yaks while reducing the workload of breeding workers, which is very helpful to improve breeding results and reduce breeding costs.
[0003] Therefore, there is an urgent need to develop a more accurate and automated method to predict the weight of yaks while reducing the workload of breeding workers, thereby improving breeding results and reducing breeding costs. Summary of the invention
[0004] The purpose of the present invention is to overcome the shortcomings of the prior art, and provide a non-contact yak weight measurement method and device based on yak body edge parameter extraction and deep learning algorithm. First, a yak posture recognition model is established based on YOLOv8; the identity information of the yak in the image is matched one by one, and an individual recognition model of the yak is established based on YOLOv8; the body size parameters of the back and the side of the cow are extracted by using background subtraction, edge extraction and other algorithms, the body size parameters of the back and the side of the cow are combined, and a regression model of the cow weight and body size parameters is established, and the weight of the yak is predicted by using the model; the present invention can timely and effectively measure the individual weight of the yak, the performance index of the regression model of the cow weight and body size parameters is excellent, and the mean square error between the predicted weight and the actual weight is extremely low, so that the management personnel can timely and accurately understand the weight information of the yak and make corresponding processing, improve the breeding efficiency of the yak, and has an excellent promotion and application prospect.
[0005] In order to achieve the above technical effects, the following technical solutions are adopted:
[0006] A non-contact yak weight measurement method based on yak body edge parameter extraction and deep learning algorithm comprises the following steps:
[0007] Step S1: Establishment of yak posture recognition model
[0008] Step S11: Use an image acquisition device to collect video data, and continuously collect video data of the upper back of the cow and video data of the left and right sides of the cow;
[0009] Step S12: Preliminary screening of the collected video data of the yak's upper back and the video data of the left and right sides of the yak is performed to extract the yak posture image frame by frame;
[0010] Step S13: manually identify the yak posture images extracted in step S12, mark the yak posture categories, and convert all image annotations into storage labels in YOLO format;
[0011] Step S14: randomly dividing the images with labeled yak posture categories into a training set and a test set according to proportion;
[0012] Step S15: input the training set obtained in step S14 into the YOLOv8 network model to train the yak posture recognition model, so as to obtain a trained yak posture recognition model;
[0013] Step S16: input the test set obtained in step S14 into the trained yak posture recognition model, verify the model, and output the verification result to obtain the final yak posture recognition model;
[0014] Step S2: Establishment of yak individual identification model
[0015] Step S21: using an image acquisition device to collect video data, and continuously collecting video data of individual yaks;
[0016] Step S22: preliminarily screening the collected yak individual identity video data, and extracting yak individual identity images frame by frame;
[0017] Step S23: manually identify the individual identity images of the yaks extracted in step S22, mark the individual identity information of the yaks, and convert all the image annotations into storage labels in YOLO format;
[0018] Step S24: randomly dividing the images with the yak individual identities marked into a training set and a test set according to a certain proportion;
[0019] Step S25: inputting the training set obtained in step S24 into the YOLOv8 network model to train the yak individual identity recognition model, thereby obtaining a trained yak individual identity recognition model;
[0020] Step S26: input the test set obtained in step S24 into the trained yak individual identity recognition model, verify the model, and output the verification result to obtain the final yak individual identity recognition model;
[0021] Step S3: Extraction of yak back body size parameter features
[0022] Use image acquisition equipment to collect video data of yaks that need to be tested for weight, continuously collect video data of the upper back of the yaks, video data of the left and right sides of the yaks, and video data of the individual identity of the yaks; extract the posture image of the yaks and the individual identity image of the yaks frame by frame;
[0023] First, the yak posture image is input into the established yak posture recognition model to recognize the posture of the yak. When the yak in the posture image is recognized as a normal posture, its posture image or the individual identity image of the yak is transmitted to the yak individual identity recognition model to perform individual identity recognition on the yak. After the individual identity recognition of the yak is completed, the image data of the upper back and the left and right sides of the specific individual yak is input into the yak body size parameter feature extraction module, including the following steps:
[0024] Step S31: Define the key points of the neck and tail
[0025] Define the yak head on the left and the tail on the right as the positive direction, and obtain the image contour of the upper back of the yak from the top perspective. In the left half of the upper back contour of the yak, if the curvature change of the yak's back contour curve at two upper and lower points is greater than the curvature change of other nearby positions, and the body width of these two points is also smaller than the body width of other nearby positions, then these two points are defined as the upper neck key point a1 and the lower neck key point A1;
[0026] In the right half of the upper back contour of the yak, if the curvature change of the contour curve of the yak at two points is greater than the curvature change of other nearby positions, and the body width of the two points is smaller than the left body width and larger than the right body width, then the two points are defined as the key point a on the tail n+1 and the key point A under the tail n+1 ;
[0027] Step S32: Extraction of yak back body size parameter features
[0028] Adjust the key points a1 on the neck and A1 on the lower neck to form a vertical line L1, and adjust the key points a1 on the tail to form a vertical line L1. n+1 and the key point A under the tail n+1 Adjust to form a vertical line L n+1 ;
[0029] Inside the outline of the yak's upper back, between the vertical lines L1 and L n+1 Set n-1 parallel lines L1 and L n+1 The vertical lines L2, L3, L4…L n , vertical line L1 and vertical line L n+1The distance between them is divided into n parts, among which the intersection point of vertical line L2 and the upper part of the cow's back contour is a2, the intersection point of vertical line L2 and the lower part of the cow's back contour is A2, the intersection point of vertical line L3 and the upper part of the cow's back contour is a3, the intersection point of vertical line L3 and the lower part of the cow's back contour is A3, the intersection point of vertical line L4 and the upper part of the cow's back contour is a4, the intersection point of vertical line L4 and the lower part of the cow's back contour is A4, and so on. n The intersection point with the upper part of the cow's back contour is a n , vertical line L n The intersection point with the lower part of the cow's back outline is A n ;
[0030] In the left and right side image data of the yak, the positive direction is defined as the head on the left and the tail on the right. The highest point of the back and the lowest point of the front hoof are identified. The difference is taken to obtain the body height of the yak, which is recorded as L. n+4 ;
[0031] Calculate the area of the trapezoid formed by a1, a2, A1, A2, and record it as S1; calculate the area of the trapezoid formed by a2, a3, A2, A3, and record it as S2; calculate the area of the trapezoid formed by a3, a4, A3, A4, and record it as S3; and so on. n-1 , a n , A n-1 , A n The area of the trapezoid formed is recorded as S n-1 ; Calculate a n , a n+1 , A n , A n+1 The area of the trapezoid formed is recorded as S n ;
[0032] Calculate the upper and lower horizontal tangents and vertical lines L1 and L2 at the maximum width of the yak back contour n+1 The area of the rectangle enclosed by the intersection of the extended lines is recorded as S n+1 ;
[0033] Step S33: Determine the parameter index of the yak back size
[0034] Determine the yak back body size parameter index S according to the following formula g :
[0035] S g =S1+S2+S3+S4+…+S n +S n+1 *L n+4 ;
[0036] Among them, n≥4;
[0037] The comprehensive index S of yak body size parameters based on a single picture g ; Calculate the comprehensive combined index S of yak body size parameters from multiple images g The average value of
[0038] Step S4: Extraction of yak lateral body size parameter features
[0039] Use image acquisition equipment to collect video data of yaks that need to be tested for weight, continuously collect video data of the left and right sides of the yaks and video data of the individual identity of the yaks; extract the yak posture image and the individual identity image of the yak frame by frame;
[0040] First, a yak posture image is input into a well-established yak posture recognition model to recognize the posture of the yak. When the yak in the posture image is recognized as a normal posture, its posture image or the individual identity image of the yak is then transmitted to the yak individual identity recognition model to perform individual identity recognition on the yak. After the individual identity recognition of the yak is completed, the left and right side image data of the specific individual yak is input into the yak side body size parameter feature extraction module, including the following steps:
[0041] Step S41: Definition of key points on the yak side
[0042] Define the positive direction as the head of the yak is on the left and the tail is on the right, and get the image contour of the upper back of the yak from the side perspective;
[0043] Determine the lower left key point of the yak's side and the upper left key point of the cow's side: take the point with the maximum curvature between the back bend of the cow's front thigh and the front bend of the abdomen as the lower left key point of the cow's side; extend vertically upward from the lower left key point of the cow's side to the vertex of the cow's back contour to determine the upper left key point of the cow's side;
[0044] Determine the key point of the right rear of the yak's side: take the point with the largest curvature between the upper bend of the yak's buttocks and the lower bend where the yak's tail meets the yak's buttocks as the key point of the right rear of the yak's side;
[0045] Determine the upper right key point of the yak's side and the lower right key point of the cow's side: draw a horizontal auxiliary line from the upper left key point of the cow's side, and draw a vertical auxiliary line from the right rear key point of the cow's side. The intersection of the two lines is the upper right key point of the cow's side; draw a horizontal auxiliary line from the lower left key point of the cow's side, and draw a vertical auxiliary line from the right rear key point of the cow's side. The intersection of the two lines is the lower right key point of the cow's side;
[0046] Step S42: Extraction of yak lateral body size parameter features
[0047] In the left and right side image data of the yak, the positive direction is defined as the head of the yak on the left and the tail on the right. The highest point of the yak's back and the lowest point of the yak's front hoof are identified, and the difference is taken to obtain the body height of the yak, which is recorded as L. n+4 ;
[0048] The distance between the upper left key point of the yak side and the lower left key point of the cow side or the distance between the upper right key point Q of the yak side and the lower right key point R of the cow side is recorded as the cow side body size parameter L n+5 ;
[0049] The distance between the lower left key point of the yak side and the lower right key point of the cow side or the distance between the upper left key point of the yak side and the upper right key point of the cow side is recorded as the cow side body size parameter L n+6 ;
[0050] Step S43: Determine the yak lateral body size parameter index
[0051] Determine the yak's lateral body size parameter index S according to the following formula p :
[0052] S p =(L n+5 *L n+6 )*L n+4 ;
[0053] Among them, n≥4;
[0054] The comprehensive index S of yak body size parameters based on a single picture p ; Calculate the comprehensive combined index S of yak body size parameters from multiple images p The average value of
[0055] Step S5: Determination of the comprehensive body size parameter index AHS of yak
[0056] The yak back body size parameter index S in step S3 g The average value and the yak back body size parameter index S in step S4 p The average values are added to get the comprehensive body size parameter index AHS of yaks:
[0057] AHS=S g Average + S p average value
[0058] Step S6: Establishment of regression model for yak weight prediction
[0059] The relationship between the actual weight of yaks and the comprehensive body size parameter index AHS of yaks was analyzed by regression, and a regression model fitting between the predicted weight of yaks and the comprehensive body size parameter index AHS of yaks was established.
[0060] The root mean square error of body weight was calculated using the actual body weight of k yak individuals and the predicted body weight of cattle to evaluate the performance of the regression model, k ≥ 16;
[0061] If the root mean square error of weight is less than 2kg, the prediction regression model is output for yak weight prediction;
[0062] In step S32 and step S42, the machine vision algorithm is used to automatically complete the calculation and extraction of body size parameters throughout the entire process;
[0063] The regression model fitted in step S6 is:
[0064] Yak predicted weight T (kg) = 4.92*AHS-9.06;
[0065] The specific method for obtaining the image contour of the upper back of the yak from the top perspective in step S31 is:
[0066] The timestamp on the image of the yak in normal posture is read. Within 5s to 20s before and after the time, the YOLOv8 algorithm is used to detect whether there is a background without interference. If it exists, the background is used as background image 1. If not, the search time range is expanded until background image 1 is found. At the same time, the ground background color is extracted using image processing technology to automatically create a background image 2 containing less information. The normal posture yak image is subtracted from background image 1 and background image 2 respectively, and then the two background subtracted images are fused to obtain the final binary image.
[0067] The Canny edge extraction algorithm is used to extract the edge of the binary image to obtain the edge contour image of the yak.
[0068] Furthermore, the regression model for weight prediction is efficiently deployed in the Jetson Nano embedded device to achieve real-time image data processing and accurate detection of yak weight; the Jetson Nano embedded device has a built-in GPU and uses the TensorRT framework developed by NVIDIA to convert the detection model into a format that can run efficiently under the TensorRT framework.
[0069] Furthermore, the specific method for obtaining the side view cow side image contour in step S41 is:
[0070] The timestamp on the image of the yak in normal posture is read. Within 5s to 20s before and after the time, the YOLOv8 algorithm is used to detect whether there is a background without interference. If it exists, the background is used as background image 1. If not, the search time range is expanded until background image 1 is found. At the same time, the background color is extracted using image processing technology to automatically create a background image 2 containing less information. The normal posture yak image is subtracted from background image 1 and background image 2 respectively, and then the two background subtracted images are fused to obtain the final binary image.
[0071] The Canny edge extraction algorithm is used to extract the edges of the binary image to obtain the side profile image of the cow.
[0072] Furthermore, the image acquisition device in step S11 and step S21 is an acquisition device with an uninterrupted power supply and a storage system; the video data of the upper back of the yak is collected by the acquisition device placed directly above the yak house, the video data of the left and right sides of the yak is collected by the acquisition device placed on the side of the feeding trough, and the video data of the individual identity of the yak is collected by the acquisition device placed directly above the yak house and the acquisition device placed on the side of the feeding trough; there are 3 to 8 cows in the yak house, and the acquisition time is 7 to 14 days.
[0073] Furthermore, in step S13, the yak posture categories are divided into normal and abnormal postures, and the yak posture category determination method is: if the angle between the neck and the trunk of the yak in the top view image of the yak's upper back does not exceed 5 degrees, then the posture is considered to be a normal posture, otherwise it is an abnormal posture; in the left and right side images of the yak, the limbs of the cow are standing on the ground at the same time, and the angle between the front two hooves of the yak and the angle between the back two hooves of the cow do not exceed 5 degrees, then the posture is considered to be a normal posture, otherwise it is an abnormal posture.
[0074] Furthermore, in step S14, the ratio of the number of data in the training set to that in the test set is 5-7:3-5.
[0075] Furthermore, the information contained in the yak individual identity image in step S23 is: determining the individual identity of the cattle by identifying the head and neck features of the yak or identifying the cattle individual identity specific information; the marking of the yak individual identity information is to number different cattle individuals for future use.
[0076] Furthermore, in step S24, the ratio of the number of data in the training set to that in the test set is 5-7:3-5.
[0077] Furthermore, the image acquisition device in step S3 and step S4 is an acquisition device with an uninterrupted power supply and a storage system; the video data of the yak's back is collected by the acquisition device placed directly above the cowshed, the video data of the left and right sides of the cow are collected by the acquisition device placed on the side of the trough, and the video data of the yak's individual identity is collected by the acquisition device placed directly above the cowshed and the acquisition device placed on the side of the trough; there are 3 to 8 yaks in the cowshed, and the acquisition time is 7 to 14 days.
[0078] Furthermore, the yak individual identity specific information includes tags, seals, colors, marks, and numbers on the yak.
[0079] The beneficial effects of the present invention are:
[0080] 1. The present invention extracts the features of yaks from two perspectives, top and side, with richer data. The weight measurement accuracy is higher through the comprehensive body size parameters of the back and side. The present invention has the characteristics of small site restrictions, high image quality, and no stress on yak weight measurement. It can realize real-time measurement of yak weight, meet the need to obtain weight at any time, and provide data support for refined breeding.
[0081] 2. The present invention identifies the posture information of the yak by distinguishing the angle between the neck and the body of the yak. It is a contactless identification method. At the same time, the recognition angle of the yak posture is the same as the contour extraction angle, which is conducive to feature extraction of the yak. The recognition process is simple and the recognition accuracy is high.
[0082] 3. Compared with the existing methods, the present invention divides the postures of yaks into normal postures and abnormal postures, so that no manual selection is required during the image processing process, the process is fully automated, and weight measurement is more convenient;
[0083] 4. The present invention identifies the individual identity information of the yak by distinguishing the head and neck features of the yak or identifying the specific information of the individual identity of the yak. It is a contactless identification method with a simple identification process and high identification accuracy.
[0084] 5. The present invention can realize real-time measurement of cattle weight, meet the need of obtaining weight at any time, and provide data support for refined breeding;
[0085] 6. The present invention has the advantages of good stability and strong anti-interference ability. BRIEF DESCRIPTION OF THE DRAWINGS
[0086] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. The drawings in the following description are merely embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.
[0087] Figure 1 This is a flow chart of non-contact measurement of yak weight according to an embodiment of the present invention;
[0088] Figure 2 This is a schematic diagram of the definition of the back posture of a yak according to an embodiment of the present invention;
[0089] Figure 3 This is a schematic diagram of the side posture definition of a yak according to an embodiment of the present invention;
[0090] Figure 4 This is a schematic diagram of the body size parameters of the yak back according to an embodiment of the present invention;
[0091] Figure 5This is a schematic diagram of the body size parameters of a yak from the side according to an embodiment of the present invention;
[0092] Figure 6 This is a flowchart of yak posture recognition according to an embodiment of the present invention;
[0093] Figure 7 This is a flowchart of yak individual identification according to an embodiment of the present invention;
[0094] Figure 8 This is a regression fitting curve diagram of the predicted weight and body size parameters of yaks in an embodiment of the present invention. DETAILED DESCRIPTION
[0095] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0096] It should be noted that the following detailed descriptions are exemplary and are intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art to which the present invention belongs.
[0097] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit exemplary embodiments according to the present invention. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprising" and / or "including" are used in this specification, it indicates the presence of features, steps, operations and / or combinations thereof.
[0098] Embodiment 1:
[0099] like Figure 1 FIG. 1 is a flow chart of non-contact measurement of yak weight according to an embodiment of the present invention;
[0100] like Figure 6 As shown, the yak posture recognition method includes the following steps:
[0101] S1: Use two image acquisition devices with uninterruptible power supply and local storage card to collect video data. Place one device directly above the cowshed and the other device on the side of the trough to ensure that the camera covers the entire cowshed. The video data of the cow's back is collected by the acquisition device placed directly above the cowshed, and the video data of the cow's left and right sides is collected by the acquisition device placed on the side of the trough. There are 6 yaks in each cowshed, and the relevant video data of the cows is obtained 24 hours a day for 7 consecutive days.
[0102] S2: Perform a preliminary screening of the collected videos, use VSPlayer video editing software to extract yak posture images frame by frame, and save them in the yak posture image folder in picture format, a total of 4000 images;
[0103] S3: Use the image annotation tool to process the cow posture image obtained in S2, manually identify the category of the cow posture, and select the category to be marked. There are 2 categories in total, namely normal and abnormal postures;
[0104] The method for determining the yak posture category is as follows: Figure 2 As shown in , if the angle between the neck and trunk of the cow in the top view image of the cow's back does not exceed 5 degrees, the posture is considered normal, otherwise it is abnormal; Figure 3 As shown, when the cow's four limbs are standing on the ground at the same time in the left and right side images of the cow, and the angle between the cow's front two hooves and the angle between the cow's back two hooves do not exceed 5 degrees, the posture is considered to be normal, otherwise it is an abnormal posture.
[0105] After all images are labeled, click to convert to YOLO format storage labels; the data information of the storage labels is the category, the position of the center pixel of the labeled target box in the image, and the size of the labeled box from left to right;
[0106] S4: The 4000 labeled yak posture images are randomly divided into training set and test set in a ratio of 7:3. The training set has 2800 images and the test set has 1200 images, and there is no overlap between the training set and the test set images.
[0107] S5: Build the operating environment required for YOLOv8;
[0108] S6: Input the training set obtained in S4 into YOLOv8 to train the yak posture recognition model;
[0109] S7: Input the test set into the trained model, verify the model, and output the verification result to obtain the final yak posture recognition model.
[0110] Embodiment 2:
[0111] like Figure 7 As shown, the method for identifying yak individuals comprises the following steps:
[0112] S1: Use two uninterruptible power supply and local storage card image acquisition devices to collect video data. Place one device directly above the cowshed and the other device on the side of the trough to ensure that the camera covers the entire cowshed. The image acquisition device is an uninterruptible power supply device with a storage system. The video data of individual cattle identities is collected by the acquisition device placed directly above the cowshed and the acquisition device placed on the side of the trough. There are 6 yaks in each cowshed, and the relevant video data of cattle is obtained 24 hours a day for 7 consecutive days.
[0113] S2: Perform a preliminary screening of the collected videos, extract individual yak identity images frame by frame, and save them in the individual yak identity image folder in the image format, a total of 4000 images;
[0114] S3: Use image annotation tools to process the yak individual identity image obtained in S2, and manually identify the individual identity information of the yak, and determine the individual identity of the yak by identifying the head and neck features of the yak or identifying the individual identity information of the yak; the individual identity information of the yak includes the label, seal, color, mark, number, etc. on the yak; select the identity category to be marked, a total of 6 categories, namely cow1 to cow6;
[0115] After all images are annotated, click to convert to YOLO format storage labels. The data information of the storage labels is from left to right: category, the position of the center pixel of the box of the annotated target in the image, and the size of the annotated box;
[0116] S4: The 4,000 labeled yak individual identity images were randomly divided into a training set and a test set in a ratio of 7:3. The training set contained 2,800 images and the test set contained 1,200 images, and there was no overlap between the training set and the test set images.
[0117] S5: Build the environment required for YOLOv8.
[0118] S6: Input the training set into YOLOv8 to train the yak individual recognition model;
[0119] S7: Input the test set into the trained model, verify the model, and output the verification result to obtain the final yak individual recognition model.
[0120] Embodiment 3:
[0121] like Figure 1 As shown:
[0122] An image acquisition device with uninterrupted power supply and storage system is used to collect video data of yaks that need to be tested for weight. Video data of the upper back of the yaks, video data of the left and right sides of the yaks, and video data of the individual identity of the yaks are collected continuously. The video data of the upper back of the yaks is collected by the acquisition device placed directly above the cowshed, the video data of the left and right sides of the yaks is collected by the acquisition device placed on the side of the trough, and the video data of the individual identity of the yaks is collected by the acquisition device placed directly above the cowshed and the acquisition device placed on the side of the trough. There are 3-8 cows in the cowshed, and the acquisition time is 7-14 days. The cow posture image and the individual identity image of the cow are extracted frame by frame.
[0123] First, the yak posture image is input into the established cattle posture recognition model to recognize the cattle posture. When the cattle in the cattle posture image are recognized as normal posture, the posture image or the cattle individual identity image is transmitted to the cattle individual identity recognition model to perform individual identity recognition on the cattle. After the cattle individual identity recognition is completed, the upper back and left and right side image data of the specific cattle individual are input into the yak back body size parameter feature extraction module, including the following steps:
[0124] 1. Yak back body size parameters
[0125] (1) Define the key points of the neck and tail
[0126] Define the yak's head on the left and the tail on the right as the positive direction, and get the image outline of the yak's back from the top perspective:
[0127] Read the timestamp on the image of the cow in normal posture, and use the YOLOv8 algorithm to detect whether there is a background without interference within 5s-20s before and after the time. If it exists, use the background as background image 1. If not, expand the search time range until background image 1 is found. At the same time, use image processing technology to extract the ground background color and automatically create a background image 2 containing less information. Subtract the background of the cow image in normal posture from background image 1 and background image 2 respectively, and then fuse the two background-subtracted images to obtain the final binary image.
[0128] The Canny edge extraction algorithm is used to extract the edge of the binary image to obtain the edge contour image of the yak;
[0129] like Figure 4 As shown:
[0130] In the left half of the upper back contour of the yak, if the curvature change of the back contour curve of the yak at two points is greater than the curvature change of other nearby positions, and the body width of the two points is also smaller than the body width of other nearby positions, then the two points are defined as the upper neck key point a1 and the lower neck key point A1;
[0131] In the right half of the upper back contour of the yak, if the curvature change of the contour curve of the yak at two points is greater than the curvature change of other nearby positions, and the body width of the two points is smaller than the left body width and larger than the right body width, then the two points are defined as the upper tail key point a5 and the lower tail key point A5;
[0132] (2) Yak body size parameter feature extraction
[0133] Adjust the key point a1 on the neck and the key point A1 on the neck to form a vertical line L1, and adjust the key point a5 on the tail and the key point A5 on the tail to form a vertical line L5;
[0134] In the upper back contour of the yak, three vertical lines L2, L3, and L4 are set between the vertical line L1 and the vertical line L5 and are parallel to the vertical line L1 and the vertical line L5, and the distance between the vertical line L1 and the vertical line L5 is equally divided into four parts, wherein the intersection point of the vertical line L2 and the upper half of the yak back contour is a2, the intersection point of the vertical line L2 and the lower half of the yak back contour is A2, the intersection point of the vertical line L3 and the upper half of the yak back contour is a3, the intersection point of the vertical line L3 and the lower half of the yak back contour is A3, the intersection point of the vertical line L4 and the upper half of the yak back contour is a4, and the intersection point of the vertical line L4 and the lower half of the yak back contour is A4;
[0135] Calculate the lengths of the vertical lines L1, L2, L3, and L4 and record them as L1, L2, L3, and L4 respectively;
[0136] The maximum width of the yak's back contour is defined as the body width of the yak, recorded as L6;
[0137] Calculate the horizontal distance between vertical line L1 and vertical line L5 and record it as L7;
[0138] like Figure 5 As shown, in the left and right side image data of the yak, the head of the yak is defined as the left and the tail is defined as the positive direction, the highest point K on the back of the yak and the lowest point L on the hoof are identified, and the difference is taken to obtain the body height of the yak, which is recorded as L8;
[0139] Calculate the area of the trapezoid formed by a1, a2, A1, A2, and record it as S1; calculate the area of the trapezoid formed by a2, a3, A2, A3, and record it as S2; calculate the area of the trapezoid formed by a3, a4, A3, A4, and record it as S3; calculate the area of the trapezoid formed by a4, a5, A4, A5, and record it as S4;
[0140] Calculate the area of the rectangle formed by the intersection of the upper and lower horizontal tangent lines of the maximum width of the yak back contour and the vertical line L1 and the extension line of the vertical line L5, and record it as S5;
[0141] The machine vision algorithm is used to automatically complete the calculation and extraction of the above body size parameters throughout the entire process;
[0142] (3) Determination of comprehensive combined index of yak body size parameters and establishment of regression model of comprehensive combined index and cattle weight prediction
[0143] Determine the comprehensive combined index S of yak body size parameters according to the following formula g :
[0144] S g =S1+S2+S3+S4+S5*L8;
[0145] The comprehensive index S of yak body size parameters based on a single picture of a single yak g ; Calculate the comprehensive combined index S of yak body size parameters of 20 pictures of a single yak g (average);
[0146] like Figure 1 As shown:
[0147] 2. Yak lateral body size parameters
[0148] An image acquisition device with uninterrupted power supply and storage system is used to collect video data of yaks that need to be tested for weight, and video data of the upper back, left and right sides of the yaks, and individual identity of the yaks are collected continuously. The video data of the upper back of the yaks is collected by the acquisition device placed directly above the cowshed, the video data of the left and right sides of the yaks is collected by the acquisition device placed on the side of the trough, and the video data of the individual identity of the yaks is collected by the acquisition device placed directly above the cowshed and the acquisition device placed on the side of the trough. There are 3-8 yaks in the cowshed, and the acquisition time is 7-14 days. The posture image of the yaks and the individual identity image of the yaks are extracted frame by frame.
[0149] First, a yak posture image is input into a well-established yak posture recognition model to recognize the posture of the yak. When the yak in the posture image is recognized as a normal posture, its posture image or the individual identity image of the yak is then transmitted to the yak individual identity recognition model to perform individual identity recognition on the yak. After the individual identity recognition of the yak is completed, the left and right side image data of the specific individual yak is input into the yak side body size parameter feature extraction module, including the following steps:
[0150] (1) Definition of key points on the yak side
[0151] Define the yak's head on the left and the tail on the right as the positive direction, and get the left and right side image contours of the yak from the side perspective:
[0152] Read the timestamp on the image of the cow in normal posture, and use the YOLOv8 algorithm to detect whether there is a background without interference within 5s-20s before and after the time. If it exists, use the background as background image 1. If not, expand the search time range until background image 1 is found. At the same time, use image processing technology to extract the ground background color and automatically create a background image 2 containing less information. Subtract the background of the cow image in normal posture from background image 1 and background image 2 respectively, and then fuse the two background-subtracted images to obtain the final binary image.
[0153] The Canny edge extraction algorithm is used to extract the edge of the binary image to obtain the side edge contour image of the yak;
[0154] like Figure 5 As shown:
[0155] Determine the lower left key point N of the yak's side and the upper left key point M of the cow's side: take the point with the maximum curvature between the rear bend of the cow's front thigh and the front bend of the abdomen as the lower left key point N of the cow's side; extend vertically upward from the lower left key point of the cow's side to the vertex of the cow's back contour to determine the upper left key point M of the cow's side;
[0156] Determine the key point S of the right rear of the yak's side: take the point with the maximum curvature between the upper bend of the cow's buttocks and the lower bend where the cow's tail touches the cow's buttocks as the key point S of the right rear of the cow's side;
[0157] Determine the key point Q on the upper right side of the yak and the key point R on the lower right side of the cow: draw a horizontal auxiliary line from the key point on the upper left side of the cow, and draw a vertical auxiliary line from the key point on the right rear side of the cow. The intersection of the two lines is the key point Q on the upper right side of the cow; draw a horizontal auxiliary line from the key point on the lower left side of the cow, and draw a vertical auxiliary line from the key point on the right rear side of the cow. The intersection of the two lines is the key point R on the lower right side of the cow;
[0158] (2) Feature extraction of yak lateral body size parameters
[0159] In the left and right side image data of the yak, the positive direction is defined as the head of the yak on the left and the tail on the right. The highest point K on the back of the yak and the lowest point L on the front hoof of the yak are identified. The difference is taken to obtain the body height of the yak, which is recorded as L8.
[0160] The distance between the upper left key point M of the yak's flank and the lower left key point N of the cow's flank or the distance between the upper right key point Q of the yak's flank and the lower right key point R of the cow's flank is recorded as the cow's flank body size parameter L9;
[0161] The distance between the lower left key point N of the yak side and the lower right key point R of the cow side or the distance between the upper left key point M of the yak side and the upper right key point Q of the cow side is recorded as the cow side body size parameter L 10 ;
[0162] (3) Determination of yak lateral body size parameters
[0163] Determine the yak's lateral body size parameter index S according to the following formula p :
[0164] S p =(L9*L 10 )*L8;
[0165] The comprehensive index S of yak body size parameters based on a single picture p ; Calculate the comprehensive combined index S of yak body size parameters from multiple images p The average value of
[0166] 3. Determination of the comprehensive body size parameter index AHS of yaks
[0167] The yak back body size parameter index S g Average value and yak back body size parameter index S p The average values are added to get the comprehensive body size parameter index AHS of yaks:
[0168] AHS=S g Average + S p average value
[0169] 4. Establishment of regression model for yak weight prediction
[0170] The relationship between the actual weight of yaks and the comprehensive body size parameter index AHS of yaks was analyzed by regression, and a regression model fitting between the predicted weight of yaks and the comprehensive body size parameter index AHS of yaks was established.
[0171] The root mean square error of body weight was calculated using the actual body weight of k yak individuals and the predicted body weight of cattle to evaluate the performance of the regression model, k ≥ 16;
[0172] If the root mean square error of weight is less than 2kg, the prediction regression model is output for yak weight prediction;
[0173] Use machine vision algorithms to automatically calculate and extract body size parameters throughout the entire process;
[0174] like Figure 8 As shown, the regression model is:
[0175] Yak predicted weight T (kg) = 4.92*AHS-9.06;
[0176] The root mean square error of body weight was calculated using the actual body weight of k yak individuals and the predicted body weight of cattle to evaluate the performance of the regression model, k ≥ 16;
[0177] The regression model in this embodiment uses the weights of 16 yaks to calculate the root mean square error of weight, and the root mean square error of weight is only 1.38 kg. The performance index of yak weight measurement is excellent.
[0178] The regression model for weight prediction in this embodiment is efficiently deployed in the Jetson Nano embedded device to achieve real-time image data processing and accurate detection of yak weight; the Jetson Nano embedded device has a built-in GPU and uses the TensorRT framework developed by NVIDIA to convert the detection model into a format that can be efficiently run under the TensorRT framework.
[0179] In summary, the present invention discloses a non-contact yak weight measurement method and device based on yak body edge parameter extraction and deep learning algorithm. First, a yak posture recognition model is established based on YOLOv8; the identity information of the yak in the image is matched one by one, and an individual recognition model of the yak is established based on YOLOv8; the body size parameters of the back and the side of the cow are extracted by using background subtraction, edge extraction and other algorithms, and the body size parameters of the back and the side of the cow are combined to establish a regression model of the yak weight and body size parameters, and the weight of the yak is predicted by using the model; the present invention can timely and effectively measure the individual weight of the yak, the performance index of the regression model of the cow weight and body size parameters is excellent, and the mean square error between the predicted weight and the actual weight is extremely low, so that the management personnel can timely and accurately understand the weight information of the yak and make corresponding processing, improve the breeding efficiency of the yak, and have an excellent promotion and application prospect.
[0180] At this point, those skilled in the art recognize that, although the embodiments of the present invention have been shown and described in detail herein, many other variations or modifications that conform to the principles of the present invention can still be directly determined or derived based on the contents disclosed in the present invention without departing from the spirit and scope of the present invention. Therefore, the scope of the present invention should be understood and recognized as covering all such other variations or modifications.
Claims
1. A non-contact yak weight measurement method based on yak body edge parameter extraction and deep learning algorithm, characterized in that: The measuring method comprises the following steps: Step S1: Establishment of yak posture recognition model Step S11: Use an image acquisition device to collect video data, and continuously collect video data of the upper back of the cow and video data of the left and right sides of the cow; Step S12: Preliminary screening of the collected video data of the yak's upper back and the video data of the left and right sides of the yak is performed to extract the yak posture image frame by frame; Step S13: manually identify the yak posture images extracted in step S12, mark the yak posture categories, and convert all image annotations into storage labels in YOLO format; Step S14: randomly dividing the images with labeled yak posture categories into a training set and a test set according to proportion; Step S15: input the training set obtained in step S14 into the YOLOv8 network model to train the yak posture recognition model, so as to obtain a trained yak posture recognition model; Step S16: input the test set obtained in step S14 into the trained yak posture recognition model, verify the model, and output the verification result to obtain the final yak posture recognition model; Step S2: Establishment of yak individual identification model Step S21: using an image acquisition device to collect video data, and continuously collecting video data of individual yaks; Step S22: preliminarily screening the collected yak individual identity video data, and extracting yak individual identity images frame by frame; Step S23: manually identify the individual identity images of the yaks extracted in step S22, mark the individual identity information of the yaks, and convert all the image annotations into storage labels in YOLO format; Step S24: randomly dividing the images with the yak individual identities marked into a training set and a test set according to a certain proportion; Step S25: inputting the training set obtained in step S24 into the YOLOv8 network model to train the yak individual identity recognition model, thereby obtaining a trained yak individual identity recognition model; Step S26: input the test set obtained in step S24 into the trained yak individual identity recognition model, verify the model, and output the verification result to obtain the final yak individual identity recognition model; Step S3: Extraction of yak back body size parameter features Use image acquisition equipment to collect video data of yaks that need to be tested for weight, continuously collect video data of the upper back of the yaks, video data of the left and right sides of the yaks, and video data of the individual identity of the yaks; extract the posture image of the yaks and the individual identity image of the yaks frame by frame; First, the yak posture image is input into the established yak posture recognition model to recognize the posture of the yak. When the yak in the posture image is recognized as a normal posture, its posture image or the individual identity image of the yak is transmitted to the yak individual identity recognition model to perform individual identity recognition on the yak. After the individual identity recognition of the yak is completed, the image data of the upper back and the left and right sides of the specific individual yak is input into the yak body size parameter feature extraction module, including the following steps: Step S31: Define the key points of the neck and tail Define the yak head on the left and the tail on the right as the positive direction, and obtain the image contour of the upper back of the yak from the top perspective. In the left half of the upper back contour of the yak, if the curvature change of the yak's back contour curve at two upper and lower points is greater than the curvature change of other nearby positions, and the body width of these two points is also smaller than the body width of other nearby positions, then these two points are defined as the upper neck key point a1 and the lower neck key point A1; In the right half of the upper back contour of the yak, if the curvature change of the contour curve of the yak at two points is greater than the curvature change of other nearby positions, and the body width of the two points is smaller than the left body width and larger than the right body width, then the two points are defined as the key point a on the tail n+1 and the key point A under the tail n+1 ; Step S32: Extraction of yak back body size parameter features Adjust the key points a1 on the neck and A1 on the lower neck to form a vertical line L1, and adjust the key points a1 on the tail to form a vertical line L1. n+1 and the key point A under the tail n+1 Adjust to form a vertical line L n+1 ; Inside the outline of the yak's upper back, between the vertical lines L1 and L n+1 Set n-1 parallel lines L1 and L n+1 The vertical lines L2, L3, L4…L n , vertical line L1 and vertical line L n+1 The distance between them is divided into n parts, among which the intersection point of vertical line L2 and the upper part of the cow's back contour is a2, the intersection point of vertical line L2 and the lower part of the cow's back contour is A2, the intersection point of vertical line L3 and the upper part of the cow's back contour is a3, the intersection point of vertical line L3 and the lower part of the cow's back contour is A3, the intersection point of vertical line L4 and the upper part of the cow's back contour is a4, the intersection point of vertical line L4 and the lower part of the cow's back contour is A4, and so on. n The intersection point with the upper part of the cow's back contour is a n , vertical line L n The intersection point with the lower part of the cow's back outline is A n ; In the left and right side image data of the yak, the positive direction is defined as the head on the left and the tail on the right. The highest point of the back and the lowest point of the front hoof are identified. The difference is taken to obtain the body height of the yak, which is recorded as L. n+4 ; Calculate the area of the trapezoid formed by a1, a2, A1, A2, and record it as S1; calculate the area of the trapezoid formed by a2, a3, A2, A3, and record it as S2; calculate the area of the trapezoid formed by a3, a4, A3, A4, and record it as S3; and so on. n-1 , a n , A n-1 , A n The area of the trapezoid formed is recorded as S n-1 ; Calculate a n , a n+1 , A n , A n+1 The area of the trapezoid formed is recorded as S n ; Calculate the upper and lower horizontal tangents and vertical lines L1 and L2 at the maximum width of the yak back contour n+1 The area of the rectangle enclosed by the intersection of the extended lines is recorded as S n+1 ; Step S33: Determine the parameter index of the yak back size Determine the yak back body size parameter index S according to the following formula g : S g =S1+S2+S3+S4+…+S n +S n+1 *L n+4 ; Among them, n≥4; The comprehensive index S of yak body size parameters based on a single picture g ; Calculate the comprehensive combined index S of yak body size parameters from multiple images g The average value of Step S4: Extraction of yak lateral body size parameter features Use image acquisition equipment to collect video data of yaks that need to be tested for weight, continuously collect video data of the left and right sides of the yaks and video data of the individual identity of the yaks; extract the yak posture image and the individual identity image of the yak frame by frame; First, a yak posture image is input into a well-established yak posture recognition model to recognize the posture of the yak. When the yak in the posture image is recognized as a normal posture, its posture image or the individual identity image of the yak is then transmitted to the yak individual identity recognition model to perform individual identity recognition on the yak. After the individual identity recognition of the yak is completed, the left and right side image data of the specific individual yak is input into the yak side body size parameter feature extraction module, including the following steps: Step S41: Definition of key points on the yak side Define the positive direction as the head of the yak is on the left and the tail is on the right, and get the image contour of the upper back of the yak from the side perspective; Determine the lower left key point of the yak's side and the upper left key point of the cow's side: take the point with the maximum curvature between the back bend of the cow's front thigh and the front bend of the abdomen as the lower left key point of the cow's side; extend vertically upward from the lower left key point of the cow's side to the vertex of the cow's back contour to determine the upper left key point of the cow's side; Determine the key point of the right rear of the yak's side: take the point with the largest curvature between the upper bend of the yak's buttocks and the lower bend where the yak's tail meets the yak's buttocks as the key point of the right rear of the yak's side; Determine the upper right key point of the yak's side and the lower right key point of the cow's side: draw a horizontal auxiliary line from the upper left key point of the cow's side, and draw a vertical auxiliary line from the right rear key point of the cow's side. The intersection of the two lines is the upper right key point of the cow's side; draw a horizontal auxiliary line from the lower left key point of the cow's side, and draw a vertical auxiliary line from the right rear key point of the cow's side. The intersection of the two lines is the lower right key point of the cow's side; Step S42: Extraction of yak lateral body size parameter features In the left and right side image data of the yak, the positive direction is defined as the head of the yak on the left and the tail on the right. The highest point of the yak's back and the lowest point of the yak's front hoof are identified, and the difference is taken to obtain the body height of the yak, which is recorded as L. n+4 ; The distance between the upper left key point of the yak side and the lower left key point of the cow side or the distance between the upper right key point of the yak side and the lower right key point of the cow side is recorded as the cow side body size parameter L n+5 ; The distance between the lower left key point of the yak side and the lower right key point of the cow side or the distance between the upper left key point of the yak side and the upper right key point of the cow side is recorded as the cow side body size parameter L n+6 ; Step S43: Determine the yak lateral body size parameter index Determine the yak's lateral body size parameter index S according to the following formula p : S p =(L n+5 *L n+6 )*L n+4 ; Among them, n≥4; The comprehensive index S of yak body size parameters based on a single picture p ; Calculate the comprehensive combined index S of yak body size parameters from multiple images p The average value of Step S5: Determination of the comprehensive body size parameter index AHS of yak The yak back body size parameter index S in step S3 g The average value and the yak back body size parameter index S in step S4 p The average values are added to get the comprehensive body size parameter index AHS of yaks: AHS=S g Average + S p average value Step S6: Establishment of regression model for yak weight prediction The relationship between the actual weight of yaks and the comprehensive body size parameter index AHS of yaks was analyzed by regression, and a regression model fitting between the predicted weight of yaks and the comprehensive body size parameter index AHS of yaks was established. The root mean square error of body weight was calculated using the actual body weight of k yak individuals and the predicted body weight of cattle to evaluate the performance of the regression model, k ≥ 16; If the root mean square error of weight is less than 2kg, the prediction regression model is output for yak weight prediction; In step S32 and step S42, the machine vision algorithm is used to automatically complete the calculation and extraction of body size parameters throughout the entire process; The regression model fitted in step S6 is: Yak predicted weight T (kg) = 4.92*AHS-9.06; The specific method for obtaining the image contour of the upper back of the yak from the top perspective in step S31 is: The timestamp on the image of the yak in normal posture is read. Within 5s to 20s before and after the time, the YOLOv8 algorithm is used to detect whether there is a background without interference. If it exists, the background is used as background image 1. If not, the search time range is expanded until background image 1 is found. At the same time, the ground background color is extracted using image processing technology to automatically create a background image 2 containing less information. The normal posture yak image is subtracted from background image 1 and background image 2 respectively, and then the two background subtracted images are fused to obtain the final binary image. The Canny edge extraction algorithm is used to extract the edge of the binary image to obtain the edge contour image of the yak.
2. A non-contact yak weight measurement method based on yak body edge parameter extraction and deep learning algorithm as described in claim 1, characterized in that: The regression model for weight prediction is efficiently deployed in the Jetson Nano embedded device to achieve real-time image data processing and accurate detection of yak weight; the Jetson Nano embedded device has a built-in GPU and uses the TensorRT framework developed by NVIDIA to convert the detection model into a format that can be efficiently run under the TensorRT framework.
3. A non-contact yak weight measurement method based on yak body edge parameter extraction and deep learning algorithm as described in claim 1, characterized in that: The specific method for obtaining the side view cow image contour in step S41 is: The timestamp on the image of the yak in normal posture is read. Within 5s to 20s before and after the time, the YOLOv8 algorithm is used to detect whether there is a background without interference. If it exists, the background is used as background image 1. If not, the search time range is expanded until background image 1 is found. At the same time, the background color is extracted using image processing technology to automatically create a background image 2 containing less information. The normal posture yak image is subtracted from background image 1 and background image 2 respectively, and then the two background subtracted images are fused to obtain the final binary image. The Canny edge extraction algorithm is used to extract the edges of the binary image to obtain the side profile image of the cow.
4. A non-contact yak weight measurement method based on yak body edge parameter extraction and deep learning algorithm as described in claim 1, characterized in that: The image acquisition device in step S11 and step S21 is an acquisition device with an uninterrupted power supply and a storage system; the video data of the upper back of the yak is collected by the acquisition device placed directly above the yak house, the video data of the left and right sides of the yak is collected by the acquisition device placed on the side of the feeding trough, and the video data of the individual identity of the yak is collected by the acquisition device placed directly above the yak house and the acquisition device placed on the side of the feeding trough; there are 3 to 8 cows in the yak house, and the acquisition time is 7 to 14 days.
5. A non-contact yak weight measurement method based on yak body edge parameter extraction and deep learning algorithm as claimed in claim 1, characterized in that: In step S13, the yak posture categories are divided into normal and abnormal postures, and the yak posture category determination method is as follows: if the angle between the neck and the trunk of the yak in the top view of the yak's upper back image does not exceed 5 degrees, then the posture is considered to be a normal posture, otherwise it is an abnormal posture; if the yak's four limbs are standing on the ground at the same time in the left and right side images of the yak, and the angle between the yak's front two hooves and the angle between the yak's rear two hooves do not exceed 5 degrees, then the posture is considered to be a normal posture, otherwise it is an abnormal posture.
6. A non-contact yak weight measurement method based on yak body edge parameter extraction and deep learning algorithm as claimed in claim 1, characterized in that: In step S14, the ratio of the number of data in the training set to that in the test set is 5-7:3-5.
7. A non-contact yak weight measurement method based on yak body edge parameter extraction and deep learning algorithm as described in claim 1, characterized in that: The information contained in the yak individual identity image in step S23 is: determining the individual identity of the cattle by identifying the head and neck features of the yak or identifying the cattle individual identity specific information; the marking of the yak individual identity information is to number different cattle individuals for future use.
8. A non-contact yak weight measurement method based on yak body edge parameter extraction and deep learning algorithm as claimed in claim 1, characterized in that: In step S24, the ratio of the number of data in the training set to that in the test set is 5-7:3-5.
9. A non-contact yak weight measurement method based on yak body edge parameter extraction and deep learning algorithm as claimed in claim 1, characterized in that: The image acquisition device in step S3 and step S4 is an acquisition device with an uninterrupted power supply and a storage system; the video data of the yak's back is collected by the acquisition device placed directly above the cowshed, the video data of the left and right sides of the cow are collected by the acquisition device placed on the side of the trough, and the video data of the yak's individual identity is collected by the acquisition device placed directly above the cowshed and the acquisition device placed on the side of the trough; there are 3 to 8 yaks in the cowshed, and the acquisition time is 7 to 14 days.
10. A non-contact yak weight measurement method based on yak body edge parameter extraction and deep learning algorithm as claimed in claim 7, characterized in that: The specific information of the individual identity of the yak includes tags, seals, colors, marks, and numbers on the yak.