プリンキピア

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

14.2. Fine-Tuning14.2 微調整

In earlier chapters, we discussed how to train models on the Fashion-MNIST training dataset with only 60000 images. We also described ImageNet, the most widely used large-scale image dataset in academia, which has more than 10 million images and 1000 objects. However, the size of the dataset that we usually encounter is between those of the two datasets.
英語のヒント
前の章では、60000枚の画像しかないFashion-MNISTの訓練データセットでモデルを訓練する方法を論じた。また、学界で最も広く使われている大規模な画像データセットであるImageNetも説明した。それには1000万枚以上の画像と1000の物体がある。しかし、ふつう出会うデータセットの大きさは、この二つのデータセットのあいだにある。
Suppose that we want to recognize different types of chairs from images, and then recommend purchase links to users. One possible method is to first identify 100 common chairs, take 1000 images of different angles for each chair, and then train a classification model on the collected image dataset. Although this chair dataset may be larger than the Fashion-MNIST dataset, the number of examples is still less than one-tenth of that in ImageNet. This may lead to overfitting of complicated models that are suitable for ImageNet on this chair dataset. Besides, due to the limited amount of training examples, the accuracy of the trained model may not meet practical requirements.
英語のヒント
画像からさまざまな種類の椅子を認識し、それからユーザーに購入のリンクを勧めたいとしよう。ありうる一つの方法は、まずよくある100種類の椅子を特定し、各椅子についてさまざまな角度から1000枚の画像を撮り、集めた画像データセットで分類モデルを訓練することである。この椅子のデータセットはFashion-MNISTのデータセットより大きいかもしれないが、事例の数はまだImageNetの10分の1にも満たない。これは、ImageNetに適した複雑なモデルが、この椅子のデータセットで過学習することにつながるかもしれない。さらに、訓練事例の量が限られているので、訓練したモデルの正解率が実用上の要件を満たさないかもしれない。
In order to address the above problems, an obvious solution is to collect more data. However, collecting and labeling data can take a lot of time and money. For example, in order to collect the ImageNet dataset, researchers have spent millions of dollars from research funding. Although the current data collection cost has been significantly reduced, this cost still cannot be ignored.
英語のヒント
上の問題に対処するため、明らかな解決策は、もっと多くのデータを集めることである。しかし、データを集めてラベルをつけるには、多くの時間とお金がかかりうる。たとえば、ImageNetのデータセットを集めるため、研究者たちは研究資金から数百万ドルを費やした。現在のデータ収集のコストはかなり下がったが、このコストはまだ無視できない。
Another solution is to apply transfer learning to transfer the knowledge learned from the source dataset to the target dataset. For example, although most of the images in the ImageNet dataset have nothing to do with chairs, the model trained on this dataset may extract more general image features, which can help identify edges, textures, shapes, and object composition. These similar features may also be effective for recognizing chairs.
英語のヒント
もう一つの解決策は、転移学習を当てはめて、ソースデータセットから学んだ知識をターゲットデータセットに移すことである。たとえば、ImageNetのデータセットのほとんどの画像は椅子と何の関係もないが、このデータセットで訓練したモデルは、もっと一般的な画像の特徴を抽出するかもしれず、それはエッジ、テクスチャ、形、物体の構成を見分けるのに役立ちうる。こうした似た特徴は、椅子を認識するのにも効果的かもしれない。