arXiv reaDer
TransformerのTransformer
Transformer in Transformer
Transformerは、注意メカニズムを介して入力データを強力な機能としてエンコードする新しい種類のニューラルアーキテクチャです。基本的に、ビジュアルトランスフォーマーは、最初に入力画像をいくつかのローカルパッチに分割し、次に両方の表現とそれらの関係を計算します。自然画像は非常に複雑で、詳細と色の情報が豊富であるため、パッチ分割の粒度は、さまざまなスケールや場所にあるオブジェクトの特徴を発掘するには十分ではありません。このホワイトペーパーでは、これらのローカルパッチ内の注意が、高性能のビジュアルトランスを構築するためにも不可欠であることを指摘し、新しいアーキテクチャ、つまりTransformer iN Transformer(TNT)を検討します。具体的には、ローカルパッチ(例:16×16)を「視覚的文」と見なし、それらをさらに小さなパッチ(例:4×4)に「視覚的単語」として分割するために提示します。各単語の注意は、無視できる計算コストで、与えられた視覚的な文の他の単語で計算されます。表現力を高めるために、単語と文の両方の特徴が集約されます。いくつかのベンチマークでの実験は、提案されたTNTアーキテクチャの有効性を示しています。たとえば、ImageNetで81.5%のトップ1精度を達成しています。これは、同様の計算を備えた最先端のビジュアルトランスフォーマーよりも約1.7%高くなっています。費用。 PyTorchコードはhttps://github.com/huawei-noah/CV-Backbones/tree/master/tnt_pytorchで入手でき、MindSporeコードはhttps://gitee.com/mindspore/mindspore/tree/master/で入手できます。 model_zoo / research / cv / TNT。
Transformer is a new kind of neural architecture which encodes the input data as powerful features via the attention mechanism. Basically, the visual transformers first divide the input images into several local patches and then calculate both representations and their relationship. Since natural images are of high complexity with abundant detail and color information, the granularity of the patch dividing is not fine enough for excavating features of objects in different scales and locations. In this paper, we point out that the attention inside these local patches are also essential for building visual transformers with high performance and we explore a new architecture, namely, Transformer iN Transformer (TNT). Specifically, we regard the local patches (e.g., 16×16) as "visual sentences" and present to further divide them into smaller patches (e.g., 4×4) as "visual words". The attention of each word will be calculated with other words in the given visual sentence with negligible computational costs. Features of both words and sentences will be aggregated to enhance the representation ability. Experiments on several benchmarks demonstrate the effectiveness of the proposed TNT architecture, e.g., we achieve an 81.5% top-1 accuracy on the ImageNet, which is about 1.7% higher than that of the state-of-the-art visual transformer with similar computational cost. The PyTorch code is available at https://github.com/huawei-noah/CV-Backbones/tree/master/tnt_pytorch, and the MindSpore code is at https://gitee.com/mindspore/mindspore/tree/master/model_zoo/research/cv/TNT.
updated: Mon Jul 05 2021 03:31:05 GMT+0000 (UTC)
published: Sat Feb 27 2021 03:12:16 GMT+0000 (UTC)
参考文献 (このサイトで利用可能なもの) / References (only if available on this site)
被参照文献 (このサイトで利用可能なものを新しい順に) / Citations (only if available on this site, in order of most recent)
Amazon.co.jpアソシエイト