SilvioGiancola / SoccerNetv2-DevKit

Development Kit for the SoccerNet Challenge
MIT License
169 stars 39 forks source link

Question about ResNET_TF2.npy #39

Closed allanchan339 closed 2 years ago

allanchan339 commented 2 years ago

Hi owner! I am new to this devkit and follow NetVLAD++ as starting point. I have found the data downloading are all npy files, eg. 1_ResNET_TF2.npy instead of raw video. I wonder how the data is preprocessed and divided into 1_ResNet and 2_ResNet. Could you provide some hints on it?

Also, when I am trying to test the NetVLAD++, I am found something weird during testSpotting(). I have found that the program crashed at data with index 36. More specifically, it is related to "europe_uefa-champions-league/2016-2017/2017-05-02 - 21-45 Real Madrid 3 - 0 Atl. Madrid/2_ResNET_TF2.npy". The error is given as follows:

cannot reshape array of size 4997088 into shape (5400,2048)

I wonder if I download the 2_ResNET_TF2.npy wrongly or the index 36 data should be avoided?

Thank you for reading my issue in advance.

SilvioGiancola commented 2 years ago

Hi @allanchan339

You can check this code: https://github.com/SilvioGiancola/SoccerNetv2-DevKit/tree/main/Features for extracting the ResNET features. 1_ResNet correspond to the 1st half of the game, while 2_ResNet correspond to the 2 half of the game.

I cannot reproduce your error with europe_uefa-champions-league/2016-2017/2017-05-02 - 21-45 Real Madrid 3 - 0 Atl. Madrid/2_ResNET_TF2.npy, can you maybe remove the file 2_ResNET_TF2.npy and download it again? It might be corrupted on your end.

Best,

allanchan339 commented 2 years ago

Hi @SilvioGiancola ,

Thank you for your help, I have redownloaded the data. It works fine now.

Sorry that I didn't reply to you on time. I have a mid-term review by the fund.

Btw, I noticed that your pre-processing part takes TF2 (Keras) as the backend while using PyTorch in model development. Is there any special reason to combine TF2 and Pytorch like this?

Best regards,

SilvioGiancola commented 2 years ago

Hi @allanchan339 , the only reason why we used TF2 (Keras) over PyTorch is that it was easier to code. Note that I never intended to train a model end-to-end, so I used whatever library was available. I do remember trying with the pre-trained model available on PyTorch back in the days, and got slightly worst results. The difference might come for the weights that can be slightly different between Keras and PyTorch, or maybe the libraries Keras and PyTorch use to read and pre-process the videos.

allanchan339 commented 2 years ago

@SilvioGiancola Thank you so much to reply! Sorry that I didn't close the issue on time.