Chicken exercise amount determination method and device, storage medium and electronic equipment

The chicken video frames are processed through federated learning and multi-objective tracking algorithms, and the chicken movement volume is accurately calculated, which solves the problems of low efficiency and poor accuracy of manual observation in traditional breeding, and improves the scientificity and accuracy of breeding data.

CN119648746AActive Publication Date: 2025-03-18CHINA AGRI UNIV +2
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411907867.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-23
Publication Date
2025-03-18
Estimated Expiration
2044-12-23

AI Technical Summary

Technical Problem

In traditional broiler breeding, manual observation is used to determine the exercise volume of breeders, which is inefficient and difficult to achieve the ideal level of data repetition and accuracy, which affects the efficiency and accuracy of breeding work.

Method used

Using federated learning method, by obtaining target chicken video frames, using pre-trained target recognition model for identification, combining the preset multi-objective tracking algorithm to process the recognition results, determine the motion trajectory of each chicken, and calculate the motion amount based on the motion trajectory.

Benefits of technology

It realizes efficient and accurate measurement of chicken exercise, reduces subjective deviations in manual measurement, does not affect the normal growth and development of chickens, and improves the scientificity and accuracy of breeding data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119648746A_ABST
    Figure CN119648746A_ABST
Patent Text Reader

Abstract

The invention provides a chicken exercise amount determination method and apparatus, a storage medium and an electronic device. The method comprises the steps of obtaining a target chicken video frame; the target chicken video frame is a current to-be-identified video frame in the chicken video; identifying the target chicken video frame by using a pre-trained target identification model to obtain an identification result of the target chicken video frame, the identification result comprising at least one piece of chicken image region information; processing the identification result of the target chicken video frame by using a preset multi-target tracking algorithm to obtain a multi-target tracking result of the target chicken video frame; the multi-target tracking result at least comprises the motion trail of each chicken in the target chicken video frame; and according to the motion trail of each chicken in the target chicken video frame, determining the motion amount of each chicken. By applying the method provided by the embodiment of the invention, the exercise amount of the chicken can be efficiently and accurately measured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a method, device, storage medium and electronic device for determining the amount of exercise of chickens. Background Art

[0002] With the continuous growth and consumption upgrade of China's chicken consumption market, consumers' requirements for chicken quality are constantly increasing. Although the traditional large-scale production model has ensured the market supply in the past, it has gradually failed to meet the needs of consumers in the new era for higher quality and diversified chicken products. In order to adapt to this changing trend, accelerating the development of breeder chicken breeding and cultivating high-quality broiler breeds that can meet market demand has become the core task of the industry's development.

[0003] In current broiler breeding practices, the determination of phenotypic traits mostly relies on manual observation. This method not only significantly increases the workload, but also, due to the influence of human factors, makes it difficult for the repeatability and accuracy of the collected data to reach the ideal level. Especially when evaluating the key indicator of the amount of exercise of breeder chickens, traditional observation methods often rely on the experience of observers and use simple tools such as stopwatches and tape measures for estimation. This method is inefficient and can easily cause unnecessary pressure on breeder chickens due to direct intervention, affecting their normal growth and development, making the final observation results lack objectivity and scientific basis. This situation not only limits the efficiency and accuracy of breeding work, but also hinders the research and development of high-quality broiler breeds, and indirectly weakens the market's supply capacity for high-quality chicken products. Summary of the invention

[0004] The technical problem to be solved by this application is to provide a method, device, storage medium and electronic device for determining the amount of exercise of chickens, which can efficiently and accurately measure the amount of exercise of chickens. The specific scheme is as follows:

[0005] A method for determining the amount of exercise of chickens, applied to the first participant of federated learning, includes:

[0006] Obtain a target chicken video frame; the target chicken video frame is a video frame to be currently identified in the chicken video;

[0007] Using a pre-trained target recognition model to recognize the target chicken video frame, and obtaining a recognition result of the target chicken video frame, wherein the recognition result includes at least one chicken image region information;

[0008] The recognition result of the target chicken video frame is processed by using a preset multi-target tracking algorithm to obtain a multi-target tracking result of the target chicken video frame; the multi-target tracking result at least includes the motion trajectory of each chicken in the target chicken video frame;

[0009] The movement amount of each chicken is determined according to the movement trajectory of each chicken in the target chicken video frame.

[0010] The above method, optionally, uses a preset multi-target tracking algorithm to process the recognition result of the target chicken video frame to obtain the multi-target tracking result of the target chicken video frame, including:

[0011] In the case where the target chicken video frame is not the first video frame in the chicken video, determining the similarity between each chicken image region information in the recognition result of the target chicken video frame and the historical chicken image region information of the historical recognition result of the previous video frame, wherein the similarity includes appearance feature similarity, spatial scale similarity and running trajectory similarity;

[0012] Determine the chicken image region information and the historical chicken image region information belonging to each chicken according to the similarity between each chicken image region information and each historical chicken image region information;

[0013] According to the chicken image region information of each chicken and the historical chicken image region information, a multi-target tracking result of the target chicken video frame is obtained.

[0014] The above method may optionally determine the movement amount of each chicken according to the movement trajectory of each chicken in the target chicken video frame, including:

[0015] Detecting whether the motion trajectory of each of the chickens in the target chicken video frame meets a preset optimization condition;

[0016] Optimizing the motion trajectory that meets the optimization conditions;

[0017] After optimizing the motion trajectory that meets the optimization condition, the motion amount of each chicken is determined according to the current motion trajectory of each chicken in the target chicken video frame.

[0018] In the above method, optionally, the training process of the target recognition model includes:

[0019] Obtain an initial YOLOv7 model and a first training data set; the first training data set includes a plurality of first training video frames, each of the first training video frames includes annotation box information for annotating each chicken image region in the first training video frame;

[0020] Training the initial YOLOv7 model using the first training data set;

[0021] When the initial YOLOv7 model meets a preset training completion condition, the initial YOLOv7 model that meets the training completion condition is determined as a trained target recognition model.

[0022] In the above method, optionally, determining the movement amount of each chicken according to the movement trajectory of each chicken in the target chicken video frame includes:

[0023] Obtaining the correspondence between the pixel length in the target chicken video frame and the actual length;

[0024] The movement amount of each chicken is determined according to the movement trajectory and the corresponding relationship of each chicken in the target chicken video frame.

[0025] The above method may optionally further include, after determining the movement amount of each chicken according to the movement trajectory of each chicken in the target chicken video frame:

[0026] Determine the movement status information of the chicken group according to the movement amount of each chicken, wherein the movement status includes at least one of the total movement distance of the chicken group, the activity level of the chicken group, and the rate of change of the activity level of the chicken group; the chicken group includes each of the chickens;

[0027] Output the amount of exercise of each chicken and the exercise status information of the chicken group.

[0028] A device for determining the amount of exercise of a chicken, comprising:

[0029] An acquisition unit is used to acquire a target chicken video frame; the target chicken video frame is a video frame to be currently identified in the chicken video;

[0030] A recognition unit, used to recognize the target chicken video frame using a pre-trained target recognition model to obtain a recognition result of the target chicken video frame, wherein the recognition result includes at least one chicken image region information;

[0031] A processing unit, used to process the recognition result of the target chicken video frame using a preset multi-target tracking algorithm to obtain a multi-target tracking result of the target chicken video frame; the multi-target tracking result at least includes a motion trajectory of each chicken in the target chicken video frame;

[0032] The determination unit is used to determine the movement amount of each chicken according to the movement trajectory of each chicken in the target chicken video frame.

[0033] In the above device, optionally, the processing unit includes:

[0034] A first determination subunit is used to determine the similarity between each chicken image region information in the recognition result of the target chicken video frame and the historical chicken image region information of the historical recognition result of the previous video frame when the target chicken video frame is not the first video frame in the chicken video, wherein the similarity includes appearance feature similarity, spatial scale similarity and running trajectory similarity;

[0035] A second determining subunit is used to determine the chicken image region information belonging to each chicken and the historical chicken image region information according to the similarity between each chicken image region information and each historical chicken image region information;

[0036] The execution subunit is used to obtain the multi-target tracking result of the target chicken video frame according to the chicken image area information of each chicken and the historical chicken image area information.

[0037] A storage medium includes stored instructions, wherein when the instructions are executed, the device where the storage medium is located is controlled to execute the method for determining the amount of exercise of chickens as described above.

[0038] An electronic device includes a memory and one or more instructions, wherein the one or more instructions are stored in the memory and are configured to be executed by one or more processors to perform the method for determining the amount of exercise of chickens as described above.

[0039] Based on the above-mentioned implementation of the present application, a method, device, storage medium and electronic device for determining the amount of movement of a chicken are provided, the method comprising: obtaining a target chicken video frame; the target chicken video frame is a video frame currently to be identified in the chicken video; using a pre-trained target recognition model to identify the target chicken video frame, and obtaining a recognition result of the target chicken video frame, the recognition result including at least one chicken image area information; using a preset multi-target tracking algorithm to process the recognition result of the target chicken video frame, and obtaining a multi-target tracking result of the target chicken video frame; the multi-target tracking result at least includes the movement trajectory of each chicken in the target chicken video frame; according to the movement trajectory of each chicken in the target chicken video frame, the amount of movement of each chicken is determined. Applying the method provided in the embodiment of the present application can efficiently and accurately measure the amount of movement of chickens. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.

[0041] Figure 1 A method flow chart of a method for determining the amount of exercise of chickens provided in this application;

[0042] Figure 2 A flowchart of a process for obtaining a multi-target tracking result of a target chicken video frame provided by the present application;

[0043] Figure 3 A flowchart of a process for determining the amount of exercise for each chicken provided in the present application;

[0044] Figure 4 A flowchart of the process of processing data by a federated learning model provided for this application;

[0045] Figure 5 A schematic diagram of a chicken movement trajectory provided in this application;

[0046] Figure 6 A schematic diagram of a multi-target tracking process provided by the present application;

[0047] Figure 7 A schematic diagram of the structure of a device for determining the amount of exercise of chickens provided in this application;

[0048] Figure 8 A schematic diagram of the structure of an electronic device provided in this application. DETAILED DESCRIPTION

[0049] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0050] In this application, the terms "comprises", "comprising" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprising a ..." does not exclude the presence of other identical elements in the process, method, article or device comprising the element.

[0051] The embodiment of the present invention provides a method for determining the amount of exercise of a chicken, which can be applied to an electronic device. The method flow chart of the method is as follows: Figure 1 As shown, specifically including:

[0052] S101: Acquire a target chicken video frame; the target chicken video frame is a video frame to be currently identified in the chicken video.

[0053] In this embodiment, the chicken video can be obtained by shooting the chicken activity area by an image acquisition device. The chicken activity area can be a chicken breeding area, and the number of chickens in the chicken activity area can be multiple.

[0054] See also Figure 2 , an image acquisition device can be installed at the top of the chicken activity area, and the image acquisition device is connected to a computer to realize real-time monitoring and image acquisition of all chickens in the chicken activity area; wherein, the vertical arrangement can ensure that the monitoring camera can cover the entire space of the breeding area without being restricted by blind spots, and according to the adjustment of the camera height from the ground, the requirements of the field of view and the image resolution can be balanced, that is, the closer the camera is to the ground, the narrower the field of view is, but the image acquisition clarity is improved, and the farther the camera is from the ground, the wider the field of view is, but the individual image resolution is correspondingly reduced.

[0055] In some embodiments, the frame rate of the chicken video is 25fps, the video resolution is 2560×1440, and the video encoding is H.264.

[0056] S102: using a pre-trained target recognition model to recognize the target chicken video frame, and obtaining a recognition result of the target chicken video frame, wherein the recognition result includes at least one chicken image region information.

[0057] In this embodiment, the target recognition model can be a trained YOLOv7 model. The target chicken video frame is recognized by the YOLOv7 model to obtain a recognition result of the target chicken video frame. The recognition result may include a rectangular bounding box. The recognition result can be used to identify a specific object frame in an image or video frame, that is, chicken image area information.

[0058] Optionally, the following technical means are used during the YOLOv7 model training process to improve the model's training speed, detection accuracy and robustness: 1. Use the Mixup data enhancement operation to increase data diversity and improve the generalization ability of the model by mixing the training data; 2. Introduce the E-ELAN structure, optimize the network architecture, and improve feature extraction efficiency and feature expression capabilities; 3. Apply the EPSA attention mechanism and the ACmix attention mechanism to enhance the model's ability to capture key information, further improve detection accuracy and robustness, and ensure that individual chickens can be accurately and quickly identified and located in complex breeding environments.

[0059] S103: Using a preset multi-target tracking algorithm to process the recognition result of the target chicken video frame to obtain a multi-target tracking result of the target chicken video frame; the multi-target tracking result at least includes the motion trajectory of each chicken in the target chicken video frame.

[0060] In this embodiment, for each chicken image region information in the recognition result, a deep neural network can be used to extract a feature embedding vector of the chicken from the chicken image region, and the embedding vector is used to characterize the attributes of the chicken; the SORT algorithm is used to predict the next possible position of each target after the current frame based on the motion information of the tracked target; by calculating the similarity between the feature embedding vector of the chicken detected in the current frame and the feature embedding vector of the tracked target in the previous frame, a similarity measurement method is used to achieve matching and association between the target detected in the current frame and the tracked target in the previous frame, thereby achieving continuous tracking of the target.

[0061] Optionally, the multi-target tracking result may also include at least one of a bounding box of each chicken, a chicken category, and a target unique identifier (ID). The chicken category may be divided according to the growth stage of the chicken, for example, it may be a chick stage, a growing stage, and a degeneration stage.

[0062] S104: Determine the movement amount of each chicken according to the movement trajectory of each chicken in the target chicken video frame.

[0063] In this embodiment, a distance mapping method is used to determine the actual movement distance of each chicken based on the movement trajectory of each chicken.

[0064] The method provided in the embodiments of the present application can improve the accuracy and efficiency of exercise calculation, reduce the subjective deviation of manual measurement, and do not need to affect the chickens, thereby realizing non-interventional calculation of the chicken's exercise volume and improving data support for efficient breeding.

[0065] In an embodiment provided in the present application, based on the above scheme, optionally, the process of processing the recognition result of the target chicken video frame using a preset multi-target tracking algorithm to obtain the multi-target tracking result of the target chicken video frame is as follows: Figure 3 As shown, including:

[0066] S301: When the target chicken video frame is not the first video frame in the chicken video, determine the similarity between each chicken image region information in the recognition result of the target chicken video frame and the historical chicken image region information of the historical recognition result of the previous video frame, wherein the similarity includes appearance feature similarity, spatial scale similarity and running trajectory similarity.

[0067] In this embodiment, when the target chicken video frame is the first video frame in the chicken video, a multi-target tracking structure can be obtained according to the pixel positions of all chicken image region information.

[0068] S302: Determine the chicken image region information and the historical chicken image region information belonging to each chicken according to the similarity between each chicken image region information and each historical chicken image region information.

[0069] In this embodiment, the chicken appearance features, historical motion trajectory information and spatial scale information are combined to construct a three-dimensional similarity matrix. Then, the Hungarian algorithm is used to solve the loss matrix converted from the similarity matrix, thereby obtaining the optimal match of individual chickens between frames.

[0070] Optionally, the chicken appearance feature similarity calculation function is:

[0071]

[0072] in, For the appearance characteristics of chickens, The cosine distance of the two features is calculated. In the chicken activity area, the IoU between adjacent chickens can reflect the similarity of spatial scale information. In this embodiment, the spatial matching of two chickens between two different video frames can be achieved by the intersection over union (IoU).

[0073] Optionally, the spatial similarity calculation function of the chickens in two video frames is: .

[0074] Optionally, the chicken's motion trajectory similarity calculation function is: , where represents the trajectory vector, It represents the vector formed by the trajectory area of ​​the most recent frame and the center point of the detection area of ​​the current frame. During the movement, the angle between the chicken in front and the historical chicken trajectory is the smallest, so the cosine angle can well reflect its changing trend.

[0075] In this embodiment, the calculation formula for the distance that the chicken moves pixels per unit time in the video sequence is:

[0076]

[0077] in, is the unit time, at this time Also said Frame The speed of an object; Indicates Frame The pixel coordinates of an object.

[0078] Optional, when When is larger, the similarity value obtained by trajectory information is more reliable than the IoU based on spatial information similarity. When is smaller, the similarity value obtained by spatial information is more reliable. Therefore, considering the two cases, the similarity of spatial information and motion information can be summed as , and its calculation formula is:

[0079] .

[0080] in, is a hyperparameter, which represents the maximum pixel distance that the chicken moves between two adjacent frames.

[0081] According to the above calculation formula, the similarity matrix of multi-dimensional information fusion can be obtained, and then the similarity matrix is ​​converted into a loss matrix. The loss matrix is ​​shown as follows:

[0082]

[0083]

[0084] In this embodiment, , , They represent the loss matrix of chicken appearance features, the loss matrix of spatial similarity, and the loss matrix of motion trajectory similarity. is a weight factor used to control the weight of the appearance feature loss function and the similarity loss function of spatial information and motion information in the total loss function. Finally, the Hungarian algorithm can be used to obtain the best matching result of the loss matrix.

[0085] S303: Obtaining a multi-target tracking result of the target chicken video frame according to the chicken image region information of each chicken and the historical chicken image region information.

[0086] In this embodiment, for each chicken, the current pixel position can be obtained based on the chicken image area information of the chicken in the target chicken video frame, and the historical pixel position can be obtained based on the chicken's historical chicken image area information. The motion trajectory of the chicken is obtained based on the current pixel position and historical pixel position of the chicken, and the multi-target tracking result of the target chicken video frame is obtained based on the motion trajectory of each chicken.

[0087] In an embodiment provided in the present application, based on the above scheme, optionally, according to the motion trajectory of each chicken in the target chicken video frame, the process of determining the motion amount of each chicken is as follows: Figure 4 As shown, including:

[0088] S401: Detect whether the movement trajectory of each of the chickens in the target chicken video frame meets a preset optimization condition.

[0089] In this embodiment, if the pixel distance between the current pixel position of the chicken and the historical pixel position of the chicken in the previous video frame is less than a preset distance threshold, it is determined that the movement trajectory of the chicken meets the preset optimization condition.

[0090] Optionally, the distance threshold may be set to 2 pixels.

[0091] S402: Optimize the motion trajectory that meets the optimization condition.

[0092] In this embodiment, for a motion trajectory that meets the optimization condition, the current pixel position of the chicken to which the motion trajectory belongs may be replaced with the historical pixel position of the chicken in a previous video frame to optimize the motion trajectory.

[0093] like Figure 5 As shown, Figure 5 Part a shows the motion trajectory before optimization. Figure 5 Part b shows the optimized motion trajectory

[0094] S403: After optimizing the motion trajectory that meets the optimization condition, determine the motion amount of each chicken according to the current motion trajectory of each chicken in the target chicken video frame.

[0095] In this embodiment, by optimizing the motion trajectory that meets the optimization conditions, the motion trajectory error caused by the chicken shaking its body while its position does not change in a standing state can be reduced.

[0096] In an embodiment provided in the present application, based on the above scheme, optionally, determining the movement amount of each chicken according to the movement trajectory of each chicken in the target chicken video frame includes:

[0097] Obtaining the correspondence between the pixel length in the target chicken video frame and the actual length;

[0098] The movement amount of each chicken is determined according to the movement trajectory and the corresponding relationship of each chicken in the target chicken video frame.

[0099] In this example, it can be assumed that the ground length of the chicken activity area is and width is a fixed value, and the ground length within the recognizable range is divided into Equal parts, of which By calculation, the ground width value of each division point and its corresponding pixel width value can be obtained. The length of each small interval after the ground length is divided is close to the ground width value, so the relationship between the ground width value and the image pixel value can be obtained by calculating the relationship between the ground length value and the image pixel value. Set the pixel width value to , the ground width value is .

[0100] Define the fitted model as

[0101] ,

[0102] The loss function is defined as:

[0103]

[0104] in, is the number of data sets.

[0105] Optional, about The partial derivative of is: .

[0106] Optional, about The partial derivative of is: .

[0107] Optional, about The partial derivative of is: .

[0108] In this embodiment, after obtaining the actual amount of exercise of each chicken, the chicken group activity level calculation method is used to quantitatively calculate the group activity level.

[0109] For example, setting a period of time to , the total number of chickens detected in a certain period of time is N, and the movement distance of the i-th chicken in a certain period of time is , the total movement distance of the group is , the calculation process is:

[0110] .

[0111] Optionally, the group activity level during a period of time is , the calculation process is:

[0112]

[0113] Optionally, the rate of change of activity level in different time periods is R, calculated as:

[0114] .

[0115] In this embodiment, let The partial derivative of is zero, and the best fitting parameters can be calculated by substituting the actual data points , the best fitting equation can be obtained.

[0116] In an embodiment provided in the present application, based on the above solution, optionally, the training process of the target recognition model includes:

[0117] Obtain an initial YOLOv7 model and a first training data set; the first training data set includes a plurality of first training video frames, each of the first training video frames includes annotation box information for annotating each chicken image region in the first training video frame;

[0118] Training the initial YOLOv7 model using the first training data set;

[0119] When the initial YOLOv7 model meets a preset training completion condition, the initial YOLOv7 model that meets the training completion condition is determined as a trained target recognition model.

[0120] In this embodiment, the chicken activity area can be photographed by an image acquisition device to collect the video required for training. In order to ensure the spatiotemporal continuity, motion smoothness and information retention of the image extracted from the video, the video image is saved every 2 frames, which can not only retain the important trajectory information of the chicken movement but also avoid obvious blur, distortion and image content jump. The extracted video images are screened and classified and saved, and then the images are subjected to data preprocessing operations such as image color transformation, scale transformation, noise disturbance, etc., to increase data diversity, improve image complexity, and enhance model robustness and generalization ability. The images obtained after the preprocessing operation are annotated according to the chicken movement data set annotation standard to obtain the first training data set and the second training data set, which are finally divided according to the ratio.

[0121] Optionally, the first training data set annotation standard is: all chickens contained in the images extracted from the video are annotated at the box level, each annotated box accurately marks the position and size of the chicken, and records the coordinates of the upper left corner and the lower right corner of the marked box.

[0122] Optionally, the second training data set annotation standard is: images extracted from the same video are saved in frame order and distinguished from images extracted from other videos. Box-level annotation is performed for each chicken in the image, and a category label and a unique identifier (ID) are assigned to each chicken target. In the image sequence extracted from the same video, the category label and ID of each target should always remain consistent from the beginning to the end of the sequence.

[0123] In this embodiment, if Figure 6 As shown, the trained target recognition model can be used to recognize the video frames in the second training data set to obtain the recognition results, and then the chicken appearance features, historical motion trajectory information and spatial position information in the second training data set can be combined to construct a three-dimensional similarity matrix. The Hungarian algorithm is then used to solve the loss matrix converted from the similarity matrix to obtain the optimal match of individual chickens between frames.

[0124] and Figure 1 Corresponding to the method described above, the embodiment of the present application also provides a device for determining the amount of exercise of chickens, for determining the amount of exercise of chickens Figure 1 The specific implementation of the method is shown in the following diagram: Figure 7 As shown, specifically including:

[0125] The acquisition unit 701 is used to acquire a target chicken video frame; the target chicken video frame is a video frame to be currently identified in the chicken video;

[0126] The recognition unit 702 is used to recognize the target chicken video frame using a pre-trained target recognition model to obtain a recognition result of the target chicken video frame, wherein the recognition result includes at least one chicken image region information;

[0127] The processing unit 703 is used to process the recognition result of the target chicken video frame using a preset multi-target tracking algorithm to obtain a multi-target tracking result of the target chicken video frame; the multi-target tracking result at least includes a motion trajectory of each chicken in the target chicken video frame;

[0128] The determination unit 704 is used to determine the movement amount of each chicken according to the movement trajectory of each chicken in the target chicken video frame.

[0129] In an embodiment provided in the present application, based on the above solution, optionally, the processing unit includes:

[0130] A first determination subunit is used to determine the similarity between each chicken image region information in the recognition result of the target chicken video frame and the historical chicken image region information of the historical recognition result of the previous video frame when the target chicken video frame is not the first video frame in the chicken video, wherein the similarity includes appearance feature similarity, spatial scale similarity and running trajectory similarity;

[0131] A second determining subunit is used to determine the chicken image region information belonging to each chicken and the historical chicken image region information according to the similarity between each chicken image region information and each historical chicken image region information;

[0132] The execution subunit is used to obtain the multi-target tracking result of the target chicken video frame according to the chicken image area information of each chicken and the historical chicken image area information.

[0133] In an embodiment provided in the present application, based on the above solution, optionally, the determining unit includes:

[0134] A detection subunit, used to detect whether the motion trajectory of each of the chickens in the target chicken video frame meets a preset optimization condition;

[0135] An optimization subunit, used for optimizing the motion trajectory that meets the optimization conditions;

[0136] The third determination subunit is used to determine the movement amount of each chicken according to the current movement trajectory of each chicken in the target chicken video frame after optimizing the movement trajectory that meets the optimization condition.

[0137] In an embodiment provided in the present application, based on the above solution, optionally, the training process of the target recognition model includes:

[0138] An acquisition subunit is used to acquire an initial YOLOv7 model and a first training data set; the first training data set includes a plurality of first training video frames, each of the first training video frames includes annotation box information for annotating each chicken image area in the first training video frame;

[0139] A training subunit, configured to train the initial YOLOv7 model using the first training data set;

[0140] The execution subunit is used to determine the initial YOLOv7 model that meets the preset training completion condition as the trained target recognition model when the initial YOLOv7 model meets the preset training completion condition.

[0141] In an embodiment provided in the present application, based on the above solution, optionally, the determining unit includes:

[0142] An acquisition subunit, used for acquiring the correspondence between the pixel length in the target chicken video frame and the actual length;

[0143] The fourth determination subunit is used to determine the movement amount of each chicken according to the movement trajectory and the corresponding relationship of each chicken in the target chicken video frame.

[0144] In an embodiment provided in the present application, based on the above solution, optionally, the device further includes:

[0145] An execution unit, configured to determine the movement status information of a chicken group according to the movement amount of each of the chickens, wherein the movement status includes at least one of the total movement distance of the chicken group, the activity level of the chicken group, and the rate of change of the activity level of the chicken group; the chicken group includes each of the chickens;

[0146] The output unit is used to output the amount of movement of each chicken and the movement status information of the chicken group.

[0147] The specific principles and execution processes of each unit and module in the device for determining the amount of chicken exercise disclosed in the above-mentioned embodiment of the present application are the same as the method for determining the amount of chicken exercise disclosed in the above-mentioned embodiment of the present application. Please refer to the corresponding parts of the method for determining the amount of chicken exercise provided in the above-mentioned embodiment of the present application, and will not be repeated here.

[0148] An embodiment of the present application further provides a storage medium, which includes stored instructions, wherein when the instructions are executed, the device where the storage medium is located is controlled to execute the above-mentioned method for determining the amount of exercise of chickens.

[0149] The present application also provides an electronic device, whose structural diagram is as follows: Figure 8 As shown, it specifically includes a memory 801 and one or more instructions 802, wherein the one or more instructions 802 are stored in the memory 801 and are configured to be executed by one or more processors 803 to perform the following operations:

[0150] Obtain a target chicken video frame; the target chicken video frame is a video frame to be currently identified in the chicken video;

[0151] Using a pre-trained target recognition model to recognize the target chicken video frame, and obtaining a recognition result of the target chicken video frame, wherein the recognition result includes at least one chicken image region information;

[0152] The recognition result of the target chicken video frame is processed by using a preset multi-target tracking algorithm to obtain a multi-target tracking result of the target chicken video frame; the multi-target tracking result at least includes the motion trajectory of each chicken in the target chicken video frame;

[0153] The movement amount of each chicken is determined according to the movement trajectory of each chicken in the target chicken video frame.

[0154] It should be noted that each embodiment in this specification is described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same or similar parts between the embodiments can be referred to each other. For the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0155] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are merely used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations.

[0156] For the convenience of description, the above device is described in various units according to their functions. Of course, when implementing the present application, the functions of each unit can be implemented in the same or multiple software and / or hardware.

[0157] It can be known from the description of the above implementation methods that those skilled in the art can clearly understand that the present application can be implemented by means of software plus a necessary general hardware platform. Based on such an understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product can be stored in a storage medium such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in the various embodiments of the present application or certain parts of the embodiments.

[0158] The above is a detailed introduction to a method for determining the amount of exercise of chickens provided in the present application. This article uses specific examples to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for general technical personnel in this field, according to the idea of ​​the present application, there will be changes in the specific implementation method and scope of application. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A method for determining the amount of exercise of chickens, characterized in that: include: Get the target chicken video frame; The target chicken video frame is a video frame to be identified in the chicken video; Using a pre-trained target recognition model to recognize the target chicken video frame, and obtaining a recognition result of the target chicken video frame, wherein the recognition result includes at least one chicken image region information; The recognition result of the target chicken video frame is processed by using a preset multi-target tracking algorithm to obtain a multi-target tracking result of the target chicken video frame; the multi-target tracking result at least includes the motion trajectory of each chicken in the target chicken video frame; The movement amount of each chicken is determined according to the movement trajectory of each chicken in the target chicken video frame.

2. The method according to claim 1, characterized in that The method of processing the recognition result of the target chicken video frame by using a preset multi-target tracking algorithm to obtain the multi-target tracking result of the target chicken video frame includes: In the case where the target chicken video frame is not the first video frame in the chicken video, determining the similarity between each chicken image region information in the recognition result of the target chicken video frame and the historical chicken image region information of the historical recognition result of the previous video frame, wherein the similarity includes appearance feature similarity, spatial scale similarity and running trajectory similarity; Determine the chicken image region information and the historical chicken image region information belonging to each chicken according to the similarity between each chicken image region information and each historical chicken image region information; According to the chicken image region information of each chicken and the historical chicken image region information, a multi-target tracking result of the target chicken video frame is obtained.

3. The method according to claim 1, characterized in that Determining the movement amount of each chicken according to the movement trajectory of each chicken in the target chicken video frame includes: Detecting whether the motion trajectory of each of the chickens in the target chicken video frame meets a preset optimization condition; Optimizing the motion trajectory that meets the optimization conditions; After optimizing the motion trajectory that meets the optimization condition, the motion amount of each chicken is determined according to the current motion trajectory of each chicken in the target chicken video frame.

4. The method according to claim 1 or 3, characterized in that: The training process of the target recognition model includes: Obtain an initial YOLOv7 model and a first training data set; the first training data set includes a plurality of first training video frames, each of the first training video frames includes annotation box information for annotating each chicken image region in the first training video frame; Training the initial YOLOv7 model using the first training data set; When the initial YOLOv7 model meets a preset training completion condition, the initial YOLOv7 model that meets the training completion condition is determined as a trained target recognition model.

5. The method according to claim 1, characterized in that Determining the movement amount of each chicken according to the movement trajectory of each chicken in the target chicken video frame includes: Obtaining the correspondence between the pixel length in the target chicken video frame and the actual length; The movement amount of each chicken is determined according to the movement trajectory and the corresponding relationship of each chicken in the target chicken video frame.

6. The method according to claim 1, characterized in that After determining the movement amount of each chicken according to the movement trajectory of each chicken in the target chicken video frame, the method further includes: Determine the movement status information of the chicken group according to the movement amount of each chicken, wherein the movement status includes at least one of the total movement distance of the chicken group, the activity level of the chicken group, and the rate of change of the activity level of the chicken group; the chicken group includes each of the chickens; Output the amount of exercise of each chicken and the exercise status information of the chicken group.

7. A device for determining the amount of exercise of chickens, characterized in that: include: An acquisition unit, used for acquiring a target chicken video frame; The target chicken video frame is a video frame to be identified in the chicken video; A recognition unit, used to recognize the target chicken video frame using a pre-trained target recognition model to obtain a recognition result of the target chicken video frame, wherein the recognition result includes at least one chicken image region information; A processing unit, used to process the recognition result of the target chicken video frame using a preset multi-target tracking algorithm to obtain a multi-target tracking result of the target chicken video frame; the multi-target tracking result at least includes a motion trajectory of each chicken in the target chicken video frame; The determination unit is used to determine the movement amount of each chicken according to the movement trajectory of each chicken in the target chicken video frame.

8. The device according to claim 7, characterized in that The processing unit comprises: A first determination subunit is used to determine the similarity between each chicken image region information in the recognition result of the target chicken video frame and the historical chicken image region information of the historical recognition result of the previous video frame when the target chicken video frame is not the first video frame in the chicken video, wherein the similarity includes appearance feature similarity, spatial scale similarity and running trajectory similarity; A second determining subunit is used to determine the chicken image region information belonging to each chicken and the historical chicken image region information according to the similarity between each chicken image region information and each historical chicken image region information; The execution subunit is used to obtain the multi-target tracking result of the target chicken video frame according to the chicken image area information of each chicken and the historical chicken image area information.

9. A storage medium, characterized in that: The storage medium includes stored instructions, wherein when the instructions are executed, the device where the storage medium is located is controlled to execute the method for determining the amount of exercise of chickens as described in any one of claims 1 to 6.

10. An electronic device, characterized in that: It comprises a memory and one or more instructions, wherein the one or more instructions are stored in the memory and are configured to be executed by one or more processors to perform the method for determining the amount of chicken exercise as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Chicken flock activity amount real-time estimation method and chicken flock activity amount real-time estimation system based on multi-target tracking

    CN111680587A

  • Method, device and system for determining multi-target trajectory in video and storage medium

    CN113780058A

  • Multi-target tracking method, terminal equipment and storage medium

    CN116452631A

  • Pig individual positioning method and device

    CN116469129A

  • Automated poultry or livestock welfare tracking

    US20230172167A1