Scientific Programming

Scientific Programming / 2021 / Article
Special Issue

Managing Big Data, Visualization and its Analytics in Healthcare Based on Scientific Programming 2021

View this Special Issue

Research Article | Open Access

Volume 2021 |Article ID 3045418 |

Rui Liu, Ziqi Liu, Shuyong Liu, "Recognition of Basketball Player’s Shooting Action Based on the Convolutional Neural Network", Scientific Programming, vol. 2021, Article ID 3045418, 8 pages, 2021.

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

Academic Editor: Shah Nazir
Received30 Apr 2021
Revised21 May 2021
Accepted04 Jun 2021
Published22 Jun 2021


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. The 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. The human movements reflected in basketball are more complex which need deep understanding. The 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. The 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. The 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. Then, put it into the trained network model to test and get the recognition results of basketball players’ shooting movements. The research is validated with performing experiments and the results revealed the success of the study.

1. 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 [13], diverse tactics [4], and strong skills of players [57]. 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 [911] for athletes. In traditional basketball training, coaches make training plans based on athletes’ training and competition. This 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 [1214], 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. This 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. Third, coaches lack scientific evaluation methods, and it is difficult to make corresponding decision-making plans based on test data. Therefore, 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. The improvement of athletes’ competitive ability and coaches’ decision-making ability is of great significance.

There are two main recognition methods for human body gesture recognition [1922], namely, the recognition technology based on image analysis and the recognition technology based on inertial sensors [23]. Image analysis-based recognition technology mainly uses video, image, and other information to recognize human posture. Therefore, 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. The 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. There are still many shortcomings in the recognition technology based on image analysis. The 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. The 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.

Therefore, a basketball player’s shooting action recognition algorithm [25] based on a priori knowledge of the convolutional neural network [2630] 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]. Then, 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. The 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.

2.1. 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. The calculation equation is as follows:where is the gamma coefficient, is the gray value of the input image, is the gray value of the output image, and .

It can be seen from Figure 1 that(1)When , the gray value of the darker area of the image increases, and the image becomes brighter as a whole.(2)When , the gray value of the brighter area of the image becomes smaller, and the image becomes darker as a whole. The 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.

2.2. CNNs

As shown in 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. The 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. They conduct classification and finally output the classification results.

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:

The integral form is as follows:

The matrix expression is as follows:where represents the convolution, represents the input, and represents the convolution kernel. In addition, the two-dimensional convolution calculation equation is as follows:where and are the size of the convolution kernel, respectively.

3. Methodology

So far, various approaches have been presented in the field of research. Figure 1 represents different value gamma conversion curves.

Figure 2 is the representation of the typical convolutional neural network model.

3.1. Analysis of Dynamic Characteristics of Shooting Action Images under the Condition of Changing Illumination

This section takes two actual pictures taken as examples for analysis. The 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.

The 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.

3.2. 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. The 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.

3.3. 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. The 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. The 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.

3.3.1. Priori Knowledge

A standard illumination condition is assumed. Under this standard illumination condition, prior knowledge is introduced to collect athletes’ shooting image set , and the collected pictures have certain characteristics. Under any certain illumination conditions, the image of the target object is randomly collected without introducing any prior knowledge, and the image is rotated for a certain number of times, so that the image features of the image 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 is as follows: rotate the image times and denote the maximum number of rotations as . When the number of rotations 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 . When the number of rotations is equal to 0, the gray value a is 0. The new test picture is obtained by rotating the image by radian through the rotation function, where , and its calculation equation is as follows:that is, the image features of the newly obtained test picture and the original picture are included in the image features of image set . A new picture set is composed of k test set pictures and the original picture .

3.3.2. Model and Training

This is shown in Figure 7. The 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. The image features are extracted through the convolutional layer and the pooling layer, and the fully connected layer will be extracted. The 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.

4. Experiments and Results

4.1. Experimental Setup

The 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. The algorithm is written in Python language and TensorFlow deep-learning tool, and the experimental environment configuration is given in Table 1.


CPUInter(R) Core(TM) i7
RAM8.00 GB
Programming languagePython
Deep-learning toolsPyTorch

4.2. 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. The actions are collected separately. Each action is repeated 50 times. There 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.

4.3. Experimental Results

The 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. The whole experiment process is carried out in the same environment, and the ten-fold cross-validation method is adopted.


Catch the ball0.96520.92900.9782

5. 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. The 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. The 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. The 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. Then, 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

The data used to support the findings of this study are included within the article.

Conflicts of Interest

The authors declare that they have no conflicts of interest.


  1. H. Faal Moghanlo, F. S. Hosseini, and F. Mikaili Manee, “Comparison the impact of spark motor program and basketball techniques on improving gross motor skills in educable intellectually disabled boys,” Journal of Ardabil University of Medical Sciences, vol. 14, no. 3, pp. 274–284, 2014. View at: Google Scholar
  2. W. Xinhua, “The theoretical thinking and breakthrough in basketball techniques and tactics,” Journal of Guangzhou Physical Education Institue, vol. 3, 1996. View at: Google Scholar
  3. A. Mardiana, M. Doewes, and S. K. Purnama, “Development of learning media based on video tutorial on basketball based shooting techniques,” Journal of Education, Health and Sport, vol. 9, no. 5, pp. 298–303, 2019. View at: Google Scholar
  4. C. Minghua, Z. Tuxuan, and S. Shuijun, “The development tendency of positional attack tactics in the basketball match of rio olympic games,” Bulletin of Sport Science & Technology, vol. 1, 2017. View at: Google Scholar
  5. N. Apostolidis and Z. Emmanouil, “The influence of the anthropometric characteristics and handgrip strength on the technical skills of young basketball players,” Journal of Physical Education and Sport, vol. 15, no. 2, pp. 330–337, 2015. View at: Google Scholar
  6. G. Fiorilli, E. Iuliano, G. Aquino et al., “Mental health and social participation skills of wheelchair basketball players: a controlled study,” Research in Developmental Disabilities, vol. 34, no. 11, pp. 3679–3685, 2013. View at: Publisher Site | Google Scholar
  7. C. E. Silva, H. M. Carvalho, C. E. Gonçalves et al., “Growth, maturation, functional capacities and sport-specific skills in 12-13 year-old-basketball players,” Journal of Sports Medicine and Physical Fitness, vol. 50, no. 2, pp. 174–181, 2010. View at: Google Scholar
  8. M. Perše, M. Kristan, S. Kovačič, G. Vučkovič, and J. Perš, “A trajectory-based analysis of coordinated team activity in a basketball game,” Computer Vision and Image Understanding, vol. 113, no. 5, pp. 612–621, 2009. View at: Google Scholar
  9. P. G. Montgomery, D. B. Pyne, and C. L. Minahan, “The physical and physiological demands of basketball training and competition,” International Journal of Sports Physiology and Performance, vol. 5, no. 1, pp. 75–86, 2010. View at: Publisher Site | Google Scholar
  10. O. Stoll, A. Lau, and J. Stoeber, “Perfectionism and performance in a new basketball training task: does striving for perfection enhance or undermine performance?” Psychology of Sport and Exercise, vol. 9, no. 5, pp. 620–629, 2008. View at: Publisher Site | Google Scholar
  11. N. A. Maffiuletti, C. Gometti, I. G. Amiridis, A. Martin, M. Pousson, and J. C. Chatard, “The effects of electromyostimulation training and basketball practice on muscle strength and jumping ability,” International Journal of Sports Medicine, vol. 21, no. 6, pp. 437–443, 2000. View at: Publisher Site | Google Scholar
  12. A. Moreira, K. Nosaka, J. A. Nunes, L. Viveiros, A. Z. Jamurtas, and M. S. Aoki, “Changes in muscle damage markers in female basketball players,” Biology of Sport, vol. 31, no. 1, pp. 3–7, 2014. View at: Publisher Site | Google Scholar
  13. C. Alfredo, F. Diego, M. Juan, S. Calvo, and C. G. A. Jesús, “Effect of magnesium supplementation on muscular damage markers in basketball players during a full season,” Journal of Magnesium Research, vol. 30, pp. 61–70, 2017. View at: Google Scholar
  14. C. G. Marques, V. C. Santos, A. C. Levada-Pires et al., “Effects of DHA-rich fish oil supplementation on the lipid profile, markers of muscle damage, and neutrophil function in wheelchair basketball athletes before and after acute exercise,” Applied Physiology, Nutrition, and Metabolism, vol. 40, no. 6, pp. 596–604, 2015. View at: Publisher Site | Google Scholar
  15. N. Tamai, T. Minematsu, T. Maeda, K. Yabunaka, and H. Sanada, “The relationship between skin ultrasound images and muscle damage using skin blotting in wheelchair basketball athletes,” Spinal Cord, vol. 8, 2020. View at: Google Scholar
  16. B. Calvo, E. Peña, M. A. Martinez, and M. Doblaré, “An uncoupled directional damage model for fibred biological soft tissues. formulation and computational aspects,” International Journal for Numerical Methods in Engineering, vol. 69, no. 10, pp. 2036–2057, 2007. View at: Publisher Site | Google Scholar
  17. S. Lemez, N. Wattie, and J. Baker, “Do “big guys” really die younger? an examination of height and lifespan in former professional basketball players,” PloS One, vol. 12, no. 10, Article ID e0185617, 2017. View at: Publisher Site | Google Scholar
  18. T. Hachaj, M. Piekarczyk, and M. Ogiela, “Human actions analysis: templates generation, matching and visualization applied to motion capture of highly-skilled karate athletes,” Sensors, vol. 17, no. 11, p. 2590, 2017. View at: Publisher Site | Google Scholar
  19. B. W. Hwang, S. Kim, and S. W. Lee, “A full-body gesture database for automatic gesture recognition,” in Proceedings of the 7th International Conference on Automatic Face and Gesture Recognition (FGR06), pp. 243–248, IEEE, Washington, DC, USA, April 2006. View at: Google Scholar
  20. T. Gonzalez-Sanchez and D. Puig, “Real-time body gesture recognition using depth camera,” Electronics Letters, vol. 47, no. 12, pp. 697-698, 2011. View at: Publisher Site | Google Scholar
  21. F. Noroozi, D. Kaminska, C. Corneanu, T. Sapinski, S. Escalera, and G. Anbarjafari, “Survey on emotional body gesture recognition,” IEEE Transactions on Affective Computing, vol. 12, no. 2, 2018. View at: Google Scholar
  22. O. Patsadu, C. Nukoolkit, and B. Watanapa, “Human gesture recognition using Kinect camera,” in Proceedings of the 2012 Ninth International Conference on Computer Science and Software Engineering (JCSSE), pp. 28–32, IEEE, Bangkok, Thailand, May 2012. View at: Google Scholar
  23. J. Chen, C. Du, Y. Zhang, P. Han, and W. Wei, “A clustering-based coverage path planning method for autonomous heterogeneous UAVs,” IEEE Transactions on Intelligent Transportation Systems, vol. 11, pp. 1–11, 2021. View at: Publisher Site | Google Scholar
  24. A. Iosifidis, A. Tefas, and I. Pitas, “Multi-view action recognition based on action volumes, fuzzy distances and cluster discriminant analysis,” Signal Processing, vol. 93, no. 6, pp. 1445–1457, 2013. View at: Publisher Site | Google Scholar
  25. A. Schmidt, “Movement pattern recognition in basketball free-throw shooting,” Human Movement Science, vol. 31, no. 2, pp. 360–382, 2012. View at: Publisher Site | Google Scholar
  26. L. Zhang, X. Wang, X. Dong, L. Sun, W. Cai, and X. Ning, “Finger vein image enhancement based on guided tri-Gaussian filters,” ASP Transactions on Pattern Recognition and Intelligent Systems, vol. 1, no. 1, pp. 17–23, 2021. View at: Publisher Site | Google Scholar
  27. X. Zhang, Y. Yang, Z. Li, X. Ning, Y. Qin, and W. Cai, “An improved encoder-decoder network based on strip pool method applied to segmentation of farmland vacancy field,” Entropy, vol. 23, no. 4, p. 435, 2021. View at: Publisher Site | Google Scholar
  28. Y. Tong, L. Yu, S. Li, J. Liu, H. Qin, and W. Li, “Polynomial fitting algorithm based on neural network,” ASP Transactions on Pattern Recognition and Intelligent Systems, vol. 1, no. 1, pp. 32–39, 2021. View at: Publisher Site | Google Scholar
  29. R. Liu, “Multiscale dense cross-attention mechanism with covariance pooling for hyperspectral image scene classification,” Mobile Information Systems, vol. 2021, 2021. View at: Publisher Site | Google Scholar
  30. Y. Zhang, W. Li, L. Zhang, X. Ning, L. Sun, and Y. Lu, “AGCNN: adaptive gabor convolutional neural networks with receptive fields for vein biometric recognition,” Concurrency and Computation: Practice and Experience, vol. 21, p. e5697, 2020. View at: Google Scholar
  31. J. Zhang, J. Sun, J. Wang, and X.-G. Yue, “Visual object tracking based on residual network and cascaded correlation filters,” Journal of Ambient Intelligence and Humanized Computing, vol. 13, 2020. View at: Publisher Site | Google Scholar
  32. Y. Cheng, S. Yue, J. Li, L. Deng, and Q. Quan, “Errors of machine translation of terminology in the patent text from English into Chinese,” ASP Transactions on Computers, vol. 1, no. 1, pp. 12–17, 2021. View at: Publisher Site | Google Scholar
  33. L. Liang, Q. Yin, and C. Shi, “Exploring proper names online and its application in English teaching in university,” ASP Transactions on Computers, vol. 1, no. 1, pp. 24–29, 2021. View at: Publisher Site | Google Scholar

Copyright © 2021 Rui Liu et al. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

Related articles

No related content is available yet for this article.
 PDF Download Citation Citation
 Download other formatsMore
 Order printed copiesOrder

Related articles

No related content is available yet for this article.

Article of the Year Award: Outstanding research contributions of 2021, as selected by our Chief Editors. Read the winning articles.