Method and system for counting dynamic of free-range sheep based on multi-view vision

By employing multi-view vision technology and parallel computing architecture, the problems of low counting accuracy and efficiency in free-range sheep flock counting have been solved, enabling real-time and accurate dynamic counting of sheep flocks in complex environments.

CN120412014BActive Publication Date: 2025-12-30ANHUI AGRICULTURAL UNIVERSITY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510475665.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-04-16
Publication Date
2025-12-30
Estimated Expiration
2045-04-16

AI Technical Summary

Technical Problem

Existing technologies for counting free-range sheep flocks suffer from insufficient counting accuracy, poor environmental adaptability, and low processing efficiency, especially in complex outdoor environments where it is difficult to achieve real-time and accurate dynamic counting of sheep flocks.

Method used

A multi-view vision approach is adopted, which involves installing image acquisition devices at different orientations, heights, and angles, and combining deep learning target detection, multi-target tracking, and biometric recognition technologies to achieve multi-view image acquisition, preprocessing, target detection, tracking, and counting of sheep flocks. A parallel computing architecture is constructed to improve processing efficiency.

Benefits of technology

It enables accurate identification and real-time counting of sheep flocks in complex outdoor environments, improving the accuracy and efficiency of counting. It can adapt to changes in lighting and weather, and provide timely data support.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120412014B_ABST
    Figure CN120412014B_ABST
Patent Text Reader

Abstract

The application discloses a free-range sheep flock dynamic counting method and system based on multi-view vision, which adopts multi-view image acquisition deployment, installs equipment at different directions, heights and angles in the activity area of the sheep flock, and comprehensively covers the activity range. In the image preprocessing stage, operations such as greying, Gaussian filtering and histogram equalization are used to improve the image quality. The sheep flock target detection is accurately detected by means of an improved deep learning model such as YOLOv5 containing a CBAM module. The multi-target tracking correlation is combined with Kalman filtering and the Hungarian algorithm to realize stable tracking of the sheep flock target. The biological feature recognition extracts the features such as sheep faces and compares and identifies individuals with a database. An environmental factor compensation model is constructed to cope with light and weather changes. Parallel computing architecture and optimized data storage and transmission methods are adopted to improve the processing efficiency, so that the free-range sheep flock dynamic counting is accurately and timely realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of sheep counting, and more particularly to a method and system for dynamic counting of free-range sheep based on multi-view vision. Background Technology

[0002] With the rapid development of large-scale free-range sheep farming, accurately measuring sheep flock numbers has become crucial for efficient management. In vast outdoor pastures, sheep roam extensively and exhibit complex behaviors. Traditional methods of manually counting sheep periodically are not only labor-intensive and time-consuming but also prone to errors due to the continuous movement and uneven distribution of the flock. Furthermore, dynamic changes in flock numbers, such as births, disappearances, or deaths, cannot be detected in a timely manner, significantly hindering farmers' planning of feed reserves and assessment of farming efficiency. Therefore, accurate and real-time dynamic counting technology for free-range sheep flocks is urgently needed.

[0003] Existing technologies have significant shortcomings in counting accuracy. Most traditional counting methods rely on single-view monitoring, which is insufficient to comprehensively cover the sheep's activity area, resulting in numerous blind spots and causing some sheep to be missed or counted repeatedly. Furthermore, counting methods based on simple image recognition technology cannot effectively distinguish individual sheep. When sheep are obscured or clustered, counting accuracy drops sharply, failing to meet practical farming needs. In complex and variable outdoor environments, the environmental adaptability of existing technologies is also very limited. Frequent changes in light intensity, from the soft light of early morning to the strong direct sunlight of midday, cause significant fluctuations in the contrast and brightness of the acquired images, blurring sheep features and interfering with the normal operation of the recognition algorithm. In adverse weather conditions, such as raindrops obscuring the view or reduced visibility in foggy weather, existing systems struggle to acquire clear images, severely impacting counting accuracy.

[0004] In terms of efficiency, existing counting systems typically employ a serial processing mode, with each step from image acquisition to data processing performed sequentially. This results in slow processing speeds and an inability to reflect real-time dynamic changes in sheep numbers. Furthermore, data storage and transmission methods lack optimization. The storage of large amounts of image data occupies significant space, and transmission is prone to stuttering and delays, further reducing the overall operating efficiency of the system and failing to provide farmers with timely and effective decision-making support. Summary of the Invention

[0005] In order to overcome the shortcomings and deficiencies of existing technologies, this invention provides a method and system for dynamic counting of free-range sheep flocks based on multi-view vision.

[0006] A method for dynamic counting of free-range sheep flocks based on multi-view vision, comprising:

[0007] Step 1: Deployment of multi-view image acquisition. Install image acquisition devices at different locations, heights, and angles in the activity area of ​​the free-range sheep. The images acquired by each device cover the entire area where the sheep are active and have a certain degree of overlap, so as to obtain multi-view image data of the sheep's activities.

[0008] Step 2: Image preprocessing. The original images acquired from each viewpoint are converted to grayscale to simplify subsequent processing calculations. At the same time, noise reduction is performed by using a Gaussian filtering algorithm to filter the grayscale images and remove noise interference. Then, image enhancement is performed by using a histogram equalization algorithm to expand the grayscale dynamic range of the image and improve the clarity of image details.

[0009] Step 3: Sheep target detection. Based on deep learning target detection algorithm, construct target detection model for sheep flocks. Use a large amount of multi-view image sample data including sheep flocks to train the model so that the model learns the characteristics of sheep flocks. After training, input the preprocessed images from each view into the trained target detection model to detect sheep flock targets in the image and mark the position and contour information of each sheep flock target.

[0010] Step 4: Multi-target tracking and association. For the detected sheep targets, a multi-target tracking model is established using the Hungarian algorithm combined with the Kalman filter algorithm. The Kalman filter algorithm is used to predict the position of the sheep targets in the next frame image. Then, the Hungarian algorithm is used to match and associate the predicted position with the sheep targets detected in the next frame image to determine the correspondence between sheep targets in different frames and to continuously track the sheep targets.

[0011] Step 5: Biometric identification. During the tracking of the sheep flock, the biometric features of individual sheep are extracted, including facial features and horn shape features. A biometric database is constructed, and a feature matching algorithm is used to compare the real-time extracted biometric features with the features in the database to identify the individual identity information of each sheep.

[0012] Step Six: Dynamic Counting and Statistics. Based on the results of multi-target tracking and biometric identification, the sheep flocks of different individuals are counted and statistically analyzed. When a sheep enters or leaves the set counting area, the count result is increased or decreased accordingly. The flock size information is updated in real time, and the dynamic counting results are stored and displayed.

[0013] Further, in step two, the grayscale conversion formula is: grayscale value = 0.299 × red component + 0.587 × green component + 0.114 × blue component; in the Gaussian filtering algorithm, the Gaussian kernel size is set to 5 × 5, and the standard deviation σ is 1.5; in the histogram equalization algorithm, the grayscale histogram of the image is calculated, and the image grayscale value is remapped according to the formula: new grayscale value = round((current grayscale value - minimum grayscale value) × (maximum grayscale value - 0) / (total number of pixels in the image - 1)). During noise reduction, a bilateral filter weight calculation formula is introduced:

[0014]

[0015] Where (i, j) and (k, l) are the coordinates of different pixels in the image, l represents the pixel value, and σ d Let σ be the standard deviation of the spatial domain, set to 2.5. r Let be the standard deviation of the range, set to 0.2.

[0016] Further, in step three, the constructed deep learning object detection model adopts an improved YOLOv5 model. An attention mechanism module CBAM is added to the backbone network of the original model. The module parameters are set as follows: the number of neurons in the fully connected layers of the channel attention part is 1 / 16 of the original number of channels, and the convolutional kernel size of the spatial attention part is 7×7. During model training, the loss function used is: L = Lcls + λ1 × Lbox + λ2 × Lobj, where Lcls is the classification loss using the cross-entropy loss function, Lbox is the bounding box regression loss using the CloU loss function, Lobj is the target confidence loss using the binary cross-entropy loss function, and λ1 and λ2 are weight coefficients, set to 0.5 and 0.3 respectively. During model training, a cosine annealing learning rate adjustment formula is used to adjust the learning rate:

[0017]

[0018] Where, η t For the current training round T c The learning rate of ur, η max and η min Let η be the initial maximum learning rate and the final minimum learning rate. max =0.001, η min =0.00001, T m ax represents the total number of training rounds, set to 300.

[0019] Furthermore, in step four, the Kalman filtering algorithm,

[0020] State transition matrix A = [[1, 0, 1, 0], [0, 1, 0, 1], [0, 0, 1, 0], [0, 0, 0, 1]];

[0021] Observation matrix H = [[1, 0, 0, 0], [0, 1, 0, 0]];

[0022] The process noise covariance matrix Q = [[0.01, 0, 0, 0], [0, 0.01, 0, 0], [0, 0, 0.01, 0], [0, 0, 0, 0.01]].

[0023] The measurement noise covariance matrix R = [[0.1, 0], [0, 0.1]];

[0024] In the matching process, the Hungarian algorithm constructs a cost matrix by calculating the Euclidean distance between the predicted target location and the detected location, according to the formula: d = sqrt((x1-x2)). ∧ 2 + (y1 - y2) ∧ 2) Generation, where (x1, y1) are the predicted position coordinates and (x2, y2) are the detected position coordinates; target tracking stability is introduced to measure the stability of the tracked target, calculated using the following formula:

[0025]

[0026] Where N is the number of frames continuously tracked, d n S is the Euclidean distance between the predicted and detected target positions in the nth frame. The closer the S value is to 1, the more stable the target tracking is.

[0027] Further, in step five, the Local Binary Pattern (LBP) algorithm is used to extract sheep facial features. The image is divided into multiple 32×32 sub-regions, and an LBP feature histogram is calculated within each sub-region. The number of bins in the histogram is set to 59. When constructing the biometric database, a dimensionality reduction algorithm based on Principal Component Analysis (PCA) is used to project high-dimensional biometric vectors into a low-dimensional space. The projection dimension is set to 30. The feature matching algorithm uses Euclidean distance matching, calculating the Euclidean distance between the real-time feature vector and the feature vectors in the database, according to the formula: d = sqrt(sum((xy))). ∧ 2) Matching is performed, where x is the real-time feature vector and y is the feature vector in the database. When constructing the biometric database, to evaluate the discriminative power of the feature vectors, intra-class divergence and inter-class divergence are calculated. The formula for calculating intra-class divergence is:

[0028]

[0029] The formula for calculating inter-class divergence is:

[0030]

[0031] Where C is the number of categories, i.e., the number of individual sheep, and N... i Let X be the number of samples in class i, N be the total number of samples, and X be the number of samples in class i. i Let μ be the set of samples of class i. i Let μ be the mean vector of the i-th class of samples, and μ be the mean vector of all samples.

[0032] Further, in step six, the defined counting area is determined by the coordinates of polygon vertices. When the centroid coordinates of the sheep target satisfy the polygon area determination criteria, the sheep are determined to have entered or left the counting area. The polygon area determination criteria use the ray method, that is, a ray is emitted from the centroid of the target in a certain direction, and the number of intersections between the ray and the polygon boundary is counted. If the number of intersections is odd, the target is within the polygon area; otherwise, it is outside the area. The counting results are stored in a MySQL database. The database table structure includes a sheep count field, a timestamp field, and a counting area identifier field. To optimize database storage performance, when writing sheep count data, a batch insertion optimization formula is used to calculate the batch size.

[0033]

[0034] Where M is the size of the database server memory used for temporary data storage, set to 1024*1024 bytes, and T is the size of a single sheep flock data record, set to 50 bytes.

[0035] Further, in step one, the installation location of the image acquisition device is determined by a three-dimensional coordinate positioning system. This system uses a combination of Global Positioning System (GPS) and Inertial Measurement Unit (IMU). GPS acquires the device's longitude, latitude, and altitude information, while the IMU measures the device's attitude angle information. By fusing the two sets of data, the three-dimensional coordinate position of the image acquisition device in space is accurately calculated. The coordinate calculation model is: [X, Y, Z] = [GPS_X + IMU_Xoffset, GPS_Y + IMU_Yoffset, GPS_Z + IMU_Zoffset], where [X, Y, Z] are the final three-dimensional coordinates, GPS_X, GPS_Y, and GPS_Z are the GPS measurements, and IMU_Xoffset, IMU_Yoffset, and IMU_Zoffset are the calibrated offsets of the IMU measurements. During the GPS and IMU data fusion process, an extended Kalman filter fusion formula is used to update the attitude angle information.

[0036]

[0037] in, This is the updated attitude angle estimate at time k. Let K be the predicted attitude angle value at time k based on the previous time. k For Kalman gain, z k Here, H represents the attitude angle value measured by the IMU, and H is the observation matrix, set as the identity matrix.

[0038] Furthermore, this method employs a parallel computing architecture, distributing image preprocessing, target detection, multi-target tracking and association, biometric recognition, and dynamic counting and statistics steps across multiple computing cores for simultaneous processing. The parallel computing task allocation model utilizes a task queue scheduling algorithm, where task queues are sorted according to task priority. Priority is determined based on task processing time and data dependencies. Task processing time is obtained through historical data statistical analysis, and data dependencies are determined through the data input-output relationships between tasks. To balance the computational resource load during task queue scheduling, a load balancing formula is introduced:

[0039]

[0040] Where n is the number of computing cores, set to 8, W i Let be the current task load of the i-th computing core. This represents the average load of all core computing tasks.

[0041] Furthermore, in step two, during image preprocessing, the Retinex algorithm combined with adaptive histogram equalization (CLAHE) is used to compensate for changes in illumination. In the Retinex algorithm, the standard deviation σ of the Gaussian function is set to 30, and in the CLAHE algorithm, cliplimit is set to 4.0 and tilegridsize is set to 8×8. For weather conditions, a mapping table between weather types and image enhancement parameters is established. When different weather types are detected, the image enhancement parameters are automatically adjusted. For rainy days, the image contrast enhancement parameters are increased; for foggy days, the image dehazing algorithm intensity parameters are increased. To dynamically adjust the gain coefficient in the Retinex algorithm when dealing with changes in illumination, the formula for calculating the rate of change of illumination intensity is used.

[0042]

[0043] Among them, L t The current light intensity value is obtained through a light sensor, L. t-1 The light intensity value at the previous moment is used as the reference value. The gain coefficient of the Retinex algorithm is adjusted according to the value of ΔL. When ΔL is greater than the set threshold, the gain coefficient is increased to adapt to rapid changes in light intensity.

[0044] A dynamic counting system for free-range sheep based on multi-view vision includes the following units:

[0045] The image acquisition unit consists of multiple image acquisition devices installed at different locations in the free-range sheep activity area. It is used to acquire multi-view images of sheep activity and transmit the acquired image data to the image preprocessing unit.

[0046] The image preprocessing unit receives image data transmitted by the image acquisition unit, performs grayscale conversion, noise reduction, and image enhancement preprocessing operations, and outputs the preprocessed image data to the sheep target detection unit.

[0047] The sheep target detection unit, based on a deep learning target detection model, performs sheep target detection on the preprocessed image data, marks the location and contour information of the sheep target, and transmits the detection results to the multi-target tracking association unit.

[0048] The multi-target tracking and association unit uses the Hungarian algorithm combined with the Kalman filter algorithm to track and associate the sheep targets detected by the sheep target detection unit, determine the correspondence between sheep targets in different frames, and transmit the tracking results to the biometric recognition unit.

[0049] The biometric identification unit extracts the biometric features of individual sheep, compares them with the biometric database, identifies the individual identity information of each sheep, and transmits the identification results to the dynamic counting and statistics unit.

[0050] The dynamic counting and statistics unit performs dynamic counting and statistics of the sheep flock based on the results of the multi-target tracking and correlation unit and the biometric recognition unit. It stores and outputs the sheep flock quantity information, and receives external instructions to configure system parameters. The units interact with each other through the data transmission bus.

[0051] Beneficial effects:

[0052] This invention proposes a dynamic counting method and system for free-range sheep based on multi-view vision. Regarding counting accuracy, the multi-view image acquisition deployment ensures comprehensive coverage of the sheep's activity area, reducing blind spots. Combined with advanced target detection and biometric recognition technologies, it can accurately identify the individual sheep, effectively avoiding double counting or omissions and significantly improving counting accuracy. This includes a deep learning target detection model trained on a large number of samples, accurately learning sheep characteristics, and a multi-target tracking algorithm that can stably track targets during complex sheep movements. Strong environmental adaptability is a prominent advantage. Facing complex and changing outdoor environments, including changes in lighting and weather, the system's environmental factor compensation model can automatically adjust image enhancement parameters. When lighting changes, the Retinex algorithm combined with adaptive histogram equalization (CLAHE) provides effective compensation; under different weather conditions, it automatically optimizes processing based on a mapping table between weather type and image enhancement parameters, ensuring clear and usable image data is obtained in various environments, maintaining counting accuracy. In terms of efficiency, a parallel computing architecture is adopted, distributing each processing step to multiple computing cores for simultaneous processing, significantly shortening the overall processing time. The task queue scheduling algorithm allocates tasks rationally based on task priority and optimizes resource allocation by combining load balancing calculations to achieve efficient computation. Meanwhile, in terms of data storage, an optimized batch insertion formula calculates the appropriate write batch size, reducing the number of database write operations and improving storage efficiency. Furthermore, the various units of the system collaborate closely through a data transmission bus, achieving smooth data interaction and ensuring the efficient operation of the entire dynamic counting process, providing timely and accurate data support for free-range sheep flock management. Attached Figure Description

[0053] Figure 1 This is a flowchart of the method steps of the present invention.

[0054] Figure 2 This is a diagram showing the system unit composition of the present invention. Detailed Implementation

[0055] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. The application will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0056] like Figure 1 As shown, a dynamic counting method for free-range sheep based on multi-view vision includes the following steps:

[0057] Step 1: Deployment of multi-view image acquisition. Install multiple image acquisition devices at different locations, heights and angles in the activity area of ​​the free-range sheep flock to ensure that the images acquired by each device can cover the entire area of ​​the sheep flock's activity and that there is a certain degree of overlap between them, so as to obtain multi-view image data of the sheep flock's activities.

[0058] Specifically, to comprehensively capture the dynamics of free-range sheep across a vast area, multiple image acquisition devices need to be cleverly installed at different locations, heights, and angles. For example, in a rectangular pasture of 5,000 square meters, a 3-meter-high high-definition camera can be installed at each of the four corners of the pasture, facing the center and tilted slightly downwards at a 30-degree angle. This allows for clear capture of sheep activity near the pasture's edge. A 5-meter-high panoramic camera can then be installed in the center of the pasture, rotating 360 degrees to cover the central area. The images captured by each device should not only cover the entire pasture but also have a certain degree of overlap, generally between 20% and 30%. Taking two adjacent cameras as an example, the overlapping portion of their images can clearly show the complete process of a sheep flock moving from one camera's field of view to another. This provides continuity for subsequent data integration and analysis, ultimately yielding rich and comprehensive multi-view image data of sheep activity.

[0059] Step 2: Image preprocessing. The original images acquired from each viewpoint are converted to grayscale to simplify subsequent processing calculations. Next, noise reduction is performed by using a Gaussian filtering algorithm to filter the grayscale images, removing noise interference and improving image quality. Finally, image enhancement is performed by using a histogram equalization algorithm to expand the grayscale dynamic range of the image and improve the clarity of image details.

[0060] Specifically, the acquired raw color image data is massive, and some information is not essential for subsequent analysis; therefore, grayscale processing is performed first. Color images contain red, green, and blue color channels, and grayscale processing simplifies this rich color information into a single grayscale value, significantly reducing the computational burden of subsequent processing. For example, using Python's OpenCV library for grayscale conversion can transform a complex color image into an easily processed grayscale image. Next, Gaussian filtering is used for noise reduction. Since image acquisition is easily affected by environmental factors, such as slight camera shake caused by wind or glare from sunlight reflection, this noise can affect image quality. Gaussian filtering, by setting a filter template of about 5×5, applies a weighted average to each pixel and its surrounding pixels. With a standard deviation of 1.5, this effectively removes noise interference, making the image smoother. Finally, histogram equalization is used for image enhancement. In some unevenly lit images, some areas are too bright or too dark, making details difficult to see. Histogram equalization can redistribute image gray values, distributing pixels that were originally concentrated in certain narrow gray ranges evenly to a wider gray range, significantly improving the clarity of image details and making features such as the outline and fur of sheep more clearly distinguishable.

[0061] Step 3: Sheep target detection. Based on deep learning target detection algorithm, construct target detection model for sheep flocks. Use a large amount of multi-view image sample data including sheep flocks to train the model so that the model learns the characteristics of sheep flocks. After training, input the preprocessed images from each view into the trained target detection model to detect sheep flock targets in the image and mark the position and contour information of each sheep flock target.

[0062] Specifically, building an accurate sheep detection model based on deep learning object detection algorithms is a crucial step. An improved YOLOv5 model can be used, incorporating an attention mechanism module called CBAM into its backbone network. In this module, the number of neurons in the fully connected layers of the channel attention part is set to one-sixteenth of the original number of channels, and the convolutional kernel size of the spatial attention part is set to 7×7. This allows the model to focus more on the key features of the sheep. To ensure the model has strong generalization ability, it needs to be trained using massive and diverse multi-view image samples including sheep. These samples should cover images from different seasons, different weather conditions (sunny, cloudy, light rain), different time periods (early morning, noon, evening), and different sheep densities (sparse, medium, dense). During training, a composite loss function consisting of classification loss, bounding box regression loss, and object confidence loss is used to optimize the model parameters. After training, the preprocessed images from various perspectives are input into the model, which can accurately detect sheep in the image and clearly mark the position and outline of each sheep with a rectangle. Even if the sheep are partially occluded or clustered together, it can still be identified relatively accurately.

[0063] Step 4: Multi-target tracking and association. For the detected sheep targets, a multi-target tracking model is established using the Hungarian algorithm combined with the Kalman filter algorithm. The Kalman filter algorithm is used to predict the position of the sheep targets in the next frame image. Then, the Hungarian algorithm is used to match and associate the predicted position with the sheep targets detected in the next frame image to determine the correspondence between sheep targets in different frames and to continuously track the sheep targets.

[0064] Specifically, for detected sheep targets, a multi-target tracking model needs to be established using a combination of the Hungarian algorithm and the Kalman filter algorithm to achieve continuous and stable tracking of the sheep targets. The Kalman filter algorithm predicts the position of the sheep in the next frame image based on the historical movement state of the sheep targets. For example, by analyzing the position, speed, and other information of a sheep in previous frames, it predicts the range of possible positions it may appear in the next frame. Setting relevant parameters, such as the state transition matrix, observation matrix, process noise covariance matrix, and measurement noise covariance matrix, can make the prediction more accurate. The Hungarian algorithm is responsible for matching and associating the position predicted by the Kalman filter with the sheep targets actually detected in the next frame image. It selects the optimal matching pair by calculating the distance between the two, thereby determining the correspondence of sheep targets between different frames. For example, when the sheep are continuously moving in the pasture, the model can accurately determine that a sheep in the current frame is the same sheep located at a specific position in the previous frame, without confusing the target due to the complex movement of the sheep, thus achieving continuous and stable tracking of each sheep.

[0065] Step 5: Biometric identification. During the tracking of the sheep flock, the biometric features of individual sheep are extracted, such as facial features and horn shape features. A biometric database is constructed, and a feature matching algorithm is used to compare the real-time extracted biometric features with the features in the database to identify the individual identity information of each sheep.

[0066] Specifically, in tracking sheep flocks, unique biometric features of each sheep are extracted to identify their identity. Taking facial features as an example, a local binary model algorithm is used to divide the sheep's facial image into numerous 32×32 sub-regions. Within each sub-region, a feature histogram containing 59 intervals is generated. These histograms effectively describe the texture and other features of the sheep's face. When constructing the biometric database, considering the high dimensionality and large storage and computational costs of the original biometric data, a principal component analysis algorithm is used to project high-dimensional feature vectors into a low-dimensional space, for example, setting the projection dimension to 30 dimensions. Then, a feature matching algorithm is used, such as calculating the distance between the real-time extracted biometric vectors and existing feature vectors in the database. When the distance is less than a pre-set reasonable threshold, the individual sheep's identity information can be accurately identified. This is analogous to finding the corresponding "identity page" of a sheep in a "large dictionary" containing numerous sheep identity information by comparing features.

[0067] Step Six: Dynamic Counting and Statistics. Based on the results of multi-target tracking and biometric identification, the sheep flocks of different individuals are counted and statistically analyzed. When a sheep enters or leaves the set counting area, the count result is increased or decreased accordingly. The flock size information is updated in real time, and the dynamic counting results are stored and displayed.

[0068] Specifically, based on the results of multi-target tracking and biometric identification, precise counting and statistics of sheep flocks of different individuals are performed. First, a clear counting area must be defined in the pasture image, for example, by defining a polygonal region. This region can be set according to the actual management needs of the pasture, such as a specific area near the sheepfold or an area frequently used as a gathering point for sheep. When a sheep's center of gravity moves from outside the counting area into the area, the counting system automatically increments the flock count by 1; conversely, when the center of gravity moves from outside the area, the count is decremented by 1. To determine whether a sheep's center of gravity is within the counting area, a ray method is used. A virtual ray is emitted from the sheep's center of gravity in a certain direction, and the number of intersections between the ray and the polygon boundary is counted. An odd number of intersections indicates that the sheep is within the area, and an even number indicates that it is outside the area. The system updates the flock count information in real time and stores these dynamic counting results in a database such as MySQL. The database table structure includes fields such as flock count, record time, and counting area identifier for convenient subsequent querying and analysis. At the same time, the latest sheep numbers are displayed to the farmers through screens or mobile apps, allowing them to keep track of the sheep numbers at any time.

[0069] Preferably, in the image preprocessing step two, the grayscale conversion formula is: grayscale value = 0.299 × red component + 0.587 × green component + 0.114 × blue component; in the Gaussian filtering algorithm, the Gaussian kernel size is set to 5 × 5, and the standard deviation σ is 1.5; in the histogram equalization algorithm, the grayscale histogram of the image is calculated, and the grayscale value of the image is remapped according to the formula: new grayscale value = round((current grayscale value - minimum grayscale value) × (maximum grayscale value - 0) / (total number of pixels in the image - 1)). In the noise reduction process, to further optimize the noise removal effect, a bilateral filtering weight calculation formula is introduced:

[0070]

[0071] Where (i, j) and (k, l) are the coordinates of different pixels in the image, l represents the pixel value, and σ d Let σ be the standard deviation of the spatial domain, set to 2.5. r Let be the standard deviation of the range, set to 0.2.

[0072] Preferably, in step three, sheep flock target detection, the constructed deep learning target detection model adopts an improved YOLOv5 model. An attention mechanism module CBAM is added to the backbone network of the original model. The module parameters are set as follows: the number of neurons in the fully connected layer of the channel attention part is 1 / 16 of the original number of channels, and the convolutional kernel size of the spatial attention part is 7×7. During model training, the loss function used is: L = Lcls + λ1 × Lbox + λ2 × Lobj, where Lcls is the classification loss using the cross-entropy loss function, Lbox is the bounding box regression loss using the CloU loss function, Lobj is the target confidence loss using the binary cross-entropy loss function, and λ1 and λ2 are weight coefficients, set to 0.5 and 0.3 respectively. During model training, a cosine annealing learning rate adjustment formula is used to adjust the learning rate.

[0073]

[0074] Where, η t For the current training round T c The learning rate of ur, η max and η min Let η be the initial maximum learning rate and the final minimum learning rate. max =0.001, η min =0.00001, T m ax represents the total number of training rounds, set to 300.

[0075] Preferably, in the multi-target tracking association step four, the Kalman filter algorithm has the following state transition matrix A = [[1,0,1,0], [0,1,0,1], [0,0,1,0], [0,0,0,1]], observation matrix H = [[1,0,0,0], [0,1,0,0]], process noise covariance matrix Q = [[0.01,0,0,0], [0,0.01,0,0], [0,0,0,01,0], [0,0,0,0.01]], and measurement noise covariance matrix R = [[0.1,0], [0,0.1]]. In the matching process, the Hungarian algorithm constructs a cost matrix by calculating the Euclidean distance between the predicted target position and the detection position, according to the formula: d = sqrt((x1-x2)). ∧ 2 + (y1 - y2) ∧ 2) Generation, where (x1, y1) are the predicted position coordinates and (x2, y2) are the detected position coordinates; to measure the stability of the tracked target, a formula for calculating target tracking stability is introduced:

[0076]

[0077] Where N is the number of frames continuously tracked, d nS is the Euclidean distance between the predicted and detected target positions in the nth frame. The closer the S value is to 1, the more stable the target tracking is.

[0078] Preferably, in step five, biometric identification, the Local Binary Pattern (LBP) algorithm is used to extract sheep facial features. The image is divided into multiple 32×32 sub-regions, and an LBP feature histogram is calculated within each sub-region. The number of bins in the histogram is set to 59. When constructing the biometric database, a dimensionality reduction algorithm based on Principal Component Analysis (PCA) is used to project high-dimensional biometric vectors into a low-dimensional space. The projection dimension is set to 30. The feature matching algorithm uses Euclidean distance matching, calculating the Euclidean distance between the real-time feature vector and the feature vectors in the database, according to the formula: d = sqrt(sum((xy))). ∧ 2) Matching is performed, where x is the real-time feature vector and y is the feature vector in the database. When constructing the biometric database, to evaluate the discriminative power of the feature vectors, intra-class divergence and inter-class divergence are calculated. The formula for calculating intra-class divergence is:

[0079]

[0080] The formula for calculating inter-class divergence is:

[0081]

[0082] Where C is the number of categories (i.e., the number of individual sheep), N i Let X be the number of samples in class i, N be the total number of samples, and X be the number of samples in class i. i Let μ be the set of samples of class i. i Let S be the mean vector of the i-th class of samples, and μ be the mean vector of all samples. Ideally, we hope that S... w Smallest and S b Make it as large as possible to improve feature discrimination.

[0083] Preferably, in the dynamic counting statistics of step six, the defined counting area is defined by the coordinates of the vertices of a polygon. When the centroid coordinates of the sheep target meet the polygon area determination criteria, the sheep are determined to have entered or left the counting area. The polygon area determination criteria use the ray method, that is, a ray is emitted from the centroid of the target in a certain direction, and the number of intersections between the ray and the polygon boundary is counted. If the number of intersections is odd, the target is within the polygon area; otherwise, it is outside the area. The counting results are stored in a MySQL database. The database table structure includes a sheep number field, a timestamp field, and a counting area identifier field. To optimize database storage performance, when writing sheep number data, a batch insertion optimization formula is used to calculate the batch size.

[0084]

[0085] Where M is the size of the database server memory available for temporary data storage (in bytes), set to 1024*1024 bytes, and T is the size of a single sheep flock data record (in bytes), set to 50 bytes. The appropriate batch size B is calculated using this formula to reduce the number of database write operations and improve storage efficiency.

[0086] Preferably, in the multi-view image acquisition deployment step, the installation position of the image acquisition device is determined by a three-dimensional coordinate positioning system. This system uses a Global Positioning System (GPS) combined with an Inertial Measurement Unit (IMU). GPS acquires the device's longitude, latitude, and altitude information, while the IMU measures the device's attitude angle information. By fusing the two sets of data, the three-dimensional coordinate position of the image acquisition device in space is accurately calculated. The coordinate calculation model is: [X, Y, Z] = [GPS_X + IMU_Xoffset, GPS_Y + IMU_Yoffset, GPS_Z + IMU_Zoffset], where [X, Y, Z] are the final three-dimensional coordinates, GPS_X, GPS_Y, and GPS_Z are the GPS measurements, and IMU_Xoffset, IMU_Yoffset, and IMU_Zoffset are the calibrated offsets of the IMU measurements. During the GPS and IMU data fusion process, to improve fusion accuracy, an extended Kalman filter fusion formula is used to update the attitude angle information.

[0087]

[0088] in, This is the updated attitude angle estimate at time k. Let K be the predicted attitude angle value at time k based on the previous time. k For Kalman gain, z k Here, H represents the attitude angle value measured by the IMU, and H is the observation matrix, set as the identity matrix.

[0089] Preferably, to improve processing efficiency throughout the entire method flow, a parallel computing architecture is adopted, distributing steps such as image preprocessing, target detection, multi-target tracking and association, biometric recognition, and dynamic counting statistics to multiple computing cores for simultaneous processing. The parallel computing task allocation model employs a task queue scheduling algorithm, where task queues are sorted according to task priority. Priority is determined based on task processing time and data dependencies. Task processing time is obtained through historical data statistical analysis, and data dependencies are determined through the data input-output relationships between tasks. During task queue scheduling, a load balancing formula is introduced to balance the computational resource load:

[0090]

[0091] Where n is the number of computing cores, set to 8, W i This represents the current task load of the i-th computing core (calculated using task processing time). The average load of all core computing tasks is used to adjust task allocation so that the L value is as small as possible to achieve better load balancing.

[0092] Preferably, to address the impact of complex environmental factors on counting accuracy, such as changes in illumination and weather conditions, an environmental factor compensation model is constructed. In the image preprocessing stage, for illumination changes, the Retinex algorithm combined with adaptive histogram equalization (CLAHE) is used for compensation. In the Retinex algorithm, the standard deviation σ of the Gaussian function is set to 30, and in the CLAHE algorithm, cliplimit is set to 4.0 and tilegridsize is set to 8×8. For weather conditions, a mapping table between weather types and image enhancement parameters is established. When different weather types are detected, the image enhancement parameters are automatically adjusted; for example, in rainy weather, the image contrast enhancement parameter is increased, and in foggy weather, the image dehazing algorithm intensity parameter is increased. To dynamically adjust the gain coefficient in the Retinex algorithm when dealing with illumination changes, the formula for calculating the rate of change of illumination intensity is used.

[0093]

[0094] Among them, L t The current light intensity value is obtained through a light sensor, L. t-1 The light intensity value at the previous moment is used as the ΔL value. The Retinex algorithm gain coefficient is adjusted according to the value of ΔL. When ΔL is greater than the set threshold (set to 0.1), the gain coefficient is increased to better adapt to rapid changes in light intensity.

[0095] like Figure 2 As shown, a dynamic counting system for free-range sheep based on multi-view vision includes the following units:

[0096] The image acquisition unit consists of multiple image acquisition devices installed at different locations in the free-range sheep activity area. It is used to acquire multi-view images of sheep activity and transmit the acquired image data to the image preprocessing unit.

[0097] The image preprocessing unit receives image data transmitted by the image acquisition unit, performs preprocessing operations such as grayscale conversion, noise reduction, and image enhancement, and outputs the preprocessed image data to the sheep target detection unit.

[0098] The sheep target detection unit, based on a deep learning target detection model, performs sheep target detection on the preprocessed image data, marks the location and contour information of the sheep target, and transmits the detection results to the multi-target tracking association unit.

[0099] The multi-target tracking and association unit uses the Hungarian algorithm combined with the Kalman filter algorithm to track and associate the sheep targets detected by the sheep target detection unit, determine the correspondence between sheep targets in different frames, and transmit the tracking results to the biometric recognition unit.

[0100] The biometric identification unit extracts the biometric features of individual sheep, compares them with the biometric database, identifies the individual identity information of each sheep, and transmits the identification results to the dynamic counting and statistics unit.

[0101] The dynamic counting and statistics unit performs dynamic counting and statistics of the sheep flock based on the results of the multi-target tracking and correlation unit and the biometric recognition unit. It stores and displays the flock size information and can receive external commands to configure system parameters. All units interact via a data transmission bus to ensure the overall operation of the system.

[0102] Existing techniques for counting free-range sheep rely heavily on single-view monitoring, resulting in numerous blind spots and difficulty in comprehensively capturing sheep activity, significantly reducing counting accuracy. In contrast, multi-view vision-based methods and systems, by installing multiple image acquisition devices at different locations, heights, and angles within the sheep's activity area, not only comprehensively cover the sheep's movement range but also utilize a 20%-30% image overlap area to ensure data integrity and continuity, greatly improving counting accuracy. For example, in large pastures, multi-view devices can monitor sheep without blind spots, avoiding missed or double countings caused by obstructions or uneven distribution.

[0103] In complex outdoor environments, existing technologies often fail due to changes in lighting and weather. Significant fluctuations in light intensity can cause abnormal image contrast and brightness, while severe weather conditions such as rain and fog further interfere with image quality, leading to errors in recognition algorithms. In contrast, the new system constructs an environmental factor compensation model. For changes in lighting, it uses the Retinex algorithm combined with adaptive histogram equalization (CLAHE) to automatically adjust image enhancement parameters. Based on a mapping table between weather type and image enhancement parameters, it accurately optimizes images under different weather conditions, maintaining stable counting accuracy and ensuring normal operation in various complex environments.

[0104] Existing counting systems mostly employ a serial processing mode, proceeding sequentially from image acquisition to data processing. This results in slow processing speeds and unoptimized data storage and transmission, leading to frequent buffering and latency, and an inability to reflect sheep flock dynamics in real time. The multi-view vision-based system utilizes a parallel computing architecture, with each processing step performed synchronously. It leverages task queue scheduling algorithms to rationally allocate tasks and combines load balancing calculations to optimize resource utilization, significantly improving processing efficiency. Simultaneously, it optimizes data storage and transmission methods, such as calculating appropriate write batch sizes through batch insertion optimization formulas to reduce database writes, achieving efficient storage and rapid transmission, and providing farmers with timely and accurate dynamic information on sheep flock numbers.

[0105] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various equivalent changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.

Claims

1. A multi-view vision-based dynamic counting method for free-ranging sheep, characterized in that, The method comprises the following steps: Step 1: Multi-view image acquisition deployment, image acquisition devices are installed at different positions, heights and angles in the free-range sheep activity area, so that the images collected by each device cover the entire area of the sheep activity and there is a certain overlapping area among them, and multi-view image data of the sheep activity is obtained; Step 2: image preprocessing, the original images collected from each view are subjected to grayscale processing, and the color images are converted into grayscale images to simplify the subsequent processing and calculation; at the same time, noise reduction processing is performed, and a Gaussian filtering algorithm is used to filter the grayscale images to remove noise interference in the images; Then, image enhancement processing is performed, and a histogram equalization algorithm is used to expand the grayscale dynamic range of the image and improve the clarity of the image detail features; Step 3: sheep target detection, based on a deep learning target detection algorithm, a sheep target detection model is constructed, and the model is trained using multi-view image sample data of the sheep, so that the model learns the features of the sheep; after the training is completed, the preprocessed images of each view are input into the trained target detection model, the sheep targets in the images are detected, and the position and contour information of each sheep target are marked; Step 4: multi-target tracking correlation, the detected sheep targets are subjected to a Hungarian algorithm combined with a Kalman filter algorithm to establish a multi-target tracking model, the Kalman filter algorithm is used to predict the position of the sheep targets in the next frame of image, and then the Hungarian algorithm is used to match and correlate the predicted position with the detected sheep targets in the next frame of image, so as to determine the corresponding relationship between the sheep targets in different frames and continuously track the sheep targets; Step 5: biological feature recognition, in the process of tracking the sheep targets, the biological features of the sheep individuals are extracted, including the face features and horn shape features of the sheep, a biological feature database is constructed, and a feature matching algorithm is used to compare the real-time extracted biological features with the features in the database to identify the individual identity information of each sheep; Step 6: dynamic counting and statistics, according to the multi-target tracking correlation and biological feature recognition results, the sheep of different individuals are counted and statistically analyzed, when a sheep enters or leaves the set counting area, the counting result is correspondingly increased or decreased, the sheep quantity information is updated in real time, and the dynamic counting result is stored and outputted.

2. The multi-view vision-based dynamic counting method of free-ranging sheep flocks according to claim 1, characterized in that, In the step 2, the conversion formula used in the grayscale processing is: gray value = 0.299*red component + 0.587*green component + 0.114*blue component; in the Gaussian filtering algorithm, the size of the Gaussian kernel is set to 5*5, and the standard deviation σ is 1.5; in the histogram equalization algorithm, the gray histogram of the image is calculated, the image is remapped according to the formula: new gray value = round((current gray value-minimum gray value)*(maximum gray value-0) / (total number of image pixels-1)), and in the noise reduction processing, the bilateral filtering weight calculation formula is introduced: where (i, j) and (k, l) are the coordinates of different pixel points in the image, I represents the pixel value, σ d is the spatial domain standard deviation, which is set to 2.5, σ r is the value domain standard deviation, which is set to 0.

2.

3. The multi-view vision-based flocking sheep dynamic counting method according to claim 1, characterized in that, The third step, the constructed deep learning target detection model adopts an improved YOLOv5 model, an attention mechanism module CBAM is added to the backbone network part of the original model, the module parameter setting is that the number of neurons of the full connection layer in the channel attention part is 1 / 16 of the original channel number, and the spatial attention part convolution kernel size is 7*7; during model training, the loss function used is: L=Lcls+λ1*Lbox+λ2*Lobj, wherein Lcls is a classification loss, a cross-entropy loss function is used, Lbox is a bounding box regression loss, a CloU loss function is used, Lobj is a target confidence loss, a binary cross-entropy loss function is used, λ1 and λ2 are weight coefficients, and are set to 0.5 and 0.3 respectively; in the model training process, in order to adjust the learning rate, the cosine annealing learning rate adjustment formula is used: wherein η t is the learning rate for the current training epoch T c max and η min are the initial maximum learning rate and the final minimum learning rate, respectively, with η max = 0.001 and η min = 0.00001, and T m axis the total number of training epochs, which is set to 300.​ 4. The multi-view vision-based dynamic counting method of free-range sheep flocks according to claim 1, characterized in that, The fourth step, in the Kalman filtering algorithm, The state transition matrix A = [[1, 0, 1, 0], [0, 1, 0, 1], [0, 0, 1, 0], [0, 0, 0, 1]]; The observation matrix H = [[1, 0, 0, 0], [0, 1, 0, 0]]; The process noise covariance matrix Q = [[0.01, 0, 0, 0], [0, 0.01, 0, 0], [0, 0, 0.01, 0], [0, 0, 0, 0.01]], The measurement noise covariance matrix R = [[0.1, 0], [0, 0.1]]; In the matching process, the cost matrix is constructed by calculating the Euclidean distance between the target predicted position and the detected position according to the formula: d = sqrt((x1-x2) ∧ 2+(y1-y2) ∧ 2), wherein (x1, y1) is the predicted position coordinate and (x2, y2) is the detected position coordinate; the target tracking stability is introduced to measure the stability of the tracked target, and the calculation formula is: where N is the number of consecutive tracking frames, d n is the Euclidean distance between the predicted position and the detected position of the target in the nth frame. The closer the S value is to 1, the more stable the target tracking is.

5. The multi-view vision-based dynamic counting method of free-range sheep flocks according to claim 1, characterized in that, The step five, the local binary pattern LBP algorithm is used to extract the sheep face features, the image is divided into multiple 32*32 sub-regions, the LBP feature histogram is calculated in each sub-region, the number of bins of the histogram is set to 59; when the biometric feature database is constructed, the dimension reduction algorithm based on principal component analysis PCA is used, the high-dimensional biometric feature vector is projected to a low-dimensional space, the projection dimension is set to 30, the Euclidean distance matching algorithm is used for the feature matching algorithm, the Euclidean distance between the real-time feature vector and the feature vector in the database is calculated, and the matching is performed according to the formula: d=sqrt(sum((x-y ∧ 2)) wherein x is the real-time feature vector, and y is the feature vector in the database; when the biometric feature database is constructed, the within-class scatter and between-class scatter are calculated to evaluate the distinguishability of the feature vector, and the within-class scatter calculation formula is: The inter-class dispersion calculation formula is: Where C is the number of categories, i.e., the number of individuals of sheep, N i is the number of samples of the i-th category, and N is the total number of samples, X i is the i-th sample set, μ i is the mean vector of the i-th sample, and μ is the mean vector of all samples.

6. The multi-view vision-based dynamic counting method of free-range sheep flocks according to claim 1, characterized in that, The sixth step, the set counting area is defined by polygon vertex coordinates, when the centroid position coordinates of the sheep group meet the polygon area judgment condition, it is judged that the sheep group enters or leaves the counting area, the polygon area judgment condition adopts the ray method, that is, a ray is emitted from the centroid position of the target to a certain direction, the number of intersection points of the ray and the polygon boundary is counted, if the number of intersection points is odd, the target is in the polygon area, otherwise it is outside the area; the counting result storage adopts MySQL database, the database table structure design includes a sheep group number field, a timestamp field and a counting area identification field, in order to optimize the database storage performance, when writing the sheep group number data, the batch insertion optimization formula is used to calculate the batch size: Wherein, M is the size of the database server memory used for temporarily storing data, and is set to 1024*1024 bytes, T is the size of a single sheep group number data record, and is set to 50 bytes.

7. The multi-view vision-based flocking sheep dynamic counting method according to claim 1, wherein, The installation position of the image acquisition device is determined by a three-dimensional coordinate positioning system, the coordinate positioning system adopts a global positioning system (GPS) combined with an inertial measurement unit (IMU), the GPS is used to obtain longitude, latitude and altitude information of the device, the IMU is used to measure attitude angle information of the device, and the three-dimensional coordinate position of the image acquisition device in space is accurately calculated by fusing the data of the two, the coordinate calculation model is: [X, Y, Z] = [GPS_X + IMU_Xoffset, GPS_Y + IMU_Yoffset, GPS_Z + IMU_Zoffset], wherein [X, Y, Z] is the final three-dimensional coordinate, GPS_X, GPS_Y and GPS_Z are GPS measurement values, and IMU_Xoffset, IMU_Yoffset and IMU_Zoffset are offset values of IMU measurement values after calibration; in the GPS and IMU data fusion process, an extended Kalman filter fusion formula is used to update the attitude angle information: wherein, is the updated kth instant attitude angle estimate, is the kth instant predicted attitude angle value based on the previous instant, K k is the Kalman gain, z k is the IMU measured attitude angle value, H is the observation matrix, set as the identity matrix.

8. The multi-view vision-based flocking sheep dynamic counting method according to claim 1, wherein, The method adopts a parallel computing architecture, and image preprocessing, target detection, multi-target tracking association, biological feature recognition and dynamic counting and statistics steps are distributed to multiple computing cores for simultaneous processing. A task queue scheduling algorithm is used in the parallel computing task distribution model. The task queue is sorted according to the task priority, and the priority is determined according to the task processing time and the data dependency relationship. The task processing time is obtained through historical data statistical analysis, and the data dependency relationship is determined according to the data input and output relationship between tasks. When scheduling the task queue, a load balancing degree calculation formula is introduced to balance the computing resource load: where n is the number of computing cores, set to 8, W i is the current task load of the i-th computing core, is the average of all computing core task loads.

9. The multi-view vision-based dynamic counting method of free-range sheep flocks according to claim 1, characterized in that, In the image preprocessing, the Retinex algorithm combined with the adaptive histogram equalization (CLAHE) is used to compensate for the illumination change. In the Retinex algorithm, the standard deviation σ of the Gaussian function is set to 30, and in the CLAHE algorithm, the cliplimit is set to 4.0 and the tilegridsize is set to 8x8. A mapping table of weather types and image enhancement parameters is established, and when different weather types are detected, the image enhancement parameters are automatically adjusted. When it is raining, the contrast enhancement parameter of the image is increased, and when it is foggy, the strength parameter of the image defogging algorithm is increased. When dealing with illumination changes, the gain coefficient in the Retinex algorithm is dynamically adjusted by using an illumination intensity change rate calculation formula. Wherein, L t is the light intensity value of the current moment, obtained by a light sensor, L t-1 is the light intensity value of the previous moment, the Retinex algorithm gain coefficient is adjusted according to the size of the ΔL value, and the gain coefficient is increased when the ΔL is greater than a set threshold, so as to adapt to rapid changes in light.

10. A multi-view vision-based dynamic counting system for free-ranging sheep, characterized in that, The method comprises the following units: The image acquisition unit is composed of multiple image acquisition devices installed at different positions in the free-range sheep activity area, and is used for acquiring multi-view sheep activity image data and transmitting the acquired image data to the image preprocessing unit. The image preprocessing unit receives the image data transmitted by the image acquisition unit, performs grayscale, noise reduction and image enhancement preprocessing operations, and outputs the preprocessed image data to the sheep target detection unit. The sheep target detection unit detects the sheep target in the preprocessed image data based on a deep learning target detection model, marks the position and contour information of the sheep target, and transmits the detection result to the multi-target tracking association unit. The multi-target tracking association unit tracks and associates the sheep target detected by the sheep target detection unit by using the Hungarian algorithm combined with the Kalman filter algorithm, determines the corresponding relationship of the sheep target between different frames, and transmits the tracking result to the biological feature recognition unit. The biological feature recognition unit extracts the biological features of the sheep individuals, compares them with the biological feature database, recognizes the individual identity information of each sheep, and transmits the recognition result to the dynamic counting and statistical unit. The dynamic counting and statistical unit dynamically counts and counts the sheep according to the results of the multi-target tracking association unit and the biological feature recognition unit, stores and outputs the sheep number information, and receives external instructions to configure the parameters of the system. Data transmission bus is used for data interaction between units.

Citation Information

Patent Citations

  • The invention discloses an aqueduct pedestrian motion tracking detection system and a detection method thereof

    CN109840489A

  • Method for identifying and tracking behaviors of health-preserving pigs in group

    CN115223191A