{"notes":[{"id":"text-detection/dbnet_puls_puls","category":"text-detection","legacyPath":"text-detection/2202-dbnet_puls_puls","legacySlug":"2202-dbnet_puls_puls","legacyPaths":["text_detection/dbnet_pp"],"title":"DBNet++","subtitle":"自适应特征融合","author":"Z. Yuan","paperDate":"2022-02-21","publishedOn":"2024-09-14","paperTitle":"Real-Time Scene Text Detection with Differentiable Binarization and Adaptive Scale Fusion","paperUrl":"https://arxiv.org/abs/2202.10304","bibliography":{"title":"Real-Time Scene Text Detection with Differentiable Binarization and Adaptive Scale Fusion","authors":["Minghui Liao","Zhisheng Zou","Zhaoyi Wan","Cong Yao","Xiang Bai"],"url":"https://arxiv.org/abs/2202.10304","pdfUrl":"https://arxiv.org/pdf/2202.10304","codeUrl":null,"preprint":{"id":"2202.10304","submittedOn":"2022-02-21","url":"https://arxiv.org/abs/2202.10304"},"publication":{"venue":"IEEE Transactions on Pattern Analysis and Machine Intelligence","shortVenue":"IEEE TPAMI","year":2023,"kind":"journal","url":"https://doi.org/10.1109/tpami.2022.3155612"},"citation":"@misc{textdetectiondbnetpulspuls2022,\n  title = {{Real-Time Scene Text Detection with Differentiable Binarization and Adaptive Scale Fusion}},\n  author = {Minghui Liao and Zhisheng Zou and Zhaoyi Wan and Cong Yao and Xiang Bai},\n  year = {2022},\n  eprint = {2202.10304},\n  archivePrefix = {arXiv},\n  url = {https://arxiv.org/abs/2202.10304}\n}\n","citationPath":"/content/papers/citations/text-detection/dbnet_puls_puls.1fbd29e643ae.bib"},"thumbnail":{"src":"/content/papers/assets/beea09a7541d614949a30d8d5019997d84a3338ed45a09b6bf0e3ff6ea9647ca.jpg","width":1390,"height":404},"locale":"zh-hans","path":"/content/papers/zh-hans/text-detection/dbnet_puls_puls.afdf66143eec.md","headings":[{"id":"定义问题","text":"定义问题","depth":2},{"id":"解决问题","text":"解决问题","depth":2},{"id":"模型架构","text":"模型架构","depth":3},{"id":"自适应尺度融合","text":"自适应尺度融合","depth":3},{"id":"讨论","text":"讨论","depth":2},{"id":"和原始-dbnet-的比较","text":"和原始 DBNet 的比较","depth":3},{"id":"可视化","text":"可视化","depth":3},{"id":"结论","text":"结论","depth":2}],"anchorAliases":{},"guide":null,"relatedReading":[{"id":"text-detection/dbnet","relation":"background","topic":"文字检测的可微分二值化"}]},{"id":"text-detection/dbnet","category":"text-detection","legacyPath":"text-detection/1911-dbnet","legacySlug":"1911-dbnet","legacyPaths":[],"title":"DBNet","subtitle":"可微分二值化函数","author":"Z. Yuan","paperDate":"2019-11-20","publishedOn":"2024-09-13","paperTitle":"Real-time Scene Text Detection with Differentiable Binarization","paperUrl":"https://arxiv.org/abs/1911.08947","bibliography":{"title":"Real-time Scene Text Detection with Differentiable Binarization","authors":["Minghui Liao","Zhaoyi Wan","Cong Yao","Kai Chen","Xiang Bai"],"url":"https://arxiv.org/abs/1911.08947","pdfUrl":"https://arxiv.org/pdf/1911.08947","codeUrl":null,"preprint":{"id":"1911.08947","submittedOn":"2019-11-20","url":"https://arxiv.org/abs/1911.08947"},"publication":{"venue":"AAAI","year":2020,"kind":"conference","url":"https://arxiv.org/abs/1911.08947"},"citation":"@misc{textdetectiondbnet2019,\n  title = {{Real-time Scene Text Detection with Differentiable Binarization}},\n  author = {Minghui Liao and Zhaoyi Wan and Cong Yao and Kai Chen and Xiang Bai},\n  year = {2019},\n  eprint = {1911.08947},\n  archivePrefix = {arXiv},\n  url = {https://arxiv.org/abs/1911.08947}\n}\n","citationPath":"/content/papers/citations/text-detection/dbnet.c65cebf2c87e.bib"},"thumbnail":{"src":"/content/papers/assets/73a1e6296e7d2320f1a6cccee3464096301401ef8edba1128745a2951d63bac2.jpg","width":3914,"height":1342},"locale":"zh-hans","path":"/content/papers/zh-hans/text-detection/dbnet.ff1e680b24ab.md","headings":[{"id":"定义问题","text":"定义问题","depth":2},{"id":"解决问题","text":"解决问题","depth":2},{"id":"模型架构","text":"模型架构","depth":3},{"id":"标签生成","text":"标签生成","depth":3},{"id":"损失函数","text":"损失函数","depth":3},{"id":"训练数据集","text":"训练数据集","depth":3},{"id":"讨论","text":"讨论","depth":2},{"id":"消融实验","text":"消融实验","depth":3},{"id":"曲线文本实验结果","text":"曲线文本实验结果","depth":3},{"id":"icdar-2015-实验结果","text":"ICDAR 2015 实验结果","depth":3},{"id":"可视化结果","text":"可视化结果","depth":3},{"id":"结论","text":"结论","depth":2}],"anchorAliases":{},"guide":null,"relatedReading":[{"id":"text-detection/dbnet_puls_puls","relation":"next","topic":"文字检测的可微分二值化"}]}],"text":"在撰写 DBNet 系列的笔记时，我们一直在想 DBNet 的名字到底是 DB 还是 DBNet？\n\n在第一版本的论文中，完全没有提到 DBNet 这个名字，因此在其他文献的引用中，全部都称之为 DB。后来在这篇论文中，终于看到作者对于自己模型的称呼叫做 DBNet，因此我们尊重作者的命名，将这个系列的论文称之为 DBNet。\n\n## 定义问题\n\n延续上一篇论文 DBNet，作者觉得模型还有进步的空间，于是在原有的架构上，优化了特征融合的方式，提出了 DBNet++。\n\n如果你没看过上一篇论文，我们建议你回去看一下，因为这里我们会省略多数重复的细节。\n\n- [**[19.11] DBNet: 可微分二值化函数**](/blog/papers/text-detection/dbnet)\n\n## 解决问题\n\n### 模型架构\n\n![模型架构](/content/papers/assets/beea09a7541d614949a30d8d5019997d84a3338ed45a09b6bf0e3ff6ea9647ca.jpg)\n\n首先是跟第一版论文几乎一样的架构，我们直接略过。\n\n请直接看到这次改动的地方，也就是上图中：**Adaptive Scale Fusion Module** 的部分。\n\n### 自适应尺度融合\n\n![自适应尺度融合模块](/content/papers/assets/12d414776bce3abd144164b3698cc50d6264bff18fa6ab9643b47ae896ff1a93.jpg)\n\n自适应尺度融合，论文中称为 `Adaptive Scale Fusion`（ASF），是作者在 DBNet 的基础上提出的一个新模块。\n\n在原本的设计中，只是单纯地把不同尺度的特征图拼接在一起，然后送入卷积层进行特征融合，就直接接后面的预测分支。\n\n而作者认为这里显然可以做得更细致，因为不同尺度的特征可能有不同的重要性，因此在融合阶段，应该计算出每个尺度在图片各位置的重要性，再决定不同尺度特征的融合程度。\n\n如上图，我们跟著作者的思路一起走一次：\n\n1. 将四个尺度的特征图调整到相同解析度，拼接后经卷积，得到 `C x H x W` 的中间特征图。\n2. 以下开始进入 `Spatial Attention` 的部分：\n   1. 沿通道做平均池化，得到 `1 x H x W` 的特征图，保留各空间位置的信息。\n   2. 经过 `Conv-ReLU` 和 `Conv-Sigmoid`，再拓展回 `C` 个通道，尺寸为 `C x H x W`。\n   3. 将这个特征图「加上」原本的中间特征图，再经过 `Conv-Sigmoid`，得到四个尺度各自的空间权重，尺寸为 `N x 1 x H x W`，其中 `N = 4`。\n3. 回到 `Adaptive Scale Fusion` 的部分：\n   1. 将每个尺度的权重拓展到 `C` 个通道，对应乘上该尺度的输入特征图。\n   2. 将四个加权后的特征图沿通道拼接，得到 `(N x C) x H x W` 的融合特征图。\n\n\n> [!TIP]\n> \n> 这个概念非常像我们之前看过的 SENet，差别在于 SENet 是对通道进行加权，而这里是对空间位置及不同尺度进行加权。\n> \n> - [**[17.09] SENet: 挤～～用力挤～～**](/blog/papers/lightweight/senet)\n> \n>   ![SENet 示意](/content/papers/assets/322f16ed8c782ffbdd7d7db3e8292c991908e3543dc69e1addd9238e22484363.jpg)\n\n\n## 讨论\n\n### 和原始 DBNet 的比较\n\n![DBNet 与 DBNet++ 对比](/content/papers/assets/4a2f1897a013a94c367576cf2e2d9f98db98e71705af23c7bdf525df15065dee.jpg)\n\n作者在 MSRA-TD500 和 CTW1500 数据集上进行了消融实验，这些模块包括可微分二值化（Differentiable Binarization, DB）、可变形卷积（Deformable Convolution）和自适应尺度融合（Adaptive Scale Fusion）。\n\n我们挑重点看，红色框起来的部分，就是增加了 ASF 模块后的效果。\n\n以表中红框的 ResNet-50、DConv 与 DB 都开启的两列比较，加入 ASF 后，MSRA-TD500 的 Precision 维持 91.5，Recall 从 79.2 升到 83.3；CTW1500 的 Precision 从 86.9 升到 87.9，Recall 从 80.2 升到 82.8。这两组都不能说误报变多；其他设定的 Precision 则有升有降。\n\n整体而言，在上述 ResNet-50、DConv 与 DB 都开启的条件下，F-measure 在 MSRA-TD500 和 CTW1500 上分别提高了 2.3 与 1.9 个百分点（84.9→87.2、83.4→85.3），同时推理速度由 32→29、22→21 FPS。这组结果支持 ASF 模块在两个数据集上的效果。\n\n### 可视化\n\n![可视化示例](/content/papers/assets/e10d49d3dd13e29b3562074f939e13abff44190d5411aa03b1360929e552b801.jpg)\n\n这张图每组左侧是文字侦测结果，右上是阈值图，右下是概率图；它展示的是 DB 的输出样例，不能单凭这张图量化 ASF 的增益。\n\n## 结论\n\n这篇论文中大部分的内容都和先前的 DBNet 一样，我们就不再巨细靡遗地介绍了。\n\n自适应尺度融合模块让模型能够基于输入，自动调整不同尺度特征的融合程度，这样的设计在实验中证明了有效性。虽然在推理中会降低一点推理速度，但是整体而言，提升了大约 2% 的模型的性能。\n\n算起来，也是个很不错的投资！\n","imageSizes":{"/content/papers/assets/beea09a7541d614949a30d8d5019997d84a3338ed45a09b6bf0e3ff6ea9647ca.jpg":{"width":1390,"height":404},"/content/papers/assets/12d414776bce3abd144164b3698cc50d6264bff18fa6ab9643b47ae896ff1a93.jpg":{"width":1262,"height":542},"/content/papers/assets/322f16ed8c782ffbdd7d7db3e8292c991908e3543dc69e1addd9238e22484363.jpg":{"width":1688,"height":394},"/content/papers/assets/4a2f1897a013a94c367576cf2e2d9f98db98e71705af23c7bdf525df15065dee.jpg":{"width":4432,"height":1439},"/content/papers/assets/e10d49d3dd13e29b3562074f939e13abff44190d5411aa03b1360929e552b801.jpg":{"width":1678,"height":772}}}
