ArtLabss / tennis-tracking

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

cant' load weights and predict #14

Closed nlpCSir closed 2 years ago

nlpCSir commented 2 years ago

1.The model will have the following problems when loading parameters: 2022-04-04 12:43:19.257086: W tensorflow/core/util/tensor_slice_reader.cc:95] 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?

2.When I change model.1 to model.h5, the above error message will disappear, but the model will break when predicting.

I am sorry for taking your time and hope you can help!

shukkkur commented 2 years ago

Hi @nlpCSir ! Don't really know what is the problem. The message is a warning, rather that an error and shouldn't affect the functionality of overall algorithm. So, you renamed the model.1 file to model.h5. Did you change this line as well? https://github.com/ArtLabss/tennis-tracking/blob/e3d9a93b06d32cbd897e33ce796153d056ce3cee/predict_video.py#L39

What do you mean by "the model breaks"? Can you share a snippet of your code or error?

shukkkur commented 2 years ago

@nlpCSir Any updates?

nlpCSir commented 2 years ago

I reconfigured the environment and the problem was solved, thank you very much for your help. But I still have the following questions. I tested some videos I shot myself and found that I couldn't get good results, does the model have a requirement for shooting angle?

shukkkur commented 2 years ago

Happy to hear that! Yep, unfortunately the model requires videos of official matches with angle similar to the sample input videos.

nlpCSir commented 2 years ago

Thanks a lot!

nlpCSir commented 2 years ago

Sorry to interrupt, but I would like to confirm, about bounce, did you predict it? Or is it calculated by some calculation method?

shukkkur commented 2 years ago

No problem! Bounces were predicted using x,y coordinates of the ball and time series prediction model from sktime module Check out #11 for more information)