Noticed a bug in TextImageGenerator that when augmentation for training is on, augmented images will not be used while training anyway. It was because self.n and self.indexes variables were not updated after adding augmented images to self.imgs, and when you take self.imgs[self.indexes[self.cur_index]] as next image in train sampling, it never reaches indices of augmented images.
Hello.
Noticed a bug in TextImageGenerator that when augmentation for training is on, augmented images will not be used while training anyway. It was because self.n and self.indexes variables were not updated after adding augmented images to self.imgs, and when you take self.imgs[self.indexes[self.cur_index]] as next image in train sampling, it never reaches indices of augmented images.
So added two lines of code that fix it.