SforAiDl / Playground

A python library consisting of pipelines for visual analysis of different sports using Computer Vision and Deep Learning.
MIT License
18 stars 17 forks source link

Optimization to remove redundancy in code #83

Closed samruddhibothara closed 4 years ago

samruddhibothara commented 4 years ago

I have removed the redundancy in code optimization in get_heatmap and instead added the option to return a list of all coordinates in detect_players_video (by default, this parameter heatmap=False) So in the get_heatmap method, I first initialized the court, then called the detect_players_video method (with parameter heatmap=True) which returns all coordinates This coordinate list returned is then used to generate heatmap

I have also made slight changes in the utils.py file to create a method to get the default frame list

samruddhibothara commented 4 years ago

This is making the tqdm bar for detect_players_video and not for get_heatmap This issue might have to be solved and required code added, or since there isnt much of a time difference as get_heatmap is only drawing points from a list (max 1-2 seconds ) after rendering video, it can also be ignored