X-Git-Url: https://fleuret.org/cgi-bin/gitweb/gitweb.cgi?p=flatland.git;a=blobdiff_plain;f=README.md;h=82dcf7454af1bdd5214a126d84981fddde128b0a;hp=c9abf2e9a0808124078cc7e67f14fac3f4faa765;hb=c99cbb5f30e1e2052bfc36880a1425db600454b5;hpb=dcda16c32fa43d04f795f289725c00707225f460 diff --git a/README.md b/README.md index c9abf2e..82dcf74 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ This is an implementation of a simple 2d physics simulator usable from the pytorch framework. -The core provided function is +The main function is ``` torch.ByteTensor generate_sequence(bool pulling, @@ -11,23 +11,24 @@ torch.ByteTensor generate_sequence(bool pulling, int nb_images, int image_height, int image_width, int nb_shapes, - bool random_shape_size, bool random_colors) { + bool random_shape_size, bool random_colors) ``` -with - * `pulling` indicating if one of the shape should be pulled upward, - * `nb_sequences` the number of sequences to generate - * `nb_images` the number of frames per sequence - * `image_height` an `image_width` the individual image size - * `nb_shapes` how many rectangular shapes to put in the simulation - * `random_shape_size` should they be of different size - * `random_colors` should they be of different colors +where -The returned ByteTensor is of four dimensions: + * `pulling` indicates if one of the shape should be pulled upward, + * `nb_sequences` is the number of sequences to generate, + * `nb_images` is the number of frames per sequence, + * `image_height` and `image_width` is the individual image size, + * `nb_shapes` is the number of rectangular shapes in the simulation, + * `random_shape_size` states if the shapes should be of different sizes, + * `random_colors` states if they should be of different colors. - * Sequence number - * Image number - * Channel (3, as for RGB) +The returned ByteTensor has five dimensions: + + * Sequence index + * Image index + * Channel (3 since it is RGB) * Pixel row * Pixel col