Fish vaccine injection system and method based on machine vision and parallel manipulator
Through machine vision identification of the characteristics of the fry and combining the clamping mechanism of the parallel robot, high-precision and efficient automatic injection of the fish vaccine injection system are achieved, and the complex problems of fish posture adjustment and injection position positioning in the existing technology are solved. Injection requirements for different fish species.
Patent Information
- Application Number
- CN202311764507.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-20
- Publication Date
- 2024-11-26
- Estimated Expiration
- 2043-12-20
Smart Images

Figure CN117796950B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of fish breeding, and in particular to a fish vaccine injection system and method based on machine vision and a parallel manipulator. Background Art
[0002] Due to the rapid development of aquaculture, the automation requirements for the entire breeding process are becoming higher and higher. Vaccination is an important means to prevent a variety of fish diseases. Currently, fish vaccination is mainly completed by manual operation, which is very inefficient.
[0003] Foreign countries started research on automatic vaccine injection machines earlier, and have more mature systems and mechanisms, but the equipment is complex in structure and expensive, which is difficult for domestic farmers and enterprises to accept, and is not conducive to its promotion and application in China. At present, my country's research on fish vaccine injection equipment is still in its infancy. Although some people in China have conducted some research on automatic fish vaccine injection equipment and have published relevant patents, there are no mature products related to automatic machine injection, and manual injection of vaccines is still the main method. There are three main methods of injection immunization: pectoral fin injection, abdominal cavity injection and back injection. Regardless of manual or existing machine injection, due to insufficient clamping and positioning accuracy, the easiest back injection method is used.
[0004] The existing research on fish vaccine automatic injection machines based on machine vision has the following shortcomings:
[0005] (1) The traditional clamping and injection mechanism is still used to inject the fry. The machine vision only determines whether the posture of the fish meets the requirements of the clamping mechanism. If it does not meet the requirements, it will be returned to the fish pond, which is inefficient.
[0006] (2) The fish must be adjusted to a specified posture and position before injection can be performed, and the requirements for the fish's posture, size, etc. are very strict. Summary of the invention
[0007] In view of the deficiencies in the prior art, the purpose of the present invention is to provide a fish vaccine injection system and method based on machine vision and parallel manipulators. Before the fish vaccine injection, there is no need to perform complex posture adjustment and injection position positioning on the fish. The head, tail, abdomen, back and outline of the fry are identified by machine vision, and the length and width of the fry are identified based on the outline. The injection position is then located based on the head, tail, length and width of the fry combined with the position of the fry on the injection workbench, and the clamping mechanism is driven by the parallel manipulator to achieve positioning and clamping of the fry, and then the injection needle is pushed by the injection mechanism to perform injection, thereby improving the accuracy of positioning, clamping and injection, improving the degree of automation, and adapting to the injection of fry of various varieties.
[0008] In order to solve the above technical problems, the technical solution adopted by the present invention is:
[0009] Fish vaccine injection system based on machine vision and parallel manipulator, including:
[0010] Injection table for placing fry;
[0011] A camera, arranged on the injection workbench, for photographing the fry and obtaining images of the fry;
[0012] The upper computer establishes a fry recognition model to perform posture recognition on the fry image, and recognizes the contour of the fry based on the fry image, establishes an injection position regression model, and fits the injection position based on the posture and contour of the fry;
[0013] A parallel manipulator is arranged on the injection workbench, and a clamping mechanism and an injection mechanism are arranged at the end thereof, and an injection needle and a pressure sensor are arranged on the clamping mechanism;
[0014] Among them, the parallel manipulator drives the clamping mechanism to move from the original position to the injection position, so that the clamping mechanism clamps the fry. When the value detected by the pressure sensor reaches a preset threshold, the injection needle enters the injection position, and the injection mechanism pushes the injection needle to inject the fry. After the injection is completed, the parallel manipulator drives the clamping mechanism back to the original position.
[0015] Furthermore, it also includes an anesthesia pool, a lifting mechanism, a fry separation mechanism, a separation conveyor belt and a fish recovery pool which are arranged in sequence;
[0016] A lifting mechanism, used for lifting the anesthetized fry to the fry separation mechanism;
[0017] The fish fry separation mechanism is used to separate the fish fry and discharge them into the separation conveyor belt;
[0018] Discrete conveyor belt for transporting fry to the injection station;
[0019] Wherein, the injection workbench is arranged between the discrete conveyor belt and the fish recovery pond, and a separating mechanism is arranged on the injection workbench. When the injection of the fry is completed, the separating mechanism will move the fry to the fish recovery pond.
[0020] Furthermore, the fry discrete mechanism includes a discrete bin, one side of the discrete bin is provided with an inlet facing the lifting mechanism, and the other side is provided with an outlet facing the discrete conveyor belt, the height of the inlet is higher than the outlet, and the discrete bin is provided with a plurality of discrete plates inclined downward and distributed between the inlet and the outlet, and the plurality of discrete plates are staggered from top to bottom.
[0021] Furthermore, the clamping mechanism includes a pressure plate and a clamping driver for driving the pressure plate to descend, an injection hole and an injection plate arranged on one side of the injection hole are arranged on the top of the pressure plate, an injection mechanism is arranged on the injection plate, the injection mechanism includes an injection motor fixed on the injection plate, a lead screw is fixed on the output shaft of the injection motor, a slider is slidably arranged on the lead screw, the injection needle includes a syringe barrel fixed on the injection plate, a needle arranged at the end of the syringe barrel and a plunger arranged in the syringe barrel, the plunger is fixed on the slider, when the value detected by the pressure sensor reaches a preset threshold, the needle enters the injection position, the injection motor drives the lead screw to rotate, and then drives the slider to push the plunger for injection.
[0022] Furthermore, the peeling mechanism includes a peeling rod and a peeling driver for driving the peeling rod to move.
[0023] The method for injecting fish vaccine based on machine vision and parallel manipulator is applied to any of the above-mentioned systems for injecting fish vaccine based on machine vision and parallel manipulator, and the method comprises the following steps:
[0024] The fry transported to the injection workbench is photographed by a camera to obtain images of the fry;
[0025] Establish a fish fry recognition model to identify fish fry images and perform posture recognition on the fish fry;
[0026] Recognize the outline of the fry according to the fry image;
[0027] Establish an injection position regression model to fit the injection point of the fry according to the fry's posture and outline;
[0028] The parallel manipulator controls the clamping mechanism to move to the injection point of the fry;
[0029] The clamping mechanism moves downward to clamp and fix the fry;
[0030] Obtaining the value of the pressure sensor, when the pressure sensor reaches a preset threshold, the injection mechanism pushes the injection needle to inject the injection point;
[0031] After the injection is completed, the injection mechanism drives the injection needle to be pulled out of the fry body, and the parallel manipulator drives the clamping mechanism to move upward to release the clamping of the fry.
[0032] Furthermore, the posture recognition of the fry is the recognition of the head and the tail, and the method for establishing the fry recognition model is:
[0033] Acquire several images of the fry on the injection table;
[0034] Label the fish fry images by posture classification and create a dataset;
[0035] A fish fry recognition model is established based on the YOLOV8 target detection algorithm. Several labeled fish fry images are input, each fish fry image is divided into multiple grids, and a set of bounding boxes and corresponding class probabilities are predicted for each grid.
[0036] The features of each grid are extracted through a convolutional neural network and extracted into different levels;
[0037] Perform feature fusion to combine features from different levels, further process features using convolution operations, and predict the location, category, and confidence of each bounding box;
[0038] Use non-maximum suppression to remove overlapping bounding boxes and filter them based on confidence. The entire process is trained through back-propagation to continuously optimize network parameters to improve detection accuracy.
[0039] After completing the training of the fry recognition model, identify the posture of the fry.
[0040] Further, the method for identifying the outline of the fry is:
[0041] According to the acquired fish fry image, the image binary image is subjected to noise reduction processing, and then edge detection is performed to extract the outline of the fish fry.
[0042] Furthermore, the extracted fry image contour is processed, the outermost rectangular boundary of the contour point set is calculated, and the circumscribed rectangle is obtained. The circumscribed rectangle is then rotated and the corresponding circumscribed rectangle area is calculated. The circumscribed rectangle with the smallest area is obtained by comparison, and the length, width and position of the fry on the injection workbench are obtained through the minimum circumscribed rectangle contour.
[0043] Furthermore, the method for establishing the injection position regression model is:
[0044] Obtain a group of target species fry, measure the length and width of each target species fry, and measure the position coordinates of the proposed injection point relative to the head or tail;
[0045] Different linear regression equations are established according to the different postures classified, and the approximate relationship between the position coordinates of the injection point relative to the head or tail and the length and width of the target species fry is obtained;
[0046] For the acquired fry image, the posture of the fry is identified by the fry recognition model, and the length and width of the fry are obtained according to the outline of the fry, and then substituted into the corresponding linear regression equation to fit the position coordinates of the injection point of the fry in the fry image relative to the head or tail. Then, according to the position of the fry on the injection workbench, the physical coordinates of the injection point in the fry image are obtained, and the physical coordinates are converted into pixel coordinates corresponding to the camera, and the pixel coordinates are used as the position of the injection point of the fry.
[0047] Compared with the prior art, the present invention has the following advantages and beneficial effects:
[0048] The fish vaccine injection system and method based on machine vision and parallel manipulator provided by the present invention do not need to perform complex posture adjustment and injection position positioning on the fish before fish vaccine injection. A fry recognition model is established through machine vision to recognize the posture of the fry, and the contour of the fry is recognized according to the fry image, and an injection position regression model is established. According to the posture and contour of the fry, the injection position is fitted, and the parallel manipulator drives the clamping mechanism to move from the original position to the injection position so that the clamping mechanism clamps the fry. When the value detected by the pressure sensor reaches a preset threshold, the injection needle enters the injection position, and the injection mechanism pushes the injection needle to accurately inject the fry. After the injection is completed, the parallel manipulator drives the clamping mechanism back to the original position. The present invention has high positioning, clamping and injection accuracy for the fry, a high degree of automation, can be used to inject various fry, and has strong adaptability. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The illustrative embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0050] Figure 1 It is the front view of the present invention.
[0051] Figure 2 This is a downward partial view of point A in the main view.
[0052] Figure 3 It is a schematic diagram of the clamping mechanism and the injection mechanism in the present invention.
[0053] Figure 4 It is a control schematic diagram of the present invention.
[0054] Figure 5 The figure is a flow chart of the fish vaccine injection system based on machine vision and parallel manipulator in the present invention.
[0055] Figure 6 It is the overall flow chart of the present invention.
[0056] Among them, 1. Anesthesia pool; 2. Lifting mechanism; 3. Fry discrete mechanism; 31. Discrete bin; 32. Discrete plate; 4. Discrete conveyor belt; 5. Parallel manipulator; 6. Pressure sensor; 7. Injection needle; 71. Syringe barrel; 72. Needle; 73. Plunger; 8. Injection mechanism; 81. Injection motor; 82. Screw; 83. Slider; 9. Clamping mechanism; 91. Press plate; 92. Injection plate; 10. Camera; 11. Injection workbench; 12. Pulling mechanism; 13. Fish pond recovery. DETAILED DESCRIPTION
[0057] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the accompanying drawings in the embodiments of the present invention.
[0058] The present invention provides a fish vaccine injection system based on machine vision and parallel manipulators, such as Figure 1-Figure 6 As shown, it includes an injection workbench 11, a camera 10, a host computer, and a parallel manipulator 5.
[0059] The injection workbench 11 is used to place the fry and then inject the fry.
[0060] The camera 10 is arranged on the injection workbench 11 and is used to photograph the fry and obtain the image of the fry.
[0061] The host computer establishes a fry recognition model to perform posture recognition on the fry image, and recognizes the contour of the fry based on the fry image, establishes an injection position regression model, and fits the injection position according to the posture and contour of the fry.
[0062] The parallel manipulator 5 is arranged on the injection workbench 11 , and a clamping mechanism 9 and an injection mechanism 8 are arranged at the end thereof. The clamping mechanism 9 is provided with an injection needle 7 and a pressure sensor 6 .
[0063] The fish vaccine injection system based on machine vision and parallel manipulator provided by the present invention, during the working process, the parallel manipulator 5 drives the clamping mechanism 9 to move from the original position to the injection position, so that the clamping mechanism 9 clamps the fry, when the value detected by the pressure sensor 6 reaches a preset threshold, the injection needle 7 enters the injection position, and the injection mechanism 8 pushes the injection needle 7 to inject the fry, and after the injection is completed, the parallel manipulator 5 drives the clamping mechanism 9 back to the original position.
[0064] The present invention does not need to perform complicated posture adjustment and injection position positioning on the fish before injecting the fish vaccine. A fry recognition model is established through machine vision to recognize the posture of the fry, and the contour of the fry is recognized according to the fry image, and an injection position regression model is established. According to the posture and contour of the fry, the injection position is fitted, and the clamping mechanism 9 is driven to move by the parallel manipulator 5 to achieve positioning and clamping of the fry, thereby pushing the injection needle 7 to accurately inject the fry. The present invention has high positioning, clamping and injection accuracy for the fry, a high degree of automation, can inject various fry, and has strong adaptability.
[0065] The fish vaccine injection system based on machine vision and parallel manipulator 5 provided by the present invention is as follows: Figure 1 As shown, it also includes an anesthesia pool 1, a lifting mechanism 2, a fry discrete mechanism 3, a discrete conveyor belt 4 and a fish recovery pool 13 which are arranged in sequence;
[0066] A lifting mechanism 2 is used to lift the anesthetized fry to the fry separating mechanism 3;
[0067] The fry dispersing mechanism 3 is used to disperse the fry and then discharge them into the dispersing conveyor belt 4;
[0068] A discrete conveyor belt 4 for conveying the fry to the injection workbench 11;
[0069] The injection workbench 11 is arranged between the discrete conveyor belt 4 and the fish recovery pond 13 , and a separating mechanism 12 is arranged on the injection workbench 11 . When the injection of the fry is completed, the separating mechanism 12 will move the fry to the fish recovery pond 13 .
[0070] The anesthesia pool 1 is used to anesthetize the fry.
[0071] Specifically, the lifting mechanism 2 includes a lifting frame, a plurality of second pulleys rotatably mounted on the conveying frame, and a second belt sleeved on the plurality of second pulleys, wherein one of the second pulleys is driven to rotate by a lifting motor.
[0072] like Figure 1 As shown, the fry discrete mechanism 3 includes a discrete bin 31, one side of the discrete bin 31 is provided with an inlet facing the lifting mechanism 2, and the other side is provided with an outlet facing the discrete conveyor belt 4, the height of the inlet is higher than the outlet, and a plurality of discrete plates 32 inclined downward and distributed between the inlet and the outlet are provided in the discrete bin 31, and the plurality of discrete plates 32 are staggered from top to bottom. After discreteness, it is ensured that each fish does not adhere to each other, and the discrete fry are transported to the injection workbench 11 through the discrete conveyor belt 4, ensuring that only one fry is on the injection workbench 11 at a time.
[0073] The discrete conveyor belt 4 includes a conveyor frame, a plurality of first pulleys rotatably mounted on the conveyor frame, and a first belt sleeved on the plurality of first pulleys, wherein one of the first pulleys is driven to rotate by a conveying motor.
[0074] like Figure 3 As shown, the clamping mechanism 9 includes a pressing plate 91 and a clamping driver for driving the pressing plate to descend. An injection hole 911 and an injection plate 92 are provided on the top of the pressing plate 91 on one side of the injection hole 911. The injection plate 92 is for the injection needle 7 to pass obliquely. An injection mechanism 8 is provided on the injection plate 92. The injection mechanism 8 is a ball screw mechanism. The injection mechanism 8 includes an injection motor 81 fixed on the top of the injection plate 92. A screw 82 is fixed on the output shaft of the injection motor 81. A slider 83 is slidably provided on the screw 82 through a screw nut. The injection needle 7 includes a syringe barrel 71 fixed on the bottom of the injection plate 92, a needle 72 provided at the end of the syringe barrel 71 and a plunger 73 provided in the syringe barrel 71. The plunger 73 is fixed on the slider 83. When the value detected by the pressure sensor 6 reaches a preset threshold value, the needle 72 enters the injection position, and the injection motor 81 drives the screw 82 to rotate, thereby driving the slider 83 to push the plunger 73 for injection, thereby injecting the medicine in the syringe barrel 71 into the body of the fry.
[0075] Specifically, the pressing plate 91 is arc-shaped, and the bottom of the pressing plate 91 is a contoured flexible pad.
[0076] The peeling mechanism 12 includes a peeling rod and a peeling driver for driving the peeling rod to move. The peeling driver drives the peeling rod to move, so that the fry are peeled from the injection workbench 11 to the recovery fish pond 13.
[0077] The fish pond 13 is used to store the fry that have been injected with the vaccine.
[0078] The host computer controls the parallel manipulator 5 to carry the clamping mechanism 9 and the injection mechanism 8 to move above the designated injection point.
[0079] The host computer controls the parallel manipulator 5 to drive the clamping mechanism 9 to move downward, contact the body of the fry and press the fry. When the pressure sensor 6 detects that the pressure reaches a certain value, the injection needle 7 obliquely passes through the injection hole 911 on the pressure plate 91 and enters the body of the fry. The injection mechanism 8 starts to work, pushing the plunger 73 in the syringe to inject the medicine into the body of the fry. The role of the pressure sensor 6 in the clamping mechanism 9 here is to allow the parallel manipulator 5 to obtain a stable electrical signal that the fish has been clamped, thereby stopping the clamping and pressing action and transmitting the signal to execute the injection. Therefore, the pressure sensor 6 does not need to set a specific value. There is no numerical difference between different fish species and individual sizes. Therefore, it is only necessary to set a pressure value that will not damage the injected fish to complete the injection process.
[0080] In the present invention, a counting module is arranged in the upper computer to count the fry injected with the fruit vaccine.
[0081] like Figure 4 As shown, the host computer controls the parallel manipulator controller, camera, pressure sensor, injection mechanism controller, clamping mechanism controller, lifting mechanism controller, and pulling mechanism controller, and then controls the operation of the injection motor, clamping drive, lifting motor, and pulling drive.
[0082] The clamping drive and the pulling drive may be electric push rods.
[0083] In summary, the fry are anesthetized, lifted, and dispersed to ensure that they enter the injection workbench 11 in an orderly discrete state. The orderly discrete state here is that the discrete bin 31 set at the front end of the discrete conveyor belt 4 uses the gravity characteristics of the fry themselves to transform the densely gathered state of the fry when they are salvaged from the anesthesia pool 1 into a state where single fry enter the discrete conveyor belt 4 in sequence.
[0084] The present invention collects image information through machine vision to identify the posture and position of the fry, controls the movement and alignment of the parallel manipulator 5 according to the posture and position, and realizes automatic clamping, automatic injection and automatic counting.
[0085] The present invention also provides a fish vaccine injection method based on machine vision and parallel manipulator, which is applied to the fish vaccine injection system based on machine vision and parallel manipulator 5, such as Figure 5 and Figure 6 As shown, the method comprises the following steps:
[0086] The fry transported to the injection workbench 11 is photographed by the camera 10 to obtain the fry image;
[0087] Establish a fish fry recognition model to identify fish fry images and perform posture recognition on the fish fry;
[0088] Recognize the outline of the fry according to the fry image;
[0089] Establish an injection position regression model to fit the injection point of the fry according to the fry's posture and outline;
[0090] The parallel manipulator 5 controls the clamping structure 9 to move to the injection point of the fry;
[0091] The clamping mechanism 9 moves downward to clamp and fix the fry;
[0092] Obtain the value of the pressure sensor 6. When the pressure sensor 6 reaches a preset threshold, the injection mechanism 8 pushes the injection needle 7 to inject the injection point;
[0093] After the injection is completed, the injection mechanism 8 drives the injection needle 7 to be pulled out from the fry body, and the parallel manipulator 5 drives the clamping mechanism 9 to move upward to release the clamping of the fry.
[0094] In the present invention, the postures of the fry on the injection workbench 11 are different. For example, the fry may lie flat on the injection workbench 11 or lie sideways on the injection workbench 11. Therefore, the posture recognition of the fry is the recognition of the head and tail and the abdomen and back. That is, through these four features, the body position of the fry can be determined and the posture of the fry can be obtained. The method for establishing the fry recognition model is:
[0095] Obtain several images of fry on the injection workbench 11 and create a data set. The data set here should collect images of fry of various body shapes, various postures, and different head and tail directions to improve recognition accuracy;
[0096] Using annotation software to annotate the fry images for posture classification;
[0097] A fish fry recognition model is established based on the YOLOV8 target detection algorithm. Several labeled fish fry images are input, each fish fry image is divided into multiple grids, and a set of bounding boxes and corresponding class probabilities are predicted for each grid.
[0098] The features of each grid are extracted through a convolutional neural network and extracted into different levels;
[0099] Perform feature fusion to combine features from different levels, further process features using convolution operations, and predict the location, category, and confidence of each bounding box;
[0100] Use non-maximum suppression to remove overlapping bounding boxes and filter them based on confidence. The entire process is trained through back-propagation to continuously optimize network parameters to improve detection accuracy.
[0101] After completing the training of the fry recognition model, identify the posture of the fry.
[0102] During the training process of the fry recognition model, the YOLOV8 target detection algorithm uses the BackBone backbone network to extract features, and extracts the object information in the image through the convolutional network for subsequent target detection. The entire process is trained through back propagation, and the network parameters are continuously optimized to improve the detection accuracy. Among them, BCE Loss is used as the classification loss function, and DFL Loss and CIOU Loss are used as regression loss functions to obtain the degree of fit between the real detection box and the model prediction output box, which is used for back propagation optimization model.
[0103] The camera 10 placed on the injection workbench 11 is an industrial area array camera 10. The fry image is acquired by the industrial area array camera 10. The fry image is input into the fry recognition model to identify the head and tail of the fry. The posture of the fry can be determined based on the head and tail of the fry.
[0104] In the present invention, the method for identifying the outline of fry is:
[0105] According to the acquired fish fry image, the image is binarized and then subjected to noise reduction processing, and then edge detection is performed to extract the outline of the fish fry.
[0106] The extracted fry image contour is processed, the outermost rectangular boundary of the contour point set is calculated, and the circumscribed rectangle is obtained. Then the circumscribed rectangle is rotated and the corresponding circumscribed rectangle area is calculated. The circumscribed rectangle with the smallest area is obtained by comparison. The length, width and position of the fry on the injection workbench are obtained through the minimum circumscribed rectangle contour.
[0107] In the present invention, the injection positions are different for different target species of fry, but they all have a certain correlation with the length and width of the target species of fry. According to the posture and outline of the fry, the head, tail, length, width and position of the fry on the injection workbench are obtained, and the position coordinates of the injection point of the fry relative to the head and tail can be fitted.
[0108] Therefore, the method to establish the injection position regression model is:
[0109] A group of target species fry are obtained, the length and width of each target species fry are measured, and the position coordinates of the proposed injection point relative to the head or tail are measured to obtain the measurement results. Each target species fry is measured multiple times, and the average value is taken as the final measurement result.
[0110] Since the fry may have different postures on the injection workbench 11, different linear regression equations are established according to the classified different postures to obtain the approximate relationship between the position coordinates of the injection point relative to the head or tail and the length and width of the target variety of fry. The approximate relationship is x=αL+βW+σ, y=γx+ρ, where L is the length of the fish body, W is the width of the fish body, and α, β, σ, γ and ρ are all fitting parameters;
[0111] For the acquired fry image, the fry's posture is identified by the fry recognition model, and the length and width of the fry are obtained according to the fry's outline, and the fry's posture is identified by the fry recognition model, and the fry's length and width are obtained, and the fry's posture and width are obtained according to the fry's outline, and the fry's posture and width are obtained according to the fry's posture. The fry's posture and width are identified according to the fry's posture and width, and the fry's posture and width are obtained ...
[0112] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.
Claims
1. A fish vaccine injection method based on machine vision and parallel manipulator, characterized in that: The following steps are involved: The fry transported to the injection workbench is photographed by a camera to obtain images of the fry; Establish a fish fry recognition model to identify fish fry images and perform posture recognition on the fish fry, including: Acquire several images of the fry on the injection table; Label the fish fry images by posture classification and create a dataset; A fish fry recognition model was established based on the YOLOV8 target detection algorithm. Several labeled fish fry images were input, each fish fry image was divided into multiple grids, and a set of bounding boxes and corresponding category probabilities were predicted for each grid. The YOLOV8 target detection algorithm specifically includes: feature extraction through the BackBone backbone network, extracting object information in the image through a convolutional network for subsequent target detection. The entire process was trained through back propagation, and network parameters were continuously optimized to improve detection accuracy. Among them, BCE Loss was used as the classification loss function, and DFL Loss and CIOULoss were used as regression loss functions to obtain the degree of fit between the real detection box and the model prediction output box, which was used for back propagation optimization of the model. The features of each grid are extracted through a convolutional neural network and extracted into different levels; Perform feature fusion to combine features from different levels, further process features using convolution operations, and predict the location, category, and confidence of each bounding box; Use non-maximum suppression to remove overlapping bounding boxes and filter them based on confidence. The entire process is trained through back-propagation to continuously optimize network parameters to improve detection accuracy. After the fry recognition model training is completed, the posture of the fry is identified. The posture recognition of the fry is the recognition of the head and tail and the abdomen and back. Through these four features, the body position of the fry can be determined and the posture of the fry can be obtained; Recognize the outline of the fry according to the fry image; Establish an injection position regression model to fit the injection point of the fry according to their posture and outline; The parallel manipulator controls the clamping mechanism to move to the injection point of the fry; The clamping mechanism moves downward to clamp and fix the fry; Obtaining the value of the pressure sensor, when the pressure sensor reaches a preset threshold, the injection mechanism pushes the injection needle to inject the injection point; After the injection is completed, the injection mechanism drives the injection needle to be pulled out of the fry body, and the parallel manipulator drives the clamping mechanism to move upward to release the clamping of the fry.
2. The fish vaccine injection method based on machine vision and parallel manipulator according to claim 1, characterized in that: The method to identify the outline of fry is: According to the acquired fish fry image, the image is binarized and then subjected to noise reduction processing, and then edge detection is performed to extract the outline of the fish fry.
3. The method for fish vaccine injection based on machine vision and parallel manipulator according to claim 2, characterized in that: The extracted fry image contour is processed, the outermost rectangular boundary of the contour point set is calculated, and the circumscribed rectangle is obtained. Then the circumscribed rectangle is rotated and the corresponding circumscribed rectangle area is calculated. The circumscribed rectangle with the smallest area is obtained by comparison. The length, width and position of the fry on the injection workbench are obtained through the minimum circumscribed rectangle contour.
4. The fish vaccine injection method based on machine vision and parallel manipulator according to claim 1, characterized in that: The method to establish the injection location regression model is: Obtain a group of target species fry, measure the length and width of each target species fry, and measure the position coordinates of the proposed injection point relative to the head or tail; Different linear regression equations are established according to the different postures classified, and the approximate relationship between the position coordinates of the injection point relative to the head or tail and the length and width of the target species fry is obtained; For the acquired fry image, the fry posture is identified by the fry recognition model, and the length and width of the fry are obtained according to the outline of the fry, and then the corresponding linear regression equation is used to fit the position coordinates of the injection point of the fry in the fry image relative to the head or tail. Then, according to the position of the fry on the injection workbench, the physical coordinates of the injection point in the fry image are obtained. Mark, convert the physical coordinates into the pixel coordinates corresponding to the camera, and the pixel coordinates are used as the injection point of the fry.
5. A fish vaccine injection system based on machine vision and parallel manipulator, applied to the fish vaccine injection method based on machine vision and parallel manipulator according to any one of claims 1 to 4, characterized in that: include: Injection table for placing fry; A camera, arranged on the injection workbench, for photographing the fry and obtaining images of the fry; The upper computer establishes a fry recognition model to perform posture recognition on the fry image, and recognizes the contour of the fry based on the fry image, establishes an injection position regression model, and fits the injection position based on the posture and contour of the fry; A parallel manipulator is arranged on the injection workbench, and a clamping mechanism and an injection mechanism are arranged at the end thereof, and an injection needle and a pressure sensor are arranged on the clamping mechanism; Among them, the parallel manipulator drives the clamping mechanism to move from the original position to the injection position, so that the clamping mechanism clamps the fry. When the value detected by the pressure sensor reaches a preset threshold, the injection needle enters the injection position, and the injection mechanism pushes the injection needle to inject the fry. After the injection is completed, the parallel manipulator drives the clamping mechanism back to the original position.
6. The fish vaccine injection system based on machine vision and parallel manipulator according to claim 5, characterized in that: It also includes an anesthesia pool, a lifting mechanism, a fry separation mechanism, a separation conveyor belt and a fish recovery pool which are arranged in sequence; A lifting mechanism, used for lifting the anesthetized fry to the fry separation mechanism; The fry dispersing mechanism is used to disperse the fry and discharge them into the dispersing conveyor belt; Discrete conveyor belt for transporting fry to the injection station; Wherein, the injection workbench is arranged between the discrete conveyor belt and the fish recovery pond, and a separating mechanism is arranged on the injection workbench. When the injection of the fry is completed, the separating mechanism will move the fry to the fish recovery pond.
7. The fish vaccine injection system based on machine vision and parallel manipulator according to claim 6, characterized in that: The fry discrete mechanism includes a discrete bin, one side of the discrete bin is provided with an inlet facing the lifting mechanism, and the other side is provided with an outlet facing the discrete conveyor belt, the height of the inlet is higher than the outlet, and a plurality of discrete plates inclined downward and distributed between the inlet and the outlet are provided in the discrete bin, and the plurality of discrete plates are staggered from top to bottom.
8. The fish vaccine injection system based on machine vision and parallel manipulator according to claim 5, characterized in that: The clamping mechanism includes a pressure plate and a clamping driver for driving the pressure plate to descend, an injection hole and an injection plate arranged on one side of the injection hole are arranged on the top of the pressure plate, an injection mechanism is arranged on the injection plate, the injection mechanism includes an injection motor fixed on the injection plate, a lead screw is fixed on the output shaft of the injection motor, a slider is slidably arranged on the lead screw, the injection needle includes a syringe barrel fixed on the injection plate, a needle arranged at the end of the syringe barrel and a plunger arranged in the syringe barrel, the plunger is fixed on the slider, when the value detected by the pressure sensor reaches a preset threshold, the needle enters the injection position, the injection motor drives the lead screw to rotate, and then drives the slider to push the plunger for injection.
9. The fish vaccine injection system based on machine vision and parallel manipulator according to claim 6, characterized in that: The peeling mechanism comprises a peeling rod and a peeling driver for driving the peeling rod to move.
