Action recognition method and system, electronic equipment and computer readable storage medium
Through the action recognition method, the slaughtering action is evaluated using the bone key points and feature similarity of the video frame, which solves the problems of low equipment stability and safety in traditional slaughtering technology, and achieves more efficient and accurate slaughtering process management, improving the Meat product quality.
Patent Information
- Application Number
- CN202410979933.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-22
- Publication Date
- 2024-12-17
AI Technical Summary
Traditional slaughtering technology has problems such as low equipment stability and safety, high operation uncertainty, low efficiency and painful animals, resulting in unstable quality of meat products.
The action recognition method is adopted to obtain the bone key points of the video frame, calculate the similarity of action features, and combine the clustering algorithm and the YOLOv8-pose model to automatically identify and evaluate slaughtering actions, reduce manual evaluation, and improve the accuracy and efficiency of action recognition.
It improves the accuracy and efficiency of action recognition, reduces the workload of manual evaluation, ensures the standardization and safety of the slaughtering process, and improves the consistency of the quality of meat products.
Smart Images

Figure CN119152567A_ABST
Abstract
Description
Background Art
[0002] As an important livelihood industry, livestock and poultry slaughtering is of great significance to the stable development of our society. Nowadays, the entry threshold of the slaughtering industry is low, resulting in many problems exposed in the industry, low stability and safety in the equipment production process, and low precision in the slaughtering process, resulting in uneven quality of meat products and poor safety of operators. Nowadays, many domestic companies have realized that backward slaughtering technology will make the industry develop more slowly and cannot meet people's daily needs for meat products. Traditional slaughtering technology usually relies on experienced slaughtering workers for manual operation, which has many problems. First, the slaughtering technology levels of different workers are different, resulting in differences in slaughtering quality. Secondly, manual operation is easily affected by environmental factors, individual differences, fatigue and other factors, resulting in uncertainty and instability in the slaughtering process. In addition, traditional slaughtering technology also has problems such as low efficiency and easy to cause animal pain.
[0003] Therefore, it is urgent to provide a technical solution to solve the above problems. Summary of the invention
[0004] To solve the above technical problems, the present invention provides a motion recognition method, system, electronic device and computer-readable storage medium.
[0005] In a first aspect, the present invention provides a method for action recognition, the technical solution of the method is as follows:
[0006] Obtain a target video frame of each key action when the user performs the target action, and extract the skeleton key points of each target video frame;
[0007] According to the skeleton key points of each target video frame, the feature similarity of each key action is determined respectively, and based on the feature similarities of all key actions, it is determined whether the user performs the target action in a standard manner.
[0008] The beneficial effects of an action recognition method of the present invention are as follows:
[0009] The method of the present invention reduces the workload of manual evaluation and improves the accuracy of action recognition, thereby making the process of action recognition more efficient.
[0010] Based on the above solution, an action recognition method of the present invention can also be improved as follows.
[0011] In an optional manner, the step of obtaining a target video frame for each key action when a user performs a target action includes: using a clustering-based key frame extraction method to extract video stream data containing the user performing the target action to obtain a target video frame for each key action.
[0012] In the above optional methods, the key frames most relevant to the user's target action can be automatically screened out from a large amount of video stream data through a clustering algorithm, which is more efficient than manual screening and can significantly reduce processing time and labor costs. Secondly, the clustering algorithm is grouped based on the similarity of feature information, which can ensure that each key frame represents an important moment in the user's action process, which helps to capture the action details more accurately in subsequent analysis and improve the accuracy and reliability of the overall analysis. At the same time, by clustering and extracting key frames, a large number of redundant or insignificant frames contained in the video stream data can be effectively removed, so that subsequent processing and analysis can focus more on key information and improve data processing efficiency. In addition, the clustering algorithm is adaptable to the distribution and characteristics of the data, so the key frame extraction method can be flexibly applied to video data processing in different scenarios. Whether it is simple action recognition or complex scene analysis, the best effect can be achieved by adjusting clustering parameters and optimizing algorithms.
[0013] In an optional manner, the step of extracting skeleton key points of any target video frame includes: using a YOLOv8-pose model to extract skeleton key points of any target video frame.
[0014] Among the above optional methods, the YOLOv8-pose model combines the high efficiency of the YOLO series models in target detection and the accuracy of pose estimation in identifying key points of human skeletons. It can achieve high-precision recognition of key points of human skeletons in video frames, which helps to accurately capture the specific action details of slaughter workers and provide a reliable data basis for subsequent action analysis and quality assessment. The YOLOv8 model has an efficient detection speed. Combined with the pose estimation function, it can achieve real-time processing of video frames while maintaining high accuracy, ensuring that the system responds in time and makes corresponding processing.
[0015] In an optional manner, the step of determining the feature similarity of a key action corresponding to any target video frame based on the skeletal key points of the target video frame includes: using the angle and modulus ratio method to calculate the skeletal key points of any target video frame to obtain the action feature value of the key action corresponding to the target video frame, and comparing the action feature value of the key action corresponding to the target video frame with the standard action feature value to determine the feature similarity of the key action corresponding to the target video frame.
[0016] In the above optional method, by using the angle and modulus ratio method to calculate the skeleton key points, the subtle differences between the key actions and the standard actions in the target video frame can be accurately quantified. This method not only takes into account the relative position relationship between the skeleton key points, but also takes into account the similarity of the overall posture, thereby providing a more comprehensive and accurate action feature value. By comparing the calculated action feature values with the standard action feature values, the similarity between the action in the target video frame and the standard action can be intuitively reflected, which helps to reduce misjudgments and missed judgments and improve the overall accuracy of action recognition. By determining the feature similarity of key actions, a quantitative basis is provided for action evaluation, which helps to establish a more scientific and objective action evaluation standard, optimize the evaluation process, and improve evaluation efficiency and accuracy. According to the results of feature similarity, personalized analysis and guidance can be carried out for the action performance of different employees, and employees with irregular actions or potential safety hazards can be discovered in time to ensure the standardization and safety of the slaughtering process.
[0017] In an optional manner, the step of determining whether the user performs the target action in a standard manner based on the feature similarity of all key actions includes: obtaining an action score for each key action based on the feature similarity of all key actions, and calculating a comprehensive action score based on each key action score and a corresponding preset weight value; and determining whether the user performs the target action in a standard manner based on the size between the comprehensive action score and the preset action score of the target action.
[0018] In the above optional method, by considering the feature similarity of all key actions, the overall quality of the user's execution of the target action can be comprehensively evaluated. Each key action is assigned a corresponding action score, which ensures the comprehensiveness and meticulousness of the evaluation and avoids the evaluation bias caused by focusing only on some actions. When calculating the comprehensive action score, the preset weight value of each key action is introduced, making the evaluation result more reasonable and scientific, reflecting the difference in importance of different key actions in the overall action, making the evaluation result more convincing, and better guiding users to improve their actions. By comparing the comprehensive action score with the preset action score of the target action, it is possible to objectively determine whether the target action performed by the user is standard, reducing the influence of subjective factors and improving the accuracy and reliability of the judgment.
[0019] In an optional manner, the step of determining whether the user performs the target action in a standard manner based on the difference between the comprehensive action score and the preset action score of the target action includes: when the comprehensive action score is greater than the preset action score, determining it as qualified; when the comprehensive action score is not greater than the preset action score, determining it as unqualified.
[0020] In the above optional method, by setting clear comparison criteria between the comprehensive action score and the preset action score, a clear quantitative basis is provided for determining whether the user has performed the target action properly, which helps to reduce the uncertainty caused by subjective judgment and improve the accuracy and consistency of the judgment.
[0021] In a second aspect, the present invention provides an action recognition system, the technical solution of which is as follows:
[0022] The action recognition system comprises: an acquisition module and a determination module;
[0023] The acquisition module is used to acquire a target video frame of each key action when the user performs the target action, and extract the skeleton key points of each target video frame.
[0024] The determination module is used to determine the feature similarity of each key action according to the skeleton key points of each target video frame, and determine whether the user performs the target action in a standard manner based on the feature similarities of all key actions.
[0025] The beneficial effects of an action recognition system of the present invention are as follows:
[0026] The system of the present invention reduces the workload of manual evaluation and improves the accuracy of action recognition, thereby making the process of action recognition more efficient.
[0027] Based on the above solution, the action recognition system of the present invention can also be improved as follows.
[0028] In an optional manner, the acquisition module is specifically used to: adopt a clustering-based key frame extraction method to extract the video stream data containing the user performing the target action, so as to obtain the target video frame of each key action.
[0029] In the above optional methods, the key frames most relevant to the user's target action can be automatically screened out from a large amount of video stream data through a clustering algorithm, which is more efficient than manual screening and can significantly reduce processing time and labor costs. Secondly, the clustering algorithm is grouped based on the similarity of feature information, which can ensure that each key frame represents an important moment in the user's action process, which helps to capture the action details more accurately in subsequent analysis and improve the accuracy and reliability of the overall analysis. At the same time, by clustering and extracting key frames, a large number of redundant or insignificant frames contained in the video stream data can be effectively removed, so that subsequent processing and analysis can focus more on key information and improve data processing efficiency. In addition, the clustering algorithm is adaptable to the distribution and characteristics of the data, so the key frame extraction method can be flexibly applied to video data processing in different scenarios. Whether it is simple action recognition or complex scene analysis, the best effect can be achieved by adjusting clustering parameters and optimizing algorithms.
[0030] In a third aspect, a technical solution of an electronic device of the present invention is as follows:
[0031] The invention comprises a memory, a processor and a program stored in the memory and running on the processor. When the processor executes the program, the steps of the action recognition method of the present invention are implemented.
[0032] In a fourth aspect, the present invention provides a computer-readable storage medium having the following technical solution:
[0033] Instructions are stored in the computer-readable storage medium. When the computer-readable storage medium reads the instructions, the computer-readable storage medium executes the steps of the action recognition method of the present invention.
[0034] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] The accompanying drawings are only used to illustrate the embodiments and are not to be considered as limiting the present invention. In addition, the same reference symbols are used to represent the same components throughout the accompanying drawings. In the accompanying drawings:
[0036] Figure 1 A schematic diagram of a flow chart of an embodiment of a motion recognition method of the present invention;
[0037] Figure 2 Schematic diagram of the coordinates of key points of the human skeleton in the present invention;
[0038] Figure 3It is the determination criteria for similarity classification and classification of membership and similarity influencing factors of the present invention;
[0039] Figure 4 A schematic diagram of the evaluation and weight allocation of the processing process of the present invention;
[0040] Figure 5 It is the key points of the action for slaughtering in the present invention;
[0041] Figure 6 A schematic diagram of the structure of an embodiment of a motion recognition system provided by the present invention;
[0042] Figure 7 The figure is a schematic structural diagram of an embodiment of an electronic device of the present invention. DETAILED DESCRIPTION
[0043] Exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present invention are shown in the drawings, it should be understood that the present invention can be implemented in various forms and should not be limited to the embodiments set forth herein.
[0044] Figure 1 FIG. 1 is a flow chart showing an embodiment of a method for motion recognition provided by the present invention, wherein the method is executed by a controller. Figure 1 As shown, the following steps are included:
[0045] S1, obtain the target video frame of each key action when the user performs the target action, and extract the skeleton key points of each target video frame. In S1:
[0046] ① Target video frames refer to video frames selected from a continuous video stream that are representative or have specific meanings. These video frames contain important information or changes in the video sequence, providing an effective data basis for subsequent behavior recognition or action analysis.
[0047] ② Skeleton key points refer to the coordinate points of key parts of the human body extracted from the video frames through the human posture estimation algorithm. These skeleton key points include the joints of the human body, as well as specific points of the head, hands and other parts. After extracting the coordinates of these key points, the human skeleton structure can be further constructed, thereby accurately reflecting the posture changes and movement characteristics of the human body, providing strong support for subsequent behavior analysis, action classification or anomaly detection tasks.
[0048] Specifically, the controller obtains a target video frame of each key action when the user performs the target action, and extracts the skeleton key points of each target video frame.
[0049] S2, according to the skeleton key points of each target video frame, determine the feature similarity of each key action respectively, and based on the feature similarities of all key actions, determine whether the user performs the target action in a standard manner. In S2:
[0050] Feature similarity is calculated through a series of algorithms, which may include but are not limited to distance calculation, angle calculation, shape matching, etc. between skeletal key points, and are intended to measure the similarity or difference between user actions and standard actions. Feature similarity is a quantitative assessment of the accuracy of each key action when the user performs the target action, and is used to ultimately determine whether the action performed by the user is standard.
[0051] Specifically, the controller further calculates the feature similarity based on each skeleton key point, and determines whether the user performs the target action in a standard manner through the feature similarity.
[0052] The technical solution of this embodiment reduces the workload of manual evaluation and improves the accuracy of action recognition, thereby making the action recognition process more efficient.
[0053] In an optional manner, the step of obtaining a target video frame for each key action when the user performs the target action includes: using a clustering-based key frame extraction method to extract video stream data containing the user performing the target action to obtain a target video frame for each key action.
[0054] Furthermore, a clustering-based key frame extraction method is adopted: first, N cluster centers are set, and their respective feature information is extracted, and N clusters are divided according to the difference in feature information; then, the distance between the current frame and each cluster center is calculated to determine which cluster the frame is divided into; after all frames are divided into clusters, the frame closest to each cluster center is selected as the key frame of the cluster.
[0055] It should be noted that the clustering formula in the key frame extraction method based on clustering is as follows:
[0056]
[0057] Among them, k represents the number of key frames selected in each cluster, q represents the number of shot segmentations, and n represents the category. Represents the distance from the sample to the cluster center.
[0058] In this embodiment, taking the pneumatic stunning action in slaughtering action recognition as an example, the video in the monitoring DAV format is regarded as the video stream data, and the key frame extraction method based on clustering is adopted to extract the target video frame in the jpg format of the pneumatic stunning stage from the video.
[0059] Specifically, the controller can further automatically filter out the target video frames that are most relevant to the user's target action from a large amount of video stream data through a clustering algorithm, which is more efficient than manual screening and can significantly reduce processing time and labor costs. Secondly, the clustering algorithm is grouped based on the similarity of feature information, which can ensure that each key frame represents an important moment in the user's action process, which helps to capture the action details more accurately in subsequent analysis and improve the accuracy and reliability of the overall analysis. At the same time, by clustering and extracting key frames, a large number of redundant or insignificant frames contained in the video stream data can be effectively removed, so that subsequent processing and analysis can focus more on key information and improve data processing efficiency. In addition, the clustering algorithm is adaptable to the distribution and characteristics of the data, so the key frame extraction method can be flexibly applied to video data processing in different scenarios. Whether it is simple action recognition or complex scene analysis, the best effect can be achieved by adjusting the clustering parameters and optimizing the algorithm.
[0060] In an optional manner, the step of extracting skeleton key points of any target video frame includes: using a YOLOv8-pose model to extract skeleton key points of any target video frame.
[0061] Figure 2 A schematic diagram of the coordinates of the human skeleton key points in the present invention is shown. Further, the YOLOv8-pose model is used to extract the skeleton key points of any target video frame: the skeleton key points are extracted by YOLOv8-pose, thereby obtaining the coordinates of the key points and the human body structure vector.
[0062] Specifically, the controller further uses the YOLOv8-pose model to achieve high-precision recognition of key points of human skeletons in video frames, which helps to accurately capture the specific action details of slaughter workers and provide a reliable data basis for subsequent action analysis and quality assessment. The YOLOv8 model has a high detection speed. Combined with the pose estimation function, it can achieve real-time processing of video frames while maintaining high accuracy, ensuring that the system responds in time and makes corresponding processing.
[0063] In an optional manner, the step of determining the feature similarity of a key action corresponding to any target video frame based on the skeletal key points of the target video frame includes: using the angle and modulus ratio method to calculate the skeletal key points of any target video frame to obtain the action feature value of the key action corresponding to the target video frame, and comparing the action feature value of the key action corresponding to the target video frame with the standard action feature value to determine the feature similarity of the key action corresponding to the target video frame.
[0064] Furthermore, in view of the differences in monitoring angles and distances faced by employees and their different body shapes, a method combining angle and modulus ratio information is used to construct the motion feature values of the posture graph.
[0065] It should be noted that the formula for angle calculation is as follows:
[0066] A(xi,yi,ci)
[0067] B(xj,yj,cj)
[0068] C(xk,yk,ck)
[0069]
[0070] Among them, A, B, and C are the coordinates of the skeleton key points; cosθ is the angle formed by the three skeleton key points.
[0071] The formula for calculating the modulus ratio is as follows:
[0072]
[0073] Among them, Figure 2 As shown, the three key points A, B, and C of the left arm are represented by vectors and To represent, the dot product of two vectors is divided by The model can be obtained exist The projection length in the direction, and then divide this projection length by The model is obtained exist The ratio of the projection length in the direction to the length of AB is W1. W1 is the modulus ratio eigenvector of the left arm of the human body.
[0074] Furthermore, the obtained action feature value is subtracted from the value corresponding to the standard action feature, and the difference of 10 angles is taken as a factor set U, and the evaluation set is V. When there is a factor ui, the membership of the factor to vi can be obtained. The evaluation set of multiple factors can be expressed as ri. The evaluation set of ten factors can constitute a general evaluation matrix R. The product of the weight set A and the evaluation matrix R is the fuzzy synthesis result B. The membership of each level of similarity is multiplied by the fuzzy synthesis result B to obtain the feature similarity result, which is converted into the action score calculation result P.
[0075] Figure 3The similarity classification and the criteria for the classification of membership and similarity influencing factors of the present invention are shown. In this embodiment, the action characteristic value M of the pneumatic stunning posture diagram can be constructed by combining the information of the angle calculation method and the modulus ratio calculation method, where M=(60, 9, 112, 170, 90, 90, 170, 112, 9, 60, 3, 4, 4, 3).
[0076] The difference between the angles of the 10 key points (right wrist-right elbow-right shoulder, right elbow-right shoulder-right hip, right shoulder-right hip-right knee, right hip-right knee-right ankle, right knee-right ankle-ground, left wrist-left elbow-left shoulder, left elbow-left shoulder-left hip, left shoulder-left hip-left knee, left hip-left knee-left ankle, left knee-left ankle-ground) and the standard action feature angles constitutes the factor set U. The evaluation set is V, the similarity influencing factors are classified as v1 (angle difference ui is less than or equal to 10 degrees), v2 (angle difference ui is less than or equal to 10 degrees), and the similarity classification and membership are v1=1, v2=0. The weights ai corresponding to the 10 angles constitute the weight set A;
[0077] When there is a factor ui, the membership of this factor to vi can be obtained, the evaluation set of multiple factors can be expressed as ri, and the evaluation set of ten factors can form a general evaluation matrix R. A fuzzy transformation B from U to V can be uniquely determined, then B is the fuzzy synthesis result, B = A°R; the membership of each level of similarity is multiplied by the fuzzy synthesis result B to obtain the feature similarity result, which is converted into the action score calculation result P, P = (1, 0) × B^T × 100.
[0078] Specifically, the controller further calculates the skeleton key points by using the angle and modulus ratio method, which can accurately quantify the subtle differences between the key actions and the standard actions in the target video frame. This method not only takes into account the relative position relationship between the skeleton key points, but also takes into account the similarity of the overall posture, thereby providing a more comprehensive and accurate action feature value. By comparing the calculated action feature values with the standard action feature values, the similarity between the action in the target video frame and the standard action can be intuitively reflected, which helps to reduce misjudgment and missed judgment and improve the overall accuracy of action recognition. By determining the feature similarity of key actions, a quantitative basis is provided for action evaluation, which helps to establish a more scientific and objective action evaluation standard, optimize the evaluation process, and improve the evaluation efficiency and accuracy. According to the results of feature similarity, personalized analysis and guidance can be carried out for the action performance of different employees, and employees with irregular actions or potential safety hazards can be discovered in time to ensure the standardization and safety of the slaughtering process.
[0079] In an optional method, based on the feature similarity of all key actions, the step of determining whether the user performs the target action in a standard manner includes: obtaining an action score for each key action based on the feature similarity of all key actions, and calculating a comprehensive action score based on each key action score and a corresponding preset weight value; and determining whether the user performs the target action in a standard manner based on the size between the comprehensive action score and the preset action score of the target action.
[0080] Furthermore, the key actions of each step are classified as evaluation factors, and the first-level evaluation factor set Fi is constructed after summarizing the classification. The first-level evaluation set is the macro classification of the evaluation; on the basis of each first-level evaluation factor set Fi, it is further refined into specific actions to form a second-level evaluation set, and the detection results of each step are used as the second-level influence to construct the second-level evaluation factor set fi; the first-level evaluation set Ωi of the comprehensive evaluation of the first-level evaluation factors is constructed, and the action score is used as the value of the second-level evaluation set ωi of the comprehensive evaluation of the second-level evaluation factors; the first-level evaluation weight Ai and the second-level evaluation weight ai are determined by the hierarchical analysis method; according to the second-level evaluation set ωi and the second-level weight set ai of the second-level evaluation factor set fi, a function is established to calculate wi; the value of wi is used as the score of the first-level evaluation set Ωi, and according to the first-level evaluation set Ωi and the first-level weight set Ai of the first-level evaluation factor set Fi, a function is established to calculate w, and then the comprehensive evaluation score w is obtained;
[0081] Furthermore, Figure 4 The schematic diagram of the process evaluation and weight distribution of the present invention is shown. Figure 4As shown in the figure, the key actions are divided into three first-level evaluations, with the preparation stage, the second stage, and the third stage as first-level evaluation factors, and a first-level evaluation factor set is constructed, marked as Fi∈{1, 2, 3}; the results of each detection point in the preparation stage, the second stage, and the third stage are used as second-level evaluation factors to construct a second-level evaluation factor set fi={f1, f2, f3....fn}, where f represents the nth score under the i-th evaluation; a first-level evaluation set for comprehensive evaluation of first-level evaluation factors is constructed, denoted as Ωi={Ω1, Ω2, Ω3...Ωn}, and Ωn represents the nth score of the first-level evaluation factor. A second-level evaluation set for comprehensive evaluation of second-level evaluation factors is constructed, denoted as ωi={ω1, ω2, ω3...ωn}, and ωn represents the nth score of the second-level evaluation factor. The weight of the first-level evaluation factor is determined by the hierarchical analysis method, denoted as Ai={A1, A2,…, An}, where An represents the weight of the nth stage. The weight of the secondary evaluation factor is determined by the hierarchical analysis method, which is recorded as ai={a1, a2,…, an}, where an represents the weight of the result of the nth detection point. According to the score of the secondary evaluation set ωi of the secondary evaluation factor set fi and the secondary weight set ai, a function is established to calculate wi. The analysis steps include: evaluating each secondary factor according to the secondary evaluation set ωi of the secondary evaluation factor set fi and the secondary evaluation weight ai, and establishing a table Ri with the evaluation sets of n secondary factors as rows. Table 1 is a table Ri established with the evaluation sets of n secondary factors as rows.
[0082] Table 1:
[0083] Secondary evaluation factor set Secondary evaluation weight ai Secondary evaluation set ωi f1 a1 ω1 f2 a2 ω2 f3 a3 ω3 ... ... ... fn an ωn
[0084] Each secondary factor is evaluated, and the secondary evaluation set ωi of each secondary evaluation factor set fi is added to the secondary weight ai to construct a function to calculate wi: The value of wi is used as the score of the first-level evaluation set Ωi. Further, according to the score of the first-level evaluation set Ωi of the first-level evaluation factor set Fi and the first-level weight set Ai, a function is established to calculate w, and then the comprehensive evaluation score w is obtained. The analysis steps include:
[0085] Further, the first-level evaluation set Ωi of each first-level influencing factor is used as a single element evaluation set to establish a table R. Table 2 is a table R established by using the first-level evaluation set Ωi of each first-level influencing factor as a single element evaluation set to establish a row.
[0086] Table 2:
[0087] First-level evaluation factor set Fi First-level weight Ai First-level evaluation set Ωi F1 A1 Ω1 F2 A2 Ω2 F3 A3 Ω3
[0088] Furthermore, each first-level factor is evaluated, and w is obtained by constructing a function to calculate the first-level evaluation set Ωi and the first-level weight Ai of each first-level evaluation factor set Fi: Further, the analysis step of calculating the comprehensive action score of action recognition based on the obtained comprehensive evaluation score w and the score S includes:
[0089] Set a score S, whose value range is [0, 1]; calculate the comprehensive evaluation score w and the score S to obtain the comprehensive action score W = w*S of the action recognition; W represents the comprehensive action score of the standardized slaughtering technique of the action recognition;
[0090]
[0091] Figure 5 The key points of the action for slaughtering in the present invention are shown. In this embodiment, the obtained action feature value M is subtracted from the value corresponding to the standard action feature M0 obtained according to the action key points, M0 = (45, 10, 120, 180, 90, 90, 180, 120, 10, 45, 3, 4, 4, 3), and the difference between the 10 angles is used as the factor set U, U = (15, 1, 8, 10, 0, 0, 10, 8, 1, 15). Figure 3 As shown, when there is a factor Ui, the membership of this factor to Vi can be obtained. The evaluation set of multiple factors can be expressed as ri = {ri1, ri2}, and the evaluation set of ten factors can form a general evaluation matrix R, The preset weight values corresponding to each angle are artificially set to form a weight set A, A = {0.2, 0.1, 0.05, 0.05, 0.1, 0.1, 0.05, 0.05, 0.1, 0.2}. A fuzzy transformation B from U to V can be uniquely determined, then B is the fuzzy synthesis result, B = A°R, B = {0.2, 0.1, 0.05, 0.05, 0.1, 0.1, 0.05, 0.05, 0.1, 0.2}° Multiply the membership degree of each level of similarity by the fuzzy synthesis result B to obtain the slaughter action similarity result, which is converted into the slaughter action score calculation result: According to the above specific implementation process and the determined standard action features, which are determined manually, the results of 15 actions are 90.25, 89.65, 99.54, 87.65, 88.98, 98.32, 87.45, 90.21, 86.74, 88.98, 87.59, 90.88, 96.55, 87.69, and 95.36.
[0092] like Figure 4As shown in the figure, the three first-level evaluations are the preparation stage, the second stage, and the third stage as the first-level evaluation factors, and the first-level evaluation factor set is constructed and marked as Fi∈{1, 2, 3}; the results of each detection point in the preparation stage, the second stage, and the third stage are used as the second-level evaluation factors to construct the second-level evaluation factor set fi, which is recorded as:
[0093] fi = {pneumatic stunning f1, vertical bleeding f2, horizontal bleeding f3}
[0094] fi = {hanging cattle f1, draining blood and stimulating with electricity f2, removing front hooves f3, ligating the esophagus f4, peeling the hind legs f5, removing hind hooves f6};
[0095] fi = {hang f1, peel the chest and abdomen f2, peel the neck and front legs f3, open the chest f4, remove the tail f5, split in half f6};
[0096] Construct the first-level evaluation set for comprehensive evaluation of first-level evaluation factors, denoted as:
[0097] Ωi={Ω1,Ω2,Ω3};
[0098] Construct the secondary evaluation set for comprehensive evaluation of secondary evaluation factors, denoted as:
[0099] ωi={90.25,89.65,99.54}
[0100] ωi={87.65, 88.98, 98.32, 87.45, 90.21, 86.74}
[0101] ωi={88.98, 87.59, 90.88, 96.55, 87.69, 95.36};
[0102] The user determines the weight of the first-level evaluation factor through the hierarchical analysis method, which is recorded as:
[0103] Ai = {3, 6, 6};
[0104] The user determines the weight of the secondary evaluation factor through the hierarchical analysis method, which is recorded as:
[0105] ai={1 / 3,1 / 3,1 / 3},
[0106] ai={1 / 6, 1 / 6, 1 / 6, 1 / 6, 1 / 6, 1 / 6}
[0107] ai={1 / 6, 1 / 6, 1 / 6, 1 / 6, 1 / 6, 1 / 6}
[0108] Further, according to the scores of the secondary evaluation set ωi of the secondary evaluation factor set fi and the secondary weight set ai, a function is established to calculate wi. The analysis steps include:
[0109] Further, each secondary factor is evaluated according to the secondary evaluation set ωi and the secondary evaluation weight ai of the secondary evaluation factor set fi, and a table R1 is established with the evaluation sets of n secondary factors as rows. Table 3 is a table R1 established with the evaluation sets of n secondary factors as rows in this embodiment.
[0110] Table 3:
[0111] Secondary evaluation factor set Weight AI Secondary evaluation set ωi Pneumatic Stun F1 1 / 3 90.25 Vertical bloodletting f2 1 / 3 89.65 Horizontal bloodletting 1 / 3 99.54
[0112] We obtain w1=Σ(ai*ωi)=[90.25*(1 / 3)]+[89.65*(1 / 3)]+[99.54*(1 / 3)]=93.15.
[0113] According to the above algorithm, we can get:
[0114] w2=89.89
[0115] w3=91.16
[0116] The value of wi is taken as the score of the first-level evaluation set Ωi. At this time, w1, w2, and w3 are the evaluation sets for constructing the comprehensive evaluation of the first-level evaluation factors, which are recorded as Ωi = {95.36, 89.89, 91.16}. According to the score of the first-level evaluation set Ωi of the first-level evaluation factor set Fi and the first-level weight set Ai, a function is established to calculate w, and then the comprehensive evaluation score w is obtained. The analysis steps include: taking the first-level evaluation set Ωi of each first-level influencing factor as a single element evaluation set to establish a table R as a row. Table 4 is a table R established in this embodiment with the first-level evaluation set Ωi of each first-level influencing factor as a single element evaluation set as a row.
[0117] Table 4:
[0118] First-level evaluation factor set Fi Weight Ai First-level evaluation set Ωi Stage 1 F1 1 95.36 Stage 2F2 1 98.89 Stage 3F3 1 91.16
[0119] Furthermore, each first-level factor is evaluated, and the first-level evaluation set Ωi of each first-level evaluation factor set Fi is added to the first-level weight Ai to construct a function to calculate w:
[0120] w=Σ(Ai*Ωi)=95.36*1+89.89*1+91.16*1=276.41.
[0121] The analysis steps of calculating the comprehensive action score of the standardized slaughtering technology based on human behavior action recognition according to the obtained comprehensive evaluation score w and the score S include:
[0122] Set the score S = 1 / 3; calculate through the comprehensive evaluation score w and the score S to obtain the comprehensive action score W = w*S = 276.41*1 / 3 = 92.13 of the standardized slaughtering technology based on human behavior action recognition, where 92.13 is expressed as the comprehensive action score W of the standardized slaughtering technology based on human behavior action recognition.
[0123] Specifically, the controller can further comprehensively evaluate the overall quality of the user's target action by considering the feature similarity of all key actions. Each key action is assigned a corresponding action score, which ensures the comprehensiveness and meticulousness of the evaluation and avoids the evaluation bias caused by focusing only on some actions. When calculating the comprehensive action score, the preset weight value of each key action is introduced, making the evaluation result more reasonable and scientific, reflecting the difference in importance of different key actions in the overall action, making the evaluation result more convincing, and better guiding users to improve their actions. By comparing the comprehensive action score with the preset action score of the target action, it is possible to objectively determine whether the target action performed by the user is standard, reducing the influence of subjective factors and improving the accuracy and reliability of the judgment.
[0124] In an optional manner, the step of determining whether the user performs the target action in a standard manner according to the difference between the comprehensive action score and the preset action score of the target action includes:
[0125] When the comprehensive action score is greater than the preset action score, it is judged as qualified; when the comprehensive action score is not greater than the preset action score, it is judged as unqualified.
[0126] Specifically, the controller provides a clear quantitative basis for determining whether the user has performed the target action properly by setting clear comparison criteria between the comprehensive action score and the preset action score, which helps reduce the uncertainty caused by subjective judgment and improves the accuracy and consistency of the judgment.
[0127] Figure 6 FIG. 2 is a schematic diagram showing a structure of an embodiment of a motion recognition system 200 provided by the present invention. Figure 6 As shown, the system 200 includes: an acquisition module 210 and a determination module 220 .
[0128] The acquisition module 210 is used to acquire a target video frame of each key action when the user performs the target action, and extract the skeleton key points of each target video frame.
[0129] The determination module 220 is used to determine the feature similarity of each key action according to the skeleton key points of each target video frame, and determine whether the user performs the target action in a standard manner based on the feature similarities of all key actions.
[0130] In an optional manner, the acquisition module 210 is specifically configured to: adopt a clustering-based key frame extraction method to extract the video stream data containing the user performing the target action, and obtain a target video frame for each key action.
[0131] The technical solution of this embodiment reduces the workload of manual evaluation and improves the accuracy of action recognition, thereby making the action recognition process more efficient.
[0132] The above parameters and steps for each module to implement corresponding functions in the motion recognition system 200 of this embodiment can refer to the parameters and steps in the above embodiment of the motion recognition method, and will not be repeated here.
[0133] like Figure 7 As shown, an electronic device 300 according to an embodiment of the present invention includes a processor 320, the processor 320 is coupled to a memory 310, and the memory 310 stores at least one computer program 330, and the at least one computer program 330 is loaded and executed by the processor 320, so that the electronic device 300 implements any of the above-mentioned motion recognition methods, specifically:
[0134] The electronic device 300 may have relatively large differences due to different configurations or performances, and may include one or more processors 320 (Central Processing Units, CPU) and one or more memories 310, wherein the one or more memories 310 store at least one computer program 330, and the at least one computer program 330 is loaded and executed by the one or more processors 320, so that the electronic device 300 implements any one of the motion recognition methods provided in the above embodiments. Of course, the electronic device 300 may also have components such as a wired or wireless network interface, a keyboard, and an input and output interface for input and output, and the electronic device 300 may also include other components for implementing device functions, which will not be described in detail here.
[0135] A computer-readable storage medium according to an embodiment of the present invention stores at least one computer program, and the at least one computer program is loaded and executed by a processor so that a computer implements any one of the above-mentioned action recognition methods.
[0136] Optionally, the computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a compact disc (CD-ROM), a magnetic tape, a floppy disk, an optical data storage device, and the like.
[0137] In an exemplary embodiment, a computer program product or a computer program is also provided, the computer program product or the computer program comprising computer instructions, the computer instructions being stored in a computer-readable storage medium. A processor of an electronic device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the electronic device performs any of the above-mentioned motion recognition methods.
[0138] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects and represent the definition of a specific order or sequence. The order of use of similar objects can be interchanged where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than the order shown or described.
[0139] Those skilled in the art know that the present invention can be implemented as a system, method or computer program product. Therefore, the present disclosure can be specifically implemented in the following forms, namely: it can be complete hardware, it can be complete software (including firmware, resident software, microcode, etc.), or it can be a combination of hardware and software, which is generally referred to as "circuit", "module" or "system" herein. In addition, in some embodiments, the present invention can also be implemented in the form of a computer program product in one or more computer-readable media, and the computer-readable medium contains computer-readable program code.
[0140] Any combination of one or more computer-readable media may be used. A computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium. A computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present application, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in conjunction with an instruction execution system, device, or device.
[0141] Although the embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and are not to be construed as limitations of the present invention. A person skilled in the art may change, modify, replace and vary the above embodiments within the scope of the present invention.
Claims
1. A method for motion recognition, characterized in that: include: Obtain a target video frame of each key action when the user performs the target action, and extract the skeleton key points of each target video frame; According to the skeleton key points of each target video frame, the feature similarity of each key action is determined respectively, and based on the feature similarities of all key actions, it is determined whether the user performs the target action in a standard manner.
2. The action recognition method according to claim 1, characterized in that: The step of obtaining a target video frame of each key action when the user performs the target action includes: A clustering-based key frame extraction method is adopted to extract the video stream data when the user performs the target action, so as to obtain the target video frame of each key action.
3. The action recognition method according to claim 1, characterized in that: The steps of extracting skeleton key points of any target video frame include: The YOLOv8-pose model is used to extract the skeleton key points of any target video frame.
4. The method for motion recognition according to claim 1, characterized in that: The step of determining the feature similarity of the key action corresponding to any target video frame according to the skeleton key points of the target video frame comprises: The angle and module ratio method is used to calculate the skeleton key points of any target video frame to obtain the action feature value of the key action corresponding to the target video frame, and the action feature value of the key action corresponding to the target video frame is compared with the standard action feature value to determine the feature similarity of the key action corresponding to the target video frame.
5. The method for motion recognition according to claim 1, characterized in that: The step of determining whether the user performs the target action in a standard manner based on the feature similarities of all key actions comprises: According to the feature similarity of all key actions, the action score of each key action is obtained, and the comprehensive action score is calculated according to each key action score and the corresponding preset weight value; Whether the user performs the target action in a standard manner is determined based on the difference between the comprehensive action score and the preset action score of the target action.
6. The method for motion recognition according to claim 5, characterized in that: The step of determining whether the user performs the target action in a standard manner according to the difference between the comprehensive action score and the preset action score of the target action comprises: When the comprehensive action score is greater than the preset action score, it is judged as qualified; when the comprehensive action score is not greater than the preset action score, it is judged as unqualified.
7. A motion recognition system, characterized in that: include: Acquisition module and determination module; The acquisition module is used to: acquire a target video frame of each key action when the user performs the target action, and extract the skeleton key points of each target video frame; The determination module is used to determine the feature similarity of each key action according to the skeleton key points of each target video frame, and determine whether the user performs the target action in a standard manner based on the feature similarities of all key actions.
8. The motion recognition system according to claim 7, characterized in that: The acquisition module is specifically used for: A clustering-based key frame extraction method is adopted to extract the video stream data when the user performs the target action, so as to obtain the target video frame of each key action.
9. An electronic device, characterized in that: The electronic device includes a processor, the processor is coupled to a memory, the memory stores at least one computer program, and the at least one computer program is loaded and executed by the processor so that the electronic device implements the action recognition method as described in any one of claims 1 to 6.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores at least one computer program, and the at least one computer program is loaded and executed by the processor so that the computer-readable storage medium implements the action recognition method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Action recognition system and method
CN111898571A
Motion scoring method and device based on key points of human skeleton and medium
CN116386136A
Factory worker illegal action real-time detection method based on YOLOv8-pose
CN118072398A
Action detection method based on human skeleton feature and storage medium
US20240021019A1
