{"id":6654,"date":"2022-08-30T11:39:00","date_gmt":"2022-08-30T03:39:00","guid":{"rendered":"http:\/\/139.9.1.231\/?p=6654"},"modified":"2022-08-29T11:42:06","modified_gmt":"2022-08-29T03:42:06","slug":"deeplab-v2","status":"publish","type":"post","link":"http:\/\/139.9.1.231\/index.php\/2022\/08\/30\/deeplab-v2\/","title":{"rendered":"Deeplab v2"},"content":{"rendered":"\n<p><strong>DeepLabv2\uff1a<\/strong><br><a href=\"https:\/\/arxiv.org\/abs\/1606.00915\" target=\"_blank\" rel=\"noreferrer noopener\">DeepLab: Semantic Image Segmentation with Deep Convolutional Nets, Atrous Convolution, and Fully Connected CRFs<\/a><\/p>\n\n\n\n<p>TPAMI 2018<\/p>\n\n\n\n<p>Deeplab v2 \u4e25\u683c\u4e0a\u7b97\u662fDeeplab v1\u7248\u672c\u7684\u4e00\u6b21\u4e0d\u5927\u7684\u66f4\u65b0\uff0c\u5728v1\u7684\u7a7a\u6d1e\u5377\u79ef\u548cCRF\u57fa\u7840\u4e0a\uff0c\u91cd\u70b9\u5173\u6ce8\u4e86\u7f51\u7edc\u5bf9\u4e8e\u591a\u5c3a\u5ea6\u95ee\u9898\u7684\u9002\u7528\u6027\u3002<strong>\u591a\u5c3a\u5ea6\u95ee\u9898<\/strong>\u4e00\u76f4\u662f\u76ee\u6807\u68c0\u6d4b\u548c\u8bed\u4e49\u5206\u5272\u4efb\u52a1\u7684\u91cd\u8981\u6311\u6218\u4e4b\u4e00\uff0c\u4ee5\u5f80\u5b9e\u73b0\u591a\u5c3a\u5ea6\u7684\u60ef\u5e38\u505a\u6cd5\u662f\u5bf9\u540c\u4e00\u5f20\u56fe\u7247\u8fdb\u884c\u4e0d\u540c\u5c3a\u5bf8\u7684\u7f29\u653e\u540e\u83b7\u53d6\u5bf9\u5e94\u7684\u5377\u79ef\u7279\u5f81\u56fe\uff0c\u7136\u540e\u5c06\u4e0d\u540c\u5c3a\u5bf8\u7684\u7279\u5f81\u56fe\u5206\u522b\u4e0a\u91c7\u6837\u540e\u518d\u878d\u5408\u6765\u83b7\u53d6\u591a\u5c3a\u5ea6\u4fe1\u606f\uff0c\u4f46\u8fd9\u79cd\u505a\u6cd5\u6700\u5927\u7684\u7f3a\u70b9\u5c31\u662f\u8ba1\u7b97\u5f00\u9500\u592a\u5927\u3002Deeplab v2\u501f\u9274\u4e86\u7a7a\u95f4\u91d1\u5b57\u5854\u6c60\u5316\uff08Spatial Pyramaid Pooling, SPP\uff09\u7684\u601d\u8def\uff0c\u63d0\u51fa\u4e86\u57fa\u4e8e\u7a7a\u6d1e\u5377\u79ef\u7684\u7a7a\u95f4\u91d1\u5b57\u5854\u6c60\u5316\uff08Atrous Spatial Pyramaid Pooling, ASPP\uff09\uff0c\u8fd9\u4e5f\u662fDeeplab v2\u6700\u5927\u7684\u4eae\u70b9\u3002\u63d0\u51faDeeplab v2\u7684\u8bba\u6587\u4e3aDeepLab: Semantic Image Segmentation with Deep Convolutional Nets, Atrous Convolution, and Fully Connected CRFs\uff0c\u662fDeeplab\u7cfb\u5217\u7f51\u7edc\u4e2d\u524d\u671f\u7ed3\u6784\u7684\u91cd\u8981\u4ee3\u8868\u3002<\/p>\n\n\n\n<p><strong>ASPP\u6765\u6e90\u4e8eR-CNN\uff08Regional CNN\uff09\u76ee\u6807\u68c0\u6d4b\u9886\u57df\u4e2dSPP\u7ed3\u6784\uff0c\u8be5\u65b9\u6cd5\u8868\u660e\u4efb\u610f\u5c3a\u5ea6\u7684\u56fe\u50cf\u533a\u57df\u53ef\u4ee5\u901a\u8fc7\u5bf9\u5355\u4e00\u5c3a\u5ea6\u63d0\u53d6\u7684\u5377\u79ef\u7279\u5f81\u8fdb\u884c\u91cd\u91c7\u6837\u800c\u51c6\u786e\u6709\u6548\u5730\u5206\u7c7b\u3002ASPP\u5728\u5176\u57fa\u7840\u4e0a\u5c06\u666e\u901a\u5377\u79ef\u6539\u4e3a\u7a7a\u6d1e\u5377\u79ef\uff0c\u901a\u8fc7\u4f7f\u7528\u591a\u4e2a\u4e0d\u540c\u6269\u5f20\u7387\u4e14\u5e76\u884c\u7684\u7a7a\u6d1e\u5377\u79ef\u8fdb\u884c\u7279\u5f81\u63d0\u53d6\uff0c\u6700\u540e\u5728\u5bf9\u6bcf\u4e2a\u5206\u652f\u8fdb\u884c\u878d\u5408\u3002ASPP\u7ed3\u6784\u5982\u4e0b\u56fe\u6240\u793a\u3002<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" width=\"848\" height=\"428\" src=\"http:\/\/139.9.1.231\/wp-content\/uploads\/2022\/08\/image-440.png\" alt=\"\" class=\"wp-image-6660\" srcset=\"http:\/\/139.9.1.231\/wp-content\/uploads\/2022\/08\/image-440.png 848w, http:\/\/139.9.1.231\/wp-content\/uploads\/2022\/08\/image-440-300x151.png 300w, http:\/\/139.9.1.231\/wp-content\/uploads\/2022\/08\/image-440-768x388.png 768w\" sizes=\"(max-width: 848px) 100vw, 848px\" \/><\/figure>\n\n\n\n<p>\u9664\u4e86ASPP\u4e4b\u5916\uff0cDeeplab v2\u8fd8\u5c06v1\u4e2dVGG-16\u7684\u4e3b\u5e72\u7f51\u7edc\u6362\u6210\u4e86ResNet-101\uff0c\u7b97\u662f\u5bf9\u7f16\u7801\u5668\u7684\u4e00\u6b21\u5347\u7ea7\uff0c\u4f7f\u5176\u5177\u5907\u66f4\u5f3a\u7684\u7279\u5f81\u63d0\u53d6\u80fd\u529b\u3002Deeplab v2\u5728PASCAL VOC\u548cCityscapes\u7b49\u8bed\u4e49\u5206\u5272\u6570\u636e\u96c6\u4e0a\u5747\u53d6\u5f97\u4e86\u5f53\u65f6\u7684SOTA\u7ed3\u679c\u3002\u5173\u4e8eASPP\u6a21\u5757\u7684\u4e00\u4e2a\u7b80\u5355\u5b9e\u73b0\u53c2\u8003\u5982\u4e0b\u4ee3\u7801\u6240\u793a\uff0c\u5148\u662f\u5206\u522b\u5b9a\u4e49\u4e86ASPP\u7684\u5377\u79ef\u548c\u6c60\u5316\u65b9\u6cd5\uff0c\u7136\u540e\u5728\u5176\u57fa\u7840\u4e0a\u5b9a\u4e49\u4e86ASPP\u6a21\u5757\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\r\n### \u5b9a\u4e49ASPP\u5377\u79ef\u65b9\u6cd5\r\nclass ASPPConv(nn.Sequential):\r\n    def __init__(self, in_channels, out_channels, dilation):\r\n        modules = &#91;\r\n            nn.Conv2d(in_channels, out_channels, 3, padding=dilation,\r\n                      dilation=dilation, bias=False),\r\n            nn.BatchNorm2d(out_channels),\r\n            nn.ReLU(inplace=True)\r\n        ]\r\n        super(ASPPConv, self).__init__(*modules)\r\n\r\n  ### \u5b9a\u4e49ASPP\u6c60\u5316\u65b9\u6cd5\r\nclass ASPPPooling(nn.Sequential):\r\n    def __init__(self, in_channels, out_channels):\r\n        super(ASPPPooling, self).__init__(\r\n            nn.AdaptiveAvgPool2d(1),\r\n            nn.Conv2d(in_channels, out_channels, 1, bias=False),\r\n            nn.BatchNorm2d(out_channels),\r\n            nn.ReLU(inplace=True))\r\n\r\n    def forward(self, x):\r\n        size = x.shape&#91;-2:]\r\n        x = super(ASPPPooling, self).forward(x)\r\n        return F.interpolate(x, size=size, mode='bilinear',\r\n align_corners=False)\r\n\r\n### \u5b9a\u4e49ASPP\u6a21\u5757\r\nclass ASPP(nn.Module):\r\n    def __init__(self, in_channels, atrous_rates):\r\n        super(ASPP, self).__init__()\r\n        out_channels = 256\r\n        modules = &#91;]\r\n        modules.append(nn.Sequential(\r\n            nn.Conv2d(in_channels, out_channels, 1, bias=False),\r\n            nn.BatchNorm2d(out_channels),\r\n            nn.ReLU(inplace=True)))\r\n\r\n        rate1, rate2, rate3 = tuple(atrous_rates)\r\n        modules.append(ASPPConv(in_channels, out_channels, rate1))\r\n        modules.append(ASPPConv(in_channels, out_channels, rate2))\r\n        modules.append(ASPPConv(in_channels, out_channels, rate3))\r\n        modules.append(ASPPPooling(in_channels, out_channels))\r\n\r\n        self.convs = nn.ModuleList(modules)\r\n\r\n        self.project = nn.Sequential(\r\n            nn.Conv2d(5 * out_channels, out_channels, 1, bias=False),\r\n            nn.BatchNorm2d(out_channels),\r\n            nn.ReLU(inplace=True),\r\n            nn.Dropout(0.1),)\r\n\r\n  # ASPP\u524d\u5411\u8ba1\u7b97\u6d41\u7a0b\r\n    def forward(self, x):\r\n        res = &#91;]\r\n        for conv in self.convs:\r\n            res.append(conv(x))\r\n        res = torch.cat(res, dim=1)\r\n        return self.project(res)\r\n<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" width=\"940\" height=\"534\" src=\"http:\/\/139.9.1.231\/wp-content\/uploads\/2022\/08\/image-441.png\" alt=\"\" class=\"wp-image-6663\" srcset=\"http:\/\/139.9.1.231\/wp-content\/uploads\/2022\/08\/image-441.png 940w, http:\/\/139.9.1.231\/wp-content\/uploads\/2022\/08\/image-441-300x170.png 300w, http:\/\/139.9.1.231\/wp-content\/uploads\/2022\/08\/image-441-768x436.png 768w\" sizes=\"(max-width: 940px) 100vw, 940px\" \/><\/figure>\n\n\n\n<p>\u4e0b\u56fe\u662fDeeplab v2\u5728Cityscapes\u6570\u636e\u96c6\u4e0a\u7684\u5206\u5272\u6548\u679c\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" width=\"753\" height=\"350\" src=\"http:\/\/139.9.1.231\/wp-content\/uploads\/2022\/08\/image-442.png\" alt=\"\" class=\"wp-image-6665\" srcset=\"http:\/\/139.9.1.231\/wp-content\/uploads\/2022\/08\/image-442.png 753w, http:\/\/139.9.1.231\/wp-content\/uploads\/2022\/08\/image-442-300x139.png 300w\" sizes=\"(max-width: 753px) 100vw, 753px\" \/><\/figure>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>DeepLabv2\uff1aDeepLab: Semantic Image Segmentation with Dee &hellip; <a href=\"http:\/\/139.9.1.231\/index.php\/2022\/08\/30\/deeplab-v2\/\" class=\"more-link\">\u7ee7\u7eed\u9605\u8bfb<span class=\"screen-reader-text\">Deeplab v2<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[24],"tags":[],"_links":{"self":[{"href":"http:\/\/139.9.1.231\/index.php\/wp-json\/wp\/v2\/posts\/6654"}],"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=6654"}],"version-history":[{"count":8,"href":"http:\/\/139.9.1.231\/index.php\/wp-json\/wp\/v2\/posts\/6654\/revisions"}],"predecessor-version":[{"id":6666,"href":"http:\/\/139.9.1.231\/index.php\/wp-json\/wp\/v2\/posts\/6654\/revisions\/6666"}],"wp:attachment":[{"href":"http:\/\/139.9.1.231\/index.php\/wp-json\/wp\/v2\/media?parent=6654"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/139.9.1.231\/index.php\/wp-json\/wp\/v2\/categories?post=6654"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/139.9.1.231\/index.php\/wp-json\/wp\/v2\/tags?post=6654"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}