SforAiDl / Playground

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

removed code redunancy in detect_image, detect_players_image and dete… #85

Closed siddharth2411 closed 4 years ago

siddharth2411 commented 4 years ago

I have removed code redundancy in detect_image and detect_players_image by adding a helper function in utils.py to check if Cuda is available or not. I have also made changes in detect_players_video method by adding a helper function in utils.py to calculate time_elapsed, frame_left_read, and eta. This was defined twice in the if-else condition, hence I made a helper function.