# Tag Info

12

You should validate only on the original images. The augmentation is there so that it can help your model generalize better, but to evaluate your model you need actual images, not transformed ones. To do this in keras you need to define two instances of the ImageDataGenerator, one for training and one for validating. To train the model you need to set both ...

10

Is this approach better than the mere augmentation or just the use of class weights ? Note that data augmentation is the process of changing the training samples (e.g. for images, flipping them, changing their luminosity, adding noise, etc.) and adding them back into the set. It is used for enriching the diversity of training samples, thus, in this aspect ...

7

Ideally, data augmentation is a step in your training pipeline, which comes after splitting your data into train/validation/test sets. Otherwise, you have the same data point in both training and testing, even if it a little rotated. So your training pipeline could be something like this: +-> training set ---> data augmentation --+ ...

6

You begin by asking about image normalisation, but then refer to other techniques, which I believe all fall under "image augmentation". So I will answer the more general question: how can I perform image augmentation to improve my model? I would generally say that the more augmentation you can apply, the better. A caveat to that statement is that the ...

4

Out of the two pipelines you mentioned, I'd recommend the second (i.e. real-time augmentation). This is better than the first, because by performing random augmentations the network sees different images at each epoch. I'd recommend imgaug, which is a python library for performing data augmentation. I've found it very helpful as it can work with keras' ...

3

Disclaimer: I will try to answer the question but promote Image Augmentation Library Albumentations, which may collaborators and I develop in free time and which we believe is the best image augmentation library at the market :) There are many ways to augment the image data. Spatial transforms: Crops, Flips, Transpose, Elastic transform, ShiftScaleRotate, ...

3

Found the answer in stats.stackexchange.com. Hopefully this helps anyone else with the same question. feature extraction: freezing convolutional base vs. training on extracted features

3

If you can be sure that the model is not seeing the same instances repeatedly then there is very good chances that your model is not overfitting and that is precisely what you can measure from your validation set, you should see continuously downward loss which will eventually plateau at the local optimum that has been eventually reached by your model, that ...

3

I you want some kind of data-sets like Google spell checking data I suggest you look into the The WikEd Error Corpus dataset. The corpus consists of more than 12 million sentences with a total of 14 million edits of various types, this edits include: spelling error corrections, grammatical error corrections, stylistic changes. All these from the Wikipedia ...

3

If you need to work on images using Python, the preferred library is PIL. Here I show a function to do the modifications you have delimited. This code makes no effort to manage multiple files, or how to name the files converted. But it does show how to modify the images in the ways you have asked. Code: from PIL import Image def modify_image(im, ...

3

You can augment videos in the temporal dimension through clipping, or taking random sequences of consecutive frames. You can also augment in the spatial dimension by cropping frames randomly to simulate camera jitter. Unfortunately, augmenting video data by extrapolating motion information or by producing a video taken from a different viewpoint seems ...

3

As @fuwiak mentioned, transfer learning may not work if pre-trained model has been fitted on a "very different" dataset. Typically if the pre-trained network extract information that is not relevant for your problem. Moreover, in the paper License Plate Recognition System Based on Transfer Learning (that you shared with me), they have tried to ...

2

Your third model has the most capacity of the three. When you have the values $x$ with special negative value $\xi$ and indicators $\mathbf{1}_0$ and $\mathbf{1}_{\xi}$, the linear model can fit $$\alpha x + \beta \mathbf1_0 + \gamma \mathbf1_{\xi}$$ When $x>0$ you just get $\alpha x$, when $x=0$ you just get $\beta$, and when $x=\xi$ you get $\alpha \... 2 Yes, you can perturb your data (and targets) in ways that you wish your model to be robust against, for example by adding small amounts of noise (possibly Gaussian) or synthetic anomalies, or by creating meaningful aggregates. Some models also improve just by running the same training data through them more than once, randomly shuffled (“epochs”). 2 You should not apply *255. delta was supposed to be added to renorm_image, because you calculated this delta using cov, which was based on renorm_image. Then how would you restore renorm_image to your original image? *std + mean or *255? Obviously you should apply *std + mean. Therefore, delta = (delta*255.).astype('int8') pca_color_image = np.maximum(... 2 I don't think it is wise. Your intention to do validation on your real data is correct. But the way you have it now your model will be prevented from training on data that is from the same distribution as what you actually want to predict. It is best to first split the images into training and validation sets, then do data augmentation on the training set. 2 You could rotate images manually (without using ImageDataGenerator) and save it to disk. That way you would know which images you have rotated - so you would know which images have changed the class. After it, when using ImageDataGenerator, you need to set rotation_range to small value in order to be sure that it won't change the classes of images. ... 2 Other widely used Python libraries for data augmentation include: OpenCV: has functions/methods for bounding boxes, changing color space, scaling, cropping, translation, rotation, filters, blur, thresholding, etc. Scikit-image: also has features allowing converting from another color space to another, resizing/rescaling/rotating, erosion/dilation, filters, ... 2 I think you should look into imgaug. It supports most image augmentation and does have support for bounding boxes. Docs: https://imgaug.readthedocs.io/en/latest/ 2 As rightly pointed out by @erwan, it is a bad idea to use data augmentation with 'text data' The problem of 'training with less data' can be approached in many ways, here I enlist two ways which helped me with significant impact: (a) One approach would be to use semi-supervised approach. There are open sourced language models trained on insanely massive ... 2 In one epoch - It's the number of images in your Directory or the DataFrame In case of a custom Generator. It will be batch_size * steps_per_epoch You may check this with any of these approaches - Check the shape of prediction on train model.predict(traindata).shape Save the images into a dir by using save_to_dir='/content/train_data' Write a callback for ... 1 At first, I have to mention that$5k\$ cannot be considered as a large dataset for training a deep neural network. Anyway, about the question. In general, yes you can, but you have to be aware of some points. Data augmentation can be helpful or it can damage your entire predictions. The reason for each is that whenever you utilize data augmentation, you are ...

1

One option, which I have discovered, is back-translation via the Unsupervised Data Augmentation repository made public by Google Research. This is based on this paper.

1

Albumentations can do that augmentation. It supports multiple formats of bounding boxes annotations. From the docs: Albumentations is a Python library for fast and flexible image augmentations. Albumentations efficiently implements a rich variety of image transform operations that are optimized for performance, and does so while providing a concise, yet ...

1

There is also bbaug which implements Google's bounding box augmentation policies.

1

I have a somewhat similar model, where I limit the number of epochs for training, simply from the efficiency considerations. I let the model train for about 40 epochs, while I include the drop-out feature in the training. In my case, it is a three layers fully connected net. Using validation set I save the model from the epoch which improves the ...

1

In general, you have to be careful when using data augmentation. For example, doing rotation for this kind of image makes sense, we expect to see any of these images as potential 'real-life' example : However, doing rotation for this kind of image is less meaningful. We don't expect to see this in 'real-life' example : And GAN potentially makes generated ...

1

You don't need to validate using data augmentation. You are using data aug only for training (because you don't have enough data). If you had much data then there was no point in data augmentation. And you need data aug to reduce overfitting, there are other methods of reducing overfitting like dropout.

1

There are few ways to create your own dataset or to update already existing one. By yourself This way assumes that you have a microphone (at least one). To simplify your recording experience, record the files where you repeat each command. One unique command per one file. Extract the data then. The basic pipeline should be something like this. Collect ...

1

So there are few possible answers to your question. First of all you are mentioning Deep Convolutional GAN's which refers to Architecture of a Network. So you can either change Architectures or change Loss functions which are used in GANs which both can have an positive or negativ effect. Also you mention not learning the right data distribution, it also ...

Only top voted, non community-wiki answers of a minimum length are eligible