[ 翻譯 ] 2018.11.06- 背後原理大解析:如何運用強化學習的演算法,自動化圖像資料擴增?






Google AI 部落格

主題圖片:Designed by Zivile_z


本文源自 Google AI 部落格,經 Google 同意轉載,特此致謝!


The success of deep learning in computer vision can be partially attributed to the availability of large amounts of labeled training data — a model’s performance typically improves as you increase the quality, diversity and the amount of training data. However, collecting enough quality data to train a model to perform well is often prohibitively difficult. One way around this is to hardcode image symmetries into neural network architectures so they perform better or have experts manually design data augmentation methods, like rotation and flipping, that are commonly used to train well-performing vision models. However, until recently, less attention has been paid to finding ways to automatically augment existing data using machine learning. Inspired by the results of our AutoML efforts to design neural network architectures and optimizers to replace components of systems that were previously human designed, we asked ourselves: can we also automate the procedure of data augmentation?



n “AutoAugment: Learning Augmentation Policies from Data”, we explore a reinforcement learning algorithm which increases both the amount and diversity of data in an existing training dataset. Intuitively, data augmentation is used to teach a model about image invariances in the data domain in a way that makes a neural network invariant to these important symmetries, thus improving its performance. Unlike previous state-of-the-art deep learning models that used hand-designed data augmentation policies, we used reinforcement learning to find the optimal image transformation policies from the data itself. The result improved performance of computer vision models without relying on the production of new and ever expanding datasets.

在”AutoAugment: Learning Augmentation Policies from Data” 這篇論文中,我們探索一種強化學習的演算法,它能增加現存訓練資料集中資料的量和多樣性。直覺上,資料擴增被用來教導模型關於資料域中影像的不變性,在某種程度上使神經網路對這些重要的對稱性也維持不變,因而能改善這個神經網路的效能。不像之前最先進的深度學習模型採用人類設計的的資料擴增策略,我們運用強化學習,從資料本身發現最佳的圖像轉換原則。運用這些原則的結果改善了電腦視覺模型的效能,而無須仰賴新的且不斷變大的資料集。


Augmenting Training Data
The idea behind data augmentation is simple: images have many symmetries that don’t change the information present in the image. For example, the mirror reflection of a dog is still a dog. While some of these “invariances” are obvious to humans, many are not. For example, the mixup method augments data by placing images on top of each other during training, resulting in data which improves neural network performance.





AutoAugment is an automatic way to design custom data augmentation policies for computer vision datasets, e.g., guiding the selection of basic image transformation operations, such as flipping an image horizontally/vertically, rotating an image, changing the color of an image, etc. AutoAugment not only predicts what image transformations to combine, but also the per-image probability and magnitude of the transformation used, so that the image is not always manipulated in the same way. AutoAugment is able to select an optimal policy from a search space of 2.9 x 1032 image transformation possibilities.

AutoAugment是能為電腦視覺資料集設計自定義的資料擴增策略的一種自動化方法。例如,導引如何選擇基本圖像的轉換作業,像是水平或垂直翻轉圖像、旋轉圖像及改變圖像的顏色⋯⋯等等。AutoAugment不僅能預測到要結合哪一種圖像轉換法,還能預測每張圖像的概率,還有圖像轉換的強度,所以圖像不再使用同一種方法來調整。自動擴增技術能從高達2.9 x 1032   種圖像轉換可能性的搜尋空間中找到一個最佳策略。


AutoAugment learns different transformations depending on what dataset it is run on. For example, for images involving street view of house numbers (SVHN) which include natural scene images of digits, AutoAugment focuses on geometric transforms like shearing and translation, which represent distortions commonly observed in this dataset. In addition, AutoAugment has learned to completely invert colors which naturally occur in the original SVHN dataset, given the diversity of different building and house numbers materials in the world.

AutoAugment能根據正在處理的資料集,學習到不同的圖像轉換方式。例如,針對street view of house numbers(SVHN)這套資料集中的圖像,因其中包含真實場景圖像中的各種數字,自動擴增技術便聚焦於幾何轉換,像是歪斜和位移,代表這個資料集中常見的資料失真情況。此外,自動擴增技術已完整學會如何將顏色反轉,而這樣的情況在原始的SVHN資料集中相當常見,原因是考慮到真實世界中的各種不同的建築物和房屋門牌號碼材質。



On CIFAR-10 and ImageNet, AutoAugment does not use shearing because these datasets generally do not include images of sheared objects, nor does it invert colors completely as these transformations would lead to unrealistic images. Instead, AutoAugment focuses on slightly adjusting the color and hue distribution, while preserving the general color properties. This suggests that the actual colors of objects in CIFAR-10 and ImageNet are important, whereas on SVHN only the relative colors are important.




Our AutoAugment algorithm found augmentation policies for some of the most well-known computer vision datasets that, when incorporated into the training of the neural network, led to state-of-the-art accuracies. By augmenting ImageNet data we obtain a new state-of-the-art accuracy of 83.54% top1 accuracy and on CIFAR10 we achieve an error rate of 1.48%, which is a 0.83% improvement over the default data augmentation designed by scientists. On SVHN, we improved the state-of-the-art error from 1.30% to 1.02%. Importantly, AutoAugment policies are found to be transferable — the policy found for the ImageNet dataset could also be applied to other vision datasets (Stanford CarsFGVC-Aircraft, etc.), which in turn improves neural network performance.


針對一些最知名的電腦視覺資料集,我們的AutoAugment演算法找出一些擴增策略,而當我們把這些策略原則納入神經網路的訓練時,可以產生出最高的準確率。藉由擴增ImageNet的資料,我們獲得83.54%的準確率,排名第一!另外,在擴增CIFAR10的資料時,錯誤率則只有1.48%,相較於由科學家設計的預設的資料擴增法,錯誤率降了0.83%!而在擴增SVHN的資料時,錯誤率則是由1.30%降至1.02%。重要的是,AutoAugment策略是可轉移的,也就是說針對ImageNet資料集找出的策略原則也用在其它電腦視覺資料集(例如,Standford CarsFGVC-Aircraft⋯⋯等等。)藉此改善神經網路的效能。


We are pleased to see that our AutoAugment algorithm achieved this level of performance on many different competitive computer vision datasets and look forward to seeing future applications of this technology across more computer vision tasks and even in other domains such as audio processing or language models. The policies with the best performance are included in the appendix of the paper, so that researchers can use them to improve their models on relevant vision tasks.







你的電子郵件位址並不會被公開。 必要欄位標記為 *