プリンキピア

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

14.12. Neural Style Transfer14.12 ニューラルスタイル変換

If you are a photography enthusiast, you may be familiar with the filter. It can change the color style of photos so that landscape photos become sharper or portrait photos have whitened skins. However, one filter usually only changes one aspect of the photo. To apply an ideal style to a photo, you probably need to try many different filter combinations. This process is as complex as tuning the hyperparameters of a model.
英語のヒント
写真の愛好家なら、フィルタにはなじみがあるかもしれない。フィルタは写真の色のスタイルを変えて、風景写真をもっとくっきりさせたり、人物写真の肌を白くしたりできる。しかし、一つのフィルタはふつう写真の一つの面しか変えない。写真に理想のスタイルを当てはめるには、おそらく多くの異なるフィルタの組み合わせを試す必要がある。この過程は、モデルのハイパーパラメータを調整するのと同じくらい複雑である。
In this section, we will leverage layerwise representations of a CNN to automatically apply the style of one image to another image, i.e., style transfer (Gatys et al., 2016). This task needs two input images: one is the content image and the other is the style image. We will use neural networks to modify the content image to make it close to the style image in style. For example, the content image in Fig. 14.12.1 is a landscape photo taken by us in Mount Rainier National Park in the suburbs of Seattle, while the style image is an oil painting with the theme of autumn oak trees. In the output synthesized image, the oil brush strokes of the style image are applied, leading to more vivid colors, while preserving the main shape of the objects in the content image.
英語のヒント
この節では、CNNの層ごとの表現を活用して、ある画像のスタイルを別の画像に自動的に当てはめる。つまりスタイル変換である(Gatys et al., 2016)。この課題には二つの入力画像が要る。一つはコンテンツ画像で、もう一つはスタイル画像である。ニューラルネットワークを使ってコンテンツ画像を変更し、スタイルの点でスタイル画像に近づける。たとえば、図14.12.1のコンテンツ画像は、シアトル郊外のレーニア山国立公園で撮った風景写真であり、スタイル画像は秋のオークの木をテーマにした油絵である。出力の合成画像では、スタイル画像の油絵の筆づかいが当てはめられて色がもっと鮮やかになる一方、コンテンツ画像の物体の主な形は保たれる。
Fig. 14.12.1図14.12.1
Given content and style images, style transfer outputs a synthesized image.
英語のヒント
コンテンツ画像とスタイル画像が与えられると、スタイル変換は合成画像を出力する。