<figure><img src="image_1.png" /></figure>

ifip

International Federation for Information Processing

This document is the original author manuscript of a paper submitted to an IFIP
conference proceedings or other IFIP publication by Springer Nature. As such, there
may be some differences in the official published version of the paper. Such
differences, if any, are usually due to reformatting during preparation for publication or
minor corrections made by the author(s) during final proofreading of the publication
manuscript.
<figure><img src="image_2.png" /></figure>

# Analyzing Cricket Biomechanical Parameters
Through Keypoint Detection and Tracking

Pranay Pandey<fnref n="1" />(✉) ID, S. Dhruv Shindhe<fnref n="2" />, and S. N. Omkar<fnref n="3" /> ID

**Abstract.** In Cricket the environment is bound to undergo quick and precise motion that is time consuming and complex for analyzers and coaches to draw conclusions from and for audiences to follow. Though there are already existing methods utilizing bounding boxes for detection, their scope is limited considering the various biomechanical parameters and angles that are generally a critical source of information in this sport. This paper discusses the solution by using key point detection for angle estimation and orientation of the objects.

**Keywords:** movements · biomechanical parameters · angles · keypoints

## 1 Introduction

In today's day and age computer vision finds an important role within the field of sports [6]. Some of its very helpful uses these days are in sports analytics like for broadcast, representations of player and ball positions, such as 3-d fashions that allow you to discover locations and trajectories. Computer Vision also finds its uses in education and coaching to help referees during matches. Movement detection systems based on cameras connected to players or monitored by means of a couple of cameras had been utilized by many experts training players, and present-day study is investigating how such imaginative and prescient systems can be more easily used for similar obligations. This can be used for applications such as team sports coaching, automatic identification of major phases of a game to gather records, and automated broadcast and camera control. Automated analysis of sports videos [5] is a possible solution to fan and professional demands for different types of information. Video analysis in sports includes player position, ball tracking, material extraction and logging, narration, highlight prediction, three-dimensional conversion, animation, digital view construction and editorial material advent. It offers a wide range of applications such as virtual insertion of content visualization and improvement, gameplay analysis and evaluation, player behavior identification, referee conclusions, and other essential and unique characteristics necessary for game evaluation and study. Such studies are often done using different techniques

<footnote n="1">¹ Indian Institute of Technology (ISM), Dhanbad, Jharkhand, India
20je0704@am.iitism.ac.in</footnote>

<footnote n="2">² ARTPARK, Indian Institute of Science, Bengaluru, India</footnote>

<footnote n="3">³ IISc Department of Aerospace, Bangalore, India
omkar@iisc.ac.in</footnote>
for different kinds of sports [5]. Information extraction is a very important step in such area where many kinds of information could become useful like localization, prediction, segmentation, etc. [2].

This paper presents a particular aspect of the solution by getting the key points of the bat in the field which even provides good estimation for tv sports footage. This information could be very useful and such estimation for sportsperson have been found to be quite good, even from a single camera video generator where noise is quite high [7]. Though there are several other methods for doing the same [6], this approach provides many more features that a mere object detection with bounding box or classification of batting shots [4] or movement recognition.

## 2 Literature Review

Keypoint detection is a well-known method which involves concurrent detection and localization. In the analysis [6], the authors discuss the help Computer Vision could provide in the field of sports. The paper is an evaluation of various literature that has been published in the domain of sport orientated machine learning applications. 52 of such datasets were studied, and analyzed. The SVMs, sight-based studies and CNN algorithms were used by many of the researches. The paper concluded that IMUs and Computer Vision have the capability of information extraction and player skill improvement suggestions.

In the study [2], the authors propose an approach for localization, prediction, segmentation in a team sport for players, ball etc. which is important considering analysis of automated sports. With a complex model it tries to overcome the problem of using different complex networks for these individual tasks by using a single machine learning algorithm for extracting all such information, by using spatial embeddings.

Another paper [3] presents a method of action recognition for a sport claiming the lack of solution in the said field. The study achieving an accuracy of 90% provides insight for the importance of such application. The implications of this study would provoke scientists for statistical info analysis and this would also aid in the automatic commentary-based information. But as stated earlier, the scope of such classifiers is limited.

Considering sports video review, the research [5] presents a detailed survey discussing some machine learning techniques for particular sports. It explores current commercial systems and many other tasks, which could be automated like the action recognition systems. It accepts that tracking of a particular player or his equipment playing a sport would prove effective for his training.

The paper [7] explores the solution to the challenges faced by monocular category of videos which are captured by a single camera, because of which the data is not very comprehensible. In an unprocessed single camera 2D image with variety of background noise, human pose estimation technique is proposed to extract the required information. This proves to be a good technique for optimal feature extraction from the images.

The studies have shown an increasing complexity as they move on from simple classifiers to localization and keypoint estimation, and this also provides a lot of information about the environment and the image.
# 3 Some Biomechanical Parameters

Studying biomechanical movements will help experienced players perform extraordinarily. There are some of the Biomechanical actions like the batting backlift method (BBT) [1] which have the capability to either drastically impair the player's execution of any technique or improve his play manifolds. Thus, it is quite clear in the research paper [1], where it discusses the techniques used by many cricket players and the implication of such techniques in terms of the number of players using it and their successful batsmanship. The study focuses on the biomechanical implications of various angles while batting. The research concludes that lateral batting backlift technique (LBBT) is a very successful technique utilizing the various parameters for triumphant batsmanship. In order to hit a cricket ball, one must first create a balanced and stable base. Stability implies equilibrium and the effect of the various forces enacting on the player dynamics. The concept of predicting the opponent's next movement and placing oneself accordingly before the ball delivery by the opponent, opens up many possibilities for the hitter to gain advantage. For a powerful stroke the impulse gained must be used, but this is going to work only if the placement and body positioning is perfect. If one starts in a balanced position, one may possibly be able to end up in the required balanced posture. However, the change in placement should allow the hitter to achieve a balanced position to benefit from the trigger movement. Careful analysis of various biomechanical parameters, angles and positions can increase stability and can enhance the body movements, thus leading to better results. Some of such biomechanical parameters are discussed here.

## 3.1 Backlift Angle

It is the maximum backward lift of the bat from the initial position, before forward/downswing movement of the bat. Backlift angle is the perpendicular angle of displacement from the initial position to the maximum extremity of the bat in backward position, before the swing of the bat to hit the ball. Higher backlift perspective allows in producing more angular acceleration of the bat at some point of downswing movement, thereby helping in improved bat speed. Higher backlift angles have been used by many famous cricketers like Yuvraj Singh to improve their ball impact.

The term 'backlift' in cricket refers to how excessive the batsman raises their bat behind them before they swing it downwards or bring it forward to hit the ball. Some batsmen have greater backlift, with the toe of the bat going around overhead height, and a few batsmen have low backlift, wherein the toe of the bat slightly reaches shoulder height. It's really well worth noting that a batsman's backlift also can frequently be known as their 'backswing'. Generally, the better the backlift, the extra pressure a person can position right into a shot. Obviously, this isn't the one and only issue that impacts how powerfully a batsman can hit a cricket ball – however, it absolutely performs a part. To understand its importance one can, perform this fun activity - consider gambling a shot without lifting the bat up in the back of you at all. It might not be possible to hit the ball all together, with one's ordinary quantity of energy in case one wasn't allowed to apply any sort of backswing whatsoever. Whilst a batsman has a massive backlift, this offers them a massive distance wherein they could swing the bat downwards when wanting to
make touch with the ball. The quicker the downswing and the extra they boost up their palms via the touch with the ball, the more energy they may generally be able to get on their shots.

Backlift is crucial because: -

* It enables to generate power

* It enables a batsman to generate rhythm

* Different backlift can assist a batsman deal with distinct situations and bowlers.

Suppose the keypoints of the bat are $x_0, y_0, x_1, y_1$ then the backlift angle of the bat at that particular instant is given by the ratio of the difference in the 2 keypoints coordinates in x and y direction, i.e.

$$ \text{Backlift angle} = \tan^{-1}\left(\frac{x_0 - x_1}{y_0 - y_1}\right) $$

Since it requires the difference in coordinates, this formula can be used with respect to both the coordinate systems, namely the cropped image keypoints and the transformed keypoints in the original image giving the angle of backlift.

## 3.2 Downswing Angle

It is the forward angle of the bat from the maximum backlift position to the ball contact. The more the downswing arc, the longer is the time to be able to generate sufficient bat pace to hit the ball. The iconic Helicopter shots of MS Dhoni are generally attributed to his downswing angles. The downswing angle is the entire angle blanketed by the bat from the highest backlift attitude till the time the ball strikes the bat. It is one of the critical elements that impacts the rate and manipulates the trajectory of the ball. In golfing, such downswing angle is one of the most important biomechanical parameters wherein the function of the downswing is to boost up the club head from rest to the optimum pace and create the ideal launch conditions for hitting the golf ball to the supposed target.

An excessive backlift on its own cannot offer the perfect shot, it needs to be aligned with a similar downswing to get top pace control while hitting the ball. This altitude may be calculated with the aid of using the angle of the bat at the time, the ball hits the bat – this angle is referred to as **Bat Launch Angle**. To discover the downswing angle one can, subtract this determined angle from the backlift angle. To discover the Bat Launch angle using our 2-model approach – find the angle of the bat when the bounding box of the ball is inside the bounding box of the bat. Then use this angle along with the backlift angle to find the Downswing angle (Fig. 1).

## 4 The Dataset

For the development of the Deep Learning model, a dataset consisting of 15,000 images has been used. In the cricket playing grounds and cricket nets, long videos were taken to capture the images consisting of various kinds of sports environment and equipment. The images were filtered and cleaned for the dataset. All the images were annotated in 2 different formats. One in which bounding boxes were drawn around each class of sports
<figure><img src="image_3.png" /><figcaption>**Fig. 1.** (a) A figure depicting the backlift angle of the bat being held by a person. (b) A figure depicting downswing angle of the bat before it hits the ball.</figcaption></figure>

equipment which would form the part of the model predicting bounding boxes around the bat. The other dataset annotations were for the key points (top and bottom) of the bat.

## 4.1 The Model

2 Different models are used for a particular image. One giving the bounding box around the bat and the other would find the top and bottom position of the bat found in the image from the previous model. The first bounding box model for bat detection is trained on YoloV5 architecture taking the complete input image of size (960, 960). The output of this network gives the bounding boxes of the bats in the image. The input image is cropped to get the bounding box of the bat as another image. This image is passed on to the keypoint detection network which uses mobilenet as its backbone. The outputs of the network are two keypoints giving top and bottom coordinates of the bat. The coordinates are then transformed to find the coordinates of the keypoints of the bat in the initial image. Thus, the keypoints of the bat are found (Figs. 2 and 3).

<figure><img src="image_4.png" /><figcaption>**Fig. 2.** Figure showing the model finding the keypoints from bounding box cropped image and transforming the coordinates to original images</figcaption></figure>

## 4.2 Architecture Details

The keypoint detection network with mobilenet as its backbone and several other layers takes in an image of size (64,64) and finds the 2 keypoints. The output is in the form
<figure><img src="image_5.png" /><figcaption>**Fig. 3.** A figure showing how the model first finds the predictions for the bounding box of the bat, then predicts the keypoints of top and bottom parts of the bat and finds the backlift angle of the bat.</figcaption></figure>

<figure><img src="image_6.png" /><figcaption>**Fig. 4.** The architecture of the backbone (mobilenet) of the model</figcaption></figure>

<figure><img src="image_7.png" /><figcaption>**Fig. 5.** Architecture of the complete keypoint detection network</figcaption></figure>

of 4 float numbers – x_top, y_top, x_bottom, y_bottom. After the backbone there are 4 concatenated layers of Convolutions, Activations and Batch normalization layers. The final layer is a couple of Dense layers after using flatten layers to get the output of the network as 4 key points. The architecture is as shown in the Fig. 4 and 5.
For the training of the Convolution Neural Network Model, mean squared error loss has been used.

$$MSE = \frac{1}{n} \sum (y - \hat{y})^2$$

The Mean squared error uses the difference among the expected output and what is envisioned. The mean squared error loss is a risk characteristic, which is similar to the estimated cost of the squared error loss. The reason that it is sort of continually strictly positive (greater than 0) is due to randomness or because of the reason that the estimator will not take into account the data which might result in a greater correct estimate. Adam Optimizer has been used in the model. Adaptive moment Estimation is a set of rules for optimization approach for gradient descent. This technique is actually optimal whilst handling many problems related to numerous information or parameters. It calls for much less reminiscence and is systematic. One can understand it as a mixing of the ‘gradient descent with momentum’ with ‘RMSP’ algorithm. After the training of the network for around 100 epochs, the model produces satisfactory results.

**Hyperparameters** – Learning rate – parameter defining the step size while moving down the gradient descent towards minimum loss. (1e-3 was used)

**Epoch** – total number of times the model is trained going through every example in the dataset. (100 was used)

**Batch size** – the number of examples passed through the model at once (32 was used) (Fig. 6 and Table 1)

<table><caption>**Table 1.** Performance metrics of the proposed model</caption><thead><tr><td>Metric</td><td>Performance</td></tr></thead><tbody><tr><td>Loss</td><td>0.0084</td></tr><tr><td>Mean absolute error</td><td>0.0695</td></tr><tr><td>Training accuracy</td><td>0.8250</td></tr><tr><td>Validation accuracy</td><td>0.7930</td></tr><tr><td>Root mean squared error</td><td>0.0917</td></tr><tr><td>Mean absolute percentage error</td><td>26.0802</td></tr></tbody></table>
<figure><img src="image_8.png" /><figcaption>Fig. 6. The performance metrics of the model over the epochs</figcaption></figure>

**5 Conclusion**

The proposed approach is a novel utility of increasing the effectiveness of observation and particular calculations within the area of sports analysis and its applications. Such analysis of sports activities is an area of interest of many sportsmen, coaches and media hub. It facilitates the game to boom revenue, improve participant's overall gameplay and a team's ability to perform better, avoid injury and for greater improvements. Sports analysts, currently are in excessive demand owing to many groups, growing whole departments simply to analyze information, in the effort to outshine in the league. Many sports teams are actively investing in their analytical assessment of the sport leading to investing in a resources like SAS. In the midst of this demand the technique of keypoint detection is positive to locate its use and becomes beneficial as an analytical tool in sports enchantment and knowledge and coverage.

**References**

1. Noorbhai, H.: Biomechanical Implications of the Batting Backlift Technique in Cricket: a Collation of Current Evidence. University of Johannesburg, Johannesburg, South Africa (2016)

2. Ghasemzadeh, S.A., Van Zandycke, G., De Vleeschouwer, C.: DeepSportLab: a Unified Framework for Ball Detection, Player Instance Segmentation and Pose Estimation in Team Sports Scenes (2021)

3. Khan, M.Z., Hassan, M.A., Farooq, A., Khan, M.U.G.: Deep CNN based data-driven recognition of cricket batting shots. In: 2018 International Conference on Applied and Engineering Mathematics (ICAEM), pp. 67–71. IEEE (2018)

4. Foysal, M.A., Islam, M.S., Karim, A., Neehal, N.: Shot-Net: a convolutional neural network for classifying different cricket shots. In: International Conference on Recent Trends in Image Processing and Pattern Recognition, pp. 111–120. Springer, Singapore (2018). https://doi.org/10.1007/978-981-13-9181-1_10

5. Thomas, G., Gade, R., Moeslund, T.B., Carr, P., Hilton, A.: Computer vision for sports: current applications and research topics. Computer Vision and Image Understanding **159** (2017)

6. Cust, E.E., Sweeting, A.J., Ball, K., Robertson, S.: Machine and deep learning for sport-specific movement recognition: a systematic review of model development and performance. J. Sports Sci. **37**(5), 568–600 (2019)

7. Fastovets, M., Guillemaut, J.-Y., Hilton, A.: Athlete pose estimation from monocular tv sports footage. In: Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition Workshops, pp. 1048–1054 (2013)