X-Git-Url: https://fleuret.org/cgi-bin/gitweb/gitweb.cgi?p=flatland.git;a=blobdiff_plain;f=flatland-test.py;h=2c269ba0eb9dcc35dcb15ef7ca6df2bc9e0fddc3;hp=1f92fa3ae2f7e9c848beaf8b123d262cfc5b87c8;hb=924ef5308c54784d2c0a9bbd282e55a16efbf318;hpb=dc147618a2d9b65027b751b5e1306241a2221668 diff --git a/flatland-test.py b/flatland-test.py index 1f92fa3..2c269ba 100755 --- 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 @@ -25,7 +25,7 @@ import torch import torchvision import argparse -from _ext import flatland +import flatland ###################################################################### @@ -47,19 +47,19 @@ parser.add_argument('--height', help = 'Image height') parser.add_argument('--nb_shapes', - type = int, default = 10, + type = int, default = 8, 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', - type = int, default = 3, + type = int, default = 16, help = 'How many images per sequence') parser.add_argument('--randomize_colors', - action='store_true', default=False, + action='store_true', default=True, help = 'Should the shapes be of different colors') parser.add_argument('--randomize_shape_size', @@ -110,8 +110,8 @@ x = flatland.generate_sequence(False, 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')