Added some explanation about the main function.
authorFrancois Fleuret <francois@fleuret.org>
Sat, 15 Apr 2017 09:13:59 +0000 (11:13 +0200)
committerFrancois Fleuret <francois@fleuret.org>
Sat, 15 Apr 2017 09:13:59 +0000 (11:13 +0200)
README.md

index 47633c0..c9abf2e 100644 (file)
--- a/README.md
+++ b/README.md
@@ -3,6 +3,37 @@
 This is an implementation of a simple 2d physics simulator usable from
 the pytorch framework.
 
+The core provided function is
+
+```
+torch.ByteTensor generate_sequence(bool pulling,
+                                   int nb_sequences,
+                                   int nb_images,
+                                   int image_height, int image_width,
+                                   int nb_shapes,
+                                   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
+
+The returned ByteTensor is of four dimensions:
+
+ * Sequence number
+ * Image number
+ * Channel (3, as for RGB)
+ * Pixel row
+ * Pixel col
+
+Warning: For improper parameters values (e.g. too many shapes, too
+small images), the simulation may be stuck.
+
 # Installation and test #
 
 ```