Method for judging score of throwing solid ball
By combining long-range and short-range video acquisition with computer vision and intelligent analysis algorithms, the system automatically determines the score of shot put throws, solving the problem of subjective factors affecting manual judgment and improving the efficiency and accuracy of judgment.
Patent Information
- Application Number
- CN202512006286.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-29
- Publication Date
- 2026-02-17
AI Technical Summary
In existing technologies, the determination of the score for throwing a solid ball mainly relies on manual distance measurement and violation judgment, which is easily affected by subjective factors and is inefficient.
By combining long-range and short-range video acquisition with computer vision and intelligent analysis algorithms, human targets and solid sphere targets are identified, and automated performance evaluation is achieved through trajectory matching.
It has achieved automated judgment of the shot put score, improved judgment efficiency, solved the problem of unclear trajectory or insufficient detail in a single video stream, and can process multiple human targets at the same time.
Smart Images

Figure CN121545102A_ABST
Abstract
Description
Technical Field
[0001] This application generally relates to the field of computer vision technology. More specifically, this application relates to a method for judging the performance of throwing a medicine ball. Background Technology
[0002] Shot put is a sport in track and field that can be widely used in physical education tests in primary and secondary schools, military and police academies, and recruitment exams. Therefore, judging the performance of shot put (e.g., landing point detection, violation judgment, and distance detection) is particularly important.
[0003] Currently, the determination of scores in shot put mainly relies on manual distance measurement and violation identification. However, manual score determination is easily influenced by subjective factors and is inefficient.
[0004] In view of this, there is an urgent need to provide a method for judging the score of shot put, so as to automate the judgment of shot put score and improve the efficiency of score judgment. Summary of the Invention
[0005] In order to at least solve one or more of the technical problems mentioned above, this application proposes a method for judging the score of throwing a solid ball in several aspects.
[0006] In a first aspect, this application provides a method for judging the performance of a shot put, comprising: acquiring a first shot put video stream and a second shot put video stream, wherein the acquisition distance of the first shot put video stream is greater than the acquisition distance of the second shot put video stream; for each first video frame in the first shot put video stream, performing region localization and human key point localization on the human target in the first video frame to obtain all first human body regions and the positions of first human key points within the first human body regions in the first video frame, and performing region localization on the shot put target in the first video frame to obtain all shot put regions in the first video frame; tracking the human target in each first video frame based on the first human body regions in each first video frame to obtain at least one first human body motion trajectory, and tracking the shot put target in each first video frame based on the shot put regions in each first video frame to obtain at least one shot put motion trajectory; for each first human body motion trajectory... For each human target, a solid ball target is matched, and a first score judgment result is determined based on the solid ball's trajectory and the positions of first human key points within each first human body region of the human target. For each second video frame in the second solid ball throwing video stream, the human target in the second video frame is localized, and the human key points are located to obtain all second human body regions and the positions of second human key points within those regions. Based on the human body regions in each second video frame, the human target in each second video frame is tracked to obtain at least one second human body trajectory. For each human target in a second human body trajectory, a second score judgment result is determined based on the positions of second human key points within each second human body region of the human target. The first and second score judgment results of each human target are merged to obtain the target score judgment result for each human target.
[0007] Using the above-described method for judging the performance of a shot put, this embodiment of the application captures video of the shot put process from both long and short distances. Then, it uses computer vision and intelligent analysis algorithms to judge the performance. Specifically, it identifies the human target, key points on the human body, and the shot put target in the first shot put video stream captured from a long distance. Then, it matches the human target and the shot put target, and determines the first performance result of the human target based on the shot put trajectory and the positions of the first key points within each first human body region of the human target. Similarly, it identifies the human target and key points in the second shot put video stream captured from a short distance, and then determines the performance result based on the various... The location of the key point of the second human body within the second human body area determines the second score judgment result of the human target. Finally, the first score judgment result and the second score judgment result of each human target are merged to obtain the target score judgment result of each human target. This realizes the automation of the score judgment of the shot put, without human intervention, and improves the efficiency of score judgment. Furthermore, by using long-distance and short-distance video acquisition of the shot put process, it is possible to capture both the complete motion trajectory of the shot put and the partial movements of the human target, which solves the problem of unclear trajectory or insufficient details in a single video stream. Moreover, through target tracking and trajectory matching, the precise association between human and ball is achieved, and the scores of multiple human targets throwing shot puts can be judged simultaneously. Attached Figure Description
[0008] The above and other objects, features, and advantages of exemplary embodiments of this application will become readily understood by reading the following detailed description with reference to the accompanying drawings. In the drawings, several embodiments of this application are illustrated by way of example and not limitation, and the same or corresponding reference numerals denote the same or corresponding parts, wherein: Figure 1 An exemplary flowchart of a solid ball throwing method according to some embodiments of this application is shown; Figure 2 An exemplary structural block diagram of an improved YOLOv8 model according to some embodiments of this application is shown; Figure 3 Example diagrams illustrating the throwing distance calculation of some embodiments of this application are shown. Detailed Implementation
[0009] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0010] It should be understood that the terms "comprising" and "including" used in the specification and claims of this application indicate the presence of the described features, integrals, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or collections thereof.
[0011] It should also be understood that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the application. As used in this specification and claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used in this specification and claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes such combinations.
[0012] As used in this specification and claims, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrase "if determined" or "if [described condition or event] is detected" may be interpreted, depending on the context, as "once determined," "in response to determination," "once [described condition or event] is detected," or "in response to detection of [described condition or event]."
[0013] The specific embodiments of this application will now be described in detail with reference to the accompanying drawings.
[0014] Figure 1 An exemplary flowchart of a shot put performance determination method 100 according to some embodiments of this application is shown. It is understood that the shot put performance determination method 100 described above can be executed by any suitable device with data processing capabilities, such as, but not limited to, terminal devices, processors, and servers.
[0015] In this embodiment, the above-described method 100 for judging the performance of a shot put can be applied to scenarios such as physical education tests in primary and secondary schools and examinations in military and police academies. In these scenarios, the examination venue may include multiple throwing areas, each used for one candidate's shot put test. The examination venue may be equipped with video recording equipment, for example, two cameras. Specifically, the first camera has a longer acquisition distance than the second camera; that is, the first camera shoots from a distance to ensure the entire shot put process is captured, while the second camera shoots from a close distance to ensure the entire shot put process is captured.
[0016] In this embodiment of the application, the scores of multiple candidates throwing medicine balls can be judged based on two cameras. The judgment of the medicine ball score can include landing point detection, throwing distance determination, and violation detection, etc. This embodiment of the application does not make specific limitations on this.
[0017] In this embodiment, before judging the score of the shot put, a device with data processing capabilities connects to the first and second cameras, loads the improved YOLOv8 shot put detection model and the YOLOv8-pose human keypoint model, and initializes various parameters such as weights, thresholds, SAHI slice size, and sliding step size. Then, a buffer is established for each target (including shot put targets and human targets). This buffer uses the target ID as the key and contains a trajectory stack, a state stack, and a timestamp to store different contents of the target. Specifically, the trajectory stack stores the motion trajectory of the shot put target, and the state stack stores the keypoint information and various distance information of the human target. Then, the score of the shot put is judged according to the shot put score judgment method in the following embodiment.
[0018] like Figure 1As shown, the above-mentioned method 100 for judging the performance of throwing a solid ball includes: Step S110: acquiring a first solid ball throwing video stream and a second solid ball throwing video stream, wherein the acquisition distance of the first solid ball throwing video stream is greater than the acquisition distance of the second solid ball throwing video stream; Step S120: for each first video frame in the first solid ball throwing video stream, performing region localization and human key point localization on the human target in the first video frame to obtain all first human regions and the positions of the first human key points within the first human regions in the first video frame, and performing region localization on the solid ball target in the first video frame to obtain all solid ball regions in the first video frame; Step S130: tracking the human target in each first video frame based on the first human region in each first video frame to obtain at least one first human motion trajectory, and tracking the solid ball target in each first video frame based on the solid ball region in each first video frame to obtain at least one solid ball motion trajectory; Step S140: for the human target in each first human motion trajectory, for The human target is matched with a solid ball target, and the first score judgment result of the human target is determined based on the solid ball's trajectory and the positions of the first human key points in each first human body region of the human target; Step S150: For each second video frame in the second solid ball throwing video stream, the human target in the second video frame is located in the region and the human key points are located to obtain all second human body regions and the positions of the second human key points in the second human body regions in the video frame; Step S160: The human target in each second video frame is tracked based on the human body regions in each second video frame to obtain at least one second human body trajectory; Step S170: For the human target in each second human body trajectory, the second score judgment result of the human target is determined based on the positions of the second human key points in each second human body region of the human target; Step S180: The first score judgment result and the second score judgment result of each human target are merged to obtain the target score judgment result of each human target.
[0019] For example, the first shot put video stream in step S110 is video data of the shot put process captured by the first camera at a relatively distant position, used to capture the trajectory of the shot put and the overall movement of the human target. The second shot put video stream is video data of the shot put process captured by the second camera at a relatively close position, used to accurately capture the local key point movements of the human target.
[0020] In this embodiment, after the first camera captures the video stream of the first solid ball being thrown, and the second camera captures the video stream of the second solid ball being thrown, both video streams can be sent to the aforementioned device with data processing capabilities for processing. Specifically, the first camera, the second camera, and the device with data processing capabilities can be connected to the same local area network, and the video streams can be transmitted in real time via the RTSP protocol. Furthermore, in this embodiment, the frame rate of the two cameras can be set according to the actual processing capability of the device with data processing capabilities.
[0021] For example, the first video frame in step S120 above can be all video frames of the first solid ball throwing video stream (e.g., when the camera's frame rate is 30fps, it contains 30 first video frames per second), or it can be a portion of the first solid ball throwing video stream (e.g., the first solid ball throwing video stream is processed by frame extraction at a set interval (e.g., extracting one frame every other frame) to obtain the first video frame). This application embodiment does not specifically limit this. Each of the above first video frames includes at least one human target and at least one solid ball target.
[0022] The human target in step S120 above refers to a natural human individual appearing in the first video frame, and there is at least one such individual. Human key points refer to the iconic anatomical locations of the human body, which may specifically include: nose key point, left eye key point, right eye key point, left ear key point, right ear key point, left shoulder key point, right shoulder key point, left elbow key point, right elbow key point, left wrist key point, right wrist key point, left hip joint key point, right hip joint key point, left knee key point, right knee key point, left ankle key point, right ankle key point, left toe key point, right toe key point, left heel key point, and right heel key point, totaling 21 key points.
[0023] In this embodiment of the application, the first human body region is a rectangular bounding box region containing the human body target obtained by region localization, which can be represented as (x1, y1, x2, y2), where x1 represents the abscissa of the upper left corner of the first human body region in the image coordinate system, y1 represents the ordinate of the upper left corner of the first human body region in the image coordinate system, x2 represents the abscissa of the lower right corner of the first human body region in the image coordinate system, and y2 represents the ordinate of the lower right corner of the first human body region in the image coordinate system.
[0024] In this embodiment, the location of the first human body key point can be the center position or centroid position of each key point, etc. This embodiment does not specifically limit this; it only needs to represent the human body key point. Specifically, the location of each first human body key point can be represented as (x... a y a ), where xa The x-coordinate of the first human body key point in the image coordinate system is represented by y. a This represents the ordinate of the first human body key point in the image coordinate system.
[0025] Here, the orientation of the image coordinate system can be predefined. For example, the rightward and downward directions are the positive directions of the two coordinate axes of the image coordinate system, respectively.
[0026] In this embodiment of the application, for each first video frame, the human target in the first video frame is localized and the human key points are located. There are many ways to obtain all the first human body regions and the positions of the first human key points within the first human body regions in the first video frame. For example, it can be obtained through a pre-trained human key point detection model. Specifically, the first video frame is input into the above-mentioned human key point detection model, and the human key point detection model outputs all the first human body regions in the first video frame and the positions of the first human key points within each first human body region.
[0027] The aforementioned human keypoint detection model is a neural network model trained in advance using a large number of human images, such as the yolov8-pose model.
[0028] The solid ball target in step S120 above refers to the solid ball appearing in the first solid ball throwing video stream, and there is at least one such solid ball. The solid ball region refers to the rectangular bounding box region containing the solid ball target obtained through region localization, which can be represented as (x3, y3, x4, y4), where x3 represents the x-coordinate of the upper left corner of the solid ball region in the image coordinate system, y3 represents the y-coordinate of the upper left corner of the solid ball region in the image coordinate system, x4 represents the x-coordinate of the lower right corner of the solid ball region in the image coordinate system, and y4 represents the y-coordinate of the lower right corner of the solid ball region in the image coordinate system.
[0029] In this embodiment of the application, there are many ways to locate the solid sphere target in the first video frame and obtain all the solid sphere regions in the first video frame. For example, it can be obtained through a pre-trained solid sphere detection model. Specifically, the first video frame is input into the above-mentioned solid sphere detection model, and the solid sphere detection model outputs all the solid sphere regions in the first video frame.
[0030] The aforementioned solid sphere detection model is a neural network model trained in advance using a large number of solid sphere images; for example, it could be the YOLOv8 model.
[0031] In this embodiment of the application, in order to solve the problem that traditional detectors have difficulty detecting objects with a small number of pixels and a lack of sufficient detail, when the first video frame is input into the above-mentioned human key point detection model, SAHI slice inference can be used. That is, the first video frame is divided into overlapping small blocks for inference, which increases the relative size of small targets in the input, so that the model sees larger small balls in each small block and the features are more obvious, thereby significantly improving the detection rate.
[0032] For example, the first human motion trajectory in step S130 above refers to the sequence of position changes of the same human target in consecutive first video frames, which can be represented by the first identification information and the coordinates of the first human region in each first video frame.
[0033] The trajectory of the solid ball in step S130 above refers to the sequence of position changes of the same solid ball target in consecutive first video frames, which can be represented by the second identification information and the coordinates of the solid ball region in each first video frame.
[0034] The aforementioned first identification information refers to information used to uniquely identify a human target. It can be implemented in many ways, such as numerical codes, alphanumeric codes, text, colors, etc. This application embodiment does not specifically limit the first identification information.
[0035] The aforementioned second identification information refers to the information used to uniquely identify the solid sphere target. It can also be implemented in many ways, such as numerical code, letter code, text, color, etc. This application embodiment does not specifically limit the second identification information.
[0036] It should be noted that the first identification information of the first human body region belonging to the same human body target is the same, while the first identification information of the first human body region belonging to different human body targets is different; similarly, the second identification information of the solid sphere region belonging to the same solid sphere target is the same, while the second identification information of the solid sphere region belonging to different solid sphere targets is different. Furthermore, the first and second identification information can be of the same type (e.g., both are letter codes) or of different types (e.g., the first identification information is a number code, and the second identification information is a letter code). Of course, when the first and second identification information are of the same type, they are different.
[0037] In this embodiment, the methods for tracking human targets in each first video frame based on the first human body region in each first video frame and for tracking solid sphere targets in each first video frame based on the solid sphere region in each first video frame are the same and can be many, such as HybridSORT, ByteTrack and other multi-target tracking algorithms.
[0038] In this embodiment, a Kalman filter algorithm can be used to predict the target's position in the next video frame, and a Hungarian algorithm can be used to match the predicted position with the target area detected in the current video frame, thereby achieving multi-target tracking. When the target is not detected due to occlusion or other reasons, the trajectory prediction is maintained to avoid tracking interruption.
[0039] For example, in step S140 above, after obtaining multiple first human motion trajectories and multiple solid ball motion trajectories, a solid ball target can be matched for each human target in the first human motion trajectory to establish a correspondence between the human target and the solid ball target. Taking the first identification information as a letter number and the second identification information as a number as an example, human A-solid ball 1, human B-solid ball 2, etc. can be obtained to determine the score of solid ball throwing for each human target.
[0040] As for the specific matching method, the following examples will illustrate it, and it will not be elaborated here.
[0041] The aforementioned first performance determination result refers to the determination result obtained based on the analysis of the video stream of the first solid ball throw, which may include, but is not limited to, the landing point detection result, the throwing distance detection result, the violation detection result, etc. The violation detection result here may include: one-handed throwing violation and release point below head height violation, etc., which are not specifically limited in this embodiment of the application.
[0042] In this embodiment of the application, the first score determination result of the human target can be determined by combining the trajectory of the solid ball target and the position of the first human key point in each first human area of the human target: combining the trajectory of the solid ball to analyze the landing point and throwing distance of the solid ball, and then combining the position of the first human key point to analyze the position of the release point and the top of the head and the number of throwing hands, so as to form the first score determination result.
[0043] The specific calculation method for each particular first score determination result is described in the following examples, and will not be repeated here.
[0044] For example, the second video frame in step S150 above can be all video frames of the second shot put video stream (e.g., when the camera's frame rate is 30fps, it contains 30 second video frames per second), or it can be a portion of the second shot put video stream (e.g., the second shot put video stream is processed by frame extraction at a set interval (e.g., extracting one frame every other frame) to obtain the second video frame). This application embodiment does not specifically limit this. Each of the above second video frames includes at least one human target and at least one shot put target.
[0045] The human target in step S150 above refers to a natural human individual appearing in the second video frame, and there is at least one such individual. Human keypoints refer to the iconic anatomical locations of the human body, specifically including: nose keypoint, left eye keypoint, right eye keypoint, left ear keypoint, right ear keypoint, left shoulder keypoint, right shoulder keypoint, left elbow keypoint, right elbow keypoint, left wrist keypoint, right wrist keypoint, left hip joint keypoint, right hip joint keypoint, left knee keypoint, right knee keypoint, left ankle keypoint, right ankle keypoint, left toe keypoint, right toe keypoint, left heel keypoint, and right heel keypoint, totaling 21 keypoints.
[0046] In this embodiment, the second human body region is a rectangular bounding box region containing the human body target obtained by region localization, which can be represented as (x5, y5, x6, y6), where x5 represents the abscissa of the upper left corner of the second human body region in the image coordinate system, y5 represents the ordinate of the upper left corner of the second human body region in the image coordinate system, x6 represents the abscissa of the lower right corner of the second human body region in the image coordinate system, and y6 represents the ordinate of the lower right corner of the second human body region in the image coordinate system.
[0047] In this embodiment, the location of the second human body key point can be the center position or centroid position of each key point, etc. This embodiment does not specifically limit this; it only needs to represent a human body key point. Specifically, the location of each second human body key point can be represented as (x... b y b ), where x b The x-coordinate of the second human body key point in the image coordinate system is represented by y. b This represents the ordinate of the second human body key point in the image coordinate system.
[0048] In this embodiment of the application, for each second video frame, the human target in the second video frame is located in a region and the human key points are located. There are many ways to obtain all the second human regions and the positions of the second human key points in the second human regions in the second video frame. For example, it can be obtained through the human key point detection model mentioned above. Specifically, the second video frame is input into the human key point detection model, and the human key point detection model outputs all the second human regions in the second video frame and the positions of the second human key points in each second human region.
[0049] For example, the second human motion trajectory in step S160 above refers to the sequence of position changes of the same human target in consecutive second video frames, which can be represented by the third identification information and the coordinates of the second human region in each second video frame.
[0050] The aforementioned third identification information refers to information used to uniquely identify a human target. It can be implemented in many ways, such as numerical codes, alphanumeric codes, text, colors, etc. This application embodiment does not specifically limit the third identification information.
[0051] It should be noted that the first identification information of the second human body regions belonging to the same human body target is the same, while the first identification information of the second human body regions belonging to different human body targets is different. The third identification information can be of the same type as the first and second identification information, or it can be of a different type. When the third identification information is of the same type as the first and second identification information, the third identification information is different from the first and second identification information.
[0052] In this embodiment, the method for tracking human targets in each second video frame based on the second human body region in each second video frame is the same as the tracking method described above, and will not be repeated here.
[0053] For example, the second performance determination result in step S170 above refers to the determination result obtained based on the analysis of the second shot put video stream, which may include, but is not limited to, violation detection results, where violation detection results may include violations of stepping on the line.
[0054] In this embodiment, determining the second score of the human target based on the positions of the second key points within each second human body region can be achieved by determining whether there is a violation of stepping on the line based on the positional relationship between the foot key points and the throwing line, thereby forming the second score. The specific calculation method for the second score is described in the following embodiments and will not be elaborated upon here.
[0055] For example, in step S180 above, since the first and second score determination results are for the same shot put process, the first and second score determination results for each human target can be merged to obtain the final target score determination result for each human target. Specifically, the score results of the same human target in the first and second shot put video streams can be associated through feature matching of the human target (e.g., facial features, body shape features, etc.), integrating throwing distance and various violation determination conclusions to form the target score determination result.
[0056] This application embodiment captures video of the shot put process from both long-range and close-range perspectives. Then, it uses computer vision and intelligent analysis algorithms to determine the shot put score. Specifically, it identifies the human target, key points on the human body, and the shot put target in the first shot put video stream captured from a long distance. The human target and the shot put target are then matched, and the first score for the human target is determined based on the shot put trajectory and the positions of the first key points within each first human body region of the matched target. Similarly, it identifies the human target and key points in the second shot put video stream captured from a close distance, and then determines the score based on the second key points within each second human body region of the human target. The second score determination result for the human target is determined by identifying the key points of the body. Finally, the first score determination result and the second score determination result for each human target are merged to obtain the target score determination result for each human target. This realizes the automation of the score determination for throwing a solid ball without human intervention, thus improving the efficiency of score determination. Furthermore, by using long-distance and short-distance video acquisition of the solid ball throwing process, it is possible to capture both the complete trajectory of the solid ball and the partial movements of the human target, solving the problem of unclear trajectory or insufficient details in a single video stream. Moreover, through target tracking and trajectory matching, the precise correlation between the human and the ball is achieved, and the scores of multiple human targets throwing solid balls can be determined simultaneously.
[0057] In this embodiment, because the distance at which the first video frame is captured is relatively far, and the solid sphere target occupies a small proportion of the image in the first video frame, typically only a few dozen or even a dozen pixels, the resolution is low when using the conventional YOLOv8 model to detect the solid sphere target, and the feature information of the solid sphere target is easily lost. Based on this, the YOLOv8 model can be improved to increase the detection accuracy of the solid sphere target.
[0058] Specifically, the improved YOLOv8 model in this embodiment adopts GiraffeDet's "light backbone, heavy neck" and multi-scale full fusion approach, which can significantly improve the detection performance of small targets.
[0059] The following is combined Figure 2 The exemplary block diagram of the improved YOLOv8 model shown describes the structure of the improved YOLOv8 model: like Figure 2 As shown, the YOLOv8 model includes: an input module, a backbone network, a neck network, a head network, and an output module. For example, the input module is the front-end processing unit of the YOLOv8 model, responsible for receiving the first video frame and performing preprocessing operations to ensure that the input data meets the model requirements. The preprocessing operations here may include, but are not limited to, adaptive image scaling with letterboxing, as well as image enhancement and normalization processes such as Mosaic, MixUp, color dithering, and random perspective.
[0060] The Backbone is the feature extraction unit of the YOLOv8 model, including the C2f module and the SPPF module, used to extract multi-scale features from the first video frame and pass the extracted features to the Neck. The multi-scale features here include, but are not limited to, edge features, texture features, semantic features, etc., and this application embodiment does not specifically limit them.
[0061] The C2f module is the core feature extraction component of the YOLOv8 model. Based on CSPNet improvements, it enhances feature representation capabilities through cross-layer connections and feature fusion while controlling computational cost. The SPPF module integrates feature maps of different scales into fixed-dimensional feature vectors through pooling operations, enhancing the model's adaptability to multi-scale targets.
[0062] The Neck is the feature fusion unit of the YOLOv8 model, responsible for fusing the multi-scale features extracted from the Backbone to obtain multiple fused features (e.g., ...). Figure 2 The three fusion features in Neck enhance feature richness and semantic consistency. Specifically, Neck introduces the Bidirectional Pyramid Network (BiFPN) and the lightweight Inception to enhance feature aggregation for distant, small targets.
[0063] BiFPN supports bidirectional feature fusion from top to bottom (high-level semantic features are passed to lower levels) and from bottom to top (low-level detailed features are passed to higher levels), ensuring interaction between upper and lower level semantics, and paying more attention to small target feature layers through learned weights. Meanwhile, the lightweight Inception uses a feature extraction component with parallel multi-scale convolutional kernels (such as 1×1 and 3×3), enhancing the model's ability to detect targets of different sizes without significantly increasing computation, preserving the feature details of small targets while introducing local context. Therefore, the multi-scale feature maps output by the improved Neck show greater attention to small targets, containing rich semantic information and details.
[0064] The Head is the detection output unit of the YOLOv8 model, responsible for generating and outputting multiple detection results based on fused features. For example, Figure 2The decoupled, anchorless three-branch algorithm (i.e., predicting the category, confidence score, and bounding box coordinates) also regresses 21 human keypoints. The Head in this embodiment uses an FRM detection head, which refers to a detection head that integrates Distributed Focal Loss (DFL), Convolutional Resampling Combined Network (PCRL), and Feature Reconstruction Module (FRM), improving bounding box regression accuracy and small object detection capabilities.
[0065] DFL can be implemented using a single convolutional layer that transforms the input channels to process distributed data. PCRL includes convolutional layers, upsampling, and two sequence modules that work together on the input data, processing and merging information in different ways. FRM combines and processes feature maps at different scales, using convolution, upsampling, and softmax operations to integrate and reorganize features at different levels for further image processing.
[0066] Of course, the computational cost of the Head model increases significantly after adding the FRM detection head. Therefore, improvements are needed to ensure that the Head remains lightweight while improving bounding box regression accuracy and small object detection capabilities. Specifically, the 3×3 convolutions are replaced with depthwise separable convolutions, i.e., first performing a Depthwise convolution on the main channel followed by a 1×1 Pointwise convolution. The standard convolutions are also modified to Ghost convolutions. Furthermore, each branch first compresses the channels using a 1×1 GhostConv, then uses a Depthwise 3×3 convolution to extract spatial features, and finally uses a 1×1 convolution to restore and fuse the channels. This significantly reduces parameters and computational cost, achieving a balance between lightweight design and accuracy.
[0067] The output module refers to the back-end processing unit of the YOLOv8 model, which is responsible for post-processing the detection results output by the head network (e.g., non-maximum suppression, NMS), filtering redundant results, and outputting the final detection result, i.e., the target output result.
[0068] This application improves upon the traditional YOLOv8 model by employing a C2f+SPPF combination for the Backbone, which controls the computational load while maintaining feature extraction capabilities, balancing accuracy and speed. The Neck introduces BiFPN+Lightweight Inception, which enhances semantic consistency through bidirectional feature fusion and improves the ability to capture details of small targets through parallel convolution, thus solving the problem of indistinct features of solid spheres (small targets) in distant scenes. Furthermore, the FRM detection head improves the accuracy of bounding box regression through multi-module fusion, and combined with multi-scale detection, further enhances the accuracy and recall of solid sphere detection.
[0069] It should be noted that, to further address the challenge of detecting small, solid spheres at long distances in the air, the improved YOLOv8 model described above can employ the Non-Wide Weighted Loss (NWD) loss function during training. The NWD loss function prioritizes subtle shape and positional differences and is more sensitive to changes in small-scale bounding boxes, thus mitigating the gradient-unfriendly IoU issue in small-object scenarios. Small offsets in small bounding boxes result in minimal IoU changes and near-zero gradients, while NWD provides a continuous and smooth metric. Therefore, using the NWD loss function during training the improved YOLOv8 model more effectively trains the model to learn the precise boundaries of small objects, significantly reducing missed detections and localization errors, and further improving the stability and accuracy of small object boundary regression.
[0070] As an optional embodiment of the application, the first human body key points include hand key points; for each human target in the first human body movement trajectory, matching a solid ball target for the human target includes: for each human target in the first human body movement trajectory, selecting a frame of the video to be detected when the human target is holding the ball from the first solid ball throwing video stream; determining the solid ball target matching the human target based on the position of the hand key points of the human target and each solid ball area in the video to be detected.
[0071] For example, the aforementioned key points of the hand refer to key points of the human target's hand, which can be key points of the wrist. For example, it can be the key point of the left wrist of the human target, or it can be the key point of the right wrist of the human target. Of course, it can also include both the key points of the left wrist and the key points of the right wrist of the human target. This application embodiment does not specifically limit this.
[0072] In this embodiment of the application, the aforementioned video frame to be detected refers to one of the static video frames of a human target holding a solid ball, which is the key input frame for solid ball target matching.
[0073] In this embodiment, for each human target in the first human motion trajectory, a detection video frame of the human target holding the ball can be obtained from the first solid ball throwing video stream. Then, based on the positional relationship between the wrist key point position in the detection video frame and each solid ball region, a solid ball target matching the human target can be determined. Specifically, the distance from the wrist key point position to each solid ball region (e.g., to the center point of each solid ball target region) can be calculated, and then the solid ball target region closest to the wrist key point position is taken as the solid ball target matching the human target.
[0074] This application embodiment can match a solid ball target to each human target by utilizing the close positional relationship between the key points of the examinee's wrist and the solid ball during the ball-holding phase. Through distance filtering, it can accurately establish the association between each human target and the corresponding solid ball in the scenario where multiple examinees hold the ball at the same time, avoiding matching errors.
[0075] As an optional embodiment of this application, the first performance determination result includes: landing point detection result; obtaining the landing point detection result based on the solid ball motion trajectory of the matched solid ball target includes: when the number of trajectory points of the solid ball motion trajectory of the matched solid ball target is greater than or equal to a set number threshold, determining the highest trajectory point of the solid ball target from the solid ball motion trajectory, and selecting the solid ball motion sub-trajectory after the highest trajectory point from the solid ball motion trajectory; determining the first candidate landing point based on the velocity vector angle at each trajectory point in the solid ball motion sub-trajectory and the displacement increment along the second coordinate axis; performing quadratic curve fitting on the trajectory points in the solid ball motion sub-trajectory, and determining the second candidate landing point based on the fitting residual; determining the third candidate landing point based on the velocity change trend of the solid ball motion sub-trajectory along the second coordinate axis; and determining the target landing point based on at least one of the first candidate landing point, the second candidate landing point, and the third candidate landing point.
[0076] For example, the above-mentioned landing point detection result refers to the determination result of the final position of the solid ball in contact with the ground, which may include, but is not limited to, landing point coordinates, video frame index, and confidence level.
[0077] In this embodiment of the application, the trajectory of the matched solid sphere target can be represented by a sequence of trajectory points, i.e., trajectory={( , )}_{i=0…H-1}, where trajectory represents the sequence of trajectory points of the matched solid sphere target; , ) represents the coordinates of the trajectory points; H represents the number of trajectory points.
[0078] In this embodiment of the application, after obtaining the trajectory point sequence, it is first determined whether the number of trajectory points in the trajectory point sequence is sufficient. If the number of trajectory points is sufficient, the score is judged. If the number of trajectory points is insufficient, the trajectory point sequence is considered not to be a complete trajectory point sequence of the shot put, and the trajectory point sequence is not processed to avoid misjudgment of the landing point due to insufficient data.
[0079] Specifically, the number of trajectory points in a trajectory can be determined by whether the number (H) of trajectory points in the trajectory is greater than or equal to a set threshold. If not, the number of trajectory points in the trajectory is considered insufficient and landing point detection is not performed; if yes, landing point detection is performed.
[0080] The threshold set here is the threshold for determining whether the number of trajectory points is sufficient for landing point detection. It can be determined according to the actual situation, such as 5, 10, etc. This application embodiment does not make a specific limitation on this.
[0081] In this embodiment, when the number of trajectory points in the trajectoryory is greater than or equal to a set threshold, to reduce computational load, only the descent phase of the solid sphere target can be analyzed. Therefore, the highest trajectory point of the solid sphere target (denoted as max_) is determined from the solid sphere's trajectory (i.e., the trajectoryory). max_ dx=argmin( ), and select the sub-trajectory of the solid ball from the highest trajectory point (excluding the highest trajectory point) from the solid ball's trajectory.
[0082] For example, the aforementioned velocity vector angle refers to the angle between the trajectory point and its adjacent trajectory points, which can be calculated based on the coordinates of the trajectory point and the coordinates of its adjacent trajectory points. As for the specific calculation method, the following embodiments provide examples, which will not be elaborated here.
[0083] The second coordinate axis method mentioned above refers to the Y-axis of the image coordinate system, i.e., the vertical direction. The displacement increment mentioned above (denoted as...) () refers to the coordinate difference between the current trajectory point and the previous trajectory point, i.e. () ).
[0084] For example, the first candidate landing point mentioned above is a landing point candidate determined based on the velocity vector angle and the displacement increment along the second coordinate axis. Specifically, it can be determined by determining whether the velocity vector angle and the displacement increment along the second coordinate axis meet the corresponding set conditions, such as the velocity vector angle being greater than a set angle threshold, the displacement increment being greater than a set increment threshold, etc. This application embodiment does not specifically limit this, and the following embodiments provide examples, which will not be elaborated here.
[0085] If the velocity vector angle and displacement increment along the second coordinate axis of a point in the solid ball's motion sub-trajectory satisfy the corresponding set conditions, then the first candidate landing point is determined; if the velocity vector angle and displacement increment along the second coordinate axis of no point in the solid ball's motion sub-trajectory satisfy the corresponding set conditions, then it is considered that no first candidate landing point has been selected.
[0086] For example, the above-mentioned quadratic curve fitting refers to fitting the curve using the least squares method with time as the independent variable and the coordinates of the trajectory points along the second coordinate axis as the dependent variable, to obtain the coefficients of the curve equation (denoted as a, b, c), thus obtaining the fitted curve (denoted as...). This can reflect the ideal trajectory of the solid ball target during its descent.
[0087] The aforementioned fitting residual refers to the absolute value of the difference between the actual coordinates of the trajectory point along the second coordinate axis and the coordinates predicted by the fitted curve along the second coordinate axis. It can reflect the degree of deviation between the actual trajectory of the solid ball and the ideal trajectory.
[0088] In this embodiment, the aforementioned second candidate landing point is a landing point candidate determined based on the fitting residual, that is, a trajectory point where the actual trajectory deviates significantly from the ideal trajectory, i.e., the instant the solid ball target touches the ground. In this embodiment, after fitting the ideal quadratic curve of the solid ball's descent, the fitting residual of each trajectory point can be determined, and then the second candidate landing point is determined based on the fitting residual of each trajectory point. For example, trajectory points with larger fitting residuals can be used as second candidate landing points; if the fitting residuals of all trajectory points are small, then no second candidate landing point is considered to be selected. The following embodiments describe the process of determining the second candidate landing point in an illustrative way, which will not be repeated here.
[0089] For example, the aforementioned third candidate landing point refers to a trajectory point determined by the velocity change trend of the solid ball's sub-trajectory along the second coordinate axis. Specifically, the trajectory points of the solid ball's sub-trajectory can be traversed, the displacement increment of each trajectory point along the second coordinate axis can be calculated, and then the third candidate landing point can be determined based on the displacement increment of each trajectory point along the second coordinate axis. For example, when the displacement increment of each trajectory point along the second coordinate axis changes direction, such as from positive to negative, a third candidate landing point is determined. If the displacement increment of each trajectory point along the second coordinate axis does not change direction, then no third candidate landing point is considered to have been selected. The following embodiments also describe the process of determining the third candidate landing point in an illustrative way, which will not be repeated here.
[0090] Based on the above description, we can obtain only one candidate landing point (e.g., the first candidate landing point, the second candidate landing point, or the third candidate landing point), or only two candidate landing points (e.g., the first candidate landing point and the second candidate landing point, the second candidate landing point and the third candidate landing point, or the first candidate landing point and the third candidate landing point), or three candidate landing points (i.e., the first candidate landing point, the second candidate landing point, and the third candidate landing point). Of course, it is also possible that no candidate landing points are detected, in which case we can directly end the landing point detection.
[0091] In the embodiments of this application, when candidate landing points are detected, the target landing point can be determined based on at least one of the detected candidate landing points, namely at least one of the first candidate landing point, the second candidate landing point, and the third candidate landing point, where the target landing point refers to the final landing point.
[0092] In the embodiments of this application, there are many ways to determine the target landing point based on at least one of the first candidate landing point, the second candidate landing point, and the third candidate landing point. For example, one of the candidate landing points can be directly selected as the target landing point. Another example is to take the weighted average of the coordinates of the first candidate landing point, the second candidate landing point, and the third candidate landing point as the target landing point. The embodiments of this application do not make specific limitations on this.
[0093] The following embodiments illustrate the method for determining the target landing point. Please refer to the description of the embodiments below, which will not be repeated here.
[0094] The embodiments of this application use a multi-candidate method of "velocity vector angle + quadratic curve fitting + velocity trend reversal" to determine the target landing point. It captures the characteristics of the solid ball landing point from different dimensions. Compared with a single determination method, it has stronger anti-interference ability, that is, it has stronger robustness to rebound, rolling and background interference.
[0095] The following is an example of how to determine the first candidate landing point: As an optional embodiment of this application, the first candidate landing point is determined by the following steps: for each trajectory point on the sub-trajectory of the solid ball, the velocity vector of the trajectory point is calculated based on the coordinates of the trajectory point and the coordinates of the previous trajectory point. The velocity vector includes the displacement increment along the first coordinate axis and the displacement increment along the second coordinate axis; and the angle between the velocity vectors at the trajectory point is calculated based on the velocity vector of the trajectory point and the velocity vector of the next trajectory point. When the angle between the velocity vectors at any trajectory point satisfies a set angle condition, the displacement increment of the previous trajectory point along the second coordinate axis satisfies a first set increment condition, and the displacement increment of the next trajectory point along the second coordinate axis satisfies a second set increment condition, the next trajectory point is taken as the first candidate landing point.
[0096] For example, the aforementioned velocity vector refers to the proximity of the motion direction and velocity of the solid sphere target between adjacent video frames, which can be specifically calculated from the coordinate difference of adjacent trajectory points. In this embodiment, the velocity vector includes the displacement increment along the first coordinate axis and the displacement increment along the second coordinate axis. Here, the first coordinate axis can be the Y-axis direction (i.e., the vertical direction), and the second coordinate axis direction is the X-axis direction (i.e., the horizontal direction).
[0097] Specifically, for each point on the sub-trajectory of the solid sphere, the velocity vector of that point can be calculated based on the following formula:
[0098] in, This represents the velocity vector of the i-th trajectory point; This represents the displacement increment of the i-th trajectory point along the first coordinate axis. ; This represents the displacement increment of the i-th trajectory point along the second coordinate axis. .
[0099] In this embodiment of the application, based on the above description, for each trajectory point on the sub-trajectory of the solid sphere, the angle between the velocity vectors at that trajectory point can be calculated based on the velocity vector of that trajectory point and the velocity vector of the next trajectory point. Specifically, the angle between the velocity vectors at that trajectory point is calculated based on the following formula:
[0100] in, This represents the angle between the velocity vectors at the i-th trajectory point; This represents the velocity vector of the (i+1)th trajectory point (i.e., the next trajectory point); Let represent the magnitude of the velocity vector at the i-th trajectory point; This represents the magnitude of the velocity vector at the (i+1)th trajectory point.
[0101] For example, the aforementioned angle setting condition refers to a threshold condition for determining whether the angle between the velocity vectors meets the characteristics of the landing point, which can detect abrupt changes in the trajectory point to an obtuse angle. It can be implemented in many ways; as a specific implementation method of this application, the aforementioned angle setting condition can be, for example: , here For example, it can take the value of .
[0102] The aforementioned first preset increment condition refers to a threshold condition used to determine the displacement increment of the previous trajectory point along the second coordinate axis, which can detect the transition of the trajectory point from rest to rise and fall. It can be implemented in many ways; as a specific implementation method of this application, the aforementioned first preset increment condition can be, for example: , here The possible values are: Here, U represents the height in pixels of the video frame; fps is the frame rate. If fps ≠ 30fps, the threshold is adjusted accordingly. Linear scaling.
[0103] The aforementioned second preset increment condition refers to a threshold condition used to determine the displacement increment of the next trajectory point along the second coordinate axis, which can detect whether the solid sphere target is in a significant descent state. It can be implemented in many ways. As a specific implementation method of this application, the aforementioned first preset increment condition can be, for example: , here The possible values are, for example, .
[0104] In this embodiment, when any trajectory point simultaneously satisfies the following three conditions: the angle between the velocity vectors at that trajectory point satisfies a set angle condition, the displacement increment of the preceding trajectory point along the second coordinate axis satisfies a first set increment condition, and the displacement increment of the following trajectory point along the second coordinate axis satisfies a second set increment condition, the following trajectory point is selected as the first candidate landing point. If no trajectory point simultaneously satisfies the above three conditions, it indicates that no first candidate landing point has been selected.
[0105] This application embodiment captures the directional change characteristics of a solid ball at the moment of impact by using the angle between velocity vectors, and captures the change in motion state by combining displacement increment. This conforms to the physical laws of solid ball impact, and the accuracy of the first candidate landing point obtained is high. Furthermore, it clarifies the quantification thresholds of each condition, avoids subjective judgment, and ensures the consistency of the judgment results.
[0106] The following is an example of how to determine the second candidate landing point: As an optional embodiment of this application, the second candidate landing point is determined by the following steps: when the coordinate value of the kth trajectory point along the second coordinate axis in the solid ball motion sub-trajectory is greater than the coordinate value of the (k-1)th trajectory point along the second coordinate axis, and the coordinate values of the (k-1)th trajectory point and the nth trajectory points preceding it increase sequentially along the second coordinate axis, then the (k-(n+1))th trajectory point is taken as the fitting termination point, and the trajectory points between the fitting termination point and the starting trajectory point of the solid ball motion sub-trajectory are fitted with time as the independent variable to obtain a fitting curve; if there is a fitting residual value of a fitting point in the fitting curve that is greater than a set fitting residual threshold and the coordinate value of the fitting point along the second coordinate axis in the fitting curve is less than the coordinate value of the previous fitting point along the second coordinate axis in the fitting curve, then the trajectory point in the solid ball motion sub-trajectory that is closest to the fitting point is taken as the second candidate landing point.
[0107] For example, in this embodiment of the application, in order to avoid the interference of the rebound trajectory of the solid ball target on the quadratic curve fitting, the fitting termination point can be determined from the sub-trajectory of the solid ball's motion first.
[0108] Specifically, when there exists a k-th trajectory point in the sub-trajectory of the solid sphere, such that the coordinate value of the k-th trajectory point along the second coordinate axis is greater than the coordinate value of the (k-1)-th trajectory point along the second coordinate axis, and the coordinate values of the (k-1)-th trajectory point and its n forward (e.g., 2, etc.) trajectory points along the second coordinate axis increase sequentially, that is, the k-th trajectory point satisfies: Then, the kth trajectory point is considered as the rebound point, and the k-(n+1)th trajectory point (i.e. the k-3th mentioned above) is taken as the fitting termination point. Then, the trajectory points between the fitting termination point and the starting trajectory point of the solid ball's motion sub-trajectory are fitted with time as the independent variable to obtain the fitting curve.
[0109] Of course, if there is no k-th trajectory point in the solid ball's motion sub-trajectory that satisfies the above conditions, then all trajectory points in the solid ball's motion sub-trajectory can be directly fitted with time as the independent variable to obtain the fitted curve.
[0110] In this embodiment, the aforementioned fitting point refers to the predicted point on the fitting curve corresponding to the trajectory point, and its coordinates can be expressed as (t, t The above-mentioned setting of the fitting residual threshold (denoted as ε_fit=3) refers to the threshold for judging whether the trajectory point deviates from the ideal trajectory. It can be set according to the actual situation, such as 3 pixels, 2 pixels, etc. This application embodiment does not make specific limitations on this.
[0111] In this embodiment of the application, it is determined whether there exists a fitting point in the fitting curve whose fitting residual value is greater than a set fitting residual threshold and whose coordinate value along the second coordinate axis in the fitting curve is less than the coordinate value along the second coordinate axis of the previous fitting point in the fitting curve. <0 and >ε_fit, here This represents the fitting residual at the i-th fitting point. , This represents the difference between the coordinates of the i-th fitted point along the second coordinate axis in the fitted curve and the coordinates of the previous fitted point along the second coordinate axis in the fitted curve. The above. This represents the coordinate value of the i-th fitted point along the second coordinate axis in the sub-trajectory of the solid sphere; This represents the coordinate value of the i-th fitting point along the second coordinate axis; This represents the coordinate value of the (i-1)th fitted point along the second coordinate axis.
[0112] In this embodiment, if a candidate landing point exists, the trajectory point in the solid ball's motion sub-trajectory that is closest to the fitted point (e.g., Euclidean distance) is selected as the second candidate landing point. If a candidate landing point does not exist, it is considered that no second candidate landing point has been detected.
[0113] This application embodiment first identifies the rebound point and then determines the fitting termination point, avoiding interference from the rebound trajectory on the fitting of the ideal falling trajectory, improving the accuracy of curve fitting, and judging the trajectory deviation based on the fitting residual, matching it with the actual trajectory deviation of the solid ball when it hits the ground from the ideal falling trajectory, further improving the reliability of the landing point candidate.
[0114] The following is an example of how to determine the third candidate landing point: As an optional embodiment of this application, the third candidate landing point is determined by the following steps: if the coordinate value of any trajectory point of the solid ball's motion sub-trajectory along the second coordinate axis is greater than 0, and the coordinate value of the next trajectory point along the second coordinate axis is less than 0 and its magnitude is greater than a set coordinate threshold, then the third candidate landing point is determined based on the trajectory point.
[0115] For example, the above-mentioned set coordinate threshold (denoted as...) The threshold for determining whether the displacement increment reversal in the second coordinate axis direction is a ground bounce is pre-set. It can be set according to the actual situation, for example, 1 pixel.
[0116] In this embodiment of the application, if the coordinate value of any trajectory point of the solid sphere's motion sub-trajectory along the second coordinate axis is greater than 0, and the coordinate value of the next trajectory point along the second coordinate axis is less than 0 and its magnitude is greater than a set coordinate threshold, that is... and and If the m-th trajectory point is considered the rebound starting point, the third candidate landing point can be determined based on this trajectory point.
[0117] Of course, if no estimated point in the sub-trajectory of the solid ball meets the above conditions, it is considered that no third candidate landing point has been detected.
[0118] In the embodiments of this application, there are many methods to determine the third candidate landing point based on the trajectory point. For example, the previous trajectory point of the trajectory point can be used as the third candidate landing point; another example is to calculate the fitting residuals of the trajectory point and the z trajectory points forward of the trajectory point respectively; and the trajectory point with the smallest fitting residual can be used as the third candidate landing point.
[0119] Here, the value of z can be determined according to the actual situation, such as 2, 3, etc. This application embodiment does not make specific limitations on this. This application embodiment only describes the case where z is 2.
[0120] Based on the above description, the fitting residuals of the m-th trajectory point, the (m-1)-th trajectory point, and the (m-2)-th trajectory point can be calculated, and then the trajectory point with the smallest fitting residual can be used as the third candidate landing point.
[0121] In this embodiment, the method for calculating the fitting residual is the same as the method for calculating the fitting residual described above, and will not be repeated here.
[0122] This application's embodiments capture ground bounce characteristics based on the trend reversal (downward → upward) of displacement increments along the second coordinate axis. The logic is simple, computationally inefficient, and can quickly generate candidate landing points, improving overall detection efficiency. Furthermore, by setting a coordinate threshold, it filters out minor jitters, avoiding misjudgments caused by video frame noise and ensuring the validity of candidate points. It also provides different methods for determining third candidate landing points, adaptable to the motion trajectories of solid balls of varying qualities. For example, it can directly select a point when the trajectory is clear, or select the optimal trajectory point when there is jitter, improving the accuracy of candidate point determination.
[0123] As an optional embodiment of this application, determining a target landing point based on at least one of a first candidate landing point, a second candidate landing point, and a third candidate landing point includes: for each candidate landing point, performing a fitting deviation detection; wherein, the fitting deviation detection includes: whether the maximum fitting residual of each trajectory point within a set window range of the candidate landing point, the average fitting residual of each trajectory point, the distance from each trajectory point to the fitting curve, and the fitting slope of the candidate landing point all meet their corresponding set conditions; and for each candidate landing point, performing a dynamic consistency detection; wherein, the dynamic consistency detection includes: whether the velocity vector angle at the candidate landing point, the displacement increment of the candidate landing point along the second coordinate axis, the magnitude of the displacement increment of the previous trajectory point of the candidate landing point along the second coordinate axis, and the rate of change of curvature of the candidate landing point all meet their corresponding set conditions; if a candidate landing point passes both the fitting deviation detection and the dynamic consistency detection, then a confidence score is calculated for each candidate landing point that passes the detection; if the maximum confidence score is greater than a set confidence threshold, then the candidate landing point corresponding to the maximum confidence score is taken as the target landing point.
[0124] For example, the aforementioned fitting deviation detection refers to the degree of deviation between the trajectory points around the candidate landing point and the secondary fitting curve, used to filter errors caused by trajectory jitter, background noise, etc. Specifically, the fitting deviation detection includes: whether the maximum fitting residual of each trajectory point within the set window range of the candidate landing point, the average fitting residual of each trajectory point, the distance of each trajectory point to the fitting curve, and the fitting slope of the candidate landing point all meet their corresponding set conditions.
[0125] In this embodiment of the application, the above-mentioned window range (denoted as [m_pre, n_post]) is set in advance. It refers to the frame range extending forward and backward with the candidate landing point as the center. The specific number of frames extending forward and backward can be determined according to the actual situation, such as the first 3 frames and the last 3 frames. This embodiment of the application does not make a specific limitation on this.
[0126] In this embodiment of the application, for each candidate landing point, the fitting residual of each trajectory point within a set window range of the candidate landing point is calculated (the specific calculation method can be found in the description of the above embodiment); and the distance from each trajectory point to the secondary fitting curve is calculated. The distance here can be Euclidean distance, which can reflect the spatial offset of the trajectory point relative to the ideal falling trajectory.
[0127] Exemplarily, the above-mentioned fitting slope refers to the tangent slope (i.e., dy / dt) at the corresponding position of the candidate landing point on the quadratic fitting curve. In the embodiments of the present application, the solid ball target at the landing point should be in the falling stage, so the fitting curve needs to show a downward trend. Therefore, the threshold of the tangent slope can be set to <0.
[0128] In the embodiments of the present application, for each candidate landing point, after calculating the fitting residuals, fitting slopes of each trajectory point within the set window range of the candidate landing point, and the distances from each trajectory point to the quadratic fitting curve, it is possible to further determine whether the maximum fitting residual (denoted as , , where represents the fitting residual of each trajectory point within the set window range), the average fitting residual of each trajectory point (denoted as , , where W represents the number of trajectory points within the set window range), the distance from each trajectory point to the fitting curve (denoted as d_fit), and the fitting slope of the candidate landing point (denoted as Δ ) all meet their corresponding set conditions.
[0129] In the embodiments of the present application, the set condition corresponding to the above-mentioned maximum fitting residual can be, for example: < ε_fit (i.e., the above-mentioned set fitting residual threshold); the set condition corresponding to the above-mentioned average fitting residual can be, for example: < 0.8·ε_fit; the set condition corresponding to the distance from each trajectory point to the fitting curve can be, for example: d_fit < T_d (for example, 5 pixels); the set condition corresponding to the above-mentioned fitting slope can be, for example: Δ < 0.
[0130] It should be noted that the set conditions of the above-mentioned various parameters are all examples and are not used to limit the present application. Other reasonable set conditions are all within the protection scope of the present application.
[0131] In the embodiments of the present application, for each candidate landing point, if the above-mentioned various parameters all meet their corresponding set conditions, it is considered that the geometric deviation detection of the candidate landing point passes.
[0132] For example, the aforementioned dynamic consistency detection refers to a detection process based on the physical laws of object motion to verify whether the motion characteristics corresponding to the candidate landing point conform to the dynamic logic of the solid ball at the moment of impact, used to filter out candidate landing points that do not conform to the physical laws of motion. Specifically, the dynamic consistency detection includes whether the velocity vector angle at the candidate landing point, the displacement increment of the candidate landing point along the second coordinate axis, the magnitude of the displacement increment of the previous trajectory point of the candidate landing point along the second coordinate axis, and the rate of change of curvature of the candidate landing point all meet their corresponding set conditions.
[0133] In this embodiment, for each candidate landing point, the following calculations are performed: the angle between the velocity vectors at the candidate landing point (see the description of the above embodiment for the specific calculation method); the displacement increment of the candidate landing point along the second coordinate axis (see the description of the above embodiment for the specific calculation method); the magnitude of the displacement increment of the previous trajectory point of the candidate landing point along the second coordinate axis (see the description of the above embodiment for the specific calculation method); and the rate of curvature change of the candidate landing point. Here, the rate of curvature change characterizes the degree of turning in the trajectory of the solid sphere. Where k represents the rate of change of curvature; This represents the first derivative of the candidate landing point along the second coordinate axis on the fitted curve; This represents the second derivative of the candidate landing point along the second coordinate axis on the fitted curve; This represents the second derivative of the candidate landing point along the first coordinate axis on the fitted curve; Let represent the first derivative of the candidate landing point along the first coordinate axis on the fitted curve.
[0134] In this embodiment of the application, for each candidate landing point, after calculating the velocity vector angle at the candidate landing point, the displacement increment of the candidate landing point along the second coordinate axis, the magnitude of the displacement increment of the previous trajectory point of the candidate landing point along the second coordinate axis, and the rate of curvature change of the candidate landing point, it can be further determined whether the velocity vector angle at the candidate landing point, the displacement increment of the candidate landing point along the second coordinate axis, the magnitude of the displacement increment of the previous trajectory point of the candidate landing point along the second coordinate axis, and the rate of curvature change of the candidate landing point all satisfy their corresponding set conditions.
[0135] In this embodiment of the application, the setting condition corresponding to the velocity vector angle at the above-mentioned candidate landing point is: θ> (Right now The condition for the displacement increment of the above candidate landing point along the second coordinate axis is: dy > The setting condition corresponding to the magnitude of the displacement increment of the previous trajectory point along the second coordinate axis of the above candidate landing point is: The setting condition for the curvature change rate of the above candidate landing points can be: κ>0.01.
[0136] It should be noted that the setting conditions of each of the above parameters are merely examples and are not intended to limit this application. Other reasonable setting conditions are all within the protection scope of this application.
[0137] In this embodiment of the application, for each candidate landing point, if all the above parameters meet their corresponding set conditions, the dynamic consistency test of the candidate landing point is considered to have passed.
[0138] In this embodiment of the application, for the above three candidate landing points, if a candidate landing point passes both the fitting deviation detection and the dynamic consistency detection, then the confidence score of each candidate landing point that passes the detection is calculated. The confidence score here is used to determine the reliability of the candidate landing point, and can be calculated using the following formula:
[0139] in, , , as well as All of these are pre-defined weights, for example, =0.4, =0.3, =0.2, =0.1. =1-clip( / ε_fit, 0, 1), where clip is the clipping function used to clip the data. / ε_fit is restricted to the interval [0, 1], that is, if If / ε_fit < 0, then take 0; if 0 ≤ If / ε_fit≤1, then take / ε_fit; if If / ε_fit>1, then take 1. From (θ, ) and (dy, The normalized sigmoid combination is obtained, specifically, =α·Sigmoid((θ- ) / )+β·Sigmoid((dy- ) / Here, α and β represent weighting coefficients, and α + β = 1, for example, α = 0.6, β = 0.4; as well as These are all smoothing parameters, which can be set according to the actual situation. The proportion of backward dy<0 is the proportion of trajectory points with dy<0 after the candidate landing point; A value of 1 indicates compliance with the boundary, meaning the area is within the safe zone; otherwise, a value of 0 to 0.5 is used, which can be determined based on the distance to the safe zone.
[0140] In this embodiment of the application, after calculating the confidence score for each landing point that passes the detection, if the maximum confidence score is greater than the set confidence threshold (e.g., 0.65), then the candidate landing point corresponding to the maximum confidence score is taken as the target landing point.
[0141] This application embodiment uses a dual verification mechanism of geometric deviation detection and dynamic consistency detection to verify candidate landing points from two dimensions: geometric features and physical motion laws. It comprehensively filters out invalid candidates (such as false candidates caused by background noise and trajectory jitter), and the confidence score integrates multiple dimensions of indicators to ensure the reliability of the target landing point.
[0142] As an optional embodiment of this application, the shot put throwing area is divided into X equal zones along the shot put throwing direction; the first performance determination result also includes: throwing distance detection result; based on the shot put trajectory of the matched shot put target, including: determining the target zone where the shot put target falls based on the coordinates of the target landing point, and determining a first length based on the target zone and the zone length of each zone along the shot put throwing direction; projecting the target landing point onto the two boundaries of the target zone along the shot put throwing direction to obtain a first projection point close to the throwing line and a second projection point far from the throwing line; calculating the coordinates of the first projection point and the second projection point... Calculate the first distance between the first projection point and the second projection point, and calculate the second distance between the target landing point and the second projection point based on the coordinates of the second projection point and the coordinates of the target landing point; calculate the offset length of the target landing point in the target partition based on the first distance, the second distance, and the partition length; obtain the distortion compensation length of the target landing point by inputting the coordinates of the target landing point to the fitted deviation surface; calculate the error length between the target landing point and the target partition along any boundary perpendicular to the direction of the solid ball throwing; correct the first length based on at least one of the error length, the distortion compensation length, and the offset length to obtain the throwing distance detection result.
[0143] For example, the throwing distance test result refers to the actual straight-line distance between the shot put target and the landing point, which is the core indicator for judging the shot put performance.
[0144] In this embodiment, the shot put area is divided into X equal sections (section 0 to section X-1) along the shot put direction. Each section has the same length (denoted as L) along the shot put direction, for example, 1m. X can be determined based on actual conditions, and this embodiment does not specifically limit the value of X. Figure 3 As shown, Figure 3 The baseline in the diagram refers to the throwing line. The direction to the right is the throwing direction of the shot put. The shot put throwing area is divided into 8 equal sections along the throwing direction (i.e., alternating gray quadrilateral areas and white quadrilateral areas).
[0145] For example, the target partition (index denoted as j) mentioned above refers to the target landing point (denoted as ( In this embodiment of the application, the partition where the target landing point is located can be determined by comparing the coordinate values of the target landing point along the second coordinate axis with the coordinate values of the partition boundary along the second coordinate axis.
[0146] In this embodiment of the application, after determining the target zone where the solid ball will fall, a first length (i.e., j) is determined based on the target zone and the zone length of each zone along the direction of the solid ball's throw. ).
[0147] For example, the first projection point (denoted as pl) refers to the projection point of the target landing point on the boundary of the target zone near the throwing line; the second projection point (denoted as pr) refers to the projection point of the target landing point on the boundary of the target zone away from the throwing line.
[0148] In this embodiment of the application, after obtaining the first projection point and the second projection point, the first distance (denoted as d1) between the first projection point and the second projection point can be calculated based on the coordinates of the first projection point and the second projection point, that is, d1=||pl pr||; and calculate the second distance (denoted as d2) between the target landing point and the second projection point based on the coordinates of the second projection point and the target landing point, i.e., d2=||(x,y). pl||.
[0149] For example, the above offset length (denoted as This refers to the actual distance of the target landing point within the target partition, which can be calculated based on the first distance, the second distance, and the partition length. Specifically: = .
[0150] For example, the above-mentioned deviation surface is a quadratic surface obtained by fitting field-defined samples, which can be expressed as: Specifically, it can be obtained by fitting based on at least 6 calibration samples.
[0151] In this embodiment, the aforementioned distortion compensation length refers to the distance error caused by distortion, and specifically, the distortion compensation length at the target landing point (denoted as Δ) can be calculated based on the deviation surface. Specifically, substituting the coordinates of the target landing point into the above deviation surface equation, we obtain Δ. .
[0152] For example, the above error length (denoted as The distance from the target landing point to any boundary of the target zone along the direction perpendicular to the throwing direction (i.e., the Y-axis direction) refers to the actual distance from the target landing point to any boundary of the target zone along the direction perpendicular to the throwing direction. It is used to correct the distance error caused by the target landing point deviating from the throwing center line and can be calculated using the conventional formula for the distance from a point to a line.
[0153] In this embodiment, after obtaining the error length, distortion compensation length, and offset length, the first length can be corrected based on the error length, distortion compensation length, and offset length to obtain the throwing distance detection result (denoted as D). Specifically: .
[0154] This application embodiment introduces a lateral error (i.e., error length). The distortion compensation length corrects the lateral offset of the target landing point and the error caused by camera distortion, respectively, making the calculation of the throwing distance detection result more accurate.
[0155] As an optional embodiment of this application, the first human body key points include: head key points and hand key points; the first performance judgment result also includes: violation detection result of the release point being lower than the top of the head; the throwing distance detection result is obtained based on the solid ball trajectory of the matched solid ball target and the positions of the first human body key points in each first human body region of the human body target, including: for each first human body region, calculating the distance between the two hand key points in the first human body region and the solid ball target in the first video frame where the human body region is located; if the two hand key points in a first video frame are... If the minimum distance between the key points and the solid ball target is greater than a set distance value, and the minimum distance between the two hand key points and the solid ball target in the previous first video frame is less than or equal to the set distance value, then the first video frame is determined to be the solid ball release video frame; if the difference between the coordinates of the head key points along the second coordinate axis and the minimum coordinates of the two hand key points along the second coordinate axis in the M consecutive first video frames before the solid ball release video frame is less than the set distance value, then the release point being lower than the top of the head is determined to be a violation.
[0156] For example, the above-mentioned violation detection result of the release point being lower than the top of the head refers to the determination result of whether the wrist height is lower than the head height at the moment the solid ball is released. If so, the violation detection result of the release point being lower than the top of the head is determined to be a violation; if not, the violation detection result of the release point being lower than the top of the head is determined to be a non-violation.
[0157] In this embodiment of the application, the aforementioned head key points refer to key points of the human target's head, such as the nose key point as a reference for head height. The aforementioned hand key points refer to key points of the human target's hands, such as wrist key points, which may include the human target's left wrist key point (denoted as wrist_L) and right wrist key point (denoted as wrist_R).
[0158] In this embodiment, the coordinates of the solid sphere target can be the coordinates of the center point (denoted as C_t) of the solid sphere region. For each first human body region, the distances between the two hand key points within the first human body region and the solid sphere target in the first video frame containing the human body region are calculated based on the distance calculation formula between two points (denoted as δ_L=dist(wrist_L,C_t), δ_R=dist(wrist_R,C_t)).
[0159] For example, the aforementioned set distance value (denoted as τ) refers to the threshold for determining whether the handball has separated from the ball. It can be determined according to the actual situation. For example, it can be the diameter of the solid ball target.
[0160] In this embodiment of the application, if the minimum distance between two hand key points in a first video frame and the solid ball target is greater than a set distance value, and the minimum distance between two hand key points in the previous first video frame is less than or equal to the set distance value, i.e., min(δ_L, δ_R) changes from ≤τ to >τ, then the first video frame is determined to be the solid ball release video frame (denoted as t_rel).
[0161] In this embodiment of the application, after determining the video frame of the shot put, it is further determined whether the difference between the coordinate values of the head key points along the second coordinate axis and the minimum coordinate values of the two hand key points along the second coordinate axis in the M consecutive (e.g., 3) first video frames before the shot put video frame is less than a set distance value (i.e., min(y_wrist_L, y_wrist_R)-y_head<τ). If the shot put point is lower than the top of the head, the violation detection result is determined to be a violation and the violation frame is saved. If it does not exist, the violation detection result is determined to be no violation.
[0162] The aforementioned violation frames can be, for example, the target video frame that can be determined to be a violation because the point of attack is below the top of the head, as well as the three frames before and after the target video frame.
[0163] This application embodiment determines the release video frame by detecting sudden changes in handball distance, accurately capturing the moment the solid ball is released, providing a precise time reference for determining the release point height, and requiring that M consecutive frames meet the conditions before it is judged as a violation, avoiding misjudgment caused by noise in a single frame image or jitter in key point positioning, thus improving the stability of violation judgment.
[0164] As an optional embodiment of this application, the first human body key points include: hand key points; the first performance judgment result also includes: single-handed throwing violation detection result; the throwing distance detection result is obtained based on the solid ball trajectory of the matched solid ball target and the position of the first human body key points in each first human body region of the human body target, including: for each first human body region, calculating the distance between the two hand key points in the first human body region and the solid ball target in the first video frame where the human body region is located; if the minimum distance value between the two hand key points in the first video frame and the solid ball target is less than or equal to a set distance value, then it is determined that the solid ball target in the first video frame is in the hands of the human body target; if in N consecutive first video frames where the solid ball target is in the hands of the human body target, the distance between one hand key point and the solid ball target is less than or equal to the set distance value, the distance between the other hand key point and the solid ball target is greater than the set distance value, and the distance between the two hand key points satisfies the first set distance condition, then it is determined that the single-handed throwing violation detection result is a violation.
[0165] For example, the above-mentioned single-handed throwing violation detection result refers to the judgment result of whether the solid ball target is held with one hand during the throwing process. If yes, the single-handed throwing violation detection result is considered to be a violation; if no, the single-handed throwing violation detection result is considered to be a non-violation.
[0166] The aforementioned hand key points refer to the key points of the human target's hand, such as wrist key points, which may include the left wrist key point (denoted as wrist_L) and the right wrist key point (denoted as wrist_R) of the human target.
[0167] In this embodiment, the method for calculating the distance between two hand key points within each first human body region and the solid sphere target in the first video frame where the human body region is located can refer to the description in the above embodiment, and will not be repeated here.
[0168] In this embodiment of the application, if the minimum distance value min(δ_L, δ_R) between the two hand key points in the first video frame and the solid ball target is less than a set distance value (i.e. τ), then it is determined that the solid ball target in the first video frame is in the hand of the human target; otherwise, it is considered that the solid ball target is not in the hand of the human target.
[0169] For example, the first set distance condition mentioned above refers to the threshold condition for determining whether the hands are separated. It can be determined according to the actual situation. For example, the distance between the two wrists (denoted as dist(wrist_L, wrist_R)) is greater than 1.1×max(ball_w, ball_h). Here, ball_w and ball_h refer to the width and height of the solid ball area, respectively.
[0170] In this embodiment, if in the first video frame of N consecutive (e.g., 3) solid ball targets in the hand of a human target, the distance between one hand key point and the solid ball target is less than or equal to a set distance value (i.e., δ_L≤τ or δ_R≤τ), the distance between the other hand key point and the solid ball target is greater than the set distance value (i.e., δ_R>τ or δ_L>τ), and the distance between the two hand key points satisfies the first set distance condition (i.e., dist(wrist_L, wrist_R))>1.1×max(ball_w, ball_h)), then the single-handed throwing violation detection result is determined to be a violation, and the violation frame is saved. If it does not exist, then the single-handed throwing violation detection result is determined to be non-violation.
[0171] This application embodiment uses a dual condition of holding the ball with one wrist and separating both hands to determine a single-handed throw, avoiding misjudging situations where the ball is held with both hands but one hand is slightly further away as a single-handed throw. Furthermore, it requires that the condition be met for N consecutive frames to ensure stable action during the ball-holding phase and improve the reliability of violation determination.
[0172] As an optional embodiment of this application, the second human body key points include foot key points; the second performance judgment result also includes: line violation detection result; obtaining the line violation detection result based on the position of the second human body key points in each second human body area of the human target includes: extracting the throwing line from any second video frame; calculating the distance from two foot key points in each second human body area to the throwing line; if the distance from any foot key point in W consecutive second human body areas to the throwing line meets the second set distance condition, then the line violation detection result of the human target is determined to be a violation.
[0173] For example, the above-mentioned violation detection result refers to the judgment result of whether the human body's feet have crossed the throwing line during the throwing process. If they have crossed, the violation detection result is considered to be a violation; if they have not crossed, the violation detection result is considered to be a non-violation.
[0174] In this embodiment, the aforementioned foot key points refer to key points on the human foot, which may include ankle key points, toe key points, etc. This embodiment only uses the ankle key point as an example; the foot key points in this embodiment may include the left ankle key point and the right ankle key point.
[0175] For example, the throwing line mentioned above refers to the baseline of the throwing area (e.g., a solid white line), which can be represented by y=kx+g (where k and g are constant coefficients). In this embodiment, the throwing line can be extracted from any second video frame. For example, a conventional edge detection algorithm (e.g., the Canny algorithm) can be used to extract the straight line edge from any second video frame, and then the straight line equation of the throwing line can be obtained by combining the color features (e.g., white) and position features (e.g., located at the beginning of the field) of the throwing line.
[0176] In this embodiment, after obtaining the throwing line, the distance (denoted as d) from the two ankle key points within each second human body area to the throwing line can be calculated using the conventional point-to-line distance formula. It should be noted that this distance refers to a signed distance; d > 0 indicates the distance is in front of the throwing line, and d < 0 indicates the distance is behind the throwing line.
[0177] For example, W is the number of consecutive frames required for a pre-set violation of the line, which can be determined according to the actual situation, such as 2, 3, etc. This application embodiment does not specifically limit this, and this application embodiment only describes W as 3 as an example.
[0178] The aforementioned second set distance condition is a pre-set threshold condition for the foot crossing the line. It can be implemented in many ways. As a specific implementation of this application, it can be, for example, d>t_line. Here, t_line is a pre-set distance threshold for determining the line crossing. It can be set based on experience or pre-determined according to the actual throwing field. This application does not specifically limit this aspect.
[0179] In this embodiment, if the distance d from any foot keypoint (e.g., right ankle keypoint) within three consecutive second human body regions to the throwing line satisfies d > t_line, then the violation detection result for the human target is determined to be a violation, and the violation frame can be saved. If no distance d from any foot keypoint (e.g., right ankle keypoint) within three consecutive second human body regions to the throwing line satisfies d > t_line, then the violation detection result for the human target is determined to be non-violation.
[0180] The aforementioned violation frames can be, for example, the target video frame that can be identified as violating the rules, as well as the three frames before and after the target video frame.
[0181] As an optional embodiment of this application, the above-mentioned t_line can be obtained by the following steps: First, measurements are taken manually at the actual throwing field to determine the true location of the throwing line. Then, a second camera is used to photograph the throwing field, and the throwing line is manually marked on the captured image. At least two pixels are selected from the marked throwing line, and the equation of the throwing line is calculated based on the coordinates of the selected at least two pixels. Then, the conversion ratio between the pixels in the image and the actual throwing field in meters is calculated. For example, 1 meter in the actual throwing field corresponds to 100 pixels in the image. If it is stipulated that the foot cannot exceed the throwing line by 5 centimeters, then it corresponds to 5 pixels in the image, so t_line can be 5 pixels.
[0182] This application embodiment extracts foot key points from the second video frame of the second solid ball throwing video stream. Compared with the foot details in the long-distance video stream, the key point positioning is clearer and more accurate, thus making the line violation detection result more accurate. Furthermore, the violation judgment adopts the judgment logic of continuous W frames to avoid misjudgment caused by blurry single-frame images and key point jitter, further improving the accuracy of line violation judgment.
[0183] As an optional embodiment of this application, the first score determination result and the second score determination result of each human target are merged to obtain the target score determination result of each human target. This includes: extracting features from the human targets in the first and second shot put video streams respectively to obtain the first feature vector and the second feature vector of each human target in the first and second shot put video streams; matching the human targets in the first and second shot put video streams based on the similarity between the first feature vector and the second feature vector of each human target in the first and second shot put video streams; and merging the first and second score determination results belonging to the same human target to obtain the target score determination result of that human target.
[0184] For example, the first feature vector mentioned above refers to the feature vector of each human target extracted from the first shot put video stream; the second feature vector refers to the feature vector of each human target extracted from the second shot put video stream, which can be used to characterize the facial features, body shape features, action features, etc. of the human target. This application embodiment does not specifically limit this.
[0185] In this embodiment, features can be extracted from each human target in the first and second shot put video streams using a pre-trained feature extraction model to obtain a first feature vector and a second feature vector.
[0186] In this embodiment, after extracting the first feature vector and the second feature vector, for each first feature vector, the similarity (e.g., cosine similarity) between each second feature vector and the first feature vector is calculated. If the similarity between the first feature vector and the second feature vector is greater than 90%, then the first feature vector and the second feature vector are considered to belong to the same human target. Based on this method, cross-camera matching of human targets can be performed.
[0187] In this embodiment of the application, after matching the human target under the first camera and the human target under the second camera, the first score judgment result and the second score judgment result belonging to the same human target are merged to obtain the target score judgment result of the human target.
[0188] This application embodiment matches human targets across cameras by using the feature vector similarity of human targets, solving the problem of correlation between human targets in two video streams and ensuring accurate integration of the results; moreover, the merged target score judgment result includes throwing distance and all violation types, providing comprehensive information.
[0189] In this embodiment of the application, if the target score determination result includes violation content, it is further determined whether the time interval since the last alarm exceeds the set time interval threshold (e.g., 10s). If so, an alarm is triggered; otherwise, no alarm is triggered.
[0190] While numerous embodiments of this application have been shown and described herein, it will be apparent to those skilled in the art that such embodiments are provided by way of example only. Many modifications, alterations, and alternatives will arise for those skilled in the art without departing from the spirit and intent of this application. It should be understood that various alternatives to the embodiments of this application described herein may be employed in the practice of this application. The appended claims are intended to define the scope of protection of this application and therefore cover equivalents or alternatives within the scope of these claims.
Claims
1. A method of judging the performance of a thrown solid ball, characterized by, The method comprises the following steps: acquire a first solid ball throwing video stream and a second solid ball throwing video stream, wherein the acquisition distance of the first solid ball throwing video stream is greater than the acquisition distance of the second solid ball throwing video stream; for each first video frame in the first solid ball throwing video stream, regionally locate the human body target in the first video frame and locate the human body key points to obtain all first human body regions in the first video frame and the first human body key point positions in the first human body regions, and regionally locate the solid ball target in the first video frame to obtain all solid ball regions in the first video frame; track the human body target in each first video frame based on the first human body regions in the first video frame to obtain at least one first human body motion trajectory, and track the solid ball target in each first video frame based on the solid ball regions in the first video frame to obtain at least one solid ball motion trajectory; for the human body target in each first human body motion trajectory, match a solid ball target for the human body target, and determine a first performance determination result of the human body target based on the solid ball motion trajectory of the matched solid ball target and the first human body key point positions in each first human body region of the human body target; for each second video frame in the second solid ball throwing video stream, regionally locate the human body target in the second video frame and locate the human body key points to obtain all second human body regions in the video frame and second human body key point positions in the second human body regions; track the human body target in each second video frame based on the human body regions in the second video frame to obtain at least one second human body motion trajectory; for the human body target in each second human body motion trajectory, determine a second performance determination result of the human body target based on the second human body key point positions in each second human body region of the human body target; merge the first performance determination result of each human body target and the second performance determination result of each human body target to obtain a target performance determination result of each human body target.
2. The method of claim 1, wherein, The method satisfies at least one of the following conditions: The step of regionally locating the human body target in the first video frame and locating the human body key points to obtain all first human body regions in the first video frame and first human body key point positions in the first human body regions comprises: regionally locating the human body target in the first video frame and locating the human body key points by using a human body key point detection model to obtain all first human body regions in the first video frame and first human body key point positions in the first human body regions; the human body key point detection model adopts a YOLOv8-pose model; The step of regionally locating the solid ball target in the first video frame to obtain all solid ball regions in the first video frame comprises: regionally locating the solid ball target in the first video frame by using a solid ball detection model to obtain all solid ball regions in the first video frame; the solid ball detection model adopts a YOLOv8 model; The region positioning of the human body target in the second video frame and the positioning of the human body key points obtain all second human body regions in the video frame and second human body key point positions in the second human body regions, including: the region positioning of the human body target in the second video frame and the positioning of the human body key points by the human body key point detection model obtain all second human body regions in the video frame and second human body key point positions in the second human body regions.
3. The method of claim 2, wherein, The YOLOv8 model comprises an input module, a backbone network Backbone, a neck network Neck, a head network Head, and an output module; The input module is configured to receive the first video frame; The Backbone comprises a C2f module and an SPPF module, and is configured to perform multi-scale feature extraction on the first video frame; The Neck comprises a bidirectional pyramid network BiFPN and a lightweight Inception, and is configured to fuse features extracted by the Backbone to obtain a plurality of fused features; The Head adopts an FRM detection head, and is configured to generate a plurality of detection results based on the plurality of fused features; The output module is configured to fuse the plurality of third detection results to obtain a target output result.
4. The method of claim 1, wherein, The first human body key points comprise hand key points; and the matching of the solid ball target for the human body target in each first human body motion trajectory comprises: For the human body target in each first human body motion trajectory, a to-be-detected video frame in which the human body target holds a ball is selected from the first solid ball throwing video stream; The hand key point position of the human body target in the to-be-detected video frame and each solid ball region are used to determine the solid ball target matched with the human body target.
5. The method of claim 1, wherein, The first performance determination result comprises a landing point detection result; the landing point detection result is obtained based on the solid ball motion trajectory of the matched solid ball target, and comprises: When the number of trajectory points of the solid ball motion trajectory of the matched solid ball target is greater than or equal to a set number threshold, a highest trajectory point of the solid ball target is determined from the solid ball motion trajectory, and a solid ball motion sub-trajectory after the highest trajectory point is selected from the solid ball motion trajectory; A first candidate landing point is determined based on the speed vector angle of each trajectory point in the solid ball motion sub-trajectory and the displacement increment in the direction of the second coordinate axis; A second candidate landing point is determined by performing quadratic curve fitting on the trajectory points in the solid ball motion sub-trajectory and according to a fitting residual; A third candidate landing point is determined based on the speed change trend of the solid ball motion sub-trajectory in the direction of the second coordinate axis; A target landing point is determined based on at least one of the first candidate landing point, the second candidate landing point, and the third candidate landing point; The first candidate landing point is determined by the following steps: For each trajectory point on the sub-trajectory of the solid sphere, a velocity vector is calculated based on the coordinates of that trajectory point and the coordinates of the previous trajectory point. The velocity vector includes the displacement increment along the first coordinate axis and the displacement increment along the second coordinate axis. Calculate the angle between the velocity vectors at the trajectory point and the velocity vector of the next trajectory point. When the included angle of the velocity vector at any trajectory point satisfies the set angle condition, the displacement increment of the previous trajectory point along the second coordinate axis satisfies the first set increment condition, and the displacement increment of the next trajectory point along the second coordinate axis satisfies the second set increment condition, the next trajectory point is taken as the first candidate landing point. The second candidate landing point was determined through the following steps: When the coordinate value of the kth trajectory point along the second coordinate axis in the solid ball motion sub-trajectory is greater than the coordinate value of the (k-1)th trajectory point along the second coordinate axis, and the coordinate values of the (k-1)th trajectory point and the nth trajectory points forward of it increase sequentially along the second coordinate axis, then the (k-(n+1))th trajectory point is taken as the fitting termination point, and the trajectory points between the fitting termination point and the starting trajectory point of the solid ball motion sub-trajectory are fitted with time as the independent variable to obtain the fitting curve; If there is a fitting residual value of a fitting point in the fitting curve that is greater than a set fitting residual threshold and the coordinate value of the fitting point along the second coordinate axis in the fitting curve is less than the coordinate value of the previous fitting point along the second coordinate axis in the fitting curve, then the trajectory point in the solid ball motion sub-trajectory that is closest to the fitting point is taken as the second candidate landing point. The third candidate landing point was determined through the following steps: If the coordinate value of any trajectory point of the solid ball's motion sub-trajectory along the second coordinate axis is greater than 0, and the coordinate value of the next trajectory point along the second coordinate axis is less than 0 and its magnitude is greater than a set coordinate threshold, then a third candidate landing point is determined based on that trajectory point. The process of determining the third candidate landing point based on the trajectory point includes: The previous trajectory point of this trajectory point is taken as the third candidate landing point; or, Calculate the fitting residuals for the trajectory point and the z trajectory points preceding it, respectively; The trajectory point with the smallest fitting residual is selected as the third candidate landing point.
6. The method of claim 5, wherein, The step of determining the target landing point based on at least one of the first candidate landing point, the second candidate landing point, and the third candidate landing point includes: For each candidate landing point, a fitting deviation detection is performed. This fitting deviation detection includes: the maximum fitting residual of each trajectory point within a defined window range of the candidate landing point; the average fitting residual of each trajectory point; the distance from each trajectory point to the fitted curve; and whether the fitting slope of the candidate landing point meets its corresponding defined conditions. The candidate landing site is subjected to a geometry deviation detection and a dynamics consistency detection; the dynamics consistency detection includes whether the velocity vector included angle at the candidate landing site, the displacement increment of the candidate landing site along the second coordinate axis direction, the modulus of the displacement increment of the previous trajectory point of the candidate landing site along the second coordinate axis direction and the curvature change rate of the candidate landing site all satisfy their corresponding set conditions; If the geometry deviation detection and the dynamics consistency detection of the candidate landing site are both passed, the confidence score of each passed candidate landing site is calculated; If the maximum confidence score is greater than a set confidence threshold, the candidate landing site corresponding to the maximum confidence score is taken as the target landing site.
7. The method of claim 5, wherein, The solid ball throwing field is evenly divided into X sub-zones along the solid ball throwing direction; The first performance determination result further includes a throwing distance detection result; based on the solid ball movement trajectory of the matched solid ball target, the target sub-zone into which the solid ball target falls is determined, and a first length is determined based on the target sub-zone and the sub-zone length of each sub-zone along the solid ball throwing direction; The target landing site is projected onto two boundaries of the target sub-zone along the solid ball throwing direction respectively, to obtain a first projection point close to the throwing line and a second projection point away from the throwing line; A first distance between the first projection point and the second projection point is calculated based on the coordinates of the first projection point and the coordinates of the second projection point, and a second distance between the target landing site and the second projection point is calculated based on the coordinates of the second projection point and the coordinates of the target landing site; An offset length of the target landing site in the target sub-zone is calculated based on the first distance, the second distance and the sub-zone length; A distortion compensation length of the target landing site is obtained by inputting the coordinates of the target landing site into the fitted deviation surface; An error length between the target landing site and any boundary of the target sub-zone perpendicular to the solid ball throwing direction is calculated; The first length is corrected based on at least one of the error length, the distortion compensation length and the offset length, to obtain the throwing distance detection result. The first human body key points include head key points and hand key points; the first performance determination result further includes an out-of-hand point lower than the head violation detection result; based on the solid ball movement trajectory of the matched solid ball target and the first human body key point positions in each first human body region of the human body target, a throwing distance detection result is obtained, including:
8. The method of claim 1, wherein, For each first human body region, the distances between the two hand key points in the first human body region and the solid ball target in the first video frame in which the first human body region is located are calculated respectively; If the minimum distance value in the distances between the two hand key points and the solid ball target in a first video frame is greater than a set distance value, and the minimum distance value in the distances between the two hand key points and the solid ball target in the previous first video frame of the first video frame is less than or equal to the set distance value, the first video frame is determined as a solid ball out-of-hand video frame; If a difference between a coordinate value of the head key point in a direction of the second coordinate axis in the M continuous first video frames before the solid ball is taken out of the video frame and a minimum coordinate value of the two hand key points in the direction of the second coordinate axis is less than the set distance value, it is determined that the out-of-hand point is lower than the head and the violation detection result is a violation; The first performance determination result further includes a single-hand throwing violation detection result; a throwing distance detection result is obtained based on a solid ball movement track of the matched solid ball target and positions of the first human body key points in each first human body region of the human body target, including: For each first human body region, the distance between the two hand key points in the first human body region and the solid ball target in the first video frame in which the first human body region is located is calculated respectively; If the minimum distance value in the distance between the two hand key points in the first video frame and the solid ball target is less than or equal to the set distance value, it is determined that the solid ball target in the first video frame is in the hand of the human body target; If the distance between one of the hand key points and the solid ball target is less than or equal to the set distance value, the distance between the other hand key point and the solid ball target is greater than the set distance value, and the distance between the two hand key points satisfies the first set distance condition in the N continuous first video frames in which the solid ball target is in the hand of the human body target, it is determined that the single-hand throwing violation detection result is a violation.
9. The method of claim 1, wherein, The second human body key point includes a foot key point; The second performance determination result further includes a line stepping violation detection result; the line stepping violation detection result is obtained based on the positions of the second human body key points in each second human body region of the human body target, including: A throwing line is extracted from any second video frame; The distance between the two foot key points in each second human body region and the throwing line is calculated; If the distance between any foot key point in the W continuous second human body regions and the throwing line satisfies the second set distance condition, it is determined that the line stepping violation detection result of the human body target is a violation.
10. The method of claim 1, wherein, The first performance determination result of each human body target and the second performance determination result of each human body target are combined to obtain a target performance determination result of each human body target, including: Feature extraction is performed on the human body targets in the first solid ball throwing video stream and the second solid ball throwing video stream respectively to obtain a first feature vector of each human body target in the first solid ball throwing video stream and a second feature vector of each human body target in the second solid ball throwing video stream; Based on the similarity between the first feature vector of each human body target in the first solid ball throwing video stream and the second feature vector of each human body target in the second solid ball throwing video stream, the human body targets in the first solid ball throwing video stream and the human body targets in the second solid ball throwing video stream are matched; The first performance determination result and the second performance determination result of the same human body target are combined to obtain a target performance determination result of the human body target.