Vaccine injection method and injection robot based on machine vision

Through deep learning technology based on machine vision, the posture and movement status of pigs are identified, and efficient and automated vaccine injection is achieved, solving the problems of low injection efficiency and low success rate in the existing technology. It is suitable for high-efficiency vaccines in large-scale farms injection.

CN115252207BActive Publication Date: 2024-11-19HANGZHOU QOGORI TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210886782.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-26
Publication Date
2024-11-19
Estimated Expiration
2042-07-26

AI Technical Summary

Technical Problem

In existing pork farming, artificial vaccine injection is inefficient, labor intensity, and low degree of automation. It is impossible to grasp the pig's exercise status in real time, resulting in a low injection success rate.

Method used

Using machine vision-based vaccine injection method, the key point detection algorithm in deep learning is used to identify the pig injection area, and track the pig's movement status in real time. By identifying the standing posture and movement status, the vaccine is automatically injected, and the injection efficiency and success are improved. Rate.

Benefits of technology

Efficient and automated vaccine injections have been achieved, which improves the injection success rate and efficiency, reduces manual intervention, and is suitable for efficient vaccine injections in large-scale farms.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115252207B_ABST
    Figure CN115252207B_ABST
Patent Text Reader

Abstract

The present invention discloses a vaccine injection method and injection robot based on machine vision, which reasonably utilizes machine vision to identify the posture and injection position of live pigs, firstly identifies the posture of live pigs, then detects key points of the buttocks of live pigs, locates the injection position, and finally tracks the movement state of live pigs in real time according to key point information, and performs injection actions, effectively reducing mechanical damage to live pigs. Through the vaccine injection method and injection robot of the present invention, vaccine injection can be automatically and efficiently completed in pig farms, with high automation and high injection efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of intelligent livestock injection equipment, and in particular to a vaccine injection method and an injection robot based on machine vision. Background Art

[0002] In recent years, my country's pork production has grown rapidly, accounting for 50% of the world's pork production. The pig farming industry has developed rapidly and has become the leading industry in livestock and poultry farming. Pig production will be based on moderate scale, standardization and standardization, and will comprehensively utilize a number of modern technologies to improve the overall production level and efficiency. Among them, labor shortage and animal diseases are the biggest obstacles to the development of the pig farming industry.

[0003] The use of vaccines and drugs is an important method and means of disease prevention and control. For intelligent equipment, it can ensure stable working efficiency, replace manual work tasks, and work for a long time in breeding sites to avoid contact with the outside world and spread of diseases. Therefore, it is necessary to develop efficient, safe and practical fully automatic intelligent injection robots. Visual perception and positioning of pigs is a core issue for robots to realize automated injection operations. The key link is to perceive the real-time movement posture and injection site of pigs.

[0004] At present, in large-scale farms, manual injection of liquid medicines (vaccines) is inefficient, labor-intensive, and difficult to prevent and control viruses. For example, Patent No. 201911255171.8 involves an automatic injection device for pig vaccines. During the injection process, pigs have to pass through a narrow passage. This method still requires a lot of manual intervention and has a low degree of automation; Patent No. 202111098333.9 involves an automatic injection robot visual data processing method, system, and injection robot. Using machine vision methods, the method finds the injection position of the buttocks through the side features of the pig. This method can provide guidance for the injection robot, but the detection speed is slow, and the pig situation cannot be grasped in real time, and the injection success rate is low. Summary of the invention

[0005] The present invention is proposed in view of the above technical problems, and provides a vaccine injection method and injection robot based on machine vision, which can utilize the key point detection algorithm in deep learning to perceive and identify the position of the injection area of ​​the pig, and track the movement state of the pig in real time before injection, with a high degree of automation and high injection efficiency.

[0006] According to a first aspect of an embodiment of the present invention, a machine vision-based vaccine injection method is provided, comprising:

[0007] The injection robot moves to the first single pen in the pig farm and identifies the posture of the first live pig in the single pen;

[0008] If the recognition result is a non-standing posture, the injection robot moves to the next single pen in sequence and restarts the recognition of the posture of the second pig in the second single pen; if the recognition result is a standing posture, the key points of the buttocks of the first pig are continuously recognized to locate the injection area;

[0009] The mechanical arm of the injection robot moves to the injection preparation position, while tracking and identifying the movement state of the first pig;

[0010] If the first pig moves during the tracking and identification process, the injection robot will move to the next pen in order and start to identify the posture of the second pig in the second pen again; if the first pig is stationary during the tracking and identification process, the injection robot will quickly perform the injection action and record the injection information of the first pig, and then move to the next pen and repeat the above steps in sequence;

[0011] After the injection robot performs the above operations on the live pigs in each single pen in the pig farm in sequence, it performs the above steps again in sequence on the live pigs that have not been injected until all the live pigs in the pig farm are injected.

[0012] According to a second aspect of an embodiment of the present invention, a machine vision-based vaccine injection method as in the first aspect is provided, wherein the method for identifying the posture of a live pig is specifically as follows:

[0013] Collect images of pigs in different lighting conditions and at different ages and manually annotate them;

[0014] After obtaining the labeled data set, data enhancement is performed on the pig posture data set to increase the capacity of the training data;

[0015] After obtaining the pig posture data set, the data set is input into the pig posture recognition network for training to obtain the current posture information of the pig.

[0016] According to a third aspect of an embodiment of the present invention, a machine vision-based vaccination method as in the second aspect is provided, wherein the data enhancement method includes rotating the training data, wherein the rotation transformation formula is:

[0017]

[0018] According to a fourth aspect of an embodiment of the present invention, a machine vision-based vaccine injection method as in the first aspect is provided, wherein a specific method for locating the injection area is:

[0019] Collect images and mark different injection sites to determine the location of the pigs and eliminate the interference of environmental factors on pig identification;

[0020] After obtaining the labeled pig data, the data set is input into the DeepLabCut training network. After the training is completed, the pig video is analyzed to obtain the key point information of the pig;

[0021] The injection area location information of the pigs is obtained based on the pig body statistics, geometric model analysis and key point information.

[0022] According to a fifth aspect of an embodiment of the present invention, a machine vision-based vaccine injection method as in the fourth aspect is provided, wherein the actual injection area of ​​the pig is located by five points: the pig's posterior sea point, the pig's anus, the midpoint of the midline of the pig's buttocks, 1 / 4 below the midline of the pig's buttocks, and the lowest point of the midline of the pig's buttocks, and the injection area is auxiliary positioned by four points: the upper part of the pig's left hind leg, the upper part of the pig's right hind leg, the left knee of the pig's hind leg, and the right knee of the pig's hind leg.

[0023] According to a sixth aspect of an embodiment of the present invention, there is provided a method for vaccination based on machine vision as in the first aspect, wherein a specific method for tracking and identifying the motion state of a live pig is as follows:

[0024] The visual positioning camera is used to collect pictures of pigs and obtain the spatial position information of key points. Then, the key points of the pig hip contour detected in the i-th frame are set as A. i , where the jth key point is A i,j , the detection set in the i-2th frame is A i-2 , filter A i With A i-2 The key points of the same part in the are determined as valid key points and form a set A';

[0025] Calculate the spatial geometric distance of the key points of the corresponding parts in A'. For the key point A i,j , whose coordinates are expressed as (xij,yij,z ij ), when the pig is stationary, the position of the key point in the world coordinate system will not change; for the moving pig, the coordinates of its key point in the world coordinate system will shift according to the movement situation, which will cause the geometric distance d between the key points of the same part at different times to change;

[0026]

[0027] Where j belongs to (1,2,···,n), and k is the number of valid key points in the A' set. Therefore, the average spatial geometric distance is calculated for the k data in the set A';

[0028] Determine whether the average spatial geometric distance d between the key points of the pigs between two frames is less than the distance threshold D; if d>D, it is determined that the pigs have moved and are in motion; otherwise, they are in a stationary state.

[0029] According to a seventh aspect of an embodiment of the present invention, there is provided an injection robot using the machine vision-based vaccine injection method according to any one of the first to sixth aspects, the injection robot comprising:

[0030] Smart car, six-axis robotic arm, visual environment camera, automatic injection mechanism and visual positioning camera;

[0031] Among them, the six-axis robotic arm is installed above the chassis of the intelligent vehicle, and the automatic injection mechanism is installed at the end of the six-axis robotic arm.

[0032] According to an eighth aspect of an embodiment of the present invention, there is provided an injection robot as in the seventh aspect, wherein an automatic injection mechanism comprises a mounting plate, an automatic injection device and an injection device fixing mechanism, the automatic injection device comprises a pushing cylinder, a syringe push block and a continuous syringe, the push rod end of the pushing cylinder is connected to the syringe push block, and the lower end surface of the syringe push block is in contact with the push rod of the continuous syringe.

[0033] According to the ninth aspect of an embodiment of the present invention, there is provided an injection robot as in the seventh aspect, wherein the automatic injection mechanism comprises a needle-free syringe, a syringe fixing block, a suction and injection switch and a mounting plate, and the needle-free syringe is fixed on the mounting plate by the syringe fixing block.

[0034] The beneficial effects of the present invention are: using machine vision to identify the posture and injection position of the live pig, and tracking the movement status of the live pig in real time according to key point information, so as to grasp the situation of the live pig in real time and efficiently complete the injection action, with high injection success rate and high efficiency.

[0035] With reference to the following description and the accompanying drawings, specific embodiments of the invention are disclosed in detail, indicating the manner in which the principles of the invention may be employed.

[0036] It should be understood that the embodiments of the present invention are not limited thereby. Features described and / or shown for one embodiment may be used in one or more other embodiments in the same or similar manner, combined with features in other embodiments, or replace features in other embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] The accompanying drawings are included to provide a further understanding of the present invention, and constitute a part of the specification, illustrate preferred embodiments of the present invention, and together with the description are used to explain the principle of the present invention, wherein the same elements are represented by the same reference numerals throughout.

[0038] In the attached picture:

[0039] Figure 1 is a flow chart of a vaccine injection method based on machine vision of the present invention;

[0040] Figure 2 This is an example diagram of a working scene of the injection robot of the present invention injecting vaccines in a pig farm;

[0041] Figure 3 It is a schematic diagram of the structure of the injection robot of the present invention;

[0042] Figure 4 It is a structural schematic diagram of a first embodiment of the automatic injection structure of the injection robot of the present invention;

[0043] Figure 5 It is a structural schematic diagram of another embodiment of the automatic injection structure of the injection robot of the present invention. DETAILED DESCRIPTION

[0044] With reference to the accompanying drawings, the above and other features of the present invention will become apparent through the following description. In the specification and the accompanying drawings, specific embodiments of the present invention are specifically disclosed, which show some embodiments in which the principles of the present invention can be adopted, and it should be understood that the present invention is not limited to the described embodiments.

[0045] The present invention first provides a vaccine injection method based on machine vision. Figure 1 is a flow chart of the vaccine injection method based on machine vision of the present invention, Figure 2 This is an example of a working scene of an injection robot injecting vaccines in a pig farm, where 01 is a live pig, 02 is an injection robot, and 03 is a single pen. The vaccine injection method of the present invention specifically includes the following steps:

[0046] The injection robot moves to the first single pen in the pig farm and identifies the posture of the first live pig in the single pen;

[0047] If the recognition result is a non-standing posture (such as lying on the side or prone), the injection robot moves to the next single pen in sequence and restarts the recognition of the second pig in the second single pen; if the recognition result is a standing posture, the key points of the buttocks of the first pig are continuously recognized to locate the injection area;

[0048] The mechanical arm of the injection robot moves to the injection preparation position, and simultaneously tracks and identifies the movement state of the first pig;

[0049] If the first pig moves during the tracking and identification process, the injection robot moves to the next single pen in order and restarts the identification of the posture of the second pig in the second single pen; if the first pig is stationary during the tracking and identification process, the injection robot quickly performs the injection action and records the injection information of the current first pig, and then moves to the next single pen and repeats the above steps in sequence;

[0050] After the injection robot performs the above operations on the live pigs in each single pen in the pig farm in sequence, it performs the above steps again in sequence on the live pigs that have not been injected until all the live pigs in the pig farm are injected.

[0051] According to the vaccine injection method of the present invention, the whole image of the pig captured by the camera is first input into the pig posture judgment model to determine the three postures of the pig: standing, lying on its side and lying prone.

[0052] The specific steps include:

[0053] S11. For the pig posture recognition task, collect pig images of different lighting and different age groups and manually annotate them. After obtaining the labeled data set, perform data enhancement on the pig posture data set, and increase the capacity of the training data by rotating, translating, horizontally flipping, scaling, and shearing the training data. The transformation formula for rotation is shown in the following formula:

[0054]

[0055] S12. After obtaining the pig posture data set, the data set is input into the pig posture recognition network for training to obtain the current posture information of the pig; wherein the posture recognition network is based on the MobileNet V2 network, the number of channels in the ninth layer is adjusted to 640, and a Dropout layer is added to improve the network overfitting phenomenon, and finally a fully connected layer is used to obtain the final classification result, that is, whether the pig posture is standing.

[0056] According to the vaccine injection method of the present invention, the key point recognition model is used to detect the key point information of the injection site on the pig's buttocks, and the pig's body statistical information and geometric model analysis are combined to obtain the pig's injection area position information.

[0057] The specific steps include:

[0058] S21: Collect images and mark different injection sites to determine the location of the pigs and eliminate the interference of environmental factors on pig identification:

[0059] (1) Prepare the data set required for deep learning model training. In the process of data set selection, first collect videos of penned pigs at a speed of 25f / s with a resolution of 1920×1080, and then transmit the collected videos to the monitoring computer through the data transmission line for storage.

[0060] (2) For the pig buttocks injection task, that is, to identify the pig buttocks contour information, it is mainly used in mobile robot solutions, that is, the camera takes images from the back of the pig's body and identifies the injection site of the pig's buttocks. The data set includes pictures of the pig's buttocks and torso, and there is only one pig in the picture. The key points that need to be marked on the pig's buttocks are: the pig's Houhai point, the pig's anus, the midpoint of the pig's buttocks midline, 1 / 4 below the pig's buttocks midline, the lowest point of the pig's buttocks midline, the intersection of the pig's hind legs and buttocks (left and right), and the left and right knees of the pig's hind legs. Nine points are used to represent the contour of the pig's buttocks.

[0061] S22: After obtaining the labeled pig data, the data set is input into the DeepLabCut training network. After the training is completed, the pig video is analyzed to obtain the key point information of the pig. The DeepLabCut network uses MobileNet v2 as the backbone network, and the initial weight of the network is the ImageNet pre-training weight to improve the accuracy of key point detection.

[0062] S23: Obtain the injection area position information of the pig according to the pig body statistics, geometric model and key point information analysis. Accurate perception of the injection area spatial information is the prerequisite for ensuring the smooth progress of the injection operation. In the present invention, according to the pig key bone joint point information obtained by the calculation in the above steps, based on the pig body statistics and geometric model analysis, the spatial information of the pig injection is obtained.

[0063] The injection site of the buttocks is located above the hip bone (cross bone), including the muscles on both sides of the buttocks. This area is relatively large, especially in the midline of the buttocks, so the injection points on the left and right sides of the midline of the buttocks can be directly located by the five points of Houhai acupoint, pig anus, midpoint of the midline of the buttocks of the pig, 1 / 4 below the midline of the buttocks of the pig, and the lowest point of the midline of the buttocks of the pig. In addition, the upper left hind leg of the pig, the upper right hind leg of the pig, the left knee of the hind leg of the pig, and the right knee of the hind leg of the pig are used to assist in the positioning of the injection area in order to improve the accuracy and robustness of the model.

[0064] According to the vaccine injection method of the present invention, based on the pixel movement information of the key skeletal joints of the pigs in continuous video frames, it is identified whether the pigs are in an active and moving state during the entire injection process, thereby achieving real-time monitoring of the pigs' movements during the injection process.

[0065] The specific steps include:

[0066] S31, the visual positioning camera continuously takes pictures of the pig, uses the plane position information of the key points of the buttocks contour in the color image, and obtains the spatial information of the key points through three-dimensional stereo transformation. Suppose the key points of the pig buttocks contour detected in the i-th frame are set A i, where the jth key point is A i,j , the detection set in the i-2th frame is A i-2 . Screening A i With A i-2 The key points in the same part of the image are determined as valid key points and form a set A'.

[0067] S32, calculate the spatial geometric distance of the key points of the corresponding parts in A'. i,j , whose coordinates are expressed as (x ij ,y ij ,z ij ), when the pig is stationary, the position of the key point in the world coordinate system will not change; for the moving pig, the coordinates of its key point in the world coordinate system will shift according to the movement situation, which will cause the geometric distance d between the key points of the same part at different times to change.

[0068]

[0069] Where j belongs to (1, 2, ···, n), and k is the number of valid key points in the A' set. Therefore, the average spatial geometric distance is calculated for the k data in the set A'.

[0070] S33, judging whether the average spatial geometric distance d between the key points of the pigs between the two frames is less than the distance threshold D. In order to increase the fault tolerance of pig state discrimination, this study sets a pig state discrimination threshold D. If d>D, it is judged that the pig has moved and is in motion; otherwise, it is in a stationary state.

[0071] The present invention also provides an injection robot, Figure 3 : is a schematic diagram of the structure of the injection robot of the present invention. As shown in the figure, the injection robot 02 includes a control device 1, an intelligent vehicle 2, a six-axis mechanical arm 3, a visual environment camera 4, an automatic injection mechanism 5, and a visual positioning camera 6. Among them, the six-axis mechanical arm 3 is installed above the chassis of the intelligent vehicle 2, and the automatic injection mechanism 5 is installed at the end of the six-axis mechanical arm 3. Figure 4 FIG. 1 is a schematic diagram of the structure of the first embodiment of the automatic injection structure of the injection robot of the present invention. Figure 4The automatic injection mechanism 5 includes a mounting plate 51, an automatic injection device 52 and an injection device fixing mechanism 53. The automatic injection device 52 includes a push cylinder 521, a syringe push block 522 and a continuous syringe 523. The push cylinder 521 is fixed to the mounting plate 51 by screws. The push rod end of the push cylinder 521 is connected to the syringe push block 522. The lower end surface of the syringe push block 522 contacts the push rod of the continuous syringe 523. The continuous syringe 523 is fixed to the automatic injection mechanism by a clamping and limiting method. The end is connected to the needle by an automatic locking joint. A needle storage box 7 is also provided below the automatic injection mechanism 5. The needle storage box 7 is installed below the column of the six-axis robot 3.

[0072] Figure 5 It is a structural schematic diagram of another embodiment of the automatic injection structure of the injection robot of the present invention. As shown in the figure, in this embodiment, the automatic injection mechanism 8 includes a needle-free syringe 81, a syringe fixing block 82, a liquid suction and injection switch 83, and a mounting plate 84. The needle-free syringe 81 is fixed on the mounting plate 84 through the syringe fixing block 82. The liquid suction and injection switch 83 includes an injection electromagnet 831, a liquid suction electromagnet 832, and an injection button 833. By controlling the action of the needle-free syringe, the automatic control of liquid suction and injection is completed.

[0073] The injection robot of the present invention adopts a visual positioning injection method, and rationally utilizes vision to identify the posture of the pig and the injection position. First, the posture of the pig is identified, and then the key points of the pig's buttocks are detected to locate the injection position. Finally, the movement state of the pig is tracked in real time according to the key point information, and the injection action is performed, which effectively reduces the mechanical damage to the pig and improves the injection stability.

[0074] The preferred embodiments of the present invention have been described above with reference to the accompanying drawings, and many features and advantages of these embodiments are clear from this detailed description. In addition, since those skilled in the art will readily appreciate many modifications and changes, it is not intended that the embodiments of the present invention be limited to the precise structures and operations illustrated and described.

Claims

1. An injection robot, characterized in that: The injection robot comprises: Control device, smart car, six-axis robotic arm, visual environment camera, automatic injection mechanism and visual positioning camera; Among them, the six-axis mechanical arm is installed above the chassis of the intelligent car, and the automatic injection mechanism is installed at the end of the six-axis mechanical arm; wherein the automatic injection mechanism includes a first mounting plate, an automatic injection device and an injection device fixing mechanism, and the automatic injection device includes a pushing cylinder, a syringe push block and a continuous syringe, the push rod end of the pushing cylinder is connected to the syringe push block, and the lower end surface of the syringe push block is in contact with the push rod of the continuous syringe; the continuous syringe and the automatic injection mechanism are fixed in a clamping and limiting manner, and the end is connected to the needle with an automatic locking joint; a needle storage box is also provided below the automatic injection mechanism, and the needle storage box is installed below the column of the six-axis mechanical arm; The method for implementing a vaccine injection based on machine vision by the injection robot includes: The injection robot moves to the first single pen in the pig farm and identifies the posture of the first live pig in the single pen; If the recognition result is a non-standing posture, the injection robot moves to the next single pen in sequence and restarts the recognition of the posture of the second pig in the second single pen; if the recognition result is a standing posture, the key points of the buttocks of the first pig are continuously recognized to locate the injection area; The mechanical arm of the injection robot moves to the injection preparation position, while tracking and identifying the movement state of the first pig; If the first pig moves during the tracking and identification process, the injection robot will move to the next pen in order and start to identify the posture of the second pig in the second pen again; if the first pig is stationary during the tracking and identification process, the injection robot will quickly perform the injection action and record the injection information of the first pig, and then move to the next pen and repeat the above steps in sequence; After the injection robot performs the above operations on the pigs in each single pen in the pig farm in sequence, it performs the above steps again in sequence on the pigs that have not been injected until all the pigs in the pig farm are injected; The method for the injection robot to identify the posture of the first pig is specifically as follows: Collect images of pigs in different lighting conditions and at different ages and manually annotate them; After obtaining the labeled data set, data enhancement is performed on the pig posture data set to increase the capacity of the training data; After obtaining the pig posture data set, the data set is input into the pig posture recognition network for training to obtain the current posture information of the pig; The specific method for the injection robot to locate the injection area is: Collect images and mark different injection sites to determine the location of the pigs and eliminate the interference of environmental factors on pig identification; After obtaining the labeled pig data, the data set is input into the DeepLabCut training network. After the training is completed, the pig video is analyzed to obtain the key point information of the pig; Then, the location information of the injection area of ​​the pig is obtained based on the pig body statistics, geometric model and key point information analysis; The specific method for the injection robot to track and identify the motion state of the first pig is: The visual positioning camera is used to collect pictures of pigs and obtain the spatial position information of key points. Then, the key points of the pig hip contour detected in the i-th frame are set as A. i , where the jth key point is A i,j , the detection set in the i-2th frame is A i-2 , filter A i With A i-2 The key points of the same part in the are determined as valid key points and form a set A'; Calculate the spatial geometric distance of the key points of the corresponding parts in A'. For the key point A i,j, Its coordinates are expressed as (x ij ,y ij ,z ij ), when the pig is stationary, the position of the key point in the world coordinate system will not change; for the moving pig, the coordinates of its key point in the world coordinate system will shift according to the movement situation, which will cause the geometric distance d between the key points of the same part at different times to change; Where j belongs to (1,2,…,n), k is the number of valid key points in the A' set, therefore, the average spatial geometric distance is calculated for the k data in the set A'; Determine whether the average spatial geometric distance d between the key points of the pigs between two frames is less than the distance threshold D; if d>D, it is determined that the pigs have moved and are in motion; otherwise, they are in a stationary state.

2. An injection robot, characterized in that: The injection robot comprises: Control device, smart car, six-axis robotic arm, visual environment camera, automatic injection mechanism and visual positioning camera; Among them, the six-axis robotic arm is installed above the chassis of the intelligent vehicle, and the automatic injection mechanism is installed at the end of the six-axis robotic arm; Wherein, the automatic injection mechanism comprises a needle-free syringe, a syringe fixing block, a liquid suction and injection switch, and a second mounting plate, and the needle-free syringe is fixed on the second mounting plate through the syringe fixing block; The method for implementing a vaccine injection based on machine vision by the injection robot includes: The injection robot moves to the first single pen in the pig farm and identifies the posture of the first live pig in the single pen; If the recognition result is a non-standing posture, the injection robot moves to the next single pen in sequence and restarts the recognition of the posture of the second pig in the second single pen; if the recognition result is a standing posture, the key points of the buttocks of the first pig are continuously recognized to locate the injection area; The mechanical arm of the injection robot moves to the injection preparation position, while tracking and identifying the movement state of the first pig; If the first pig moves during the tracking and identification process, the injection robot will move to the next pen in order and start to identify the posture of the second pig in the second pen again; if the first pig is stationary during the tracking and identification process, the injection robot will quickly perform the injection action and record the injection information of the first pig, and then move to the next pen and repeat the above steps in sequence; After the injection robot performs the above operations on the pigs in each single pen in the pig farm in sequence, it performs the above steps again in sequence on the pigs that have not been injected until all the pigs in the pig farm are injected; The method for the injection robot to identify the posture of the first pig is specifically as follows: Collect images of pigs in different lighting conditions and at different ages and manually annotate them; After obtaining the labeled data set, data enhancement is performed on the pig posture data set to increase the capacity of the training data; After obtaining the pig posture data set, the data set is input into the pig posture recognition network for training to obtain the current posture information of the pig; The specific method for the injection robot to locate the injection area is: Collect images and mark different injection sites to determine the location of the pigs and eliminate the interference of environmental factors on pig identification; After obtaining the labeled pig data, the data set is input into the DeepLabCut training network. After the training is completed, the pig video is analyzed to obtain the key point information of the pig; Then, the location information of the injection area of ​​the pig is obtained based on the pig body statistics, geometric model and key point information analysis; The specific method for the injection robot to track and identify the motion state of the first pig is: The visual positioning camera is used to collect pictures of pigs and obtain the spatial position information of key points. Then, the key points of the pig hip contour detected in the i-th frame are set as A. i , where the jth key point is A i,j , the detection set in the i-2th frame is A i-2 , filter A i With A i-2 The key points of the same part in the are determined as valid key points and form a set A'; Calculate the spatial geometric distance of the key points of the corresponding parts in A'. For the key point A i,j , whose coordinates are expressed as (x ij ,y ij ,z ij ), when the pig is stationary, the position of the key point in the world coordinate system will not change; for the moving pig, the coordinates of its key point in the world coordinate system will shift according to the movement situation, which will cause the geometric distance d between the key points of the same part at different times to change; Where j belongs to (1,2,…,n), k is the number of valid key points in the A' set, therefore, the average spatial geometric distance is calculated for the k data in the set A'; Determine whether the average spatial geometric distance d between the key points of the pigs between two frames is less than the distance threshold D; if d>D, it is determined that the pigs have moved and are in motion; otherwise, they are in a stationary state.