# Artificial Intelligence Technology to Record the Number of Times the Ball Passes the Net in Tennis Matches

Authors: Wei Liu; Zhen Liu; Zhenjia Huang
Journal: Wireless Communications and Mobile Computing
 (2022)

---

## Abstract

Tennis competition is one of sports events. The vigorous development of sports can promote people’s pursuit of sports spirit and promote social unity and stability. However, in the course of social modernization development, sports events also need to follow closely, and we can no longer rely on traditional tools to support the development of events, which is not conducive to the positive development of sports. Due to the problem that the number of times the ball crosses the net in the traditional tennis game is too backward and the error rate is high, this paper uses artificial intelligence technology to record the number of times the ball crosses the net in tennis games and introduces the Center Net target based on the diagnostic criteria and comprehensive evaluation of tennis nets. Detect and track tennis balls by target recognition, feature extraction, and other methods, and record the times of net passing. However, considering that abnormal behaviors will also occur in the process of tennis passing through the net, the density-based DBSCAN clustering algorithm is used to discriminate and record abnormal behaviors in tennis matches. In order to verify the detection performance of DBSCAN clustering algorithm and Center Net target detection, the video of tennis match was analyzed and compared by drone from the perspective of time and space. By recording the number of times the ball crosses the net during the tennis receiving, connecting and attacking, and stalemate phases, the performance of the two recording times is compared.R2 are all higher than 0.94, and R values are 0.982 and 0.963, respectively, so the recall rate of DBSCAN clustering algorithm is 0.02 higher, which is better than Center Net target detection. Using artificial intelligence technology to record the number of times the ball crosses the net in tennis games can not only improve the scientificity and accuracy of the record but also promote the development of the sports industry.


---

## Body

## 1. Introduction

Sports is a product of the human social process. It can not only keep people in a good state of mind and work but also have the functions of promoting health, entertainment, and education. It can meet people’s spiritual and cultural needs, promote national unity, and promote economic development. It develops the healthy development of society. Artificial intelligence is one of the types of computer science. Since the birth of artificial intelligence, the theory and technology have become increasingly mature. The technological products brought by artificial intelligence in the future will be the crystallization of human wisdom. And artificial intelligence technology has penetrated into all walks of life and has a positive role in promoting the development of the industry. The continuous development of deep learning and computer vision technology and the continuous upgrading of computer hardware have provided new ways and methods for tennis net counting in tennis matches.The diagnostic criteria and comprehensive evaluation of tennis net times is an emerging research field in tennis. This paper systematically studies the whole process of tennis net times system construction, diagnosis, and comprehensive evaluation. When diagnosing the times of tennis passing the net, Center Net target detection and DBSCAN clustering algorithm are used to analyze the game video, respectively, and the times of tennis passing the net are recorded. The target is selected by the method of Center Net target detection, the characteristic analysis of the target is performed, and the target is locked for diagnosis, which is beneficial to improve the accuracy of the record. The DBSCAN clustering algorithm records the number of abnormal tennis passes over the net during the game, which can greatly reduce the dispute time for scoring points during the game and is also conducive to the fairness of the game.The pros and cons of the tennis net counting algorithm in the game are directly related to the evaluation of the game results. This paper mainly uses the Center Net object detection and the DBSCAN clustering algorithm to identify and count the tennis nets in the tennis match. In the process of counting the tennis nets in the game, the abnormal behavior in the game is analyzed according to the DBSCAN clustering algorithm, and the diagnostic indicators at all levels are used to carry out real-time diagnosis and analysis of the players during the game and after the game, which can relatively meticulously analyze the players’ games. In the current state of the game, the second-level tactical diagnostic index evaluation method is used to track and diagnose the players’ games, which can not only evaluate the number of times the players pass the net in each tactical link in each game but also evaluate the players’ tactical levels in each period. The combination of artificial intelligence technology and sports competitions, tracking the competition according to artificial intelligence, and determining the results of the competition is beneficial to the principle of fairness and openness of the competition.


## 2. Related Work

With the advancement of science and technology, the sports industry is also approaching modernization. In order to solve the problem that tennis players move slowly and the shadows are missed by normal algorithms, Jie and Fei propose a method combining tennis player detection and improved Gaussian mixture model to remove the shadows of players in tennis games. In order to verify the effectiveness of the proposed method, the effects of the proposed method on shadow removal with the Gaussian mixture model method and the background difference model were compared [1]. Lever et al.’s study analyzed the impact of sleep on competition by combining factors such as written parameters, well-being, anxiety, and competition results on adolescent sleep records during high-performance youth tennis tournaments [2]. Meffert et al. looked at male players’ pull length, serve and return behavior, and number of winners and forced and unforced errors to determine the possible impact of possible mental stress in a tiebreak situation, aim to compare player performance at tiebreak point (TBP) and nontiebreaker point (NTBP) [3]. Cui et al. use descriptive statistics that help provide general information on game characteristics and assess player performance. Through classification tree analysis, it was shown that tennis player performance depends on familiarity with the court surface as well as other contextual variables [4]. However, the relevance of intelligent technology research on the number of tennis passes in tennis games is still insufficient.Artificial intelligence has brought about high-tech changes, which have contributed to the development of society. Zheng et al. studied the human sleep process and classified sleep stages and realized the extraction and classification of EEG features based on K-means clustering algorithm [5]. Chin et al. show great potential to improve system speed without degrading object detector accuracy by experimenting on the ImageNet VID dataset, i.e., the speedup of dynamic domain-specific approximation is up to 7.5 times [6]. Khalifa et al. use the method of detecting multiple objects by background subtraction to sequentially track the features of different surveillance videos. In object detection at each frame, pixel differences are computed against a reference background frame to detect objects that only apply to any ideal static condition [7]. Han et al. delve into a comprehensive review of object detection techniques based on advanced deep learning techniques, including object detection (OD), salient object detection (SOD), and class-specific object detection (COD) [8]. In order to improve the effect of automatic epilepsy detection, Zhan et al. proposed a new classification method based on unsupervised multiview clustering results, which reduces the sample dimension and increases the sample separability [9]. Gallo and Cappozi proposed a web-based data mining method to break through the limitations of human recognition ability, which combines correlation graphs with cluster analysis to rapidly extract patterns from WBM, which are then tied to manufacturing defects [10]. However, the accuracy of the study of tennis net counts still needs to be improved.


## 3. Tennis Net Recognition Technology in Machine Learning

### 3.1. Center Net Object Detection

Corner Net determines the target by extracting spatial information from the upper left and lower right corners of the detected object. Only the edge features of the target can be extracted, resulting in false detection. Therefore, in order to avoid the above problems, Center Net target detection is used. For object detection, the mean estimated score is usually complemented by angular nets, and this reduces false detections by the network [11].In the early tennis technique and tactics research, after the statistical indicators were designed, they were collected on-site. Due to the limitation of human and material resources, there were few statistical indicators, and only some technical links could be collected for diagnosis and analysis [12]. Later, with the popularization and application of computers, Excel was used to compile corresponding tables for on-the-spot/post-game video collection and summary calculation data. Compared with manual work, this collection method was efficient, fast, and easy to operate and had more statistical indicators [13]. In order to evaluate the parameters, it is more convenient and faster to use a computer, but no matter what method of data collection is used, manual participation is required, and the collection of a large amount of game data is still time-consuming and laborious, and complete intelligent collection has not been achieved.Using artificial intelligence technology as an important way to strive to achieve intelligent training and competition plays an important role in improving the sports potential of athletes and transforms it into sports performance through competition [14]. Through the Center Net target detection technology, the game skill detection, tactical analysis, and diagnosis in tennis matches are used as the judging criteria. Center Net provides a simpler and more efficient object detection algorithm [15]. The main idea is as follows: the target frame is represented by a single point in the center of the target frame, and other attributes, such as target size, dimension, 3D range, orientation, and object pose, are regressed through image features at the position of the center point [16]. Regression models are both predictions and explanations, and this is reflected in the unordered series of events that the model outputs, but the disadvantage of multiple correlations is in predictive models. The overall structure of Center Net target detection is shown in Figure 1.Figure 1
Center Net algorithm structure diagram.The basic network structure of Center Net is similar to that of Corner Net. The algorithm flow of Center Net is as follows: first, input a picture, after7×7 target detection, reduce the picture size to a quarter of the original size, and extract it according to features [17]. In network extraction features, the difference between Center Net and Corner Net is as follows: Corner Net is an Hourglass Network composed of two hourglass modules, while Center Net is an Hourglass Network composed of an hourglass module. The prediction model is divided into three parts, heatmaps, size, and offsets. Among them, heatmaps is the center point information of the output prediction. Size is the width and height information of the predicted image. Offsets is used to fine-tune the prediction frame.Winning or losing a tennis match requires several back-and-forth confrontations, a win or loss requires multiple rounds, a win or loss of a game requires multiple serve points and break points, and a win or loss requires at least one point or more [18]. The Center Net algorithm performs target detection on the center point of the tennis ball to obtain the target attribute and transmits the image to the fully curved network to form a heatmap; secondly, the peak point of the heatmap is determined; finally, the target position will be generated [19]. In this paper, the central net algorithm is used to detect the tennis net passing state. The target center point is shown in Figure 2.Figure 2
Center Net target center point prediction.In the tennis game picture, the tennis picture is used as input and input to DLA or Hourglass function map512∗512∗3downsamplingstride=4, heatmap center offset (x,y), box size (width, height), and3∗3Max pooling peak as object center, as shown in Figure 3.Figure 3
Overall structure of Center Net.Center Net center point prediction is to calculate the ground resolution point for a certain C class in each target object map during the whole training process, then mark the video image, and use the Gaussian kernel to distribute the key points to the feature map, making it overlap with the target image [20]. The central keypoint computes the regression target size for each target trained by the ensemble. To speed up the computation, a single size prediction is used for each object class, and the edge size is increased at the center point [21]. After inputting the original video, the objective function of the entire training is adjusted by adding relevant absorption, and the formula is as follows:
(1)T=a1+a22,b1+b22,(2)Babc=exp−a−TbΛ2+b−TbΛ22σ2T,(3)TΛ=TR,(4)TP=a1P+a2P2,b1P+b2P2,(5)KT=a2P−a1P,b2P+b1P,(6)Lsize=1m∑x=1mKΛTP−KT,(7)Ldet=Lk+λsizeLsize+λoffLoff,(8)λsize=0.1,(9)λoff=1.The video data is intercepted by the video interception program, and the overall information of the tennis is marked with the annotation tool, as shown in Figure4.Figure 4
Center Net object detection model.


### 3.2. DBSCAN Clustering Algorithm

In the information age, huge amounts of data are generated every day. With the ever-increasing scale and dimension of data, how to effectively mine valuable information from these data has become a hot issue [22]. Machine learning algorithms are generally divided into supervised learning and unsupervised learning, and the DBSCAN clustering algorithm belongs to unsupervised machine learning [23]. For the supervised learning of DBSCAN clustering algorithm, it mainly trains the collected tennis match data and then sends the data of the number of times the ball crosses the net into the trained model to obtain classification or regression results. The characteristic of unsupervised machine learning is that there is no training process, the data is directly input into the model, and then, the result is obtained. Unlike classification problems, clustering algorithms generally do not define the number of classifications in advance. Different clustering algorithms must divide a batch of samples into multiple classes according to their own rules to ensure that samples in the same class are similar, but different. The samples of the classes are different [24]. The types into which samples are classified are also called “clusters.”DBSCAN is a common density-based clustering algorithm, and the full English name is Density-Based Spatia Clustering of Applications with Noise [25]. At the beginning of clustering, the algorithm will use any data points that have not been visited as core points and divide adjacent points within the core point radius Eps into the same cluster; then, the algorithm will use these new points as core points and then expand according to Eps to the surrounding and continue to include qualifying points in this cluster. Repeat this process until there are no nearby data points that can be expanded. Those points that do not meet the radius and minimum number will be marked as noise. After retrieving the data, label each point as belonging to a cluster or noise. Compared with other clustering algorithms, density-based clustering algorithms have great advantages. First, the number of clusters to be divided does not need to be entered before the algorithm starts. Second, this algorithm can identify outliers as noise, which means it can input noise filtering parameters when needed. Third, this algorithm can find clusters of any size and shape. However, this algorithm needs to set parameters Eps and Min Pts in advance, and it is difficult to set the parameters when the spatial cluster density is not uniform.For the detection of abnormal behavior in the game, the first problem is to give a clear definition of the so-called abnormal behavior, and it is necessary to ensure the correctness and rationality of the regular tennis net passing behavior. In general, the definition of abnormal behavior needs to be compared with normal behavior. Anything that does not match normal behavior can be regarded as abnormal behavior. Different scenarios have different definitions of abnormal behavior. The scientific principle is the first basic principle that any academic research activities must follow. The principle of scientificity means that the theoretical basis of the evaluation index system should be sufficient and reasonable, and the selected index should be able to scientifically reflect the object of knowledge, so as to realize the accurate diagnosis of the number of times the men’s tennis players pass the net. For this paper, we consider the movement state of the crowd in the tennis match from the perspective of the drone, and the abnormal behavior is defined as the tennis net passing behavior and landing state.The evaluation of the counting algorithm based on target detection needs to consider the classification performance and regression performance. When the algorithm detects the correct passenger flow, the IOU is greater than the threshold set by the model, and vice versa. Therefore, the precision rate, recall rate,F1 value, and mean precision are selected as the evaluation indicators of the algorithm. The formula of the evaluation index is as follows:
(10)IOU=Ky∩GyKy∪Gy,(11)K=TKTK+FK,(12)R=TKTK+FN,(13)F1=2K∗RK+R,(14)mAK=∫01KRdR,(15)MAE=1mtx−zx,(16)MSE=1m∑x=1mtx−zx2,(17)Acc=1−1mtx−zxtx∗100%,(18)R2=1−∑x=1mtx−zx2∑x=1mtx−z¯x2.The DBSCAN algorithm is used to judge the recall rate of the number of times the sample crosses the network, and the precision of the recall data is calculated, so that the evaluation performance of the algorithm is obtained. The DBSCAN algorithm can find all dense areas of sample points and define these dense areas as clusters. This feature is very suitable for the characteristics of crowd distribution from the perspective of drones, so try to use the DBSCAN clustering algorithm to analyze the number of tennis nets in tennis matches.


## 3.1. Center Net Object Detection

Corner Net determines the target by extracting spatial information from the upper left and lower right corners of the detected object. Only the edge features of the target can be extracted, resulting in false detection. Therefore, in order to avoid the above problems, Center Net target detection is used. For object detection, the mean estimated score is usually complemented by angular nets, and this reduces false detections by the network [11].In the early tennis technique and tactics research, after the statistical indicators were designed, they were collected on-site. Due to the limitation of human and material resources, there were few statistical indicators, and only some technical links could be collected for diagnosis and analysis [12]. Later, with the popularization and application of computers, Excel was used to compile corresponding tables for on-the-spot/post-game video collection and summary calculation data. Compared with manual work, this collection method was efficient, fast, and easy to operate and had more statistical indicators [13]. In order to evaluate the parameters, it is more convenient and faster to use a computer, but no matter what method of data collection is used, manual participation is required, and the collection of a large amount of game data is still time-consuming and laborious, and complete intelligent collection has not been achieved.Using artificial intelligence technology as an important way to strive to achieve intelligent training and competition plays an important role in improving the sports potential of athletes and transforms it into sports performance through competition [14]. Through the Center Net target detection technology, the game skill detection, tactical analysis, and diagnosis in tennis matches are used as the judging criteria. Center Net provides a simpler and more efficient object detection algorithm [15]. The main idea is as follows: the target frame is represented by a single point in the center of the target frame, and other attributes, such as target size, dimension, 3D range, orientation, and object pose, are regressed through image features at the position of the center point [16]. Regression models are both predictions and explanations, and this is reflected in the unordered series of events that the model outputs, but the disadvantage of multiple correlations is in predictive models. The overall structure of Center Net target detection is shown in Figure 1.Figure 1
Center Net algorithm structure diagram.The basic network structure of Center Net is similar to that of Corner Net. The algorithm flow of Center Net is as follows: first, input a picture, after7×7 target detection, reduce the picture size to a quarter of the original size, and extract it according to features [17]. In network extraction features, the difference between Center Net and Corner Net is as follows: Corner Net is an Hourglass Network composed of two hourglass modules, while Center Net is an Hourglass Network composed of an hourglass module. The prediction model is divided into three parts, heatmaps, size, and offsets. Among them, heatmaps is the center point information of the output prediction. Size is the width and height information of the predicted image. Offsets is used to fine-tune the prediction frame.Winning or losing a tennis match requires several back-and-forth confrontations, a win or loss requires multiple rounds, a win or loss of a game requires multiple serve points and break points, and a win or loss requires at least one point or more [18]. The Center Net algorithm performs target detection on the center point of the tennis ball to obtain the target attribute and transmits the image to the fully curved network to form a heatmap; secondly, the peak point of the heatmap is determined; finally, the target position will be generated [19]. In this paper, the central net algorithm is used to detect the tennis net passing state. The target center point is shown in Figure 2.Figure 2
Center Net target center point prediction.In the tennis game picture, the tennis picture is used as input and input to DLA or Hourglass function map512∗512∗3downsamplingstride=4, heatmap center offset (x,y), box size (width, height), and3∗3Max pooling peak as object center, as shown in Figure 3.Figure 3
Overall structure of Center Net.Center Net center point prediction is to calculate the ground resolution point for a certain C class in each target object map during the whole training process, then mark the video image, and use the Gaussian kernel to distribute the key points to the feature map, making it overlap with the target image [20]. The central keypoint computes the regression target size for each target trained by the ensemble. To speed up the computation, a single size prediction is used for each object class, and the edge size is increased at the center point [21]. After inputting the original video, the objective function of the entire training is adjusted by adding relevant absorption, and the formula is as follows:
(1)T=a1+a22,b1+b22,(2)Babc=exp−a−TbΛ2+b−TbΛ22σ2T,(3)TΛ=TR,(4)TP=a1P+a2P2,b1P+b2P2,(5)KT=a2P−a1P,b2P+b1P,(6)Lsize=1m∑x=1mKΛTP−KT,(7)Ldet=Lk+λsizeLsize+λoffLoff,(8)λsize=0.1,(9)λoff=1.The video data is intercepted by the video interception program, and the overall information of the tennis is marked with the annotation tool, as shown in Figure4.Figure 4
Center Net object detection model.


## 3.2. DBSCAN Clustering Algorithm

In the information age, huge amounts of data are generated every day. With the ever-increasing scale and dimension of data, how to effectively mine valuable information from these data has become a hot issue [22]. Machine learning algorithms are generally divided into supervised learning and unsupervised learning, and the DBSCAN clustering algorithm belongs to unsupervised machine learning [23]. For the supervised learning of DBSCAN clustering algorithm, it mainly trains the collected tennis match data and then sends the data of the number of times the ball crosses the net into the trained model to obtain classification or regression results. The characteristic of unsupervised machine learning is that there is no training process, the data is directly input into the model, and then, the result is obtained. Unlike classification problems, clustering algorithms generally do not define the number of classifications in advance. Different clustering algorithms must divide a batch of samples into multiple classes according to their own rules to ensure that samples in the same class are similar, but different. The samples of the classes are different [24]. The types into which samples are classified are also called “clusters.”DBSCAN is a common density-based clustering algorithm, and the full English name is Density-Based Spatia Clustering of Applications with Noise [25]. At the beginning of clustering, the algorithm will use any data points that have not been visited as core points and divide adjacent points within the core point radius Eps into the same cluster; then, the algorithm will use these new points as core points and then expand according to Eps to the surrounding and continue to include qualifying points in this cluster. Repeat this process until there are no nearby data points that can be expanded. Those points that do not meet the radius and minimum number will be marked as noise. After retrieving the data, label each point as belonging to a cluster or noise. Compared with other clustering algorithms, density-based clustering algorithms have great advantages. First, the number of clusters to be divided does not need to be entered before the algorithm starts. Second, this algorithm can identify outliers as noise, which means it can input noise filtering parameters when needed. Third, this algorithm can find clusters of any size and shape. However, this algorithm needs to set parameters Eps and Min Pts in advance, and it is difficult to set the parameters when the spatial cluster density is not uniform.For the detection of abnormal behavior in the game, the first problem is to give a clear definition of the so-called abnormal behavior, and it is necessary to ensure the correctness and rationality of the regular tennis net passing behavior. In general, the definition of abnormal behavior needs to be compared with normal behavior. Anything that does not match normal behavior can be regarded as abnormal behavior. Different scenarios have different definitions of abnormal behavior. The scientific principle is the first basic principle that any academic research activities must follow. The principle of scientificity means that the theoretical basis of the evaluation index system should be sufficient and reasonable, and the selected index should be able to scientifically reflect the object of knowledge, so as to realize the accurate diagnosis of the number of times the men’s tennis players pass the net. For this paper, we consider the movement state of the crowd in the tennis match from the perspective of the drone, and the abnormal behavior is defined as the tennis net passing behavior and landing state.The evaluation of the counting algorithm based on target detection needs to consider the classification performance and regression performance. When the algorithm detects the correct passenger flow, the IOU is greater than the threshold set by the model, and vice versa. Therefore, the precision rate, recall rate,F1 value, and mean precision are selected as the evaluation indicators of the algorithm. The formula of the evaluation index is as follows:
(10)IOU=Ky∩GyKy∪Gy,(11)K=TKTK+FK,(12)R=TKTK+FN,(13)F1=2K∗RK+R,(14)mAK=∫01KRdR,(15)MAE=1mtx−zx,(16)MSE=1m∑x=1mtx−zx2,(17)Acc=1−1mtx−zxtx∗100%,(18)R2=1−∑x=1mtx−zx2∑x=1mtx−z¯x2.The DBSCAN algorithm is used to judge the recall rate of the number of times the sample crosses the network, and the precision of the recall data is calculated, so that the evaluation performance of the algorithm is obtained. The DBSCAN algorithm can find all dense areas of sample points and define these dense areas as clusters. This feature is very suitable for the characteristics of crowd distribution from the perspective of drones, so try to use the DBSCAN clustering algorithm to analyze the number of tennis nets in tennis matches.


## 4. Effect of the Method of Recording the Number of Tennis Passes over the Net in Tennis Matches

### 4.1. Data Collection of Tennis Matches

Competitive tennis is a sport with the most fundamental purpose of winning. The competitive level of athletes in the game is comprehensively reflected in five aspects: physical fitness, intelligence, mental ability, skills, and tactical ability. The video of the tennis match was filmed by drone. The video, using video observation, intelligent monitoring, and other methods, observed the tennis men’s double match system and tested the match data. The net diagnosis index system of tennis game is composed of a series of diagnosis indicators and corresponding evaluation standards. The evaluation and diagnosis indicators reflect the overall situation of judgment and identification of the target. Through partial correlation analysis and stepwise regression analysis, a secondary tactical diagnostic index system is obtained, as shown in Table1.Table 1
Tennis net diagnostic index system.
Ι level indicatorSend-and-receive segmentLink attack stageStalemate stageII level indicatorRecord the first over the net during the serving sessionRecord the second pass over the net during the catchRecord the third and fifth net crossings in the connection linkRecord the 4th and 6th net crossing in the pick-up linkRecord the seventh net crossing in the first stage of the stalemateRecord the eighth net crossing in the first stage of the stalemateTennis is one of those ball games, usually played between two singles players or a combination of two, in which the tennis player hits the ball over the net with a strap on the tennis court in order to prevent the player from hitting the ball back normally. Diagnosis ideas are mainly studied from the two dimensions of time (hitting sequence) and space (field) “segmentally,” analyzing the tactical application characteristics and scoring characteristics of the world’s outstanding men’s tennis players and preliminarily determining the distribution law of the basic unit of tennis competition process stages. According to the distribution characteristics of the basic unit competition process of the world’s outstanding men’s players, the diagnostic indicators of tennis over the net are preliminarily determined, and expert interviews and investigations are conducted to determine the overall tactical ability of men’s double tennis competition in the form of “stage division” from the perspective of expert experience. The video shows that the 55th, the highest number of strikes at the time of scoring, is set as the upper limit of the number of counts, and the first shot is set as the lower limit. The use of techniques and tactics for winning or losing each point refers not only to the use of techniques and tactics of kicking the ball itself, but also to the use of techniques and tactics of rhythm, serving or controlling the ball. If the points scored and won are the 5th loss, the combination of the 1st, 3rd, and 5th strokes of the serve demonstrates the player’s application of technique and tactics.The video selection of the men’s double match in tennis is performed by drone, and the data is mainly from the video. The dataset consists of a video sequence of up to 1 hour of images, and the dataset has a relatively low crowd density, with an average of 2-3 people per image. A dataset with different lighting conditions was collected. In addition, the crowd density of the scenes contained in this dataset is not very different, so there is no big difference in the size and appearance of the objects in the pictures. The pictures in this dataset are at least 2 people and at most 4 people. In order to verify the performance of the algorithm for recording the number of tennis passes in a tennis match, the controlled laboratory environment is shown in Table2.Table 2
Network training environment.
System hardwareModelSystemWin 8ARM128 GBFrameworkPytorch2.4.0Programming languagePython


### 4.2. Comparison of DBSCAN Clustering Algorithm and Center Net Target Detection Performance

Through the diagnostic index system and evaluation criteria of tennis net passing in tennis matches, the number of tennis net passing times in the match can be effectively recorded. For men’s tennis double tennis over-the-net diagnostic indicators in advance, by exploring the relationship between the diagnostic indicators, quantify the relationship between the diagnostic indicators and their importance to the winning rate of the game, so as to more effectively formulate training plans and game tactics and strategies provide data support. Using the constructed diagnostic index system and its evaluation criteria, the DBSCAN clustering algorithm and the Center Net target detection, analysis, and diagnosis are used to improve the intelligence of the number of tennis passes in the tennis men’s double match.In order to compare the performance of the model, only the video l dataset is used for training on the DBSCAN clustering algorithm and the Center Net target detection model. The comparison results of the test set MAE, MSE, and Acc are shown in Figure5. It can be seen from the figure that the performance of DBSCAN clustering algorithm is significantly better than that of Center Net object detection. In the Center Net target detection model, the MAE and MSE are 17.33 and 25.68, respectively, and the error is significantly higher than that of the DBSCAN clustering algorithm, but the error range of the Center Net target detection is still within the acceptable range.Figure 5
Performance comparison of different recognition methods.
(a)
Comparison of the performance of different models on video 1(b)
Robust Performance comparison of different modelFigure5 uses the DBSCAN clustering algorithm and Center Net object detection to test the training video 1 dataset to compare the robustness of different models. “Robustness” refers to the tendency of a control system to maintain some other performance characteristics under parameter disturbances. According to different definitions of performance, it can be divided into stability robustness and performance robustness. It is not difficult to see from the figure that the DBSCAN clustering algorithm model is better than the Center Net target detection in the robust performance of the tennis net counting model at different times, but compared with the test results on the same dataset, its model performance has dropped a lot, and the accuracy has dropped. This may be due to the correlation between the background environment of the tennis net data shot at different times, the color characteristics, and density distribution of the tennis ball itself, which makes the model unable to adapt to the tennis balls at different times, resulting in a large drop in counting accuracy.This paper analyzes the evaluation parameters of the three links of serving skills and tactics, the evaluation parameters of the receiving skills and tactics links, the temporal and spatial dimensions of tennis matches, the correlation differences of various diagnostic indicators, and the probability of winning.R is the multiple correlation coefficient, which represents the closeness of all independent variables in the model to the dependent variable. The larger the R value, the closer the linear regression relationship is; R2 is the square of the complex correlation coefficient, which is positively related to the model fitting, and the larger the value, the better. Absolute error means the absolute difference between the log value and the actual value; relative error is the absolute difference between the log value and the actual value as a percentage of the actual value. The smaller the absolute and relative errors, the higher the accuracy of the fitted model.TheR values of DBSCAN clustering algorithm and Center Net target detection in men’s tennis double match in Table 3 are 0.982 and 0.963, respectively, R2 is higher than 0.94, the mean absolute error is only 0.013 and 0.023, and the standard deviation is 0.0009 and 0.018. The relative errors are only 0.024% and 0.025%, and the standard deviations are 0.012% and 0.015%. The error values are small, and the fitting accuracy of the two models is higher than 95%. It shows that the two established models have high fitting accuracy, but each index value of DBSCAN clustering algorithm is better than Center Net target detection.Table 3
Accuracy comparison of different algorithms for the number of tennis passes in the tennis men’s double match.
MethodDBSCAN clustering algorithmCenter Net object detection (%)R0.9820.971R20.9630.941Absolute error0.013±0.00090.024±0.0012Relative error0.023±0.0180.025±0.015


### 4.3. DBSCAN Clustering Algorithm to Predict the Number of Tennis Passes

Due to the outstanding performance of DBSCAN clustering algorithm in counting accuracy, we only study the counting performance of DBSCAN clustering algorithm for different tennis nets. Clustering analysis is a rigorous data analysis process, which mainly consists of four parts: feature selection or mutation, clustering algorithm selection or design, clustering result evaluation, and clustering result physical analysis. At present, clustering algorithms play an important role in the field of data analysis, and each method has its own characteristics, so there is no unique way of dividing the clustering method. The DBSCAN clustering algorithm is used to compare the actual and predicted net passing times in tennis matches in different periods.In order to effectively estimate the number of times the tennis passes the net in the game, the video frame of the tennis passing the net in the tennis match video 1 is cut down along the rectangular box in the figure and counted. The actual number of tennis passes over the net is counted manually. By recording the number of tennis balls that were marked manually and the number of shoots predicted by the model trained by the network, the results of the experimental prediction of the number of tennis balls passing over the net and the actual number of tennis balls being marked are shown in Figure6.Figure 6
Comparison of the predicted tennis net passing times and the actual net passing times in two videos.
(a)
Video 1: predicted and actual number of Internet visits(b)
Video 2: predicted and actual number of Internet visitsThe model’s prediction of the number of tennis passes over the net in two different periods is close to the actual count, which indicates that the model can predict the number of tennis passes over the net well. The black curve in the figure represents the actual tennis pass count, and the red curve represents the model. For the video 1 dataset, the predicted tennis net times ranged from 12 to 60, and the actual number of markers ranged from 20 to 60. For the video 2 dataset, the model predicted a range of 60 to 110. The range of labels is between 65 and 1200. It is not difficult to see from the two figures that most of the tennis nets predicted by the model are higher than the actual number of labels. This may be due to factors such as light intensity and shooting. Some rackets are blurred in color and shape, which may be misjudged.Regression analysis is a hypothetical description. There is a hypothetical causal relationship between the input and output variables. By examining the relationship between the input and output variables, a predictive model is formed to clarify the affinity relationship, and then, the output variables are estimated based on the input variables. The predicted value of the dependent variable can be obtained by mathematically correlating this regression model with the given independent variables. The error curve refers to the difference between the value obtained in the actual game and the value in the prediction model. The smaller the difference, the better the prediction model. According to video 1 and video 2 as the test set, the DBSCAN clustering algorithm is used for modeling. The training error of the model network is shown in Figure7. The smaller the error value, the faster the training speed of the men’s tennis double match prediction model network and the good training effect.Figure 7
The training error curve of the prediction model for the number of net passes in the men’s tennis double match.The fitted regression graph of the discriminant model for men’s tennis double matches refers to the direct correlation between the output data and the target data. The data points of the model are evenly distributed near the fitting curve, indicating that the discriminative model for men’s tennis double competition constructed in this study has good training effect, discriminative ability, and overall fitting effect.According to the DBSCAN clustering algorithm, a linear regression analysis is performed on the actual marked value and the predicted value. The experimental results are shown in Figure8. The linear fit of the model is good, with R2 values of 0.663 and 0.719 and RMSE of 6.153 and 8.312, respectively, indicating that the number of tennis passes predicted by the model has a strong positive correlation with the actual number of net passes. This also shows that the DBSCAN clustering algorithm has better performance for the records of tennis passing times. In addition, the regression lines in the two figures are above the red line in the figure, which also shows that the number of tennis passes predicted by the model is higher than the actual number of markings.Figure 8
Comparison of predicted and actual tennis passes over the net.
(a)
Video 1: linear regression of predicted and actual values(b)
Video 2: linear regression of predicted and actual valuesAlthough the variables are highly correlated, the algorithm can still find their respective effects on the target variable, and the effects are significant. Through the internal training samples of the model and the test samples, the test results are basically the same, and there is no obvious sign of deterioration, indicating that the research direction conforms to empirical expectations or theories. For predictive models, the function of explanation is secondary. The primary task of predictive models is to make some kind of prediction about the future, and this prediction needs to rely on the overall ability of the model, including all the factors involved in the model. As for the accuracy of a single factor, as long as it does not affect the overall ability of the model, there is no need to care too much.


## 4.1. Data Collection of Tennis Matches

Competitive tennis is a sport with the most fundamental purpose of winning. The competitive level of athletes in the game is comprehensively reflected in five aspects: physical fitness, intelligence, mental ability, skills, and tactical ability. The video of the tennis match was filmed by drone. The video, using video observation, intelligent monitoring, and other methods, observed the tennis men’s double match system and tested the match data. The net diagnosis index system of tennis game is composed of a series of diagnosis indicators and corresponding evaluation standards. The evaluation and diagnosis indicators reflect the overall situation of judgment and identification of the target. Through partial correlation analysis and stepwise regression analysis, a secondary tactical diagnostic index system is obtained, as shown in Table1.Table 1
Tennis net diagnostic index system.
Ι level indicatorSend-and-receive segmentLink attack stageStalemate stageII level indicatorRecord the first over the net during the serving sessionRecord the second pass over the net during the catchRecord the third and fifth net crossings in the connection linkRecord the 4th and 6th net crossing in the pick-up linkRecord the seventh net crossing in the first stage of the stalemateRecord the eighth net crossing in the first stage of the stalemateTennis is one of those ball games, usually played between two singles players or a combination of two, in which the tennis player hits the ball over the net with a strap on the tennis court in order to prevent the player from hitting the ball back normally. Diagnosis ideas are mainly studied from the two dimensions of time (hitting sequence) and space (field) “segmentally,” analyzing the tactical application characteristics and scoring characteristics of the world’s outstanding men’s tennis players and preliminarily determining the distribution law of the basic unit of tennis competition process stages. According to the distribution characteristics of the basic unit competition process of the world’s outstanding men’s players, the diagnostic indicators of tennis over the net are preliminarily determined, and expert interviews and investigations are conducted to determine the overall tactical ability of men’s double tennis competition in the form of “stage division” from the perspective of expert experience. The video shows that the 55th, the highest number of strikes at the time of scoring, is set as the upper limit of the number of counts, and the first shot is set as the lower limit. The use of techniques and tactics for winning or losing each point refers not only to the use of techniques and tactics of kicking the ball itself, but also to the use of techniques and tactics of rhythm, serving or controlling the ball. If the points scored and won are the 5th loss, the combination of the 1st, 3rd, and 5th strokes of the serve demonstrates the player’s application of technique and tactics.The video selection of the men’s double match in tennis is performed by drone, and the data is mainly from the video. The dataset consists of a video sequence of up to 1 hour of images, and the dataset has a relatively low crowd density, with an average of 2-3 people per image. A dataset with different lighting conditions was collected. In addition, the crowd density of the scenes contained in this dataset is not very different, so there is no big difference in the size and appearance of the objects in the pictures. The pictures in this dataset are at least 2 people and at most 4 people. In order to verify the performance of the algorithm for recording the number of tennis passes in a tennis match, the controlled laboratory environment is shown in Table2.Table 2
Network training environment.
System hardwareModelSystemWin 8ARM128 GBFrameworkPytorch2.4.0Programming languagePython


## 4.2. Comparison of DBSCAN Clustering Algorithm and Center Net Target Detection Performance

Through the diagnostic index system and evaluation criteria of tennis net passing in tennis matches, the number of tennis net passing times in the match can be effectively recorded. For men’s tennis double tennis over-the-net diagnostic indicators in advance, by exploring the relationship between the diagnostic indicators, quantify the relationship between the diagnostic indicators and their importance to the winning rate of the game, so as to more effectively formulate training plans and game tactics and strategies provide data support. Using the constructed diagnostic index system and its evaluation criteria, the DBSCAN clustering algorithm and the Center Net target detection, analysis, and diagnosis are used to improve the intelligence of the number of tennis passes in the tennis men’s double match.In order to compare the performance of the model, only the video l dataset is used for training on the DBSCAN clustering algorithm and the Center Net target detection model. The comparison results of the test set MAE, MSE, and Acc are shown in Figure5. It can be seen from the figure that the performance of DBSCAN clustering algorithm is significantly better than that of Center Net object detection. In the Center Net target detection model, the MAE and MSE are 17.33 and 25.68, respectively, and the error is significantly higher than that of the DBSCAN clustering algorithm, but the error range of the Center Net target detection is still within the acceptable range.Figure 5
Performance comparison of different recognition methods.
(a)
Comparison of the performance of different models on video 1(b)
Robust Performance comparison of different modelFigure5 uses the DBSCAN clustering algorithm and Center Net object detection to test the training video 1 dataset to compare the robustness of different models. “Robustness” refers to the tendency of a control system to maintain some other performance characteristics under parameter disturbances. According to different definitions of performance, it can be divided into stability robustness and performance robustness. It is not difficult to see from the figure that the DBSCAN clustering algorithm model is better than the Center Net target detection in the robust performance of the tennis net counting model at different times, but compared with the test results on the same dataset, its model performance has dropped a lot, and the accuracy has dropped. This may be due to the correlation between the background environment of the tennis net data shot at different times, the color characteristics, and density distribution of the tennis ball itself, which makes the model unable to adapt to the tennis balls at different times, resulting in a large drop in counting accuracy.This paper analyzes the evaluation parameters of the three links of serving skills and tactics, the evaluation parameters of the receiving skills and tactics links, the temporal and spatial dimensions of tennis matches, the correlation differences of various diagnostic indicators, and the probability of winning.R is the multiple correlation coefficient, which represents the closeness of all independent variables in the model to the dependent variable. The larger the R value, the closer the linear regression relationship is; R2 is the square of the complex correlation coefficient, which is positively related to the model fitting, and the larger the value, the better. Absolute error means the absolute difference between the log value and the actual value; relative error is the absolute difference between the log value and the actual value as a percentage of the actual value. The smaller the absolute and relative errors, the higher the accuracy of the fitted model.TheR values of DBSCAN clustering algorithm and Center Net target detection in men’s tennis double match in Table 3 are 0.982 and 0.963, respectively, R2 is higher than 0.94, the mean absolute error is only 0.013 and 0.023, and the standard deviation is 0.0009 and 0.018. The relative errors are only 0.024% and 0.025%, and the standard deviations are 0.012% and 0.015%. The error values are small, and the fitting accuracy of the two models is higher than 95%. It shows that the two established models have high fitting accuracy, but each index value of DBSCAN clustering algorithm is better than Center Net target detection.Table 3
Accuracy comparison of different algorithms for the number of tennis passes in the tennis men’s double match.
MethodDBSCAN clustering algorithmCenter Net object detection (%)R0.9820.971R20.9630.941Absolute error0.013±0.00090.024±0.0012Relative error0.023±0.0180.025±0.015


## 4.3. DBSCAN Clustering Algorithm to Predict the Number of Tennis Passes

Due to the outstanding performance of DBSCAN clustering algorithm in counting accuracy, we only study the counting performance of DBSCAN clustering algorithm for different tennis nets. Clustering analysis is a rigorous data analysis process, which mainly consists of four parts: feature selection or mutation, clustering algorithm selection or design, clustering result evaluation, and clustering result physical analysis. At present, clustering algorithms play an important role in the field of data analysis, and each method has its own characteristics, so there is no unique way of dividing the clustering method. The DBSCAN clustering algorithm is used to compare the actual and predicted net passing times in tennis matches in different periods.In order to effectively estimate the number of times the tennis passes the net in the game, the video frame of the tennis passing the net in the tennis match video 1 is cut down along the rectangular box in the figure and counted. The actual number of tennis passes over the net is counted manually. By recording the number of tennis balls that were marked manually and the number of shoots predicted by the model trained by the network, the results of the experimental prediction of the number of tennis balls passing over the net and the actual number of tennis balls being marked are shown in Figure6.Figure 6
Comparison of the predicted tennis net passing times and the actual net passing times in two videos.
(a)
Video 1: predicted and actual number of Internet visits(b)
Video 2: predicted and actual number of Internet visitsThe model’s prediction of the number of tennis passes over the net in two different periods is close to the actual count, which indicates that the model can predict the number of tennis passes over the net well. The black curve in the figure represents the actual tennis pass count, and the red curve represents the model. For the video 1 dataset, the predicted tennis net times ranged from 12 to 60, and the actual number of markers ranged from 20 to 60. For the video 2 dataset, the model predicted a range of 60 to 110. The range of labels is between 65 and 1200. It is not difficult to see from the two figures that most of the tennis nets predicted by the model are higher than the actual number of labels. This may be due to factors such as light intensity and shooting. Some rackets are blurred in color and shape, which may be misjudged.Regression analysis is a hypothetical description. There is a hypothetical causal relationship between the input and output variables. By examining the relationship between the input and output variables, a predictive model is formed to clarify the affinity relationship, and then, the output variables are estimated based on the input variables. The predicted value of the dependent variable can be obtained by mathematically correlating this regression model with the given independent variables. The error curve refers to the difference between the value obtained in the actual game and the value in the prediction model. The smaller the difference, the better the prediction model. According to video 1 and video 2 as the test set, the DBSCAN clustering algorithm is used for modeling. The training error of the model network is shown in Figure7. The smaller the error value, the faster the training speed of the men’s tennis double match prediction model network and the good training effect.Figure 7
The training error curve of the prediction model for the number of net passes in the men’s tennis double match.The fitted regression graph of the discriminant model for men’s tennis double matches refers to the direct correlation between the output data and the target data. The data points of the model are evenly distributed near the fitting curve, indicating that the discriminative model for men’s tennis double competition constructed in this study has good training effect, discriminative ability, and overall fitting effect.According to the DBSCAN clustering algorithm, a linear regression analysis is performed on the actual marked value and the predicted value. The experimental results are shown in Figure8. The linear fit of the model is good, with R2 values of 0.663 and 0.719 and RMSE of 6.153 and 8.312, respectively, indicating that the number of tennis passes predicted by the model has a strong positive correlation with the actual number of net passes. This also shows that the DBSCAN clustering algorithm has better performance for the records of tennis passing times. In addition, the regression lines in the two figures are above the red line in the figure, which also shows that the number of tennis passes predicted by the model is higher than the actual number of markings.Figure 8
Comparison of predicted and actual tennis passes over the net.
(a)
Video 1: linear regression of predicted and actual values(b)
Video 2: linear regression of predicted and actual valuesAlthough the variables are highly correlated, the algorithm can still find their respective effects on the target variable, and the effects are significant. Through the internal training samples of the model and the test samples, the test results are basically the same, and there is no obvious sign of deterioration, indicating that the research direction conforms to empirical expectations or theories. For predictive models, the function of explanation is secondary. The primary task of predictive models is to make some kind of prediction about the future, and this prediction needs to rely on the overall ability of the model, including all the factors involved in the model. As for the accuracy of a single factor, as long as it does not affect the overall ability of the model, there is no need to care too much.


## 5. Discussion

The Center Net object detection and DBSCAN clustering algorithms are the most commonly used algorithms in machine learning. By setting relevant rules, they can simulate and replace human beings. Use Center Net object detection and DBSCAN clustering algorithm to track the tennis trajectory in tennis games and calculate the reasonable times of passing the net. Identifying the process of tennis netting through the set diagnostic criteria and evaluation criteria can not only improve the accuracy of the number of tennis passes over the net but also predict the winning or losing results of the entire game. Although Center Net object detection has a good effect on tracking the trajectory of tennis balls in tennis games, it will miss detection behavior when recording the number of tennis nets passing over the net due to the abnormality of the game. According to the experimental comparison of DBSCAN clustering algorithm, the evaluation results of the number of times of passing the net are basically consistent with the actual game, which can effectively evaluate the overall tennis game, mainly because the algorithm can accurately record the trajectory of the tennis ball in the abnormal process of the game. By combining artificial intelligence technology with sports competitions, it replaces the traditional competition people to judge the results of the competitions, and the fairness and justice of the competitions are guaranteed.



---

*Source: 7522725-2022-09-06.xml*