第7章畳み込みニューラルネットワーク
7.1.1. Invariance7.1.1 不変性
Imagine that we want to detect an object in an image. It seems reasonable that whatever method we use to recognize objects should not be overly concerned with the precise location of the object in the image. Ideally, our system should exploit this knowledge. Pigs usually do not fly and planes usually do not swim. Nonetheless, we should still recognize a pig were one to appear at the top of the image. We can draw some inspiration here from the children’s game “Where’s Waldo” (which itself has inspired many real-life imitations, such as that depicted in Fig. 7.1.1). The game consists of a number of chaotic scenes bursting with activities. Waldo shows up somewhere in each, typically lurking in some unlikely location. The reader’s goal is to locate him. Despite his characteristic outfit, this can be surprisingly difficult, due to the large number of distractions. However, what Waldo looks like does not depend upon where Waldo is located. We could sweep the image with a Waldo detector that could assign a score to each patch, indicating the likelihood that the patch contains Waldo. In fact, many object detection and segmentation algorithms are based on this approach (Long et al., 2015). CNNs systematize this idea of spatial invariance, exploiting it to learn useful representations with fewer parameters.
英語のヒント
画像の中の物体を検出したいとしよう。物体を認識するのにどんな方法を使うにせよ、画像の中の物体の正確な位置にこだわりすぎるべきではない、というのは理にかなっていそうである。理想的には、システムはこの知識を活用すべきである。ふつう豚は空を飛ばないし、飛行機は泳がない。それでも、もし画像の上端に豚が現れたら、やはり豚と認識すべきである。ここでは、子ども向けのゲーム「ウォーリーをさがせ」(これ自体、図7.1.1に示すような、現実のまねごとを数多く生み出してきた)から着想を得られる。このゲームは、さまざまな活動であふれかえった混沌とした場面がいくつも並んだものである。ウォーリーはそれぞれの場面のどこかに現れ、たいていは思いもよらない場所に潜んでいる。読者の目標は、ウォーリーを見つけることである。特徴的な服装をしているにもかかわらず、気を散らすものがあまりに多いので、これは驚くほど難しいことがある。しかし、ウォーリーがどう見えるかは、ウォーリーがどこにいるかには依存しない。ウォーリー検出器で画像を走査し、各区画に得点を付けて、その区画にウォーリーがいる見込みを示すこともできるだろう。実際、物体検出やセグメンテーションのアルゴリズムの多くは、この手法にもとづいている(Long et al., 2015)。CNNはこの空間的な不変性の考えを体系化し、それを活用して、より少ないパラメータで有用な表現を学習する。
Image omitted because its reuse rights could not be verified.権利の確認ができないため画像を割愛。
Fig. 7.1.1図7.1.1
Can you find Waldo (image courtesy of William Murphy (Infomatique))?
英語のヒント
ウォーリーを見つけられるか(画像提供:William Murphy (Infomatique))。
We can now make these intuitions more concrete by enumerating a few desiderata to guide our design of a neural network architecture suitable for computer vision:
英語のヒント
コンピュータビジョンに適したニューラルネットワークの構造を設計する指針となる、いくつかの望ましい条件を挙げて、こうした直観をもっと具体的にしよう。
- In the earliest layers, our network should respond similarly to the same patch, regardless of where it appears in the image. This principle is called translation invariance (or translation equivariance).
英語のヒント
最初のほうの層では、ネットワークは同じ区画に対して、それが画像のどこに現れても同じように反応すべきである。この原理は並進不変性(あるいは並進同変性)と呼ばれる。 - The earliest layers of the network should focus on local regions, without regard for the contents of the image in distant regions. This is the locality principle. Eventually, these local representations can be aggregated to make predictions at the whole image level.
英語のヒント
ネットワークの最初のほうの層は、離れた領域にある画像の中身にはかまわず、局所的な領域に焦点を当てるべきである。これが局所性の原理である。最終的には、こうした局所的な表現を集約して、画像全体の水準で予測を行える。 - As we proceed, deeper layers should be able to capture longer-range features of the image, in a way similar to higher level vision in nature.
英語のヒント
先に進むにつれて、より深い層は、自然界の高次の視覚と同じようなやり方で、画像のもっと長い範囲にわたる特徴をとらえられるべきである。
Let’s see how this translates into mathematics.
英語のヒント
これが数学ではどう表されるかを見てみよう。