{"id":12435,"date":"2023-02-06T18:07:00","date_gmt":"2023-02-06T10:07:00","guid":{"rendered":"http:\/\/139.9.1.231\/?p=12435"},"modified":"2023-02-03T18:07:43","modified_gmt":"2023-02-03T10:07:43","slug":"vision-transformers-for-dense-prediction","status":"publish","type":"post","link":"http:\/\/139.9.1.231\/index.php\/2023\/02\/06\/vision-transformers-for-dense-prediction\/","title":{"rendered":"\u3010\u6df1\u5ea6\u4f30\u8ba1 Transformer\u3011Vision Transformers for Dense Prediction"},"content":{"rendered":"\n<figure class=\"wp-block-pullquote\"><blockquote><p>\u4f5c\u8005\u5355\u4f4d\uff1aIntel Labs<\/p><p>https:\/\/arxiv.org\/abs\/2103.13413<\/p><cite>https:\/\/github.com\/isl-org\/DPT<\/cite><\/blockquote><\/figure>\n\n\n\n<p class=\"has-text-align-center has-light-pink-background-color has-background\"><a href=\"https:\/\/huggingface.co\/\"><strong>Hugging Face<\/strong><\/a><\/p>\n\n\n\n<p>\u5bc6\u96c6\u9884\u6d4b\u89c6\u89c9Transformer(DPT)\uff0c\u5176\u5728\u5355\u76ee\u6df1\u5ea6\u4f30\u8ba1\u3001\u8bed\u4e49\u5206\u5272\u7b49\u4efb\u52a1\u4e0a\u8868\u73b0SOTA\uff01<\/p>\n\n\n\n<p>    \u6211\u4eec\u4ecb\u7ecd\u4e86\u5bc6\u96c6\u89c6\u89c9Transformer\uff0c\u8be5\u67b6\u6784\u5229\u7528\u89c6\u89c9Transformer\u4ee3\u66ff\u5377\u79ef\u7f51\u7edc\u4f5c\u4e3a\u5bc6\u96c6\u9884\u6d4b\u4efb\u52a1\u7684\u9aa8\u5e72\u3002\u6211\u4eec\u5c06\u89c6\u89c9Transformer\u5404\u4e2a\u9636\u6bb5\u7684token\u7ec4\u88c5\u6210\u5404\u79cd\u5206\u8fa8\u7387\u7684\u56fe\u50cf\u8868\u793a\u5f62\u5f0f\uff0c\u5e76\u4f7f\u7528\u5377\u79ef\u89e3\u7801\u5668\u5c06\u5b83\u4eec\u9010\u6b65\u7ec4\u5408\u4e3a\u5168\u5206\u8fa8\u7387\u9884\u6d4b\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"1024\" height=\"328\" src=\"http:\/\/139.9.1.231\/wp-content\/uploads\/2023\/01\/image-102-1024x328.png\" alt=\"\" class=\"wp-image-12452\" srcset=\"http:\/\/139.9.1.231\/wp-content\/uploads\/2023\/01\/image-102-1024x328.png 1024w, http:\/\/139.9.1.231\/wp-content\/uploads\/2023\/01\/image-102-300x96.png 300w, http:\/\/139.9.1.231\/wp-content\/uploads\/2023\/01\/image-102-768x246.png 768w, http:\/\/139.9.1.231\/wp-content\/uploads\/2023\/01\/image-102-1536x492.png 1536w, http:\/\/139.9.1.231\/wp-content\/uploads\/2023\/01\/image-102.png 1565w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Transformer\u4e3b\u5e72\u4ee5\u6052\u5b9a\u4e14\u76f8\u5bf9\u8f83\u9ad8\u7684\u5206\u8fa8\u7387\u5904\u7406\u8868\u793a\uff0c\u5e76\u4e14\u5728\u6bcf\u4e2a\u9636\u6bb5\u90fd\u5177\u6709\u5168\u5c40\u611f\u53d7\u91ce\u3002\u4e0e\u5168\u5377\u79ef\u7f51\u7edc\u76f8\u6bd4\uff0c\u8fd9\u4e9b\u7279\u6027\u4f7f\u5bc6\u96c6\u89c6\u89c9Transformer\u53ef\u4ee5\u63d0\u4f9b\u66f4\u7ec6\u7c92\u5ea6\u548c\u66f4\u5168\u5c40\u4e00\u81f4\u7684\u9884\u6d4b\u3002<\/p>\n\n\n\n<p>\u5b9e\u9a8c\u8868\u660e\uff0c<strong><strong>\u8fd9\u79cd\u67b6\u6784<\/strong><\/strong>\u5728<strong>\u5bc6\u96c6\u7684\u9884\u6d4b\u4efb\u52a1<\/strong>\u4e0a\u4ea7\u751f\u4e86\u5b9e\u8d28\u6027\u7684\u6539\u8fdb\uff0c\u7279\u522b\u662f\u5f53\u6709\u5927\u91cf\u7684\u8bad\u7ec3\u6570\u636e\u53ef\u7528\u65f6\u3002<strong>\u5bf9\u4e8e\u5355\u773c\u6df1\u5ea6\u4f30\u8ba1<\/strong>\uff0c\u4e0e\u6700\u5148\u8fdb\u7684\u5b8c\u5168\u5377\u79ef\u7f51\u7edc\uff08FCN\uff0cfully-convolutional networks.\uff09\u76f8\u6bd4\uff0c\u5176\u76f8\u5bf9\u6027\u80fd\u63d0\u9ad8\u4e86\u9ad8\u8fbe28%\u3002<strong>\u5e94\u7528\u4e8e\u8bed\u4e49\u5206\u5272\u65f6<\/strong>\uff0cDense vision transformer\u5728ADE20K\u4e0a\u662f49.02%\u7684<strong>mIoU<\/strong>\u3002\u540c\u65f6\u8fdb\u4e00\u6b65\u8868\u660e\uff0c\u5f53\u5904\u4e8e\u65b0\u6280\u672f\u8bbe\u7f6e\uff0c\u8be5\u67b6\u6784\u53ef\u4ee5\u5728\u8f83\u5c0f\u7684\u6570\u636e\u96c6\u4e0a\u8fdb\u884c\u5fae\u8c03\uff0c\u5982<strong><strong>NYUv2\u3001KITTI<\/strong><\/strong>\u548c<strong><strong>Pascal Context<\/strong><\/strong>\u3002<\/p>\n\n\n\n<h3><strong>Introduction<\/strong><\/h3>\n\n\n\n<p><strong>\u5bc6\u96c6\u9884\u6d4b\u67b6\u6784\u4e3b\u8981<\/strong>\u57fa\u4e8e<strong>\u5377\u79ef\u7f51\u7edc<\/strong>\uff0c\u5176\u8bbe\u8ba1\u901a\u5e38\u9075\u5faa\u4e00\u79cd<strong>\u4ece\u903b\u8f91\u4e0a\u5c06\u7f51\u7edc\u5206\u4e3a<\/strong><strong>\u7f16\u7801\u5668<\/strong><strong>\u548c<\/strong><strong>\u89e3\u7801\u5668<\/strong><strong>\u7684\u6a21\u5f0f<\/strong>\u3002<strong>\u7f16\u7801\u5668<\/strong>\u901a\u5e38\u57fa\u4e8e\u4e00\u4e2a\u56fe\u50cf\u5206\u7c7b\u7f51\u7edc\uff08\u4e3b\u5e72\uff09\uff0c\u5728\u50cfImageNet\u8fd9\u6837\u7684\u5927\u578b\u8bed\u6599\u5e93\u4e0a\u8fdb\u884c\u9884\u8bad\u7ec3\u3002<strong>\u89e3\u7801\u5668<\/strong>\u805a\u5408\u6765\u81ea\u7f16\u7801\u5668\u7684\u7279\u5f81\uff0c\u5e76\u5c06\u5176\u8f6c\u6362\u4e3a\u6700\u7ec8\u7684\u5bc6\u96c6\u9884\u6d4b\u3002<strong>\u5bc6\u96c6\u9884\u6d4b\u7684\u4f53\u7cfb\u7ed3\u6784\u7814\u7a76\u5f80\u5f80\u96c6\u4e2d\u5728\u89e3\u7801\u5668\u53ca\u5176\u805a\u5408\u7b56\u7565\u4e0a\u3002<\/strong>\u4e3b\u5e72\u67b6\u6784\u5bf9\u6574\u4e2a\u6a21\u578b\u6709\u5f88\u5927\u7684\u5f71\u54cd\uff0c\u56e0\u4e3a<strong>\u7f16\u7801\u5668\u4e2d\u4e22\u5931\u7684\u4efb\u4f55\u4fe1\u606f\u90fd\u4e0d\u53ef\u80fd\u5728\u89e3\u7801\u5668\u4e2d\u6062\u590d\u3002<\/strong><\/p>\n\n\n\n<p>\u5377\u79ef\u4e3b\u5e72\u9010\u6b65\u5bf9\u8f93\u5165\u56fe\u50cf\u8fdb\u884c\u5411<strong>\u4e0b\u91c7\u6837<\/strong>\uff0c<strong>\u4ee5\u63d0\u53d6\u591a\u4e2a\u5c3a\u5ea6\u4e0a\u7684\u7279\u5f81<\/strong>\u3002\u4e0b\u91c7\u6837\u4f7f\u63a5\u53d7\u57df\u7684\u9010\u6e10\u589e\u52a0\uff0c<strong>\u5c06<\/strong>\u4f4e\u7ea7\u7279\u5f81<strong>\u5206\u7ec4\u4e3a<\/strong>\u62bd\u8c61\u7684\u9ad8\u7ea7\u7279\u5f81\uff0c\u540c\u65f6\u786e\u4fdd\u7f51\u7edc\u7684\u5185\u5b58\u548c\u8ba1\u7b97\u9700\u6c42\u4fdd\u6301\u6613\u4e8e\u5904\u7406\u3002\u7136\u800c\uff0c<strong>\u4e0b\u91c7\u6837\u6709\u660e\u663e\u7684\u7f3a\u70b9\uff0c<\/strong>\u8fd9\u5728\u5bc6\u96c6\u7684\u9884\u6d4b\u4efb\u52a1\u4e2d\u7279\u522b\u7a81\u51fa\uff1a\u7279\u5f81\u5206\u8fa8\u7387\u548c\u7c92\u5ea6\u5728\u6a21\u578b\u7684\u66f4\u6df1\u5c42\u6b21\u7684\u9636\u6bb5\u4e22\u5931\uff0c\u56e0\u6b64\u5f88\u96be\u5728\u89e3\u7801\u5668\u4e2d\u6062\u590d\u3002\u867d\u7136\u7279\u5f81\u5206\u8fa8\u7387\u548c\u7c92\u5ea6\u53ef\u80fd\u5bf9\u67d0\u4e9b\u4efb\u52a1\u5e76\u4e0d\u91cd\u8981\uff0c\u5982\u56fe\u50cf\u5206\u7c7b\uff0c\u4f46\u5b83\u4eec\u5bf9\u4e8e\u5bc6\u96c6\u9884\u6d4b\u81f3\u5173\u91cd\u8981\uff0c\u5728\u7406\u60f3\u60c5\u51b5\u4e0b\uff0c\u4f53\u7cfb\u7ed3\u6784\u5e94\u8be5\u80fd\u591f\u5728\u6216\u63a5\u8fd1\u8f93\u5165\u56fe\u50cf\u7684\u5206\u8fa8\u7387\u65f6\u5206\u8fa8\u7279\u5f81\u3002<\/p>\n\n\n\n<p>\u73b0\u63d0\u51fa\u7684<strong>\u51cf\u8f7b\u7279\u5f81\u7c92\u5ea6\u635f\u5931<\/strong>\u7684\u5404\u79cd\u6280\u672f\u3002\u8fd9\u4e9b\u5305\u62ec\u8bad\u7ec3\u5728\u66f4\u9ad8\u7684\u8f93\u5165\u5206\u8fa8\u7387\uff08\u5982\u679c\u8ba1\u7b97\u9884\u7b97\u5141\u8bb8\uff09\uff0c\u6269\u5927\u5377\u79ef\uff0c\u8fc5\u901f\u589e\u52a0\u63a5\u53d7\u57df\u6ca1\u6709\u4e0b\u91c7\u6837\uff0c\u9002\u5f53\u653e\u7f6e\u4ece\u7f16\u7801\u5668\u7684\u591a\u4e2a\u9636\u6bb5\u8df3\u8fc7\u8fde\u63a5\u5230\u89e3\u7801\u5668\uff0c\u6216\u8005\u6700\u8fd1\u7684\u901a\u8fc7\u5728\u6574\u4e2a\u7f51\u7edc\u5e76\u884c\u8fde\u63a5\u591a\u5206\u8fa8\u7387\u8868\u793a\u3002\u867d\u7136\u8fd9\u4e9b\u6280\u672f\u53ef\u4ee5\u663e\u7740\u63d0\u9ad8\u9884\u6d4b\u8d28\u91cf\uff0c\u4f46\u7f51\u7edc\u4ecd\u7136\u53d7\u5230\u5176\u57fa\u672c\u6784\u5efa\u5757\u2014\u5377\u79ef\u7684\u74f6\u9888\u3002<strong>\u5377\u79ef\u548c\u975e\u7ebf\u6027\u4e00\u8d77\u6784\u6210\u4e86\u56fe\u50cf\u5206\u6790\u7f51\u7edc\u7684\u57fa\u672c\u8ba1\u7b97\u5355\u5143\u3002<\/strong>\u6839\u636e\u5b9a\u4e49\uff0c\u5377\u79ef\u662f\u5177\u6709\u6709\u9650\u63a5\u53d7\u57df\u7684\u7ebf\u6027\u7b97\u5b50\u3002\u6709\u9650\u7684\u63a5\u53d7\u57df\u548c\u5355\u4e2a\u5377\u79ef\u7684\u6709\u9650\u8868\u8fbe\u6027\u9700\u8981\u987a\u5e8f\u5806\u53e0\u6210\u975e\u5e38\u6df1\u7684\u7ed3\u6784\uff0c\u4ee5\u83b7\u5f97\u975e\u5e38\u5e7f\u6cdb\u7684\u80cc\u666f\u548c\u8db3\u591f\u9ad8\u7684\u8868\u5f81\u80fd\u529b\u3002<strong>&nbsp;\u7136\u800c\uff0c<\/strong>\u8fd9\u9700\u8981\u4ea7\u751f\u8bb8\u591a\u9700\u8981\u5927\u91cf\u7684\u95f4\u63a5\u8868\u793a\u3002\u964d\u91c7\u6837\u4e2d\u95f4\u8868\u793a\u662f\u5fc5\u8981\u7684\uff0c\u4ee5\u4fdd\u6301\u5185\u5b58\u6d88\u8017\u5728\u73b0\u6709\u8ba1\u7b97\u673a\u67b6\u6784\u4e2d\u53ef\u884c\u7684\u6c34\u5e73\u3002<\/p>\n\n\n\n<p>\u5728\u672c\u5de5\u4f5c\u4e2d\uff0c\u4ecb\u7ecd\u4e86\u5bc6\u96c6\u7684\u9884\u6d4b\u53d8\u538b\u5668(DPT)\u3002<strong>DPT\u662f\u4e00\u79cd\u5bc6\u96c6\u7684\u9884\u6d4b\u4f53\u7cfb\u7ed3\u6784\uff0c\u5b83\u57fa\u4e8e\u7f16\u7801\u5668-\u89e3\u7801\u5668\u7684\u8bbe\u8ba1\uff0c\u5229\u7528transformer\u4f5c\u4e3a\u7f16\u7801\u5668\u7684\u57fa\u672c\u8ba1\u7b97\u6784\u5efa\u5757\u3002<\/strong>\u5177\u4f53\u6765\u8bf4\uff0c<strong>\u4f7f\u7528<\/strong>\u6700\u8fd1\u63d0\u51fa\u7684Vision Transformer(ViT)<strong>\u4f5c\u4e3a\u4e3b\u5e72\u67b6\u6784<\/strong>\uff0c<strong>\u5c06<\/strong>ViT\u63d0\u4f9b\u7684<strong>bag-of-words<\/strong>\u8868\u793a<strong>\u91cd\u65b0\u7ec4\u88c5<\/strong>\u4e3a\u4e0d\u540c\u5206\u8fa8\u7387\u7684\u7c7b\u56fe\u50cf\u7279\u5f81\u8868\u793a\uff0c<strong>\u5e76<\/strong>\u4f7f\u7528\u5377\u79ef\u89e3\u7801\u5668\u9010\u6b65\u5c06\u7279\u5f81\u8868\u793a\u7ec4\u5408\u5230\u6700\u7ec8\u7684\u5bc6\u96c6\u9884\u6d4b\u4e2d\u3002\u4e0e\u5b8c\u5168\u5377\u79ef\u7f51\u7edc\u4e0d\u540c\uff0c<strong>ViT\u4e3b\u5e72\u5728\u8ba1\u7b97\u521d\u59cb\u56fe\u50cf\u5d4c\u5165\u540e\u653e\u5f03\u663e\u5f0f\u4e0b\u91c7\u6837\u64cd\u4f5c\uff0c\u5e76\u5728\u6240\u6709\u5904\u7406\u9636\u6bb5\u4fdd\u6301\u6052\u5b9a\u7ef4\u5ea6\u7684\u8868\u793a\u3002<\/strong>\u6b64\u5916\uff0c\u5728\u6bcf\u4e2a\u9636\u6bb5\u90fd\u6709\u4e00\u4e2a\u5168\u5c40\u6027\u7684\u63a5\u53d7\u57df\uff0c\u5b9e\u9a8c\u8868\u660e\uff0c\u8fd9\u4e9b\u7279\u6027\u5bf9\u4e8e\u5bc6\u96c6\u7684\u9884\u6d4b\u4efb\u52a1\u7279\u522b\u6709\u5229\uff0c\u56e0\u4e3a\u5b83\u4eec\u4f1a\u5bfc\u81f4\u7ec6\u7c92\u5ea6\u548c\u5168\u5c40\u76f8\u4e00\u81f4\u7684\u9884\u6d4b\u3002<\/p>\n\n\n\n<p><strong>\u5355\u773c\u6df1\u5ea6\u4f30\u8ba1\u548c\u8bed\u4e49\u5206\u5272<\/strong>\u7684\u5b9e\u9a8c\u3002\u5bf9\u4e8e\u901a\u7528\u5355\u773c\u6df1\u5ea6\u4f30\u8ba1\u7684\u4efb\u52a1\uff0c\u5176\u4e2d\u6709\u5927\u89c4\u6a21\u7684\u8bad\u7ec3\u6570\u636e\u53ef\u7528\uff0c\u4e0e\u8be5\u4efb\u52a1\u4e2d\u6027\u80fd\u6700\u597d\u7684\u5168\u5377\u79ef\u7f51\u7edc\u76f8\u6bd4\uff0cDPT\u63d0\u4f9b\u7684\u6027\u80fd\u63d0\u9ad8\u4e86\u8d85\u8fc728%\u3002\u8be5\u67b6\u6784\u8fd8\u53ef\u4ee5\u5fae\u8c03\u5230\u5c0f\u7684\u5355\u773c\u6df1\u5ea6\u9884\u6d4b\u6570\u636e\u96c6\uff0c\u5982NYUv2\u548cKITTI\uff0c\u5f53\u5b83\u4e5f\u8bbe\u7f6e\u4e86\u65b0\u7684\u6280\u672f\u72b6\u6001\u3002\u5b9e\u9a8c<strong>\u5229\u7528<\/strong>\u8bed\u4e49\u5206\u5272\u5b9e\u9a8c\u8fdb\u4e00\u6b65\u63d0\u4f9b\u4e86DPT\u7684\u5f3a\u6027\u80fd\u7684\u8bc1\u636e\u3002\u5bf9\u4e8e\u8fd9\u4e2a\u4efb\u52a1\uff0cDPT\u5728\u5177\u6709\u6311\u6218\u6027\u7684ADE20K\u548cPascal Context\u6570\u636e\u96c6\u4e0a<strong>\u8bbe\u7f6e<\/strong>\u4e86\u4e00\u4e2a\u65b0\u7684\u6700\u65b0\u6280\u672f\u72b6\u6001\u3002<strong>\u5b9a\u6027\u7ed3\u679c\u8868\u660e\uff0c\u4e0e\u5377\u79ef\u7f51\u7edc\u76f8\u6bd4\uff0c\u8fd9\u4e9b\u6539\u8fdb\u53ef\u4ee5\u5f52\u56e0\u4e8e\u66f4\u7ec6\u7c92\u5ea6\u548c\u66f4\u5168\u5c40\u4e00\u81f4\u7684\u9884\u6d4b\u3002<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"1024\" height=\"666\" src=\"http:\/\/139.9.1.231\/wp-content\/uploads\/2023\/02\/image-27-1024x666.png\" alt=\"\" class=\"wp-image-12734\" srcset=\"http:\/\/139.9.1.231\/wp-content\/uploads\/2023\/02\/image-27-1024x666.png 1024w, http:\/\/139.9.1.231\/wp-content\/uploads\/2023\/02\/image-27-300x195.png 300w, http:\/\/139.9.1.231\/wp-content\/uploads\/2023\/02\/image-27-768x500.png 768w, http:\/\/139.9.1.231\/wp-content\/uploads\/2023\/02\/image-27.png 1153w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" src=\"http:\/\/139.9.1.231\/wp-content\/uploads\/2023\/02\/image-28-1024x587.png\" alt=\"\" class=\"wp-image-12735\" width=\"690\" height=\"395\" srcset=\"http:\/\/139.9.1.231\/wp-content\/uploads\/2023\/02\/image-28-1024x587.png 1024w, http:\/\/139.9.1.231\/wp-content\/uploads\/2023\/02\/image-28-300x172.png 300w, http:\/\/139.9.1.231\/wp-content\/uploads\/2023\/02\/image-28-768x441.png 768w, http:\/\/139.9.1.231\/wp-content\/uploads\/2023\/02\/image-28.png 1121w\" sizes=\"(max-width: 690px) 100vw, 690px\" \/><\/figure><\/div>\n\n\n\n<h3><strong>Transformer encoder<\/strong>&nbsp;<\/h3>\n\n\n\n<p>\u5728\u4e00\u4e2a\u9ad8\u6c34\u5e73\u4e0a\uff0cVision Transformer\u5728\u56fe\u50cf\u7684<strong>bag-of-words<\/strong>\u8868\u793a\u4e0a\u8fdb\u884c\u64cd\u4f5c\u3002\u5355\u72ec\u5d4c\u5165\u5230\u7279\u5f81\u7a7a\u95f4\u4e2d\u7684\u56fe\u50cf\u8865\u4e01\uff0c\u6216\u8005\u4ece\u56fe\u50cf\u4e2d\u63d0\u53d6\u7684\u6df1\u5ea6\u7279\u5f81\uff0c\u626e\u6f14\u201cwords\u201d\u7684\u89d2\u8272\u3002<strong>\u5728\u672c\u5de5\u4f5c\u7684\u5176\u4f59\u90e8\u5206\u4e2d\uff0c\u5c06\u5d4c\u5165\u7684\u201cword\u201d\u79f0\u4e3atokens\u00a0<\/strong>\u3002Transformer\u4f7f\u7528<strong>multi-headed self-attention(MHSA)<\/strong>\u7684\u987a\u5e8f\u5757\u5bf9tokens\u8fdb\u884c\u8f6c\u6362\uff0c\u8be5\u5757\u5c06tokens\u76f8\u4e92\u8054\u7cfb\u8d77\u6765\u6765\u8f6c\u6362\u8868\u793a\u3002<\/p>\n\n\n\n<p>image&#8211;extracted&#8211;image patch&#8211;word&#8211;token\uff08\u53d8\u5316\uff09\uff1a\u7279\u5f81\u7a7a\u95f4\u4e2d\u7684\u56fe\u50cfpatch<\/p>\n\n\n\n<p><strong>image patch<\/strong>\uff1a\u56fe\u50cf\u8865\u4e01\u662f\u8f83\u5927\u5f62\u5f0f\u7684\u50cf\u7d20<strong>\u5bb9\u5668<\/strong>\u4f8b\u5982\uff0c\u5047\u8bbe\u6709\u4e00\u5f20 100 \u50cf\u7d20 x 100 \u50cf\u7d20\u7684\u56fe\u50cf\u3002\u5982\u679c\u60a8\u5c06\u8fd9\u4e9b\u56fe\u50cf\u5212\u5206\u4e3a 10&#215;10 \u5757\uff0c\u90a3\u4e48\u5c06\u62e5\u6709\u4e00\u4e2a\u5305\u542b 100 \u4e2a\u5757\u7684\u56fe\u50cf\uff08\u5373\u6bcf\u4e2a\u5757\u4e3a 100 \u50cf\u7d20\uff09\u3002\u5982\u679c\u5f00\u53d1\u4e86\u4e00\u79cd\u7b97\u6cd5\uff0c\u53ef\u4ee5\u5728 10px x 10px \u4e0a\u8fd0\u884c\uff0c\u90a3\u4e48 10px x 10px \u5c31\u662f\u8865\u4e01\u5927\u5c0f\u3002\u4f8b\u5982\uff0cCNN \u7684\u6c60\u5316\u5c42\u91c7\u7528\u66f4\u5927\u7684\u5757\u5e76\u5c06\u5b83\u4eec\u53d8\u6210\u4e00\u4e2a\u50cf\u7d20\uff0c\u53ef\u4ee5\u5c06\u5176\u89c6\u4e3a\u4fe1\u53f7\u5904\u7406\u4e2d\u7684\u7a97\u53e3\u3002\u5728\u56fe\u50cf\u5904\u7406<strong>\u8865\u4e01<\/strong>\u548c<strong>\u7a97\u53e3<\/strong>\u5927\u591a\u6570\u60c5\u51b5\u4e0b\u662f\u53ef\u4ee5\u4e92\u6362\u7684\uff0c\u4f46\u662f\u5f53\u60a8\u7684\u7b97\u6cd5\u4e3b\u8981\u5173\u6ce8\u4e00\u5806\u50cf\u7d20\u5171\u4eab\u76f8\u4f3c\u5c5e\u6027\u7684\u4e8b\u5b9e\u65f6\uff0c\u901a\u5e38\u4f1a\u5728\u4e0a\u4e0b\u6587\u4e2d\u4f7f\u7528\u8865\u4e01\u3002\u4f8b\u5982\uff0c\u8865\u4e01\u7528\u4e8e\u7a00\u758f\u8868\u793a\u6216\u56fe\u50cf\u538b\u7f29\u7684\u4e0a\u4e0b\u6587\uff0c\u800c\u7a97\u53e3\u7528\u4e8e\u8fb9\u7f18\u68c0\u6d4b\u6216\u56fe\u50cf\u589e\u5f3a\u3002<\/p>\n\n\n\n<p>Multi-headed self-attention(MHSA)\u00a0Net\uff1a\u4e00\u79cd\u65b0\u7684\u4eba\u7269\u518d\u8bc6\u522b\u6a21\u578b\uff0c\u79f0\u4e3a\u591a\u5934\u81ea\u6211\u6ce8\u610f\u7f51\u7edc(MHSA-Net)\uff0c\u7528\u4e8e\u4ece\u4eba\u7269\u56fe\u50cf\u4e2d<strong>\u5254\u9664\u4e0d\u91cd\u8981\u7684\u4fe1\u606f<\/strong>\u5e76<strong>\u6355\u6349\u5173\u952e\u7684\u5c40\u90e8\u4fe1\u606f<\/strong>\u3002MHSA-Net\u5305\u542b\u4e24\u4e2a\u4e3b\u8981\u7684\u65b0\u9896\u7ec4\u4ef6\uff1a\u591a\u5934\u81ea\u6211\u6ce8\u610f\u5206\u652f(MHSAB)\u548c\u6ce8\u610f\u529b\u7ade\u4e89\u673a\u5236(ACM)\u3002MHSAM\u81ea\u9002\u5e94\u5730\u6355\u83b7\u5173\u952e\u7684\u5c40\u57df\u4eba\u4fe1\u606f\uff0c\u7136\u540e\u4ea7\u751f\u6709\u6548\u7684\u56fe\u50cf\u591a\u6837\u6027\u5d4c\u5165\uff0c\u7528\u4e8e\u4eba\u7684\u5339\u914d\u3002ACM\u8fdb\u4e00\u6b65\u5e2e\u52a9\u8fc7\u6ee4\u5254\u9664\u6ce8\u610f\u529b\u3001\u566a\u97f3\u548c\u975e\u5173\u952e\u4fe1\u606f\u3002\u901a\u8fc7\u5e7f\u6cdb\u7684\u6d88\u878d\u7814\u7a76\uff0c\u9a8c\u8bc1\u4e86\u7ed3\u6784\u5316\u7684\u81ea\u6211\u6ce8\u610f\u5206\u652f\u548c\u6ce8\u610f\u7ade\u4e89\u673a\u5236\u90fd\u6709\u52a9\u4e8eMHSA-Net\u7684\u6027\u80fd\u63d0\u9ad8\u3002MHSA-Net\u5728\u6709<strong>\u906e\u6321\u7684\u56fe\u50cf<\/strong>\u4e0a\u4f5c\u7528\u6df1\u8fdc\u3002<\/p>\n\n\n\n<p>\u5bf9\u4e8e\u5e94\u7528\u7a0b\u5e8f\u6765\u8bf4\uff0c<strong>\u91cd\u8981\u7684\u662f\uff0ctransformer\u5728\u6240\u6709\u8ba1\u7b97\u8fc7\u7a0b\u4e2d\u4fdd\u6301token\u6570\u91cf<\/strong>\u3002\u7531\u4e8etoken\u4e0eimage patches\u6709<strong>\u4e00\u5bf9\u4e00<\/strong>\u7684\u5bf9\u5e94\u5173\u7cfb\uff0c\u8fd9\u610f\u5473\u7740ViT\u7f16\u7801\u5668\u5728\u6240\u6709transformer\u9636\u6bb5\u4fdd\u6301\u521d\u59cb\u5d4c\u5165\u7684\u7a7a\u95f4\u5206\u8fa8\u7387\u3002\u6b64\u5916\uff0cMHSA\u662f\u4e00\u4e2a\u5168\u5c40\u64cd\u4f5c\uff0c\u56e0\u4e3a\u6bcf\u4e2atoken\u90fd\u53ef\u4ee5\u5173\u6ce8\u5e76\u5f71\u54cd\u5176\u4ed6token\u3002\u56e0\u6b64\uff0ctransformer\u5728\u521d\u59cb\u5d4c\u5165\u540e\u7684\u6bcf\u4e2a\u9636\u6bb5<strong>\u90fd\u6709<\/strong>\u4e00\u4e2a\u5168\u5c40\u7684\u63a5\u53d7\u57df\u3002<strong>\u8fd9\u4e0e\u5377\u79ef\u7f51\u7edc\u5f62\u6210\u4e86\u9c9c\u660e\u7684\u5bf9\u6bd4<\/strong>\uff0c\u5377\u79ef\u7f51\u7edc\u968f\u7740\u7279\u5f81\u901a\u8fc7\u8fde\u7eed\u7684\u5377\u79ef\u548c\u4e0b\u91c7\u6837\u5c42\u65f6\uff0c<strong>\u9010\u6e10\u589e\u52a0<\/strong>\u4e86\u5b83\u4eec\u7684\u63a5\u53d7\u57df\u3002&nbsp;<\/p>\n\n\n\n<p>\u5177\u4f53\u800c\u8a00\uff0cViT\u901a\u8fc7\u5904\u7406<strong>\u6240\u6709\u4e0d\u91cd\u53e0\u7684\u6b63\u65b9\u5f62\u6591\u5757<\/strong>\u4ece\u56fe\u50cf\u4e2d<strong>\u63d0\u53d6<\/strong>\u5d4c\u5165\u7684\u8865\u4e01\u4ece\u56fe\u50cf\u4e2d\u83b7\u5f97<img alt=\"p^{2}\" src=\"https:\/\/latex.codecogs.com\/gif.latex?p%5E%7B2%7D\">\u50cf\u7d20\u7684\u5927\u5c0f\u3002\u8fd9\u4e9b\u8865\u4e01\u88ab<strong>\u6241\u5e73(flattened into)<\/strong>\u5230\u5411\u91cf\u4e2d\uff0c\u5e76\u4f7f\u7528\u7ebf\u6027\u6295\u5f71\u5355\u72ec\u5d4c\u5165\u3002\u53e6\u4e00\u79cd\uff0c\u66f4\u5177\u6837\u672c\u6548\u7387\u7684ViT\u53d8\u4f53\u901a\u8fc7\u5bf9\u56fe\u50cf\u5e94\u7528ResNet50\u6765\u63d0\u53d6\u5d4c\u5165\uff0c\u5e76\u4f7f\u7528\u751f\u6210\u7684\u7279\u5f81\u6620\u5c04\u7684\u50cf\u7d20\u7279\u5f81\u4f5c\u4e3a\u6807\u8bb0\u3002\u7531\u4e8etransformer\u662fset-to-set functions\uff0c\u56e0\u6b64\u5b83\u4eec<strong>\u672c\u8d28\u4e0a<\/strong>\u5e76\u4e0d\u4fdd\u7559\u5355\u4e2atoken\u7684\u7a7a\u95f4\u4f4d\u7f6e\u4fe1\u606f\u3002\u56e0\u6b64\uff0c\u56fe\u50cf\u5d4c\u5165\u4e0e\u53ef\u5b66\u4e60\u7684\u4f4d\u7f6e\u5d4c\u5165\u8fde\u63a5\uff0c\u4ee5\u5c06\u8fd9\u4e9b\u4fe1\u606f\u6dfb\u52a0\u5230\u8868\u793a\u4e2d\u3002\u5728NLP\u4e2d\u7684\u5de5\u4f5c\u4e4b\u540e\uff0cViT\u8fd8\u6dfb\u52a0\u4e86\u4e00\u4e2a\u4e0e\u8f93\u5165\u56fe\u50cf\u4e0d\u76f8\u5173\u7684special token\uff08readout token\uff09\uff0c\u5e76\u4f5c\u4e3a\u6700\u7ec8\u7528\u4e8e\u5206\u7c7b\u7684\u5168\u5c40\u56fe\u50cf\u8868\u793a\u3002\u5728\u6b64\u5c06\u8fd9\u4e2a\u7279\u6b8a\u7684\u6807\u8bb0\u79f0\u4e3a\u8bfb\u51fa\u6807\u8bb0\u3002<\/p>\n\n\n\n<h4><strong>Convolutional decoder<\/strong><\/h4>\n\n\n\n<p>\u89e3\u7801\u5668\u5c06tokens\u7ec4\u5408\u6210\u4e0d\u540c\u5206\u8fa8\u7387\u7684\u7c7b\u56fe\u50cf\u7279\u5f81\u8868\u793a\u3002\u7279\u5f81\u8868\u793a\u9010\u6e10\u878d\u5408\u5230\u6700\u7ec8\u7684\u5bc6\u96c6\u9884\u6d4b\u4e2d\u3002\u6587\u7ae0\u63d0\u51fa\u4e86\u4e00\u4e2a\u7b80\u5355\u7684\u4e09\u9636\u6bb5\u91cd\u7ec4\u64cd\u4f5c\uff0c\u4ee5<strong>\u4ecetransformer&nbsp;<\/strong><strong>encoder<\/strong><strong>\u4efb\u610f\u5c42\u8f93\u51fa\u7684token<\/strong>\u4e2d\u6062\u590d\u7c7b\u56fe\u50cf\u7684\u8868\u793a\u5f62\u5f0f<\/p>\n\n\n\n<p><strong>\u4e0d\u7ba1\u5177\u4f53\u7684transformer\u4e3b\u5e72\u5982\u4f55\uff0c\u90fd\u5728\u56db\u4e2a\u4e0d\u540c\u7684\u9636\u6bb5\u548c\u56db\u4e2a\u4e0d\u540c\u7684\u5206\u8fa8\u7387\u4e0a\u91cd\u65b0\u7ec4\u88c5\u7279\u5f81\u3002<\/strong>\u4ee5\u66f4\u4f4e\u5206\u8fa8\u7387\u7ec4\u88c5transformer\u6df1\u5c42\u7684\u7279\u5f81\uff0c\u800c\u65e9\u671f\u5c42\u7684\u7279\u5f81\u4ee5\u66f4\u9ad8\u5206\u8fa8\u7387\u7ec4\u88c5\u3002\u5f53<strong>\u4f7f\u7528ViT-Large<\/strong>\u65f6\uff0c\u4ece<em>&nbsp;l<\/em>&nbsp;={5\uff0c12\uff0c18\uff0c24}\u5c42\u91cd\u65b0\u7ec4\u88c5tokens\uff0c\u800c<strong>\u4f7f\u7528ViT-Base<\/strong>\uff0c\u4f7f\u7528&nbsp;<em>l<\/em>&nbsp;={3\uff0c6\uff0c9\uff0c12}\u5c42\u3002\u5f53\u4f7f\u7528<strong>ViT-Hybrid\u65f6<\/strong>\uff0c\u4f7f\u7528\u4e86\u6765\u81ea\u5d4c\u5165\u7f51\u7edc\u7684\u7b2c\u4e00\u548c\u7b2c\u4e8c\u4e2aResNet\u5757\u548c\u9636\u6bb5&nbsp;<em>l<\/em>&nbsp;={9,12}\u7684\u7279\u6027\u3002\u9ed8\u8ba4\u4f53\u7cfb\u7ed3\u6784<strong>\u4f7f\u7528\u6295\u5f71\u4f5c\u4e3a\u8bfb\u51fa\u64cd\u4f5c<\/strong>\uff0c\u5e76\u4f7f\u7528<img alt=\"\\hat{D}\" src=\"https:\/\/latex.codecogs.com\/gif.latex?%5Chat%7BD%7D\">=256\u7ef4\u5ea6\u751f\u6210\u7279\u6027\u6620\u5c04\uff0c\u5c06\u8fd9\u4e9b\u67b6\u6784\u5206\u522b\u79f0\u4e3a<strong>DPT-Base\u3001DPT-Large\u548cDPTHybrid\u3002<\/strong><\/p>\n\n\n\n<p>\u6700\u540e\uff0c\u4f7f\u7528\u57fa\u4e8e<strong>RefineNet<\/strong>\u7684\u7279\u5f81\u878d\u5408\u5757\u7ed3\u5408\u4ece\u8fde\u7eed\u9636\u6bb5\u63d0\u53d6\u7684\u7279\u5f81\u56fe\uff0c\u5e76\u5728\u6bcf\u4e2a\u878d\u5408\u9636\u6bb5\u5bf9\u8868\u793a\u5411<strong>\u4e0a\u91c7\u6837\u4e24\u6b21<\/strong>\u3002\u6700\u7ec8\u7684\u8868\u793a\u5927\u5c0f\u7684\u5206\u8fa8\u7387\u662f\u8f93\u5165\u56fe\u50cf\u7684\u4e00\u534a\uff0c\u5728\u6b64\uff0c\u9644\u52a0\u4e00\u4e2a\u7279\u5b9a\u4e8e\u4efb\u52a1\u7684\u8f93\u51fa\u5934\u6765\u4ea7\u751f\u6700\u7ec8\u7684\u9884\u6d4b\u3002\u5b8c\u6574\u67b6\u6784\u7684\u793a\u610f\u56fe\u6982\u8ff0\u5982\u4e0a\u56fe\u6240\u793a\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"1024\" height=\"616\" src=\"http:\/\/139.9.1.231\/wp-content\/uploads\/2023\/02\/image-26-1024x616.png\" alt=\"\" class=\"wp-image-12730\" srcset=\"http:\/\/139.9.1.231\/wp-content\/uploads\/2023\/02\/image-26-1024x616.png 1024w, http:\/\/139.9.1.231\/wp-content\/uploads\/2023\/02\/image-26-300x181.png 300w, http:\/\/139.9.1.231\/wp-content\/uploads\/2023\/02\/image-26-768x462.png 768w, http:\/\/139.9.1.231\/wp-content\/uploads\/2023\/02\/image-26.png 1490w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>\u4f5c\u8005\u5355\u4f4d\uff1aIntel Labs https:\/\/arxiv.org\/abs\/2103.13413 https: &hellip; <a href=\"http:\/\/139.9.1.231\/index.php\/2023\/02\/06\/vision-transformers-for-dense-prediction\/\" class=\"more-link\">\u7ee7\u7eed\u9605\u8bfb<span class=\"screen-reader-text\">\u3010\u6df1\u5ea6\u4f30\u8ba1 Transformer\u3011Vision Transformers for Dense Prediction<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[35,36,9],"tags":[],"_links":{"self":[{"href":"http:\/\/139.9.1.231\/index.php\/wp-json\/wp\/v2\/posts\/12435"}],"collection":[{"href":"http:\/\/139.9.1.231\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/139.9.1.231\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/139.9.1.231\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/139.9.1.231\/index.php\/wp-json\/wp\/v2\/comments?post=12435"}],"version-history":[{"count":23,"href":"http:\/\/139.9.1.231\/index.php\/wp-json\/wp\/v2\/posts\/12435\/revisions"}],"predecessor-version":[{"id":12737,"href":"http:\/\/139.9.1.231\/index.php\/wp-json\/wp\/v2\/posts\/12435\/revisions\/12737"}],"wp:attachment":[{"href":"http:\/\/139.9.1.231\/index.php\/wp-json\/wp\/v2\/media?parent=12435"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/139.9.1.231\/index.php\/wp-json\/wp\/v2\/categories?post=12435"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/139.9.1.231\/index.php\/wp-json\/wp\/v2\/tags?post=12435"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}