Jersey cattle body condition scoring method and system based on tail root area segmentation

Through the improved YOLOv11 model and measurement channel combined with industrial cameras, the image acquisition and processing of the root region of Juanshan oxtail was solved, and the efficient and accurate body condition score without contact and stress was achieved.

CN120451714APending Publication Date: 2025-08-08SHANDONG AGRICULTURAL UNIVERSITY +1

Patent Information

Application Number
CN202510865833.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-26
Publication Date
2025-08-08

AI Technical Summary

Technical Problem

Traditional cow body condition scores mainly rely on manual scoring, which are subjective and inefficient, and cannot achieve rapid measurement of large-scale dairy herds, affecting milk volume production.

Method used

The body condition scoring method based on the segmentation of the tail root area was adopted, and the image segmentation and scoring was used to perform image segmentation and scoring, and the measurement channel and industrial camera were combined for automated acquisition and processing to achieve contactless body condition scoring.

Benefits of technology

It achieves efficient and accurate scoring of Juanshan Niu's physical condition, reduces the intensity and potential danger of manual labor, improves the scoring efficiency, and avoids the subjectivity of manual scoring.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120451714A_ABST
    Figure CN120451714A_ABST
Patent Text Reader

Abstract

The invention discloses a Jersey cattle body condition scoring method and system based on tail root area segmentation, and relates to the technical field of livestock breeding intellectualization. Comprising the following steps: acquiring a color image at an oxtail root; segmenting the color graph to construct a data set; a YOLOv11 model is improved, the model is lightened, and the instance segmentation precision of the model is improved; training the improved YOLOv11 model by using the data set, and evaluating and optimizing the trained model; segmenting a color image of a tail root area of the cattle based on the trained YOLOv11 model, wherein the segmented area comprises the recession degrees of the jirizi of the cattle and the tail root gully area of the cattle; and the trained YOLOv11 model is used to classify the detected oxtail root area, and body condition scoring is carried out according to the dairy cow body condition scoring index. According to the method, the high-efficiency and accurate Jersey cattle body condition scoring is realized, the scoring efficiency is remarkably improved, and the subjectivity of manual scoring is avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of intelligent animal husbandry technology, and in particular to a body condition scoring method and system for Jersey cattle based on segmentation of the tail root area. Background Art

[0002] Jersey is one of the ancient dairy cow breeds. In the breeding process of Jersey, tethering must not be used, because this will cause the Jersey to decline due to lack of exercise and increase the risk of infection. The breeding of Jersey is challenging. The traditional body condition scoring of dairy cows is mainly manual scoring, which is highly subjective and inefficient. It cannot achieve rapid measurement of large-scale dairy cow herds, and the measurement time is too long, which can easily affect the milk production of Jersey. In response to the above problems, there is an urgent need in the existing technology for a Jersey body condition scoring system that can achieve non-contact and stress-free. Under the premise of ensuring the personal safety of staff, efficient and accurate Jersey body condition scoring can be achieved, which significantly improves the scoring efficiency and avoids the subjectivity of manual scoring. Summary of the Invention

[0003] In order to solve the above technical problems, the present invention provides a Jersey cattle body condition scoring method and system based on segmentation of the tail root area, so as to achieve efficient and accurate Jersey cattle body condition scoring, significantly improve the scoring efficiency, and avoid the subjectivity of manual scoring.

[0004] The present invention is implemented by adopting the following technical solution: a body condition scoring method for Jersey cattle based on segmentation of the tail root area, comprising the following steps: S1: Collect color images of the base of the cow’s tail; S2: construct a data set for color graphics segmentation processing; S3: Improve the YOLOv11 model, make it lightweight and improve the accuracy of instance segmentation; S4: Use the dataset to train the improved YOLOv11 model, and evaluate and optimize the trained model; S5: Segment the color image of the cow's tail root area based on the trained YOLOv11 model. The segmented area includes the cow's buttocks and the degree of depression in the tail root groove area. S6: Use the trained YOLOv11 model to classify the detected cow tail root area and perform body condition scoring according to the cow body condition scoring index.

[0005] Furthermore, the improvement method of the YOLOv11 model in step S1 is: replace the original Transformer single framework of YOLOv11 with the Mamba+Transformer hybrid framework, and use the MobileNetV4 network as the lightweight backbone network of the YOLOv11 model.

[0006] Furthermore, the MambaVision module in the Mamba+Transformer hybrid framework combines Mamba and Transformer, adopting a unique hierarchical architecture as its theoretical approach. It is divided into four stages. The first two stages use CNN-based layers to quickly extract features under high-resolution input. The CNN block follows a specific residual block formula. The last two stages integrate Mamba and Transformer modules. The image input is converted into overlapping patches and projected into the embedding space. The 3×3 CNN layer with batch normalization is used between each stage to downsample the image to reduce the resolution. In terms of micro-architecture, the Mamba module is redesigned, and a general multi-head self-attention mechanism is adopted to improve the performance of the model in visual tasks.

[0007] Furthermore, step S5 specifically includes the following steps: S5.1: Input the acquired color image into the trained YOLOv11 model for forward propagation calculation. The model will generate a set of output tensors containing the score prediction results based on the gully area of the cowtail root according to the feature map of the color image. The intersection-over-union (IoU) loss function of the bounding box is , IoU is the interaction ratio, b, b gt is the center coordinate of the predicted bounding box and the true bounding box, ρ 2 is the Euclidean distance, c w 、c h The width and height of the smallest rectangular box that encloses the two bounding boxes; EIoU separates the influencing factors of the aspect ratio of the predicted box and the true box based on the penalty term of CIoU, and calculates the length and width of the predicted box and the true box respectively to solve the problem of CIoU; EIoU consists of three parts: IoU loss, distance loss, and height loss.

[0008] S5.2: The model predicts the root of the cow's tail within the filtered bounding box. The mask interaction ratio is , The pixel-level interaction ratio of the segmentation mask measures the degree of overlap between the predicted mask and the true mask. If Mask IoU ≥ threshold, it is considered a correct segmentation.

[0009] The present invention also provides a Jersey cattle body condition scoring system based on segmentation of the tail root area, comprising: Measuring channel, used to control the position and number of cows entering it, allowing only one cow to pass through at a time; An industrial camera is installed on the measurement channel to collect color images of the cow's tail root; Switch, used to connect industrial cameras to workstations; A workstation is used to process color images to obtain the degree of gully depression at the base of the cow's tail and to score it.

[0010] Furthermore, the measuring channel includes a frame body, on which are installed, from left to right, a first photoelectric switch, a first interception gate, a second photoelectric switch, a second interception gate, a third photoelectric switch, a fourth photoelectric switch, a third interception gate, a fifth photoelectric switch, a fourth interception gate and a sixth photoelectric switch. The first interception gate, the second interception gate, the third interception gate and the fourth interception gate are respectively connected to the servo motor through a reducer, and divide the interior of the frame body into a first passage area, a measurement area and a second passage area. The first photoelectric switch, the servo motor, the second photoelectric switch, the third photoelectric switch, the fourth photoelectric switch, the fifth photoelectric switch and the sixth photoelectric switch are electrically connected to the motion controller.

[0011] Furthermore, the measurement area is 205 cm long and 95 cm wide.

[0012] Furthermore, the industrial camera is 230 cm vertically away from the ground and takes photos in a top-down state at an angle of 45° to the horizontal plane.

[0013] Compared with the prior art, the present invention has the following beneficial effects: 1. This invention uses a measurement channel combined with a depth camera to collect and process color images of the Jersey cattle's tail base, achieving fully automated, contactless body condition scoring of Jersey cattle. 2. The present invention can realize intelligent body condition scoring of Jersey cattle, and can score the body condition of the Jersey cattle according to the degree of depression at the base of the tail and record the scoring results; 3. The present invention can achieve accurate scoring of Jersey cattle's body condition while greatly reducing manual labor intensity and avoiding the subjectivity and potential dangers of manual scoring, while also reducing the difficulty of raising Jersey cattle. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] Figure 1 The present invention is a workflow diagram of a Jersey cattle body condition scoring method based on segmentation of the tail root area.

[0015] Figure 2 This is a simplified diagram of the network structure of a Jersey cattle tail root area segmentation model for a Jersey cattle body condition scoring method based on segmenting the tail root area of the present invention.

[0016] Figure 3A schematic diagram of the MambaVision network structure of a Jersey cattle body condition scoring method based on segmentation of the tail root area of the present invention; Figure 4 This is a simplified structural diagram of the measurement channels in the Jersey cattle body condition scoring system based on segmentation of the tail root area according to the present invention.

[0017] In the figure: 1. First photoelectric switch; 2. Servo motor; 3. Reducer; 4. Second photoelectric switch; 5. Workstation; 6. Third photoelectric switch; 7. Fourth photoelectric switch; 8. Fifth photoelectric switch; 9. Sixth photoelectric switch; 10. Fourth interception gate; 11. Second access area; 12. Third interception gate; 13. Measuring area; 14. Industrial camera; 15. Second interception gate; 16. First access area; 17. First interception gate. DETAILED DESCRIPTION

[0018] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings in the examples of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.

[0019] The present invention uses Jersey cows as the research and testing objects. It addresses the problems that traditional manual scoring methods for the body condition of dairy cows are highly subjective and inefficient, cannot achieve rapid measurement of large-scale dairy cow herds, and the measurement time is too long, which easily affects the milk production of Jersey cows. This invention realizes efficient and accurate body condition scoring of Jersey cows, significantly improves scoring efficiency, and avoids the subjectivity of manual scoring.

[0020] like Figures 1 to 3 As shown, a body condition scoring method for Jersey cattle based on segmentation of the tail root area according to an embodiment of the present invention includes the following steps: S1: Collect color images of the base of Jersey bovine tail; Specifically, a measurement channel is combined with an industrial camera to capture color images of the base of the Jersey cow's tail. The measurement channel controls the position and number of Jersey cows entering it, allowing only one cow to pass through at a time. The industrial camera captures color images of the base of the Jersey cow's tail within the measurement channel. S2: Use LabelImg to segment color images and construct a dataset; S3: Improve the YOLOv11 model, make it lightweight and improve the accuracy of instance segmentation; Specifically, the improvement method of the YOLOv11 model is to replace the original Transformer single framework of YOLOv11 with the Mamba+Transformer hybrid framework, and use the MobileNetV4 network as the lightweight backbone network of the YOLOv11 model; MambaVision (a hybrid architecture for vision) within the Mamba+Transformer hybrid framework combines Mamba and Transformer, employing a unique layered architecture as its theoretical approach. It consists of four stages. The first two stages leverage CNN layers to rapidly extract features from high-resolution inputs. The CNN blocks follow a specific residual block formula. The last two stages integrate Mamba and Transformer modules, converting image inputs into overlapping patches and projecting them into an embedding space. Between stages, 3×3 CNN layers with batch normalization are used for downsampling to reduce resolution. The microarchitecture utilizes a redesigned Mamba module and a general multi-head self-attention mechanism to improve the model's performance in vision tasks. S4: Use the dataset to train the improved YOLOv11 model, and evaluate and optimize the trained model; S5: Segment the color image of the Jersey cow's tail base area based on the trained YOLOv11 model. The segmented area includes the Jersey cow's buttocks and the degree of concavity of the tail base groove area. Specifically, step S5 includes the following steps: S5.1: Input the acquired color image into the trained YOLOv11 model for forward propagation calculation. The model will generate a set of output tensors containing the score prediction results based on the gully area of the cowtail root according to the feature map of the color image. The intersection-over-union (IoU) loss function of the bounding box is , IoU is the interaction ratio, b, b gt is the center coordinate of the predicted bounding box and the true bounding box, ρ 2 is the Euclidean distance, c w 、c h The width and height of the smallest rectangular box that encloses the two bounding boxes; EIoU separates the influencing factors of the aspect ratio of the predicted box and the true box based on the penalty term of CIoU, and calculates the length and width of the predicted box and the true box respectively to solve the problem of CIoU; EIoU consists of three parts: IoU loss, distance loss, and height loss; S5.2: The model predicts the base of the Jersey bovine tail within the selected bounding box. The mask interaction ratio is , The pixel-level interaction ratio of the segmentation mask measures the degree of overlap between the predicted mask and the true mask. If Mask IoU ≥ threshold, it is considered a correct segmentation; S6: Use the trained YOLOv11 model to classify the detected cow tail root area and perform body condition scoring according to the cow body condition scoring index; The cow body condition scoring index in step S6 is shown in Table 1 below; Table 1 Partial criteria for body condition scoring of dairy cows: , The body condition of the cows corresponding to some of the scores is described in detail as follows: 2.0 (slightly thin): The intercostal grooves are visible, and the depressions between the last few ribs are obvious and visible to the naked eye. The outlines of the individual ribs can be clearly felt by palpation. The ischial tuberosities are angular and prominent, with sharp tuberosities, little surrounding tissue, and deep depressions. The coxal tuberosities are sharp and prominent. There is a significant depression between the lumbar angle and the ischial tuberosities, forming a "V"-shaped deep depression. 2.5 points (slightly thin - close to ideal): There are no intercostal grooves, the intercostal spaces are filled with tissue, the depressions disappear, and obvious grooves are not easily seen with the naked eye; there are edges and corners and they are slightly protruding. The ischial tuberosity is still discernible with sharp edges, but the protrusion is reduced and the pit is slightly shallower; the hip tuberosity is angular, the protrusion is slightly reduced, but the edges are still sharp; there is a clear depression between the lumbar angle and the ischial tuberosity, forming a "V"-shaped deep pit.

[0021] 3.0 points (ideal): No intercostal grooves, and ribs can only be vaguely felt with firm pressure; the ischial tuberosity is visible, palpable but with rounded edges, no longer sharp, and the pit is shallow or nearly flat; the coxal tuberosity is rounded, palpable but with smooth tops and edges; there is a distinct depression between the lumbar angle and the ischial tuberosity, forming a deep "V"-shaped pit; 3.5 points (close to ideal - slightly overweight): The ischial tuberosity is visible but requires firm pressure to feel. The tuberosity is covered by fat, the edges and corners disappear, and the area is flat. The coccyx tuberosity is visible but the outline is blurred and requires firm pressure to feel. The coccygeal ligament is not visible and is covered by fat, making it difficult to clearly feel. The sense of tension disappears. The sacral ligament is visible, and fat begins to accumulate on both sides of the spine. The hip joint is uneven, and a bulge can still be felt in the greater trochanter area, but the outline tends to be smooth due to fat coverage. The dorsal ligament is visible, the lumbar spinous process is not palpable, and a groove appears on the spinal line. Fat is deposited on both sides of the spine to form grooves. The depression between the lumbar angle and the ischial tuberosity becomes shallow and flat, forming a wide and shallow "U" shape. 4.0 (slightly obese): The ischial tuberosity is visible, but its outline is blurred. The tuberosity is covered by fat, the edges and corners disappear, and the area is flat. The hip tuberosity is visible, but the fat coverage increases, and the bone sense is weakened. The coccygeal ligament is not visible, and the spinal line forms a distinct groove. The ligament and bone are covered by fat. The hip joint is uneven, and a bulge can still be felt in the greater trochanter area, but the outline is smoothed due to fat coverage. The dorsal ligament is visible, and fat is deposited on both sides of the spine to form grooves. The depression between the lumbar angle and the ischial tuberosity is slightly raised, forming a wide and shallow "U" shape. 5.0 points (obesity): The ischial tuberosity is not visible, the tuberosity is completely buried in the fat pad and cannot be touched; the coccyx tuberosity is not visible, it is completely covered by fat, and the area is raised; the coccygeal ligament is not visible, it is completely buried in fat, and only soft tissue can be felt on palpation; the sacral ligament is not visible, the deep groove is obvious, and fat accumulates on both sides like hills; the hip joint is flat, the greater trochanter is completely buried in fat, the hip and thigh lines are integrated, and the palpation is soft and without bulges; the deep grooves on both sides of the dorsal ligament are obvious, and the bone cannot be touched at all; there is a clear bulge between the lumbar angle and the ischial tuberosity, which is a wide and shallow "U" shape.

[0022] It should be further explained that the improved YOLOv11 model consists of an input and preprocessing module, a backbone network (Backbone) - MobileNetV4, a feature enhancement module (Neck) - Mamba+Transformer, a prediction head (Head) - YOLOv11 Detect+DFL and a post-processing module (Post-process).

[0023] The improved YOLOv11 model works as follows: The first step is image enhancement. Through Mosaic splicing, MixUp blending, HSV perturbation and random geometric transformation, the target diversity, robustness and adaptability to target deformation are improved. Then, through Resize+Padding, the original image is scaled proportionally to the model input size, keeping the ratio unchanged. Then, through Normalize, the pixel values are normalized to [0, 1] or standardized (mean / std). Finally, it is converted to Tensor to transform the image from (H, W, C) → (C, H, W) and add the batch dimension → (B, C, H, W).

[0024] The image is fed into the MobileNetV4 backbone network, where it is scaled as needed and the number of channels is initialized to the standard RGB 3 channels. A Conv3×3 convolutional layer (stride=2) is used for fast downsampling and preliminary feature extraction. The goal of this stage is to reduce resolution while increasing the number of channels. The backbone network consists of multiple consecutive Universal Inverted Bottleneck Blocks (UIBBlocks), an adaptive building block for efficient network design with the flexibility to use various optimization objectives. Two optional depthwise convolutions (DWs) are introduced in the inverted bottleneck block: one before the expansion layer and the other between the expansion and projection layers. Although this modification is quite simple, the new module nicely unifies several important existing blocks, including the original IB block, the ConvNext block, and the FFN block in ViT. Furthermore, a new variant of UIB, the ExtraDW IB (ExtraDW) block, is introduced. UIB provides flexibility at each network stage to temporarily trade off between spatial and channel mixing, allowing for the expansion of the receptive field as needed while maximizing computational efficiency.

[0025] In the post-processing stage, the convolutional layer Conv2D is fine-tuned for channel expansion, preparing to enter the attention stage while also adjusting the computational density to adapt to subsequent modules; then it passes through Mobile Multi-Query Attention (MQA), one of the key innovations of MobileNetV4, which processes high-level semantic attention modules.

[0026] Mobile MQA is a lightweight attention mechanism that simplifies the multi-head attention structure of traditional MHSA, reduces reliance on memory bandwidth, and is optimized for mobile acceleration. It consists of multiple query heads and a single shared key and value head: , Among them, SR represents space reduction; W Q j Indicates the independent query weight of each head; W K 、W V Indicates the shared Key and Value weights.

[0027] The processed image is input into the replaced Mamba + Transformer feature enhancement module. Most of the self-attention layers in the traditional Transformer architecture are replaced with Mamba layers to achieve more efficient inference speed and lower memory consumption, while retaining the global modeling capabilities of the Transformer layers. Throughout the network, the majority of layers are Mamba blocks, with a smaller number being Transformer blocks. These layers are alternately connected with FFN layers and all incorporate residuals and normalization. Mamba blocks are used in the early and middle stages to enhance efficiency, while Transformers are introduced later to strengthen global modeling. When image information enters a Mamba block, the gate function gate(x) controls the information flow at each location. Local modeling is then performed through a 1D convolution (Conv), and finally a Scan operation performs recursive state propagation. Mamba blocks do not require an attention matrix or cache, enabling them to simulate state evolution in continuous time. They have linear time complexity and are highly efficient for processing very long sequences.

[0028] When image information enters the Transformer Block, Multi-Head Self-Attention (MHSA) + FFN is used to perform self-attention on each feature map, strengthening the modeling of global context and enhancing the global modeling capabilities of the spatial dimension. Although this model retains a very small number of original attention layers, they are evenly inserted throughout the model to compensate for the local limitations of Mamba. The Transformer consists of two main modules: Encoder and Decoder, each of which is composed of multiple stacked sub-layers, including Multi-Head Self-Attention (MHSA), Feed-Forward Network (FNN), and Residual Connection + LayerNorm. The core of the Transformer's basic attention mechanism is: , Among them, Q (Query) represents the query vector; K (Key) represents the key vector; V (Value) represents the value vector; d k Indicates the dimension of the key.

[0029] In the (Mamba+Transformer)+M4 model, the Mamba+Transformer hybrid framework replaces the original Transformer framework of YOLOv11, and the MobileNetV4 network is used as the lightweight backbone network of the YOLOv11 model, which reduces computational complexity. The use of structural reparameterization (RepConv) and sparse activation mechanisms (e.g., Swish2) optimizes model processing speed and enhances the model's ability to extract coordinate information of the Jersey oxtail root region. ECA does not perform channel compression, which avoids information loss and enables the model to more completely extract information about the Jersey oxtail root region.

[0030] like Figure 4 As shown, another embodiment of the present invention provides a body condition scoring system for Jersey cattle based on segmentation of the tail root area, comprising: Measuring channel, used to control the position and number of cows entering it, allowing only one cow to pass through at a time; An industrial camera 14 is provided on the measuring channel and is used to collect a color image of the oxtail root; A switch for connecting the industrial camera 14 to the workstation 5; Workstation 5 is used to process the color image to obtain the degree of gully depression at the base of the cow's tail and score it.

[0031] Among them, the measurement channel includes a frame body, on which the first photoelectric switch 1, the first interception gate 17, the second photoelectric switch 4, the second interception gate 15, the third photoelectric switch 6, the fourth photoelectric switch 7, the third interception gate 12, the fifth photoelectric switch 8, the fourth interception gate 10 and the sixth photoelectric switch 9 are installed from left to right. The first interception gate 17, the second interception gate 15, the third interception gate 12, and the fourth interception gate 10 are respectively connected to the servo motor 2 through the reducer 3, and divide the interior of the frame into a first passage area 16, a measuring area 13 and a second passage area 11. The first photoelectric switch 1, the servo motor 2, the second photoelectric switch 4, the third photoelectric switch 6, the fourth photoelectric switch 7, the fifth photoelectric switch 8, and the sixth photoelectric switch 9 are electrically connected to the motion controller.

[0032] Specifically, the measurement channel is assembled from a circular tube with an outer diameter of 50 mm and a wall thickness of 3.5 mm. The measurement area 13 is 205 cm long and 95 cm wide. The industrial camera 14 is an Azure Kinect DK depth camera, which is 230 cm vertically from the ground and shoots at a 45° angle to the horizontal plane in a top-down state.

[0033] Taking the first interception gate 17 as the starting entry direction, before starting work, all interception gates in the measurement channel are in a closed state and the industrial cameras 14 are in a non-working state; the position of the cow is obtained according to the photoelectric switch sensor, and the motion controller controls the servo motor 2 according to the position of the cow's body to complete the opening and closing of each interception gate to ensure that there is only one cow in the measurement area 13.

[0034] The working process of the system described in this embodiment includes the following specific steps: 1. When the first photoelectric switch 1 sensor detects that the cow has reached the extension area of the first passage area 16, the first interception gate 17 and the second interception gate 15 are opened simultaneously to allow the single cow to quickly pass through the first passage area 16 and enter the measurement area 13; 2. When the second photoelectric switch 4 detects that the cow has completely entered the first passage area 16, the first interception gate 17 is closed to prevent the cows behind from entering; 3. When the third photoelectric switch 6 and the fourth photoelectric switch 7 detect that the cow has completely entered the measuring area 13, the second intercepting door 15 is closed; 4. When the cow enters the measurement area 13, the industrial camera 14 located above and behind the cow starts working and takes a picture of the cow's tail root from a bird's-eye view. 5. After collecting 10 color images, stop taking pictures and then open the third interception gate 12 and the fourth interception gate 10 to allow the cows to quickly pass through the second passage area 11 and leave the measurement channel; 6. When the fifth photoelectric switch 8 and the sixth photoelectric switch 9 detect that the cow has completely left the measurement channel, the third interception gate 12 and the fourth interception gate 10 are closed, the first interception gate 17 and the second interception gate 15 are opened, and a cow is allowed to enter; 7. Repeat steps 1-6 above.

[0035] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art will be able to modify the technical solutions described in the aforementioned embodiments or replace some of the technical features therein with equivalents. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention shall be included within the scope of protection of the present invention.

Claims

1. A body condition scoring method for Jersey cattle based on segmentation of the tail root area, characterized in that: The following steps are involved: S1: Collect color images of the base of the cow’s tail; S2: Segmentation of color graphics to construct a data set; S3: Improve the YOLOv11 model, make it lightweight and improve the accuracy of instance segmentation; S4: Use the dataset to train the improved YOLOv11 model, and evaluate and optimize the trained model; S5: Segment the color image of the cow's tail root area based on the trained YOLOv11 model. The segmented area includes the cow's buttocks and the degree of depression in the tail root groove area. S6: Use the trained YOLOv11 model to classify the detected cow tail root area and perform body condition scoring according to the cow body condition scoring index.

2. The method for scoring body condition of Jersey cattle based on segmentation of the tail root area according to claim 1, characterized in that: The improvement method of the YOLOv11 model in step S1 is: replace the original Transformer single framework of YOLOv11 with the Mamba+Transformer hybrid framework, and use the MobileNetV4 network as the lightweight backbone network of the YOLOv11 model.

3. The method for scoring body condition of Jersey cattle based on segmentation of the tail root area according to claim 2, characterized in that: The MambaVision module in the Mamba+Transformer hybrid framework combines Mamba and Transformer, using a unique hierarchical architecture as its theoretical approach. It is divided into four stages. The first two stages use CNN-based layers to quickly extract features under high-resolution input. The CNN blocks follow a specific residual block formula. The last two stages integrate Mamba and Transformer modules. The image input is converted into overlapping patches and projected into the embedding space. Between each stage, a batch normalized 3×3 CNN layer is used for downsampling to reduce the resolution. In terms of micro-architecture, the Mamba module is redesigned, and a general multi-head self-attention mechanism is adopted to improve the model's performance in visual tasks.

4. The method for scoring body condition of Jersey cattle based on segmentation of the tail root area according to claim 1, characterized in that: Step S5 specifically includes the following steps: S5.1: Input the acquired color image into the trained YOLOv11 model for forward propagation calculation. The model will generate a set of output tensors containing the score prediction results based on the gully area of the cowtail root according to the feature map of the color image. The intersection-over-union (IoU) loss function of the bounding box is , IoU is the interaction ratio, b, b gt is the center coordinate of the predicted bounding box and the true bounding box, ρ 2 is the Euclidean distance, c w 、c h The width and height of the smallest rectangular box that encloses the two bounding boxes; EIoU separates the influencing factors of the aspect ratio of the predicted box and the true box based on the penalty term of CIoU, and calculates the length and width of the predicted box and the true box respectively to solve the problem of CIoU; EIoU consists of three parts: IoU loss, distance loss, and height loss; S5.2: The model predicts the root of the cow's tail within the filtered bounding box. The mask interaction ratio is , The pixel-level interaction ratio of the segmentation mask measures the degree of overlap between the predicted mask and the true mask. If Mask IoU ≥ threshold, it is considered a correct segmentation.

5. A body condition scoring system for Jersey cattle based on segmentation of the tail root area, characterized in that: include: Measuring channel, used to control the position and number of cows entering it, allowing only one cow to pass through at a time; An industrial camera (14) is provided on the measuring channel and is used to collect a color image of the oxtail root; A switch for connecting an industrial camera (14) to a workstation (5); The workstation (5) is used to process the color image to obtain the degree of depression of the gully at the root of the cow's tail and to score it.

6. The Jersey cattle body condition scoring system based on segmented tail root area according to claim 5, characterized in that: The measuring channel comprises a frame, on which a first photoelectric switch (1), a first intercepting door (17), a second photoelectric switch (4), a second intercepting door (15), a third photoelectric switch (6), a fourth photoelectric switch (7), a third intercepting door (12), a fifth photoelectric switch (8), a fourth intercepting door (10) and a sixth photoelectric switch (9) are sequentially mounted from left to right. The first intercepting door (17), the second intercepting door (15), the third intercepting door (12) and the fourth intercepting door (10) are respectively connected to the servo motor (2) via a reducer (3), and the interior of the frame is divided into a first passage area (16), a measuring area (13) and a second passage area (11). The first photoelectric switch (1), the servo motor (2), the second photoelectric switch (4), the third photoelectric switch (6), the fourth photoelectric switch (7), the fifth photoelectric switch (8) and the sixth photoelectric switch (9) are electrically connected to a motion controller.

7. The Jersey cattle body condition scoring system based on segmented tail root area according to claim 6, characterized in that: The measuring area (13) is 205 cm long and 95 cm wide.

8. The herbaceous mulberry harvester according to claim 7, characterized in that: The industrial camera (14) is 230 cm vertically away from the ground and is angled at 45° with the horizontal plane to shoot in a top-down state.

Citation Information

Patent Citations

  • Dairy cow body condition scoring method and system, electronic equipment and medium

    CN115841680A

  • Dairy cow body condition scoring method based on improved YOLOv7 model

    CN118196837A

  • Infrared ship identification method based on lightweight YOLOv8

    CN119007136A

  • High-resolution remote sensing image change detection method based on multi-scale convolution decoding, electronic equipment and storage medium

    CN119418216A

  • Embryo development quality evaluation method based on SMMC network

    CN119992235A

Cited By

  • Device and method for sensing crop growth environment and detecting chlorophyll content based on map fusion

    CN120801223A