Insight

How data augmentation affects machine learning

Why data quality is getting more important

2023
.
05
.
23
by
Sangsun Moon
How data augmentation affects machine learning

Data augmentation is a technique for improving the performance of computer vision. It refers to ways to augment the dataset you have in various ways to increase the size of the actual training dataset. As different machine learning methodologies have emerged, so has the interest in data augmentation.

Data augmentation Example

Data augmentation is a technique used to improve the performance of image classification models. Image classification models work by identifying objects. Typically trained with a set of image data, these models can become overly familiar with the training data and unable to generalize to new data. In this case, data augmentation is used to generate new images to train the model.

The model is trained on two kinds of images: new and original. The model can learn about different variations of the training data. Studies have shown that when data augmentation is used, it can be up to 5% more accurate than without.

Data augmentation Example

The data augmentation method used for image data is shown below.

  • Rotate image: Rotate the image by a specific angle.
  • Scale an image: Resize an image by a specific percentage.
  • Move image: Move the image a specific distance.
  • Image distortion: Distorts the image in a specific way.
  • Add image noise: Add noise to the image.
  • Translate text: Translate text into another language and then back into the original language.
  • Replace text synonyms: Replace specific words with synonyms.
  • Insert or delete text words: Insert or delete words in the text.
  • Change text word order: Change the word order of the text.

Cropping and color adjustment can be used to scale training data. Changing the size or transforming from a multi-angle perspective has also been shown to improve performance when used to extend test data. Scratches, stamps, and dark smudges are also used as data augmentations in object recognition.

Understanding Data Augmentation | What is Data Augmentation & how it works?
<source: Understanding Data Augmentation | What is Data Augmentation & how it works?>

When building a machine learning model to distinguish between dogs and cats, we found that data augmentation dramatically reduced LOS and increased accuracy.

Data augmentation Technology and machine learning

Data augmentation helps prevent machine learning models from overfitting. Overfitting occurs when a model is too well-fitted to the training data and cannot generalize to new data. Data augmentation can prevent overfitting by allowing the model to learn about different variations of the training data.

Data augmentation can also help improve the performance of your model. This is because models can become more accurate when they are trained with more data. Data augmentation allows the model to learn about different variations of the training data.

Data augmentation can be used to address diversity and data volume issues in training data. It can also be used to address class imbalance issues in classification tasks.

Data augmentation types for images

Data augmentation can be divided into geometric transformations and task-based scaling.

  • Geometric transformations: Resize, invert, crop, rotate, pan, and split windows.
  • Task-based scaling: Rotate, translate, scale, and distort

Geometric transformations are the most common type of transformations used in image augmentation. By using different transformations, you allow your model to learn how to process data under different conditions.

Task-based scaling involves increasing the data based on the model's training goals. For example, if you're training a text categorization model, you might want to provide the model with more examples of sentences, including artificial synthesis of positive and negative sentences. This helps the model to better distinguish between positive and negative sentences.

However, both geometric transformations and task-based scaling have their limitations. Geometric transformations help train a model to process data under different conditions, but they cannot generate new data points. Task-based scaling can help generate new data points, but it does not help train a model to process data under different conditions. To overcome these limitations, it is important to use both methods together.

Tesla's data augmentation for deep learning

Through numerous studies, we've been able to prove the validity of data augmentation when building training data, so let's take a look at some real-world examples.

Tesla completes FSD with data augmentation

Tesla has applied data augmentation to driving tasks, such as how to handle steep curves on the highway or how to make a left turn at an intersection. Over time, they've said they'll apply it to things like how and when to change lanes on the highway.

The neural network predicts what a human driver would do in a given situation and incorporates it into the driving outcome. In essence, the decision-making process is done by predicting the behavior of the Tesla driver.

Tesla is patenting a clever way to train Autopilot with augmented camera images
<Source: Tesla is patenting a clever way to train Autopilot with augmented camera images>

또One Tesla patent is titled 'Systems and Methods for Training Machine Models with Augmented Data'. Tesla is preparing for an era of fully autonomous driving with a system centered around cameras and artificial intelligence. FSD systems, which rely heavily on visual data and trained neural networks, require huge amounts of data.

With this in mind, Tesla utilizes data augmentation to train its neural networks in the most efficient way possible.

Tesla is equipped with cameras that provide 360-degree visual coverage of the vehicle. It turns out that the images used to train neural networks are typically captured by a variety of sensors, sometimes with different characteristics. Tesla's data augmentation enables it to process these images in an optimized way.

"Augmentation can help generalize and make model predictions more robust, especially when images are blurred or obscured, or when detectable objects are not clearly visible," Tesla explained, adding that this approach could be particularly useful for object detection and autonomous vehicles.

Images can also be augmented with a cutout feature that removes a portion of the original image. The removed portion is replaced with a specified color or other image content, such as blur, noise, or another image. These processes are expected to help Tesla with 3D labeling, especially as they are linked with images used to train neural networks.

Conclusion: Data augmentation is essential for more accurate and robust model training

Among deep learning applications, computer vision tasks such as image classification or object detection and segmentation have been very successful. Data augmentation has been very effective for training deep learning models in these applications.

In practice, images can be taken under a variety of conditions. The simple transformations mentioned above may not be enough to account for all the variations in conditions. Another disadvantage of simple transformations is that due to changes in geometry or lighting, objects in the image may lose their original features. Therefore, deeper neural network-based methods are also being researched to apply realistic transformations.

Tips for effective data augmentation

The reason for using data augmentation during model training is that models need to be trained in a variety of learning environments to ensure sophistication and accuracy in performance.

The quality of the source data plays an important role in the effectiveness of data augmentation techniques. Having high-quality source data with diverse and representative samples allows the augmented data to respond to a wide range of variations or scenarios. Data augmentation techniques modify the original data to create new samples. This requires source data with accurate and reliable labels to provide a solid foundation for enrichment without compromising the integrity of the data.

Using high-quality source data enables machine learning algorithms to better understand underlying patterns, correlations, and contextual information. This understanding enables the model to generate augmented samples that reflect realistic and useful variation, contributing to improved model performance. In other words, using high-quality data enables the most effective use of data augmentation techniques.

At Datahunt, we build data for model training in a variety of ways, including data augmentation. This has helped us achieve 99% data accuracy for our homegrown models.

Summary: An overview of data augmentation, its vision, and applied technologies

  1. Data augmentation is a way to increase the size of your training dataset by augmenting the dataset you have in various ways.
  2. Data agumentation can be used in ways like rotating images or converting text, and is a great way to avoid overfitting your model.
  3. Companies researching and developing computer vision, including Tesla, are actively utilizing data augmentation, and it is expected to show the most promise in training neural networks for deep learning.

Table of Contents
Talk to Expert