プリンキピア

第14章コンピュータビジョン

14.1. Image Augmentation14.1 画像の拡張

In Section 8.1, we mentioned that large datasets are a prerequisite for the success of deep neural networks in various applications. Image augmentation generates similar but distinct training examples after a series of random changes to the training images, thereby expanding the size of the training set. Alternatively, image augmentation can be motivated by the fact that random tweaks of training examples allow models to rely less on certain attributes, thereby improving their generalization ability. For example, we can crop an image in different ways to make the object of interest appear in different positions, thereby reducing the dependence of a model on the position of the object. We can also adjust factors such as brightness and color to reduce a model’s sensitivity to color. It is probably true that image augmentation was indispensable for the success of AlexNet at that time. In this section we will discuss this widely used technique in computer vision.
英語のヒント
8.1節では、大きなデータセットが、さまざまな応用で深いニューラルネットワークが成功するための前提条件であることを述べた。画像の拡張は、訓練画像に一連のランダムな変更を加えたあとで、似ているが別個の訓練事例を生成し、それによって訓練集合の大きさを広げる。別の見方として、画像の拡張は、訓練事例をランダムに少しいじると、モデルが特定の属性に頼る度合いが減り、それによって汎化能力が上がるという事実から動機づけられる。たとえば、画像をさまざまなやり方で切り抜いて、注目する物体がさまざまな位置に現れるようにすれば、モデルが物体の位置に依存する度合いを減らせる。明るさや色のような要因を調整して、モデルの色に対する敏感さを減らすこともできる。当時のAlexNetの成功には、おそらく画像の拡張が欠かせなかったと言ってよい。この節では、コンピュータビジョンで広く使われるこの技法を論じる。
%matplotlib inline
import torch
import torchvision
from torch import nn
from d2l import torch as d2l