data-augmentation

using Keras' flow_from_directory with FCNN

▼魔方 西西 提交于 2019-12-11 14:16:18
问题 I trained a constitutional neural net for image segmentation with Keras successfully. Now I am trying to improve performance applying some data augmentation to my images. To do so I use the ImageDataGenerator and then flow_from_directory to load only batches into memory (I tried without but I get memory error). Code example is: training_images = np.array(training_images) training_masks = np.array(training_masks)[:, :, :, 0].reshape(len(training_masks), 400, 400, 1) # generators for data

Data Augmentation in PyTorch

北慕城南 提交于 2019-11-30 06:35:14
问题 I am a little bit confused about the data augmentation performed in PyTorch. Now, as far as I know, when we are performing data augmentation, we are KEEPING our original dataset, and then adding other versions of it (Flipping, Cropping...etc). But that doesn't seem like happening in PyTorch. As far as I understood from the references, when we use data.transforms in PyTorch, then it applies them one by one. So for example: data_transforms = { 'train': transforms.Compose([ transforms