tylerhutcherson/synthetic-images

Help - Crashes happening a few hundred images in.

Closed this issue · 1 comments

I'm getting about 300 images into generating them and then I consistently get this error

Traceback (most recent call last):
  File "create.py", line 134, in <module>
    obj_h, obj_w, x_pos, y_pos = get_obj_positions(obj=obj_img, bkg=bkg_img, count=count_per_size)            
  File "create.py", line 51, in get_obj_positions
    x_positions.extend(list(np.random.randint(0, max_x, count)))
  File "mtrand.pyx", line 746, in numpy.random.mtrand.RandomState.randint
  File "_bounded_integers.pyx", line 1254, in numpy.random._bounded_integers._rand_int64
ValueError: low >= high

Is there anything I can do to debug this? I assume I have a bad image somewhere but don't know what would be wrong with it
Thanks.

Actually. I think I figured it out. I had one image in the background images that was tiny, for some reason. I guess it was smaller than an object image