Method for counting volleyball padding and related product

By employing YOLO dual-model collaborative reasoning and gridded correction technology, the accuracy and practicality of the volleyball passing counting system have been improved, solving the problem of insufficient accuracy in small target detection and achieving efficient and accurate counting of volleyball passing.

CN121838008APending Publication Date: 2026-04-10绍兴市北大信息技术科创中心
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-25
Publication Date
2026-04-10

AI Technical Summary

Technical Problem

Existing technologies lack sufficient accuracy in detecting small targets during volleyball ball passing and counting, resulting in low accuracy and practicality of the counting system. In particular, it is difficult to achieve efficient association between athletes and volleyballs in complex occlusion scenarios.

Method used

A YOLO-based dual-model collaborative reasoning method is adopted, combining a volleyball detection model and an athlete detection model. By utilizing a cross-stage partial connection module of partial convolution and a spatially enhanced attention module, and through multi-target tracking and gridding correction techniques, the detection accuracy and counting accuracy of small volleyball targets are improved.

Benefits of technology

It achieves high-precision detection of small volleyball targets, improves the accuracy and practicality of the volleyball passing counting system, and can effectively distinguish between complete passing actions and interference actions in complex scenarios, thus reducing counting errors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121838008A_ABST
    Figure CN121838008A_ABST
Patent Text Reader

Abstract

The invention discloses a volleyball padding counting method and a related product. The method disclosed by the invention comprises the following steps: acquiring a video related to the volleyball padding movement; processing the frame image in the video by using a YOLO-based volleyball detection model to obtain a volleyball detection result; processing the frame image in the video by using a YOLO-based athlete detection model to obtain an athlete detection result; according to the volleyball detection results of the plurality of frame images and the athlete detection result, calculating the volleyball padding times of the athlete; wherein the volleyball detection model comprises a cross-stage partial connection module adopting partial convolution. According to the volleyball padding counting method provided by the invention, the detection precision of a small volleyball target can be improved while the lightweight of the volleyball detection model is realized, so that the accuracy and practicability of a volleyball padding counting system are improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application generally relates to the technical field of artificial intelligence. More specifically, the present application relates to a method for counting volleyball pads and related products. BACKGROUND

[0002] In the field of volleyball training and teaching, accurately counting the number of pads is an important indicator for evaluating the technical level of athletes. Currently, there are three types of volleyball pad counting methods: manual counting method, automatic counting method based on feature extraction and machine learning classifier, and automatic counting method based on deep learning algorithm. The manual counting method can complete the counting without using auxiliary equipment, but it is highly subjective and prone to counting errors due to visual fatigue, and it cannot monitor the training of multiple athletes at the same time. The automatic counting method based on feature extraction and machine learning classifier requires manual design of feature extraction algorithm, and the effectiveness of the features directly affects the classification performance. It has the problem of insufficient generalization ability, and it is difficult to adapt to different field environments, lighting conditions and individual differences of athletes. Compared with the automatic counting method based on feature extraction and machine learning classifier, the automatic counting method based on deep learning algorithm can realize end-to-end automatic feature extraction and target detection, and has obvious advantages in accuracy and real-time performance.

[0003] In the prior art, the spatial-temporal graph convolutional network (STGCN) and trajectory correlation analysis are relatively effective volleyball pad counting methods. STGCN can classify actions through human key point topology graph, but the model complexity is high and the computational overhead is large, which makes it difficult to meet the real-time training requirements. Trajectory correlation analysis, such as the trajectory correlation analysis method based on Pearson correlation coefficient, is prone to misjudgment in complex occlusion scenarios, and the accuracy of action completeness judgment is limited.

[0004] The inventors of the present application found in practice that the volleyball target occupies a small proportion of pixels in the video picture, moves at a high speed and is easily occluded by the human body, and belongs to small targets that are difficult to detect. The prior art has deficiencies in dealing with small target detection in volleyball pad counting, which seriously affects the accuracy and practicality of the volleyball pad counting system. Therefore, the present application proposes a method for counting volleyball pads to improve the detection accuracy of small volleyball targets and the accuracy and practicality of the volleyball pad counting system. SUMMARY

[0005] In order to at least solve one or more of the above-mentioned technical problems, the present application proposes a method for counting volleyball pads, an electronic device and a non-transitory machine-readable storage medium in multiple aspects.

[0006] In a first aspect, the present application provides a method for counting volleyball padding, comprising: acquiring a video related to volleyball padding movement; processing frame images in the video by using a YOLO-based volleyball detection model to obtain a volleyball detection result; processing the frame images in the video by using a YOLO-based player detection model to obtain a player detection result; and calculating the number of volleyball padding of the player according to the volleyball detection result and the player detection result of a plurality of frame images; wherein the volleyball detection model comprises a cross-stage partial connection module using partial convolution.

[0007] In a second aspect, the present application provides an electronic device, comprising: a processor; and a memory having a program for counting volleyball padding stored thereon, which, when executed by the processor, causes the electronic device to implement the method of the first aspect.

[0008] In a third aspect, the present application provides a non-transitory machine-readable storage medium having a program for counting volleyball padding stored thereon, which, when executed by a processor, causes the implementation of the method of the first aspect.

[0009] Through the method for counting volleyball padding, the electronic device and the non-transitory machine-readable storage medium provided as above, the present application can help to improve the detection accuracy of small volleyball targets and the accuracy and practicability of the volleyball padding counting system while realizing the lightweight of the volleyball detection model. BRIEF DESCRIPTION OF DRAWINGS

[0010] The above and other objects, features and advantages of the exemplary embodiments of the present application will be more apparent from the following detailed description taken in conjunction with the accompanying drawings, in which: Figure 1 An exemplary structural schematic diagram of the YOLO algorithm in some embodiments of the present application is shown.

[0011] Figure 2 An exemplary flowchart of the volleyball padding counting method based on double-model collaborative reasoning in some embodiments of the present application is shown.

[0012] Figure 3 An exemplary structural schematic diagram of the player detection model in some embodiments of the present application is shown.

[0013] Figure 4 An exemplary schematic diagram of the volleyball padding scene in some embodiments of the present application is shown.

[0014] Figure 5An exemplary structural schematic of a volleyball detection model in some embodiments of the present application is shown.

[0015] Figure 6 An exemplary schematic of a volleyball pad play scenario in some embodiments of the present application is shown.

[0016] Figure 7 An exemplary structural schematic of an athlete detection model in some embodiments of the present application is shown.

[0017] Figure 8 An exemplary structural schematic of a SEAM in some embodiments of the present application is shown.

[0018] Figure 9 An exemplary structural schematic of a CSMM in some embodiments of the present application is shown.

[0019] Figure 10 An exemplary schematic of a volleyball pad play scenario in some embodiments of the present application is shown.

[0020] Figure 11 An exemplary flowchart of a training method of a volleyball detection model and an athlete detection model in some embodiments of the present application is shown.

[0021] Figure 12 An exemplary schematic of an online volleyball pad play counting method in some embodiments of the present application is shown. DETAILED DESCRIPTION

[0022] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are some but not all of the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work fall within the scope of protection of the present application.

[0023] It should be understood that the terms “include” and “contain” used in the specification and claims of the present application indicate the presence of the described features, whole, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, whole, steps, operations, elements, components and / or sets thereof.

[0024] It should also be understood that the terms used herein are for the purpose of describing particular embodiments and are not intended to limit the application. As used in the specification and claims, the singular forms "a," "an" and "the" are intended to include plural forms as well, unless the context clearly dictates otherwise. It will be further understood that the terms "and / or," as used herein, refers to and encompasses any and all possible combinations of one or more of the associated listed items. The singular forms "a," "an" and "the" include plural referents unless the context clearly dictates otherwise.

[0025] As used in the specification and claims, the term "if" can be interpreted as meaning "when" or "once" or "in response to a determination" or "in response to detecting" depending on the context. Similarly, the phrase "if it is determined" or "if [a described condition or event] is detected" can be interpreted to mean "once it is determined" or "in response to a determination" or "once [the described condition or event] is detected" or "in response to detecting [the described condition or event]," depending on the context.

[0026] In addition, the terms "first", "second", etc. are used herein only to describe different instances, and cannot be construed to indicate or imply relative importance or a specific number of the technical features indicated. Thus, the features defined with "first", "second" can explicitly or implicitly include one or more of the features. In the description of the present application, the meaning of "a plurality of" is two or more, unless otherwise explicitly and specifically limited. The meaning of "several" is one or more, unless otherwise explicitly and specifically limited.

[0027] The embodiments of the present disclosure can involve data of users, acquisition and / or use of data, etc. These aspects all comply with the corresponding laws and regulations and relevant provisions. In the embodiments of the present disclosure, all data collection, acquisition, processing, processing, forwarding, use, etc. are carried out on the premise that the user is aware of and confirms. Accordingly, when implementing the embodiments of the present disclosure, the type of data or information that can be involved, the use range, the use scenario, etc. should be notified to the user and the authorization of the user should be obtained through appropriate means according to the relevant laws and regulations. The specific notification and / or authorization mode can vary according to the actual situation and application scenario, and the scope of the present disclosure is not limited in this aspect.

[0028] In the specification and embodiments of the present disclosure, if personal information processing is involved, it will be processed on the premise of legality (for example, obtaining the consent of the subject of personal information, or being necessary for the performance of a contract, etc.), and only within the prescribed or agreed range. The user refuses to process personal information other than the necessary information required for the basic function, which does not affect the user's use of the basic function.

[0029] The specific embodiments of the present application will be described in detail below with reference to the accompanying drawings.

[0030] Volleyball is a popular sport worldwide, and the level of mastery of its basic technical movements directly affects the athlete's competitive level. Spiking is one of the most basic and commonly used techniques in volleyball, and in daily training and physical tests, quantifying the number of spikes is a key step in assessing the technical proficiency, physical endurance, and training effectiveness of athletes. Volleyball spike counting requires counting the number of effective spikes for a specific athlete. Whether the volleyball trajectory and the athlete's spiking action meet the action specifications can be used to determine whether the spike is effective, for example, the volleyball must complete the complete trajectory of "ball up → rise → fall", and reach the preset height during the rising phase; the athlete must use the forearm 10-15 cm above the wrist to hit the ball instead of the palm, fist, etc.

[0031] Currently, there are three types of volleyball spike counting methods: manual counting method, feature extraction and machine learning classifier-based counting method, and deep learning algorithm-based counting method. The manual counting method records the number of effective spikes completed by the athlete through manual visual observation. Although it can be completed without the use of auxiliary equipment, this method is highly subjective and prone to counting errors due to visual fatigue, and it cannot monitor the training of multiple athletes at the same time. The automatic counting method based on feature extraction and machine learning classifier detects by extracting features such as movement trajectory and shape. However, this method requires manual design of feature extraction algorithms, and the effectiveness of the features directly affects the classification performance, which has insufficient generalization ability and is difficult to adapt to different field environments, lighting conditions, and individual differences among athletes.

[0032] In recent years, deep learning algorithms represented by Convolutional Neural Network (CNN) have made significant progress in object detection and pose estimation, providing a high-precision, real-time detection solution for volleyball spike counting. You Only Look Once (YOLO) is a target detection algorithm based on CNN, which is widely used in sports motion analysis due to its efficient detection speed and good accuracy. YOLO sends the input image into the neural network model at once, directly predicting the object's bounding box position, class, target confidence, and class confidence at the output layer; compared with the automatic counting method based on feature extraction and machine learning classifier, the automatic counting method based on YOLO algorithm can realize end-to-end automatic feature extraction and target detection, and has obvious advantages in accuracy and real-time performance.

[0033] Since its inception, the YOLO algorithm has undergone numerous iterations, evolving into a large family including variants such as YOLOv3, YOLOv4, YOLOv5, and YOLOv8. Currently, the YOLO series of algorithms has formed a highly modular and scalable comprehensive framework, comprising three core components: the backbone, the neck, and the head. The backbone extracts features at different levels from the input image, the neck fuses the multi-scale feature maps output by the backbone, and the head outputs the prediction result based on the fused features. The backbone, neck, and head of the YOLO series algorithms can all be replaced and adjusted relatively independently, greatly enhancing the model's customizability and adaptability to different hardware and tasks.

[0034] Figure 1 Exemplary structural diagrams of the YOLO algorithm in some embodiments of this application are shown. For example... Figure 1 As shown, in some embodiments, the YOLO algorithm can be the YOLOv8 algorithm, which includes a Backbone, a Neck, and a Head. The Backbone includes convolutional (Conv) layers, a Cross-Stage Partial with 2 Convolutions and Fusion (C2f) module, and a Spatial Pyramid Pooling Fast (SPPF) module. The Neck includes upsampling layers, concatenation (Concat) operations, and a C2f module. The Head includes a detection module. Further, as... Figure 1 As shown, the C2f module includes convolutional layers, split operations, multiple bottleneck layers, and concatenation operations; the SPPF module includes convolutional layers and two-dimensional max pooling (MaxPool2d) layers.

[0035] Counting volleyball passes using deep learning algorithms requires not only accurately identifying athletes and volleyballs from video frames, but also determining the athletes' body movements and the volleyball's trajectory. A dual-model collaborative inference method processes video frames simultaneously using two parallel YOLO models, combining their outputs to obtain more comprehensive motion information.

[0036] Figure 2 An exemplary flowchart of a volleyball ball-passing counting method 200 based on dual-model collaborative reasoning in some embodiments of this application is shown. Figure 2 As shown, method 200 includes: S201, acquire video data.

[0037] S202, Use a volleyball detection model to identify volleyballs in the frame image. In some embodiments, the object detection model can be a YOLO series algorithm, which outputs the bounding box, object confidence, and class confidence of the object identified as a volleyball for each frame image.

[0038] S203, use an athlete detection model to identify athletes and human keypoints in the frame image. In some embodiments, human keypoints may include 17 keypoints labeled in the Common Objects in Context (COCO) dataset, namely, nose, left eye, right eye, left ear, right ear, left shoulder, right shoulder, left elbow, right elbow, left wrist, right wrist, left hip, right hip, left knee, right knee, left ankle, and right ankle.

[0039] Figure 3 Exemplary structural diagrams of athlete detection models in some embodiments of this application are shown. For example... Figure 3 As shown, the athlete detection model can be the YOLOv8-Pose model, and... Figure 1 Similar to the YOLOv8 algorithm shown, the YOLOv8-Pose model also includes a Backbone, Neck, and Head. The differences are: in the Backbone, there is no Conv layer between the SPPF module and the previous C2f module; in the Head, the Detect module is replaced by the Pose module. The Detect module outputs the object's category, bounding box coordinates, and confidence score, while the Pose module additionally outputs the coordinates of human keypoints and their confidence scores.

[0040] Back Figure 2 Method 200 also includes S204, multi-target tracking and association. In the continuous video frame input, the detection results of the volleyball detection model and the athlete detection model for each frame image are obtained. The multi-target tracking algorithm is used to track the athletes and volleyballs in the detection results, and a unique identification (ID) is assigned to each tracked target. The association between the athletes and the volleyballs is established through motion trajectory analysis and spatial position relationship.

[0041] S205, Timing Logic Judgment and Counting. Performs continuous multi-frame timing state analysis on each athlete and its associated volleyball. Determines the rising and falling phases of the passing action by analyzing the trajectory of the volleyball's height change and the athlete's key point movement patterns. Counts are performed when a complete passing action cycle is detected and a valid passing shot is generated.

[0042] Figure 4 Exemplary schematic diagrams of volleyball passing scenarios in some embodiments of this application are shown. For example...Figure 4 As shown, the inventors of this application discovered in practice that volleyball targets occupy a small pixel proportion in video images, move quickly, and are easily obscured by human bodies, making them difficult-to-detect small targets. Existing technologies are insufficient in detecting small targets in volleyball passing and counting, severely affecting the accuracy and practicality of volleyball passing and counting systems. Therefore, this application proposes a method for volleyball passing and counting to improve the detection accuracy of small volleyball targets and the accuracy and practicality of volleyball passing and counting systems.

[0043] In some embodiments, the method for counting volleyball passing according to this application includes: acquiring a video related to volleyball passing motion; processing frame images in the video using a YOLO-based volleyball detection model to obtain volleyball detection results; processing frame images in the video using a YOLO-based athlete detection model to obtain athlete detection results; and calculating the number of times the athlete passes the ball based on the volleyball detection results and athlete detection results of multiple frame images; wherein the volleyball detection model includes a cross-stage partial connection module employing partial convolution.

[0044] In some embodiments, high-definition cameras can be used to capture video data of the volleyball court in real time to obtain video related to volleyball passing. In these embodiments, specific detection areas can be defined in the volleyball court, and athletes are restricted to passing within these areas. It is necessary to ensure that the video covers the entire detection area, with a video resolution of not less than 1920×1080 and a frame rate of not less than 30fps.

[0045] In some embodiments, the volleyball detection model and the athlete detection model are based on YOLO, meaning they are deep learning object detection algorithms based on YOLO. The volleyball detection model receives video frame images as input data. After processing, the resulting volleyball detection result includes the bounding box of the volleyball in the frame image, the object confidence score, and the class confidence score. The athlete detection model receives video frame images as input data. After processing, the resulting athlete detection result includes the bounding box of the athlete in the frame image, the object confidence score, and the class confidence score. In these embodiments, the volleyball detection model and the athlete detection model receive the same video frame data as input data.

[0046] The number of times an athlete passes the ball can be calculated based on the volleyball detection results and athlete detection results of multiple frames. For example, the number of times an athlete passes the ball can be accumulated from zero, and the number of passes corresponding to the athlete can be incremented by 1 each time a valid pass is detected.

[0047] Figure 5 Exemplary structural diagrams of volleyball detection models in some embodiments of this application are shown. For example...Figure 5 As shown, in some embodiments, the volleyball detection model is a YOLOv8-based object detection model, which replaces the C2f module in YOLOv8 with a Cross-Stage Partial Partial Convolution (CSPPC) module that employs partial convolution. Figure 5 As further shown, the CSPPC module includes two Conv layers, a Split operation, a Concat operation, and two Partial Convolution (Pconv) layers. The output of the first Conv layer is connected to the Split operation and the Concat operation. The output of the Split operation is connected to the first Pconv layer and the Concat operation. The output of the first Pconv layer is connected to the second Pconv layer. The output of the second Pconv layer is connected to the Concat operation. The output of the Concat operation is connected to the second Conv layer.

[0048] The Pconv layer in the CSPPC module has the advantage of focusing on key feature channels and reducing the number of model parameters. According to the method for volleyball ball-passing counting proposed in this application, it can help improve the detection accuracy of small volleyball targets while achieving a lightweight volleyball detection model, thereby improving the accuracy and practicality of the volleyball ball-passing counting system. According to the inventors' experimental verification, the number of parameters in the volleyball detection model can be reduced by approximately one million, the computational cost (GFLOPs) can be reduced to 6.0 GFLOPs, and the accuracy of the volleyball detection results can be improved by 3%.

[0049] Figure 6 Exemplary schematic diagrams of volleyball passing scenarios in some embodiments of this application are shown. For example... Figure 6 As shown, the inventors of this application discovered in practice that factors such as athletes' limbs obscuring each other and rapid changes in posture increase the difficulty of detecting key points on the human body. Different lighting conditions at different venues, changes in camera angles, and individual differences among athletes reduce the generalization performance of the target recognition algorithm used for athlete detection. In view of this, this application discloses the following embodiments for a method for counting volleyball passing: In some embodiments, the athlete detection model includes a spatially enhanced attention module.

[0050] Figure 7 Exemplary structural diagrams of athlete detection models in some embodiments of this application are shown. For example... Figure 7As shown, in some embodiments, the athlete detection model is a YOLOv8-Pose-based object detection model, which can embed a Spatially Enhanced Attention Module (SEAM) before the Pose module of YOLOv8-Pose.

[0051] Figure 8 Exemplary structural diagrams of SEAM in some embodiments of this application are shown. For example... Figure 8 As shown, in some embodiments, SEAM includes three Channel and Spatial Mixing Modules (CSMMs) of different sizes. Specifically, the patch sizes of the local feature regions of the three CSMMs are 6, 7, and 8 pixels, respectively. The outputs of the CSMM modules are average pooled, then subjected to channel expansion (Channel exp) operations, and finally multiplied to provide an enhanced feature representation.

[0052] Figure 9 Exemplary structural diagrams of the CSMM in some embodiments of this application are shown. For example... Figure 9 As shown, in some embodiments, CSMM includes Patch Embedding for embedding the input patches; activation operations using Gaussian Error Linear Unit (GELU) as the activation function; BatchNorm operations for accelerating the training process and improving performance; Depthwise Convolution for performing convolution operations on each input channel separately; and Pointwise Convolution using 1×1 convolution kernels to fuse the features of the Depthwise Convolution.

[0053] Understandably, CSMM utilizes multi-scale features through patches of different sizes and employs depthwise separable convolutions to learn the correlation between spatial dimensions and channels. This meticulous processing of spatial dimensions and channels enhances the network's attention to and capture of features in occluded areas. By comprehensively utilizing multi-scale features and depthwise separable convolutions, CSMM improves feature extraction accuracy while maintaining computational efficiency. Embedding SEAM before the Pose module in YOLOv8-Pose enhances the model's ability to recognize various human features in complex scenes. By improving the YOLOv8-Pose model and introducing the SEAM attention mechanism, the model's ability to detect human keypoints, especially in complex backgrounds, with limb occlusion, and under varying lighting conditions, is significantly enhanced. This effectively suppresses background interference, reduces the false negative and false positive rates for keypoints, and lays the foundation for accurate motion analysis.

[0054] The inventors of this application discovered during practice that the volleyball passing counting process suffers from a problem caused by perspective distortion in monocular vision, leading to errors in volleyball height measurement. When shooting with monocular vision (using only one camera), the perspective effect of "near objects appear larger, far objects appear smaller" causes a volleyball of the same physical height to have different pixel heights at different positions (near / far, left / right) in the image. Directly converting pixel height to actual height results in a significant error in calculating the actual height of the volleyball. To address this problem, this application discloses the following embodiments for a method for volleyball passing counting: In some embodiments, calculating the number of times an athlete passes the ball based on volleyball detection results and athlete detection results from multiple frame images includes: dividing the detection area into grids to obtain multiple grids; determining the conversion coefficient between pixel height and actual height grid by grid; determining the first grid in which the volleyball is located in the frame image and the first pixel height of the volleyball in the frame image based on the volleyball detection results of the frame image; and calculating the actual height of the volleyball based on the first pixel height and the first conversion coefficient corresponding to the first grid.

[0055] As mentioned earlier, athletes are confined to a detection area to pass the ball, and the video captured by the camera covers the entire detection area. In some embodiments, the detection area can be divided into multiple circular, rectangular, or square grids. In some embodiments, the detection area can be divided into uniform rectangular grids, wherein the grid layout includes 3×3, 5×5, or 7×7.

[0056] Pixel height can be the height of a pixel in a frame image from a reference pixel. For example, pixel height can be the vertical distance from a pixel in a frame image to the bottom row of pixels, or the vertical distance from a pixel in a frame image to a ground reference point. The unit of pixel height is pixels. Determining the conversion factor between pixel height and actual height for each grid involves calculating the conversion factor between the pixel height and actual height of each pixel in the frame image for each grid. The actual height can be the height relative to the ground. The conversion factor between pixel height and actual height can be calibrated for each grid. After identifying the volleyball target from the frame image using the volleyball detection model, the actual height of the volleyball can be calculated based on the first grid where the volleyball is located, the first pixel height of the volleyball, and the first conversion factor corresponding to the first grid. This overcomes the error in volleyball height measurement caused by perspective distortion in monocular vision. The first pixel height of the volleyball can be the pixel height corresponding to the center point of the volleyball.

[0057] In some embodiments, determining the conversion factor between pixel height and actual height grid by grid includes: measuring the pixel height of the calibration object in the current grid; and determining the conversion factor corresponding to the current grid based on the actual height of the calibration object and the pixel height of the calibration object.

[0058] In some embodiments, calibration is performed according to the perspective of a fixed camera in a ball-counting scenario. After dividing the detection area into grids, a calibration object with a known physical height (denoted as physicalH1) is placed in each grid area. The pixel height of the calibration object (denoted as pixelH1) is calculated through image measurement, and the conversion coefficient p1=pixelH1 / physicalH1 corresponding to the grid can be calculated.

[0059] In some embodiments, determining the first pixel height of the volleyball in the frame image based on the volleyball detection result includes: calculating the first pixel height based on the pixel coordinates of the ground reference point of the first grid and the pixel coordinates of the center point of the volleyball in the frame image; calculating the actual height of the volleyball based on the first pixel height and the first conversion factor corresponding to the first grid includes: calculating the actual height of the volleyball using actualH = pixelH × p; where actualH represents the actual height of the volleyball, pixelH represents the first pixel height, and p represents the first conversion factor. In these embodiments, the pixel coordinates (x1, y1) of the center point of the volleyball in the frame image can be determined based on the volleyball detection result output by the volleyball detection model, and the pixel coordinates (x2, y2) of the ground reference point of the grid in the frame image can be recorded during the grid calibration conversion process, then the first pixel height pixelH = y1 - y2.

[0060] It is understandable that the more grids the detection area is divided into, the higher the correction accuracy for errors in volleyball height measurement caused by monocular vision perspective distortion. In some embodiments, the detection area division method can be set according to the area of ​​the detection area and the correction accuracy requirements. Thus, this application uses a multi-grid perspective correction method and a dynamic accuracy selection mechanism to accurately convert the two-dimensional pixel coordinates of monocular vision into the actual physical height, effectively overcoming the measurement errors caused by camera angle and perspective distortion, and realizing the accurate quantification of volleyball motion height.

[0061] Figure 10 Exemplary schematic diagrams of volleyball passing scenarios in some embodiments of this application are shown. For example... Figure 10 As shown, the inventors of this application discovered in practice that in multi-person training scenarios, the spatial interplay of multiple players, multiple balls, and interfering objects, along with overlapping limbs, makes it difficult to accurately associate the correspondence between athletes and volleyballs, resulting in low accuracy in volleyball passing counts. To address this problem, this application discloses the following embodiments for a method for volleyball passing counts: In some embodiments, calculating the number of times an athlete passes the ball based on volleyball detection results and athlete detection results from multiple frames includes: for each frame image, determining the volleyball associated with the athlete based on the distance between the volleyball and the athlete; and increasing the athlete's volleyball passing count value in response to the athlete and their associated volleyball satisfying preset volleyball passing rules.

[0062] In some embodiments, the positions of each volleyball can be extracted from the volleyball detection results of each frame image, and the positions of each athlete can be extracted from the athlete detection results of each frame image. The volleyball closest to the athlete is then identified as the volleyball associated with that athlete, thus forming an athlete-volleyball association pair. In these embodiments, the pixel coordinates of the volleyball's center point can be obtained from the volleyball detection results, and the pixel coordinates of the athlete's left or right wrist keypoints can be extracted from the athlete detection results. The distance between the volleyball and the athlete can be evaluated based on the Euclidean distance between the pixel coordinates of the volleyball's center point and the pixel coordinates of the athlete's left / right wrist keypoints.

[0063] In some embodiments, a state machine is maintained for each athlete-volleyball pair, with states including Idle, Rising, Top, and Falling. The initial state of a pass is Idle, where the athlete can be standing and waiting or slowly adjusting their position. When the volleyball height remains below a threshold H1 (e.g., 180cm) and begins to rise, and the distance between the volleyball and the associated athlete's wrist is less than a set threshold, a state transition is triggered, from the Idle state to the Rising state. When the volleyball height rises and exceeds a threshold H2 (e.g., 200cm), a state transition is triggered, from the Rising state to the Top state. When the volleyball height reaches its peak and begins to decline, a state transition is triggered, from the Top state to the Falling state. When the volleyball height falls back below the threshold H1, a state transition is triggered, from the Falling state to the Idle state. In these embodiments, the preset volleyball passing rules include: the athlete-volleyball association pair needs to undergo a complete state transition process in consecutive video frames: standby → ball lift → highest point → ball drop → standby. It is understood that this state machine mechanism can effectively filter out interference caused by invalid volleyball jolting, non-passing actions, or brief obstructions, ensuring the accuracy of the count.

[0064] In some embodiments, determining the volleyball associated with the athlete based on the distance between the volleyball and the athlete for each frame image includes: performing cross-frame tracking of the athlete to obtain the athlete's trajectory; predicting the athlete's position in a subsequent frame based on the athlete's motion state in a previous frame; extracting the athlete's appearance features; and correcting the trajectory based on the predicted position of the athlete and the appearance features.

[0065] In some embodiments, the Bytetrack multi-target tracking algorithm is used to track athletes across frames, and each athlete is assigned a unique ID to obtain their movement trajectory. In some embodiments, Kalman filtering is used to predict the athlete's position in the next frame based on the athlete's position and velocity in the previous frame. If the athlete detection model fails to identify the athlete in the next frame, the predicted position is used as the athlete's detection position in the next frame. In some embodiments, the athlete's appearance features are extracted and a standard feature vector is generated. When the athlete's position determined by the athlete detection model in a certain frame differs significantly from the position in the adjacent frames, an appearance feature vector is generated for the athlete in that frame. If the generated appearance feature vector does not match the standard feature vector, the predicted position is used as the athlete's detection position in that frame.

[0066] In some embodiments, determining the volleyball associated with the athlete based on the distance between the volleyball and the athlete for each frame image includes: determining the volleyball associated with the athlete based on the distance between the volleyball and the athlete and the athlete's trajectory for each frame image.

[0067] In these embodiments, motion trajectory consistency is used to help identify athlete-volleyball association pairs. For example, the closest athlete and volleyball are identified as athlete-volleyball association pairs only when the volleyball and athlete are moving in roughly the same direction.

[0068] Understandably, this application combines multi-target tracking algorithms with high-precision detection models. By assigning a unique ID to each athlete and continuously tracking them, it achieves independent identification and state management of individual targets in multi-person training scenarios, effectively solving the interference problems caused by target intersection and occlusion. Furthermore, by using a state machine based on temporal logic to interpret continuous passing actions and combining the spatial relationship between the volleyball's height trajectory and the athlete's wrist key points for comprehensive judgment, it effectively distinguishes the complete passing action cycle from other interfering actions, significantly reducing the system's false count rate and ensuring the accuracy and reliability of the counting results.

[0069] Figure 11 An exemplary flowchart of a training method 1100 for a volleyball detection model and an athlete detection model according to some embodiments of this application is shown. Figure 11 As shown, in some embodiments, method 1100 includes: S1101, Video Data Acquisition. In some embodiments, a high-definition industrial camera or network camera with a resolution of not less than 1920×1080 and a frame rate of not less than 30fps is used, and the camera equipment is deployed on the side or corner of the volleyball training court to ensure that the field of view can cover the main activity area of ​​the athletes. Video data under different lighting conditions (such as normal light, backlight) and different training scenarios (single-person passing, multi-person practice) are collected to enrich the diversity of the dataset.

[0070] S1102, Video frame extraction and image preprocessing. To avoid high redundancy in consecutive video frames, frame extraction is performed on the acquired video. In some embodiments, one frame can be extracted every three frames, and the extracted image sequence is uniformly scaled to the standard size required for model training (e.g., 640×640 pixels) and normalized.

[0071] S1103, Data Annotation. In some embodiments, the LabelImg professional annotation tool is used to perform fine annotation on the image. Data annotation includes human keypoint annotation and volleyball target annotation. In some embodiments, according to the 17 keypoint criteria of the COCO dataset, the nose, eyes, ears, shoulders, elbows, wrists, hips, knees, ankles, etc. of each athlete are annotated; for occluded keypoints, reasonable inference and annotation based on human anatomy are required. In some embodiments, a rectangle is used to accurately outline the entire volleyball, and the label is set to "volleyball". In some embodiments, the annotation file is saved in XML or JSON format, which contains the category label and location information of each target, including keypoint coordinates or bounding box vertex coordinates.

[0072] S1104, Dataset Partitioning and Data Augmentation. In some embodiments, the labeled complete dataset is randomly divided into a training set, a validation set, and a test set in a 7:2:1 ratio. To improve the model's generalization ability and robustness, data augmentation is applied to the training set images, including: geometric transformations, such as random rotation and random horizontal flipping; photometric transformations, such as brightness adjustment, contrast adjustment, and adding Gaussian noise; and scale transformations, such as random scaling.

[0073] S1105, YOLOv8m baseline was selected as the volleyball detection model. YOLOv8m is a medium-sized model in the YOLOv8 series.

[0074] S1106, Introduce the CSPPC module. In some embodiments, one or more C2f modules in YOLOv8m are replaced with CSPPC modules.

[0075] S1107, YOLOv8m-Pose baseline was selected as the athlete detection model.

[0076] S1108, Introduce the SEAM module. In some embodiments, the SEAM module is embedded before the Pose module of YOLOv8m-Pose.

[0077] S1109, Model Training. In some embodiments, training the volleyball detection model includes: initialization, using a large dataset (such as COCO) to pre-train weights to accelerate model convergence; optimizer, using SGD or AdamW as the optimizer, adjusting the learning rate using a cosine annealing strategy, and dynamically adjusting the training step size; loss function, using the YOLOv8 standard composite loss, including bounding box regression loss (such as CioU Loss), classification loss, and confidence loss; iterative training on the training set, monitoring model performance on the validation set (such as mAP@0.5), and saving the optimal model weights. In some embodiments, training the athlete detection model includes: initialization, using the COCO dataset to pre-train weights to ensure initial feature extraction capability; optimizer, using SGD or AdamW as the optimizer, adjusting the learning rate using a cosine annealing strategy, and dynamically adjusting the training step size; loss function, including keypoint regression loss, such as a variant of Smooth L1 Loss, to optimize the prediction accuracy of keypoint coordinates; and training on a pose annotation dataset until the model's keypoint detection accuracy (e.g., OKS) on the validation set converges.

[0078] S1110: Determine if the model performance meets the target. If the model performance fails to meet the target, return to S1101. If the model performance meets the target, execute S1111 to save the optimal model weights.

[0079] Figure 12 An exemplary schematic diagram of an online volleyball ball-counting method 1200 according to some embodiments of this application is shown. Figure 12 As shown, in some embodiments, method 1200 includes: S1201, Load the trained model. In some embodiments, the loaded model includes a volleyball detection model and an athlete detection model.

[0080] S1202, Initialize the multi-target tracker. In some embodiments, Bytetrack is selected as the multi-target tracker.

[0081] S1203: Select the multi-grid perspective correction accuracy and initialize the correction parameters. As mentioned earlier, the more grids the detection area is divided into, the higher the correction accuracy for errors in volleyball height measurement caused by monocular vision perspective distortion. The multi-grid perspective correction accuracy can be evaluated by the grid layout, which can be 3×3 (corresponding to low accuracy), 5×5 (corresponding to medium accuracy), or 7×7 (corresponding to high accuracy). The correction parameters include the pixel coordinates of the ground reference point in the frame image for each grid.

[0082] S1204, Video stream enters. S1205, Read the next frame. S1206, Parallel inference of the model. In some embodiments, for each frame of the real-time video stream, inference is performed in parallel using the volleyball detection model and the athlete detection model.

[0083] S1207, Multi-target and Data Association. In some embodiments, the Bytetrack multi-target tracking algorithm is used to track detected athletes across frames; Kalman filtering is used to predict the estimated position of the athlete in the current frame based on the athlete's motion state (position, velocity) in the previous frame; in terms of data association, a dual association mechanism is adopted, first associating high-confidence detection boxes with predicted trajectories, and then associating unmatched trajectories with low-confidence detection boxes to optimize occlusion handling; in terms of ID management, a unique ID is assigned to each successfully associated athlete, a trajectory is created for new targets, and the trajectory is retained and restored for temporarily lost targets to reduce ID switching.

[0084] S1208, Athlete-Volleyball Association. In some embodiments, for each tracked athlete, the following operations are performed: calculate the Euclidean distance between the athlete's left and right wrist key points and the center points of all detected volleyballs in the current frame; select the volleyball closest to either of the athlete's wrists and temporarily associate it with the athlete's ID; at the same time, combine the consistency of the motion trajectory (e.g., whether the volleyball and the athlete's motion direction are roughly the same) for auxiliary judgment to exclude obviously irrelevant balls.

[0085] S1209, Height conversion based on multi-grid perspective correction. In some embodiments, the site is first divided into grids and the grids are calibrated. During real-time detection, the height is converted according to the calibrated conversion coefficients.

[0086] S1210 determines whether the athlete-volleyball association pair has undergone a complete Idle→Rising→Top→Falling→Idle state transition process. If the result is yes, execute S1211, increment the valid count, and return to S1205. If the result is no, directly return to S1205.

[0087] In some embodiments, method 1200 further includes a result output and visualization step. For example, the athlete tracking ID, bounding box, human keypoints, the trajectory of the associated volleyball, real-time height curve, and real-time pass count for each athlete are overlaid on a display screen. After the athlete's training ends, a detailed training report can be generated, including total pass counts, pass success rate, average pass height, and action frequency statistics.

[0088] This application also discloses an electronic device, including: a processor; and a memory storing a program for counting volleyball passes, which, when executed by the processor, causes the electronic device to perform the method as described in any of the preceding embodiments.

[0089] This application also discloses a non-transitory machine-readable storage medium storing a program for counting volleyball passes, which, when executed by a processor, causes the method as described in any of the preceding embodiments to be implemented.

[0090] The specific functions implemented by the electronic devices and non-transitory machine-readable storage media provided in the embodiments of this specification can be explained in comparison with the foregoing embodiments in this specification and can achieve the technical effects of the foregoing embodiments, so they will not be repeated here.

[0091] 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 for counting volleyball passes, characterized in that, include: Get videos related to volleyball passing techniques; The frame images in the video are processed using a YOLO-based volleyball detection model to obtain volleyball detection results; The frame images in the video are processed using a YOLO-based athlete detection model to obtain athlete detection results; as well as The number of times the athlete passes the ball is calculated based on the volleyball detection results and athlete detection results of multiple frames. The volleyball detection model includes a cross-stage partial connection module employing partial convolution.

2. The method according to claim 1, characterized in that, The athlete detection model includes a spatially enhanced attention module.

3. The method according to claim 1, characterized in that, Based on the volleyball detection results and athlete detection results from multiple frames, the number of times the athlete performs a volleyball pass is calculated, including: The detection area is divided into grids to obtain multiple grids; Determine the conversion factor between pixel height and actual height grid by grid; Based on the volleyball detection results of the frame image, determine the first grid position of the volleyball in the frame image and the first pixel height of the volleyball in the frame image; and The actual height of the volleyball is calculated based on the height of the first pixel and the first conversion factor corresponding to the first grid.

4. The method according to claim 3, characterized in that, The conversion factor between pixel height and actual height is determined grid-by-grid, including: Measure the pixel height of the calibration object in the current grid; The conversion factor corresponding to the current grid is determined based on the actual height of the calibration object and the pixel height of the calibration object.

5. The method according to claim 4, characterized in that, Based on the volleyball detection results of the frame image, the first pixel height of the volleyball in the frame image is determined as follows: The height of the first pixel is calculated based on the pixel coordinates of the ground reference point of the first grid and the pixel coordinates of the center point of the volleyball in the frame image. The actual height of the volleyball is calculated based on the height of the first pixel and the first conversion factor corresponding to the first grid, including: The actual height of the volleyball is calculated using actualH = pixelH × p; where actualH represents the actual height of the volleyball, pixelH represents the height of the first pixel, and p represents the first conversion factor.

6. The method according to any one of claims 1-5, characterized in that, The number of times an athlete passes the ball is calculated based on the volleyball detection results and athlete detection results from multiple frames of images, including: For each frame image, the volleyball associated with the athlete is determined based on the distance between the volleyball and the athlete; In response to the athlete and their associated volleyball satisfying a preset volleyball passing rule, the athlete's volleyball passing count is increased.

7. The method according to claim 6, characterized in that, For each frame, the volleyball associated with the athlete is determined based on the distance between the volleyball and the athlete, including: The athlete is tracked across frames to obtain the athlete's motion trajectory; Predict the athlete's position in the next frame based on the athlete's motion state in the previous frame; Extracting the athlete's physical features; and The trajectory is corrected based on the predicted position of the athlete and the physical characteristics.

8. The method according to claim 7, characterized in that, For each frame, the volleyball associated with the athlete is determined based on the distance between the volleyball and the athlete, including: For each frame image, the volleyball associated with the athlete is determined based on the distance between the volleyball and the athlete and the athlete's trajectory.

9. An electronic device, characterized in that, include: processor; as well as A memory storing a program for counting volleyball passes, which, when executed by the processor, causes the electronic device to implement the method as described in any one of claims 1-8.

10. A non-transitory machine-readable storage medium having stored thereon a program for counting volleyball passes, which, when executed by a processor, causes the method of any one of claims 1-8 to be implemented.