seuqaj114 / paig

Code for the paper Physics-as-Inverse-Graphics: Joint Unsupervised Learning of Objects and Physics from Video
MIT License
38 stars 11 forks source link

How to make data set? #1

Open tmt9XX opened 5 years ago

tmt9XX commented 5 years ago

Hello, can I ask you how to make .npz data from a normal video? I want to reproduce your work with my own one but I'm not sure how to process it properly.

seuqaj114 commented 5 years ago

Hey tmt9XX,

In general the .npz is a file with 3 fields: train_x, valid_x and test_x. Each of these is a np.int8 (range 0-255) array with shape [dataset_size, num_time_steps, width, height, channels]. To understand how to make the .npz data I would recommend checking the file nn.datasets.generators.py. In this file, see the end of the function generate_spring_balls_dataset.

Let me know if this answers your question.

yashjain1129 commented 2 years ago

Hello, where are you specifying the number of objects in it?