projects
/
flatland.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Typo.
[flatland.git]
/
flatland-test.py
diff --git
a/flatland-test.py
b/flatland-test.py
index
ff63309
..
8d9f11b
100755
(executable)
--- a/
flatland-test.py
+++ b/
flatland-test.py
@@
-1,4
+1,4
@@
-#!/usr/bin/env python
-for-pytorch
+#!/usr/bin/env python
#
# flatland is a simple 2d physical simulator
#
# flatland is a simple 2d physical simulator
@@
-47,19
+47,19
@@
parser.add_argument('--height',
help = 'Image height')
parser.add_argument('--nb_shapes',
help = 'Image height')
parser.add_argument('--nb_shapes',
- type = int, default =
10
,
+ type = int, default =
8
,
help = 'Image height')
parser.add_argument('--nb_sequences',
help = 'Image height')
parser.add_argument('--nb_sequences',
- type = int, default =
1
,
+ type = int, default =
8
,
help = 'How many sequences to generate')
parser.add_argument('--nb_images_per_sequences',
help = 'How many sequences to generate')
parser.add_argument('--nb_images_per_sequences',
- type = int, default =
3
,
+ type = int, default =
16
,
help = 'How many images per sequence')
parser.add_argument('--randomize_colors',
help = 'How many images per sequence')
parser.add_argument('--randomize_colors',
- action='store_true', default=
Fals
e,
+ action='store_true', default=
Tru
e,
help = 'Should the shapes be of different colors')
parser.add_argument('--randomize_shape_size',
help = 'Should the shapes be of different colors')
parser.add_argument('--randomize_shape_size',
@@
-110,7
+110,9
@@
x = flatland.generate_sequence(False,
args.nb_images_per_sequences,
args.height, args.width,
args.nb_shapes,
args.nb_images_per_sequences,
args.height, args.width,
args.nb_shapes,
- args.randomize_
colors
,
- args.randomize_
shape_size
)
+ args.randomize_
shape_size
,
+ args.randomize_
colors
)
sequences_to_image(x, gap = 3, gap_color = (0, 150, 200)).save('sequences.png')
sequences_to_image(x, gap = 3, gap_color = (0, 150, 200)).save('sequences.png')
+
+print('Saved sequences.png.')