TextRecognitionDataGenerator icon indicating copy to clipboard operation
TextRecognitionDataGenerator copied to clipboard

GeneratorFromStrings produces identical images every time

Open avber opened this issue 3 years ago • 2 comments

GeneratorFromStrings produces identical images every time

random.seed(100) # doesn't help

data = [] start = 200 for i in range(start, start + 3): data.append( str(i) + ' ' + '₸')

generator = GeneratorFromStrings( data, blur=0, random_blur=False, random_skew=True, )

image

avber avatar Jul 17 '22 10:07 avber

Setting the seed will not "break" randomness. It will only ensure that if you regenerate the sequence it will look the same. As a general rule I have not spent much time on making sure sure repeatability worked so it's possible that setting the seed does not lock the actual image sequence, but your example is not showing that.

Belval avatar Jul 18 '22 11:07 Belval

The problem is that images are identical. I expected them to be different on each run. I tried to run the code several times and still got these same images.

Thanks

avber avatar Jul 19 '22 04:07 avber