chychen / BasketballGAN

Basketball coaches often sketch plays on a whiteboard to help players get the ball through the net. A new AI model predicts how opponents would respond to these tactics.
https://arxiv.org/abs/1909.07088
58 stars 5 forks source link

Inquiry about the Dataset and some metrics #3

Closed ahariri13 closed 3 years ago

ahariri13 commented 4 years ago

In issue #1 you mentioned that real 50Real.npy refers to real play and 50Seq.npy refers to real offensive strategies. What difference is there between both datasets ? In my project, I am using 50Real.npy and I assume it's a tracking data containing x,y coordinates from the start to the end of a play right ?

On the other hand, I was wondering how i could calculate the MAE and RMSE of the generated data, and if those can be retrieved somehow (Sorry I am new to GANs )

Thanks in advance !

chychen commented 4 years ago

Hi @ahariri13 ,

thank you for being interested in our work.

50Real.npy -> real play, containing both offensive and defensive trajectories of an entire play.. 50Seq.npy -> real offensive strategies, containing only offensive strategies drawn by basketball coach.

why would you like to calculate the MAE and RMSE on generated data? if you mean how to train a GAN, we use Earth Moving Distance (W-distance) to train our GAN model, I will refer you to WGAN and Spectral Norm papers.

ahariri13 commented 4 years ago

@chychen Thank you for your reply, I am trying to calculate the MAE and RMSE on generated data to compare with some models of mine that use the same metrics.

I would do that either on your code directly or by extracting the generated data and calculating these metrics separately so I was wondering if that's doable somehow.

ahariri13 commented 4 years ago

@chychen Actually, one way to solve my problem is if I could test the trained model by feeding it with initial positions and obtain the generated trajectories' plots and xy coordinates (As was done in the video). Is it possible to do that ?

Thanks in advance

chychen commented 4 years ago

@ahariri13 You should feed offense strategies(a sequence) rather than initial points.

you might be interested in the branch “gui“. (somehow buggy but it is runnable.) it is the GUI interface in the demo videos.

ahariri13 commented 4 years ago

@chychen thanks a lot for your help. i ran the GUI, and got the 'output.npy' and 'points.npy' arrays. 'points.npy' is clearly the trajectories that I drew on the left screen, but 'output.npy' is of shape (100,10,74,28) in my case. I know already that 10 refers to 10 players, but what do the other components indicate ? wgan_

Sorry for my numerous questions.

chychen commented 4 years ago

Dear @ahariri13 ,

I think 100 means it sample 100 results with diff latent code. 10 means 10 conditions (offense strategies) 74 means number of frames 28 means 10 players xy (20) + 1 ball xy (2) + who own the ball in one-hot format (6)

(sorry that the code written by students is messy and it won't be maintained anymore.