Giter VIP home page Giter VIP logo

playground's People

Contributors

ashwinvaswani avatar ayubgholami avatar jaygala avatar khizirsiddiqui avatar mahakkothari avatar rajanarasimhan avatar rijul1999 avatar samruddhibothara avatar sharanranjit avatar shreypandit avatar siddharth2411 avatar someshsingh22 avatar veds12 avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar

playground's Issues

Test on Windows

Run the code, after making the changes mentioned in the README for the Windows operating system, and verify that everything is working as intended. If there is some error anywhere submit a new issue.

Adding optimization code to heatmap

Optimization code has been done on detect_players_video. Add the same for heatmap too. Preferably create helper functions for the same in utils and call them in both detect players video and get heatmap instead of having redundant code in both

Multiple progress bars

Both for heatmap and videos, multiple progress bars are displayed. There should be just one progress bar.

Progress bar and ETA for getting predictions

For the get_heatmap and detect_players_video methods, create a progress bar/ show ETA dynamically so that the user can know how much time before the entire video will be processed.

Documentation

Creating and updating documentation for the methods in the Detector module.

Save predictions as jpg

Save figure flag in the detector has not been implemented yet. With an argument similar to display_detection, allow an argument for save figure or save prediction.

Cricket wagon wheel generation

Based on the direction of motion the bat of a batsman, draw lines on the wagon wheel to analyze where a batsman tends to hit. This can help in better field positions.

Code modularisation

Create helper functions in utils.py for modularising the code in badminton.py. Currently, the code seems a little too cluttered and congested.

Data processing to extract annotations

The dataset has been uploaded. We'll need to extract frames and annotations and prepare the directory format for our models. The eaf files contain the starting and ending points of actions along with their annotations. Since there are multiple eaf files, I'd suggest taking up one video/eaf file and processing that first to understand if your code is working fine. Please download the video files themselves from YouTube, since they are too large by themselves to be added to the repository. The expected Directory structure after processing is:

-Data
-------train
-------------smash
---------------------clip1
-----------------------------frame1
-----------------------------frame2
-----------------------------frame3
-----------------------------and so on
---------------------clip2
-----------------------------frame1
-----------------------------frame2
-----------------------------frame3
-----------------------------and so on
-------------lob and so on

-------val
------------Similarly

Removing code redundancy

Badminton.py has a lot of redundant code in terms of checks and if-else statements.
For example:

if optimization==True:
            frames_skipped=frames_skipped_input
        else:
            frames_skipped=1
if optimization==True:
     count_of_frames=0
      .. and so on

Such scenarios can be removed and code can be optimised further

Extract position of feet of detected person

The bottom center of the detected person must be extracted and returned which will be used for heatmap generation. Simply return those co-ordinates from the detect_players method.

Plain court template for heatmap

Currently, the heatmap base image contains the players too. We would like to have a base template court of the same size as the wrapped transform(see dimensions of heatmap.png) and show heatmap on that rather than a court image with players.
Eg: If we can have a pure white image with just badminton court "white" lines in black as base image, that would be good to show the heatmap on. We can explore other colors and black/neon color scenes later

Downloading weights

Currently weights need to be explicitly downloaded beforehand using the script config/download_weights.sh
Add necessary code in Detector in Badminton/Badminton.py to check if weights file has been downloaded, if no, download it within code and give error is weights cannot be downloaded(can happen due to network, space or some other issue)

Highlights Generation in Cricket

A good starting point would be to use the intensity (pitch / something else) of audio from commentary to filter out "exciting events" and compile the clips from those events to generate highlight.

Option to render

With the latest merge, we are no more rendering the display for heatmap and detect players video, we can have an option to render. However, I'm not sure if it's needed. I would like to hear some of your comments on it!

Heatmap generation

Using homography or some other technique, conversion of the plane of view as seen in the sample output image to a top view image of court for heatmap generation.

yolov3-tiny.cfg file missing

The tiny yolo module has been implemented but the cfg file is not downloaded

obj = Detector(tiny=True)

/content/Playground/Badminton/utilities/parse_config.py in parse_model_config(path)
      1 def parse_model_config(path):
      2     """Parses the yolo-v3 layer configuration file and returns module definitions"""
----> 3     file = open(path, "r")
      4     lines = file.read().split("\n")
      5     lines = [x for x in lines if x and not x.startswith("#")]

FileNotFoundError: [Errno 2] No such file or directory: 'Badminton/config/yolov3-tiny.cfg'

Resolving FPS issue

Currently, there's some redundant/unnecessary code because of which FPS of video detector is very poor. Making optimizations to improve FPS is necessary.

Correct image formatting

Currently, image formatting is slightly off with different parts of code using images loaded by cv2 and some using images loaded by PIL. Since the formats are different, there are some bugs. We will stick to OpenCV for image loading and all image operations from now on so changing PIL stuff wherever possible to OpenCV.

Requirements.txt

Set up a new env and generate requirements.txt after installing all the necessary dependencies like cv2, torch etc. and export requirements.txt

Add option for detecting on videos

In the detector, check if the input is image or video. If it is a video then parse through the video and run the detector on each of the individual frames of the video.

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.