GithubHelp home page GithubHelp logo

nethra8902 / badminton-sport-analysis-computer-vision Goto Github PK

View Code? Open in Web Editor NEW
17.0 4.0 5.0 23.72 MB

The following parameters have been analysed for a short badminton singles match video: 1. Player1 and Player 2 are detected with bounding boxes, 2. Recording and displaying the Start time and end time of the match, 3. Displaying the number of hits made by each player , 4. Displaying the number of out of the boundary hits (AWAYs) made by each player during the course of match, 5. Shuttlecock is detected in every frame of the video with a bounding box.

Jupyter Notebook 100.00%
cv badmintonanalysis objectdetection objecttracking imageclassification

badminton-sport-analysis-computer-vision's Introduction

BADMINTON MATCH VIDEO ANALYSIS USING YOLOV3, PYTORCH AND MXNET MODEL ARCHITECTURES

Completed by:
Nethra Viswanathan
Deepika
Saimonika Kalasamudram

Proposals achieved as part of the project:

Please find below the output achieved out of the objectives mentioned in the proposal document for a short badminton singles match video:

  1. Recognition and classification of the 2 opponents with distinct name labels, say Player 1 and Player 2 - Player1 and Player 2 are detected with bounding boxes
  2. Recording and displaying the Start time and end time of the match - Timer keeps running throughout the match video.
  3. Displaying the number of hits made by each player - Instead of displaying the number, HIT is highlighted on every hit.
  4. Displaying the number of out of the boundary hits (AWAYs) made by each player during the course of match - Instead of displaying the number, AWAY is highlighted on every AWAY hit by the player.
  5. Visualization of the trajectory of the shuttlecock - Shuttlecock is detected in every frame of the video with a bounding box.

Deliverables of the Project:

The code works well in Google Colab Pro. Hence it is recommended to execute the code in Colab Pro.In case the code needs to be run in local system, steps are provided for the purpose as well. The complete set of folders mentioned below are downloaded from Onedrive link by the code in this notebook for further processing.

All the annotated image files and videos have not been placed in deliverables due to space constraint.

  1. Folder "data" : Contains all the training and test images for both the above mentioned models
  2. data/annotations/labels : Contains all the frame numbers and labels in a txt file for training and validation of MXNet model for detection of hits
  3. data/MXNetvideos : Contains the training videos of badminton match for MXNet model (detection of hits)
  4. data/MXNetframes : Contains the frames of all the videos present in the above folder as the model trains on images and not videos directly. The folder also contains the frames of the test videos. 5.data/Test : Contains the test videos for testing the MXNet model (detection of hits). The model will pick the test videos from here for detection of hits and AWAYs.
  5. data/Test_Results: Both the models (MXNet and YOLOv3) place the resultant videos of tested videos in this path. The yolo result of player and shuttlecock detection is saved as "_detected.mp4" and the combined result of both the models is saved in "results.mp4". his folder shiuld be empty while we execute the testing script.
  6. data/Saved_test_results: Contains the backup of currently saved test results as the TEST_RESULTS folder is supposed to be empty while executing the code
  7. data/splits: Contains the video names and corresponding frame numbers in 3 different text files - train, val and test for training, validation and testing of the MXNet model for detection of hits. The test.txt file is populated through code with the video file name and frame numbers of the frames extracted from the test video uploaded in TEST folder.
  8. data/YoloTrainingImages: Contains the training images of YoloV3 model for object detection , the annotation csv file and the annotation text file in YOLO format "data_train.txt"
  9. models/vision/experiments/0000: Contains the weights calculated for 19 epochs of the MXNet model , scores.txt containing the scores of accuracy for each epoch, log file and a tensorboard event folder "tb" which records the trining sumamry in tensorboard format.
  10. models/YoloV3: Contains tensorboard logs in "logs" folder, the base model files of keras yolo3 with weights in "keras_yolo3" folder
  11. models/vision/experiments/0000/tbpyt: Contains the weights of Pytorch model as a result of 3 methods of training alomng with event logs for Tensorboard.

Project Tasks and Code Agenda:

  1. Detection of Players and Shuttlecock

    • Package Installation
    • Import statements
    • File Path declarations
    • Class definitions
    • Stand alone Funtion definitions
    • Training code
    • Detection code
  2. Detection of Hits and Aways in the game

    • Package Installation
    • Import statements
    • File Path declarations
    • Class definitions
    • Stand alone Funtion definitions
    • Training code
    • Detection code

Output:

badminton-sport-analysis-computer-vision's People

Contributors

nethra8902 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

badminton-sport-analysis-computer-vision's Issues

How to download the code?

Thank you for your work. I am quite interesting in badminton.
Would you mind telling me where the link is ?

the complete set of folders mentioned below are downloaded from Onedrive link by the code in this notebook for further processing.

Where is requirements.txt?

pip install -r requirements.txt

error cudnn

when i running densenet in pytorch there is an error
/media/yosua/NewVolume/badminton-env/lib/python3.7/site-packages/torch/nn/functional.py in batch_norm(input, running_mean, running_var, weight, bias, training, momentum, eps)
1921 return torch.batch_norm(
1922 input, weight, bias, running_mean, running_var,
-> 1923 training, momentum, eps, torch.backends.cudnn.enabled
1924 )
1925

RuntimeError: cuDNN error: CUDNN_STATUS_EXECUTION_FAILED
how to resolve that? i have use cudnn version 7.6.5 and cuda 10.1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.