SoccerNet / sn-spotting

Repository containing all necessary codes to get started on the SoccerNet Action Spotting challenge. This repository also contains several benchmark methods.
63 stars 9 forks source link

Features extraction #1

Closed Tortoise17 closed 2 years ago

Tortoise17 commented 2 years ago

I have to ask one question. How to extract from any soccer match the metadata in json with the features npy file with the time and its spotting feature info? like label_camera json files are from any of the trained engine CALF? The routine is available in the list_management.py in utilities. Is this possible while extracting features?

SilvioGiancola commented 2 years ago

Hi @Tortoise17, I am not sure I have understood your issue, please be more explicit in your question. Given a new video, you can extract frame features with the code described in this folder: https://github.com/SoccerNet/sn-spotting/tree/main/Features in a npy format. Then, you can run a spotting model like CALF that takes frame features in a npy format to spot events. CALF will return you a json file with all the spotted events, with the time in the video, the class, and a confidence score. I don't know what you meant with "list_management.py", I can't find any file with this name in this repo. I hope that answers your question, if not, please be more explicit. Best,

Tortoise17 commented 2 years ago

Hi @SilvioGiancola , thank you so much for the kind reply. I got the npy format files successfully. after this, which python file is responsible for running the CALF model to export json? can you guide a bit?

You understood correctly I want the json export from npy files.

Tortoise17 commented 2 years ago

I guess with this : python inference/main.py --video_path=<path to your video> --model_name CALF_benchmark

?

Tortoise17 commented 2 years ago

@SilvioGiancola thank you so much. I got it. I will now start working and will ask if I have the question. Otherwise, I think I can acknowledge and cite you in paper. Thank you for such a great tool.

Tortoise17 commented 2 years ago

@SilvioGiancola is it also possible to use NetVLAD++ with any configuration for exporting features in json? to see the difference of both models?

SilvioGiancola commented 2 years ago

Yes: https://github.com/SoccerNet/sn-spotting/tree/main/Benchmarks/TemporallyAwarePooling#more-encoders

SilvioGiancola commented 2 years ago

And check all parameters here: https://github.com/SoccerNet/sn-spotting/blob/8a67ce6c271ff9d3f55a449f6383bbb0be2140a5/Benchmarks/TemporallyAwarePooling/src/main.py#L110

Tortoise17 commented 2 years ago

@SilvioGiancola thank you. I have gone through it. Is it possible to test on single video? like above command line I tried with CALF model?

SilvioGiancola commented 2 years ago

The development kit is provided as is, you would have to write your own code for this.

Tortoise17 commented 2 years ago

@SilvioGiancola But somehow it expects the only data which is available on archive. and if there is no that data, it starts download.