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.
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.