[论文解读] Glance and Focus Networks for Dynamic Visual Recognition
本文提出Glance和Focus网络(GFNet),一种模拟人类视觉注意机制的动态推理框架。该框架首先处理低分辨率全局特征(glance),然后通过基于强化学习的区域提议机制,自适应地聚焦于具有判别性的图像块(focus)。该方法在MobileNet-V3上将计算成本降低最多1.3倍,且准确率无下降,实现了在高分辨率图像和视频上的高效、自适应推理。
Spatial redundancy widely exists in visual recognition tasks, i.e., discriminative features in an image or video frame usually correspond to only a subset of pixels, while the remaining regions are irrelevant to the task at hand. Therefore, static models which process all the pixels with an equal amount of computation result in considerable redundancy in terms of time and space consumption. In this paper, we formulate the image recognition problem as a sequential coarse-to-fine feature learning process, mimicking the human visual system. Specifically, the proposed Glance and Focus Network (GFNet) first extracts a quick global representation of the input image at a low resolution scale, and then strategically attends to a series of salient (small) regions to learn finer features. The sequential process naturally facilitates adaptive inference at test time, as it can be terminated once the model is sufficiently confident about its prediction, avoiding further redundant computation. It is worth noting that the problem of locating discriminant regions in our model is formulated as a reinforcement learning task, thus requiring no additional manual annotations other than classification labels. GFNet is general and flexible as it is compatible with any off-the-shelf backbone models (such as MobileNets, EfficientNets and TSM), which can be conveniently deployed as the feature extractor. Extensive experiments on a variety of image classification and video recognition tasks and with various backbone models demonstrate the remarkable efficiency of our method. For example, it reduces the average latency of the highly efficient MobileNet-V3 on an iPhone XS Max by 1.3x without sacrificing accuracy. Code and pre-trained models are available at https://github.com/blackfeather-wang/GFNet-Pytorch.
研究动机与目标
- 为解决高分辨率视觉识别中的空间冗余问题,即大多数像素对分类贡献甚微。
- 实现自适应推理,当预测置信度足够时提前终止,从而减少每个输入的计算量。
- 在无需人工标注的情况下定位具有判别性的图像区域,仅使用分类标签。
- 设计一种通用且与主干网络无关的框架,兼容MobileNet和EfficientNet等高效模型。
- 在不损失准确率的前提下,实现在边缘设备上的高效推理。
提出的方法
- 该模型采用两阶段流程:第一阶段(glance)处理输入图像的低分辨率版本(例如96×96),生成初始全局预测。
- 若置信度不足,则模型使用强化学习智能体提议一个高分辨率图像块(focus阶段)进行进一步处理。
- 区域提议网络(π)通过策略梯度强化学习进行训练,基于来自两个编码器的深度特征,选择显著且具有类别判别性的区域。
- 每个推理步骤使用逐步减小的输入尺寸,当置信度超过阈值时可实现早期终止。
- 该框架兼容任何现成的主干网络(例如MobileNet、EfficientNet、TSM),且无需架构修改。
- 训练过程为多阶段,损失函数平衡了分类准确率与策略学习。
实验结果
研究问题
- RQ1动态、顺序推理框架是否能在不损失准确率的前提下,降低高分辨率视觉识别的计算成本?
- RQ2仅使用分类标签而无需边界框或分割标注,能否有效定位具有判别性的图像区域?
- RQ3与静态模型相比,glance-and-focus机制在不同主干网络上的延迟和准确率表现如何?
- RQ4在自适应视觉识别中,模型复杂度与推理效率之间的最优权衡是什么?
- RQ5该方法能否在不同视觉任务和主干架构之间实现良好泛化?
主要发现
- GFNet在iPhone XS Max上将MobileNet-V3的平均推理延迟降低1.3倍,且准确率无下降。
- glance阶段本身即可以高置信度正确分类大量图像,验证了从粗到精策略的有效性。
- 参数量极少且GRU单元数量有限的轻量化补丁提议网络,性能可与更复杂设计相媲美。
- 基于置信度的早期终止准则,在准确率和效率方面均优于随机终止和基于熵的准则。
- 该方法在多种主干网络上均保持优异性能,包括ResNet-50、MobileNet-V3和EfficientNet。
- 调整λ并训练60–90个周期足以获得饱和性能,其中λ=1且训练60个周期可作为强大基线。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。