Recognition of Basketball Player’s Shooting Action Based on the Convolutional Neural Network

In the field of basketball, the formulation of the existing training plan mainly relies on the coaches’ artificial observation and personal experience, which is inevitably subjective. *e application of body domain network technology in athletes’ training and recognition of athletes’ postures can help coaches to assist decision-making and greatly improve athletes’ competitive ability. *e human movements reflected in basketball are more complex which need deep understanding. *e accuracy of basketball players’ shooting movements recognition plays a positive and important role in basketball games and training practice. Based on the prior knowledge of the convolutional neural network study, environment light conditions change the dynamic characteristics of basketball image analysis, capture images of the basketball goal algorithm of minimum circumscribed rectangle of the object, and based on the convolutional neural network, introduce two types of prior knowledge, one kind is based on the feature matching method that defined a priori knowledge, while another kind is based on training the convolution neural network model. *e test results of the network model are taken as the prior knowledge, and then, a convolutional neural network dynamic target recognition model is constructed based on the prior knowledge. *e construction process of the model is organized as the basketball target image is collected under any illumination conditions, the convolutional neural network model is trained with the convolutional neural network as the input data, and the standard illumination conditions are determined according to the test results of the network model. *en, put it into the trained network model to test and get the recognition results of basketball players’ shooting movements. *e research is validated with performing experiments and the results revealed the success of the study.


Introduction
Basketball is a collective sport that put the ball into the opponent's basket to score and prevents the opponent from getting the ball and scoring under certain rules. Compared with other ball games, basketball has a variety of techniques [1][2][3], diverse tactics [4], and strong skills of players [5][6][7]. It also reflects the characteristics of individual combat and coordination. In a basketball game [8], the player's basketball skill level has a very obvious impact on the entire team. If the player's basketball level is insufficient, the team's weaknesses will be exposed, and the defense and offense level will be greatly reduced, which is not conducive to the team's performance in the basketball game. It is very necessary to carry out scientific and reasonable basketball training [9][10][11] for athletes. In traditional basketball training, coaches make training plans based on athletes' training and competition.
is method relies on the training theory mastered by the coach and his own experience and has a certain degree of subjectivity. In addition, it is difficult to avoid wrong actions and possible damage to athletes' muscles [12][13][14], soft tissues [15], and bones through scientific observations during training, which will affect the normal training and even shorten the athlete's lifespan [16,17]. From the perspective of training quality evaluation, the evaluation work is performed manually. Coaches need to calculate the training performance of each athlete with reference to different test standards. is method also has some drawbacks. First of all, the testing of athletes is performed manually, which requires a lot of time for the coaches, the process is complicated, and the accuracy is poor; second, the testing methods have limitations, and it is difficult to directly measure some important sports parameters such as acceleration and angular velocity. Information such as muscle tension, sprinting ability, and body balance cannot be measured during exercise. ird, coaches lack scientific evaluation methods, and it is difficult to make corresponding decision-making plans based on test data. erefore, if the athlete's sports parameters can be accurately collected in real-time, the athlete's motion posture can be analyzed and recognized [18], and the training effect evaluation model can be constructed; the coach can make reasonable adjustments to the training program and scientifically evaluate the training quality. e improvement of athletes' competitive ability and coaches' decision-making ability is of great significance.
ere are two main recognition methods for human body gesture recognition [19][20][21][22], namely, the recognition technology based on image analysis and the recognition technology based on inertial sensors [23]. Image analysisbased recognition technology mainly uses video, image, and other information to recognize human posture. erefore, it is necessary to place a camera and other monitoring equipment in the detection environment in advance to collect data. Image analysis technology is applied to human posture recognition earlier.
e technology is relatively mature; the early ones are based on monocular video research and multiview video research. In addition, Iosifidis et al. [24] used multiple cameras to perform multiangle detection of human action poses and used neural network algorithms to image and video data that are trained and classified. Although this method can identify people's daily actions more accurately, it is difficult to realize real-time monitoring due to the large amount of data contained. ere are still many shortcomings in the recognition technology based on image analysis. e equipment requires high accuracy, and the equipment is relatively heavy and not portable. Video capture is prone to blind spots, and some places are not easy to be observed. e monitoring range is obviously limited, and the image captures the large amount of data that can easily lead to insufficient storage and fail to achieve the purpose of real-time monitoring. erefore, a basketball player's shooting action recognition algorithm [25] based on a priori knowledge of the convolutional neural network [26][27][28][29][30] analyzes the dynamic characteristics of the basketball image under the conditions of light changes and proposes the smallest enclosing rectangle algorithm for intercepting the circular target object in the image [31]. en, a fast recognition algorithm of dynamic target based on the convolutional neural network based on prior knowledge is proposed, and a blue-gray basketball is taken as an example to carry out related experiments.
e main contributions of this study are as follows: (i) In this study, neural network technology is introduced innovatively in the prediction task of graphic design multimedia communication, and it has achieved more accurate results than traditional prediction algorithms.
(ii) Based on the analysis of the traditional recursive model, this study uses a special form of the recursive neural network LSTM to predict the law of multimedia communication in graphic design, carries out a comparative experiment, and the experimental results prove the superiority of the proposed algorithm.

Digital Image
Processing. Gamma correction [32,33] performs a nonlinear operation on the gray value of the input image, so that the gray value of the input image and the gray value of the output image have an exponential relationship, thereby improving the contrast effect of the image. e calculation equation is as follows: where c is the gamma coefficient, V in is the gray value of the input image, V out is the gray value of the output image, and It can be seen from Figure 1 that (1) When c < 1, the gray value of the darker area of the image increases, and the image becomes brighter as a whole.
(2) When c > 1, the gray value of the brighter area of the image becomes smaller, and the image becomes darker as a whole. e gray value of the brighter area decreases, the gray value of the overall darker area decreases, the overall gray value becomes smaller, and the overall image becomes darker. Figure 2, a typical convolutional neural network model generally composed of an input layer, a convolutional layer, an activation layer, a pooling layer, a fully connected layer, and an output layer. e convolutional neural network proposes image features by convolution operation on a large amount of input data, continuously reduces the dimensionality of the image through the pooling operation, summarizes the proposed image features through the fully connected layer, and then realizes the image characteristics through the softmax function of the output layer. ey conduct classification and finally output the classification results.

CNNs. As shown in
In mathematics, convolution is an important analytical operation. It is a mathematical operator that generates a third function through the sum of two functions and represents the area of the overlapping part between function two and the shifted function W. Its calculation equation is as follows: Scientific Programming e integral form is as follows: e matrix expression is as follows: where * represents the convolution, X represents the input, and W represents the convolution kernel. In addition, the two-dimensional convolution calculation equation is as follows: Original

Methodology
So far, various approaches have been presented in the field of research. Figure 1 represents different c value gamma conversion curves. Figure 2 is the representation of the typical convolutional neural network model.

Analysis of Dynamic Characteristics of Shooting Action Images under the Condition of Changing Illumination.
is section takes two actual pictures taken as examples for analysis. e two images in Figure 3 are pictures of basketballs in the same position and changing lighting conditions. According to observations, the light distribution of the two pictures is uneven, and both show that the upper part of the picture has a higher brightness than the lower part of the picture; the overall brightness of the first picture is dark, and the overall brightness of the second picture is moderate. e color description of the two pictures in Figure 3 in the HIS color model is realized by Matlab simulation, and the simulation results are shown in Figures 4 and 5. Obviously, the brightness of Figure 5 is higher than that of Figure 4, so under the condition of changing illumination, the color characteristic of the image of the target object is dynamically changed.

Minimum Bounding Rectangle Algorithm.
In this study, the interception of basketball goal object in the image of the biggest external rectangular algorithm is the first choice of target image in different light conditions that appropriate gamma coefficient, reoccupy gamma correction to school optical processing of images, and select the appropriate Gaussian template, using a Gaussian filter to filter the image, and roundness based on Hough transform detection basketball round objects in the image. e maximum outer rectangle of the circle is determined, and the vertex coordinates of the rectangle are calculated.
As shown in Figure 6, the image coordinates of vertices are A, B, C, and D, and the calculation equation is as follows: According to the vertex coordinates, intercept the smallest bounding rectangle of the circular target object in the original image.

Fast Recognition Algorithm for Shooting Action.
Under the condition of changing ambient light, the characteristics of basketball players' shooting images are changing dynamically, which makes it very difficult to recognize the basketball object. e target recognition method based on convolution typical neural network models is often a target of acquisition under the condition of different illumination object image sample sets and into the convolutional neural network training, which requires the collected images of the sample set to cover all light shooting images under the condition of basketball player, so the convolution neural network can learn the image characteristics under different light conditions. e trained convolutional neural network model can contain the shooting image features of basketball players under all illumination conditions, but this requires a large number of image sample sets, and the training of the convolutional neural network model needs a lot of time, and the target object recognition accuracy is not high under illumination changes. In order to improve the rapidness and accuracy of object recognition under the condition of illumination change, this study proposes a convolutional neural network based on prior knowledge to recognize basketball player's shooting image. Based on the convolutional neural network, the algorithm introduces two kinds of prior knowledge and combines prior knowledge with the convolutional neural network to reduce the randomness of the network model in searching for image features, reduce useless exploration, shorten the training time of the convolutional neural network model, and improve the accuracy of target recognition.

Priori Knowledge.
A standard illumination condition is assumed. Under this standard illumination condition, prior knowledge is introduced to collect athletes' shooting image set S, and the collected pictures have certain characteristics. Under any certain illumination conditions, the image P of the target object is randomly collected without introducing any prior knowledge, and the image P is rotated for a certain number of times, so that the image features of the image P collected under any certain illumination conditions are included in the image features of the image set S collected under standard illumination conditions. To satisfy the above conditions, the operation on image P is as follows: rotate the image x(x � 2k) times and denote the maximum number of rotations as x max. When the number of rotations x is not equal to 0, each rotation is a radian, and the radian value a is the ratio of the whole circle radian a to the maximum number of rotations x max. When the number of rotations x is equal to 0, the gray value a is 0. e new test picture M k is obtained by rotating the image P by xα radian through the rotation function, where R xa (·), and its calculation equation is as follows: x max � max(1, 2, · · · , x), (8) x max × α � 2π, x ≠ 0, that is, the image features of the newly obtained test picture M k (k � 1, 2, · · · , x max) and the original picture P are included in the image features of image set S. A new picture set is composed of k test set pictures M k (k � 1, 2, · · · , x max) and the original picture P.

Model and Training.
is is shown in Figure 7. e first layer is the input layer, the second, fourth, sixth, and eighth layers are the convolution layer, the third, fifth, seventh, and ninth layers are the pooling layer, the tenth and eleventh layers are the full connection layer, and the twelfth layer is the output layer.
We collect sports basketball shooting images as the training set and validation set of the convolutional neural network and use the training set as the input data for training the convolutional neural network. e image features are extracted through the convolutional layer and the pooling layer, and the fully connected layer will be extracted. e output image features are combined, and the output value is calculated through the output layer. Introduce the dropout method, select the appropriate loss function, add a regularization term to the loss function, and iterate repeatedly through the gradient descent algorithm to update the network parameters until the end of the iteration. Finally, the validation set is used to verify the effect of the trained convolutional neural network model.

Experimental Setup.
e experimental software platform uses a Win-based desktop system, and the hardware platform uses an Intel Core i5-7200 processor with 4 GB of running memory. e algorithm is written in Python Scientific Programming language and TensorFlow deep-learning tool, and the experimental environment configuration is given in Table 1.

Experimental Dataset Collection.
During the data collection process, 9 types of walking, running, jumping without the ball and standing dribble, walking dribble, running dribble, shooting, passing, and receiving were completed for 8 male testers. e actions are collected separately. Each action is repeated 50 times. ere are a total of 5,000 samples. Among them, the upper limb movements when holding the ball include standing dribbling, walking dribbling, running dribbling, shooting, passing, and receiving, a total of 2,400, and a total of 2,600 lower limb movements, including those without the ball walking dribbling, running dribbling, and shooting when walking, running, jumping, and holding the ball. During the sampling process, each tester completed the prescribed actions as required, and the monitoring personnel recorded the number of actions.

Experimental Results.
e completion of basketball shooting movement is mainly through the coordination of the upper and lower limbs of players to complete the overall movement; so in the recognition of basketball movements, we need to discuss the upper and lower limbs movements, respectively. In the process of data collection, according to the different placement positions of sensor nodes in the body, the collected upper limb movement data and lower limb movement data are discussed and identified, respectively. So, in view of the onset of action, the structure classifier is to identify, respectively, through the combination of the onset of action to determine the athletes do action, and this study analyzes the characteristics of the classification of different classifiers, compares the different classification of the gesture recognition classifier for basketball performance, according to different body movement data, builds the corresponding classification algorithm for training, and the recognition effect is analyzed from two aspects of accuracy and recall rate, as given in Table 2. e whole experiment process is carried out in the same environment, and the ten-fold cross-validation method is adopted.

Conclusion
In this study, the convolutional neural network is based on prior knowledge studies, the dynamic characteristics analysis of basketball images when the environmental lighting conditions change, and then intercepts the minimum bounding rectangle algorithm of the basketball target object in the image. e research introduces two types of priors based on the convolutional neural network knowledge, one is to define prior knowledge based on the feature matching method, and the other is to pretrain the convolutional neural network model. e study uses the test results of the network model as prior knowledge and then constructs a convolution based on the prior knowledge neural network dynamic target recognition model. e model construction process is to collect basketball target images under arbitrary lighting conditions, use them as input data of the convolutional neural network to train the convolutional neural network model, and determine the standard lighting conditions according to the test results of the network model. en, put it into the trained network model to test and get the recognition result of the basketball player's shooting action. Use standard lighting conditions as prior knowledge, and under standard lighting conditions, introduce prior knowledge defined based on feature matching methods, collect target object images, and use them as input data for convolutional neural networks to train convolutional neural network models. At the same time, introduce the prior knowledge based on the feature matching method to process the test image data, put it into the trained network model for testing, and get the target recognition result.

Data Availability
e data used to support the findings of this study are included within the article.

FC FC
Output Figure 7: e structure diagram of the convolutional neural network model.