プリンキピア

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

14.11. Fully Convolutional Networks14.11 全畳み込みネットワーク

As discussed in Section 14.9, semantic segmentation classifies images in pixel level. A fully convolutional network (FCN) uses a convolutional neural network to transform image pixels to pixel classes (Long et al., 2015). Unlike the CNNs that we encountered earlier for image classification or object detection, a fully convolutional network transforms the height and width of intermediate feature maps back to those of the input image: this is achieved by the transposed convolutional layer introduced in Section 14.10. As a result, the classification output and the input image have a one-to-one correspondence in pixel level: the channel dimension at any output pixel holds the classification results for the input pixel at the same spatial position.
英語のヒント
14.9節で論じたように、セマンティックセグメンテーションは画像を画素レベルで分類する。全畳み込みネットワーク(FCN)は、畳み込みニューラルネットワークを使って、画像の画素を画素のクラスに変換する(Long et al., 2015)。前に画像分類や物体検出で出会ったCNNとは違って、全畳み込みネットワークは、途中の特徴マップの高さと幅を入力画像の高さと幅に戻す。これは、14.10節で紹介した転置畳み込み層によって実現される。その結果、分類の出力と入力画像は画素レベルで1対1に対応する。どの出力画素でも、チャネルの次元は、同じ空間の位置にある入力画素の分類結果を保持する。
%matplotlib inline
import torch
import torchvision
from torch import nn
from torch.nn import functional as F
from d2l import torch as d2l