ArtLabss / tennis-tracking

Open-source Monocular Python HawkEye for Tennis
https://www.artlabs.tech
The Unlicense
392 stars 95 forks source link

Error at step 8 of How to Run #12

Closed PaulvanderWolde closed 2 years ago

PaulvanderWolde commented 2 years ago

Describe the bug When trying to run the code in Google Colab, I get an error when I am at step 8: !pip install filterpy sktime

When I do this, I get the following errors message: ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts. yellowbrick 1.3.post1 requires numpy<1.20,>=1.16.0, but you have numpy 1.21.5 which is incompatible. datascience 0.10.6 requires folium==0.2.1, but you have folium 0.8.3 which is incompatible. albumentations 0.1.12 requires imgaug<0.2.7,>=0.2.5, but you have imgaug 0.2.9 which is incompatible. Successfully installed deprecated-1.2.13 filterpy-1.4.5 llvmlite-0.38.0 numba-0.55.1 numpy-1.21.5 sktime-0.10.0 statsmodels-0.13.1 WARNING: The following packages were previously imported in this runtime: [numpy] You must restart the runtime in order to use newly installed versions.

When I restart the runtime, it does not help. When I try to run predict_video.py, I get the following error:

2022-02-08 15:57:12.483066: W tensorflow/core/util/tensor_slice_reader.cc:96] Could not open WeightsTracknet/model.1: DATA_LOSS: not an sstable (bad magic number): perhaps your file is in a different file format and you need to use a different restore operator? OpenCV: FFMPEG: tag 0x44495658/'XVID' is not supported with codec id 12 and format 'mp4 / MP4 (MPEG-4 Part 14)' OpenCV: FFMPEG: fallback to use tag 0x7634706d/'mp4v'

I do not know if the second error is the cause of the first error, but I would love to be able to successfully implement the interesting algorithm. I am looking forward to your reply.

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context Add any other context about the problem here.

shukkkur commented 2 years ago

@PaulvanderWolde Hey! Thanks for opening the issue!

From what you sent, I guess Colab already resolved the issue with conflicting packages. However, the second error is about WeightsTracknet/model.1

Can you please tell me did you upload the repository to your Google drive and mount it to your notebook?

Can you also tell me what the following code outputs in your notebook:

import os 
print(os.getcwd())
print(os.listdir())
PaulvanderWolde commented 2 years ago

Thank you for the quick response!

I did upload the repository to my Google drive and mounted it to the notebook.

This code:

import os 
print(os.getcwd())
print(os.listdir())

Resulted in this output:

/content/drive/MyDrive/tennis-tracking ['LICENSE', 'AUTHORS.md', 'README.md', 'CODE_OF_CONDUCT.md', 'CONTRIBUTING.md', 'tracking_players.csv', 'detection.py', 'clf.pkl', 'requirements.txt', 'court_detector.py', 'predict_video.py', 'utils.py', 'bigDF.csv', 'sort.py', 'court_reference.py', 'Bounces', 'Models', 'court_configurations', 'convert', '.github', 'VideoOutput', 'WeightsTracknet', 'TrackPlayers', 'VideoInput', 'Yolov3', '.git', 'requirements.gdoc', 'pycache', 'bouncing_point_algo.ipynb']

shukkkur commented 2 years ago

Is model.1 inside WeightsTracknet folder? And a side question, did you change runtime to GPU?

PaulvanderWolde commented 2 years ago

Yes, model.1 is in WeightTracknet folder. And I also changed the runtime to GPU

shukkkur commented 2 years ago

If everything is as you say it is, then I don't have a clue 😞 this is the error:

2022-02-08 15:57:12.483066: W tensorflow/core/util/tensor_slice_reader.cc:96] Could not open WeightsTracknet/model.1: 

Others are warnings:

DATA_LOSS: not an sstable (bad magic number): perhaps your file is in a different file format and you need to use a different restore operator?
OpenCV: FFMPEG: tag 0x44495658/'XVID' is not supported with codec id 12 and format 'mp4 / MP4 (MPEG-4 Part 14)'
OpenCV: FFMPEG: fallback to use tag 0x7634706d/'mp4v'

Very sorry, if you will be able to solve the issue, let us know!

PaulvanderWolde commented 2 years ago

I deleted everything and started from the first steps (for the second time). This time, I made a new Google Colab from the Drive page itself. Now everything seems to work! I do not know why, because it should not matter. Thank you for your help!

shukkkur commented 2 years ago

I really glad to hear that! Your persistence is admirable! Thanks for trying to run our code) Cheers 😄