[Paper Review] Glance and Focus Networks for Dynamic Visual Recognition
This paper proposes Glance and Focus Networks (GFNet), a dynamic inference framework that mimics human visual attention by first processing low-resolution global features (glance) and then adaptively focusing on discriminative image patches (focus) through a reinforcement learning-based region proposal mechanism. The method reduces computational cost by up to 1.3x on MobileNet-V3 with no accuracy drop, enabling efficient, adaptive inference on high-resolution images and videos.
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.
Motivation & Objective
- To address spatial redundancy in high-resolution visual recognition, where most pixels contribute little to classification.
- To enable adaptive inference that terminates early when prediction confidence is sufficient, reducing computation per input.
- To localize discriminative image regions without human annotations, using only classification labels.
- To design a general, backbone-agnostic framework compatible with efficient models like MobileNet and EfficientNet.
- To achieve high efficiency on edge devices without sacrificing accuracy.
Proposed method
- The model uses a two-stage process: a glance step that processes a low-resolution (e.g., 96×96) version of the input image to generate an initial global prediction.
- If confidence is insufficient, the model uses a reinforcement learning agent to propose a high-resolution patch (focus step) for further processing.
- The region proposal network (π) is trained via policy gradient reinforcement learning to select salient, class-discriminative regions based on deep features from two encoders.
- Each inference step uses progressively smaller inputs, enabling early termination when confidence exceeds a threshold.
- The framework is compatible with any off-the-shelf backbone (e.g., MobileNet, EfficientNet, TSM) and requires no architectural changes.
- Training involves a multi-stage process with a loss function that balances classification accuracy and policy learning.
Experimental results
Research questions
- RQ1Can a dynamic, sequential inference framework reduce computational cost in high-resolution visual recognition without accuracy loss?
- RQ2Can discriminative image regions be localized effectively using only classification labels, without bounding box or segmentation annotations?
- RQ3How does the glance-and-focus mechanism compare to static models in terms of latency and accuracy on diverse backbones?
- RQ4What is the optimal trade-off between model complexity and inference efficiency in adaptive visual recognition?
- RQ5Can the method be generalized across different visual tasks and backbone architectures?
Key findings
- GFNet reduces the average inference latency of MobileNet-V3 on an iPhone XS Max by 1.3× with no accuracy drop.
- The glance step alone correctly classifies a large portion of images with high confidence, validating the coarse-to-fine strategy.
- A lightweight patch proposal network with minimal parameters and GRU units achieves performance comparable to more complex designs.
- The confidence-based early termination criterion outperforms random termination and entropy-based criteria in both accuracy and efficiency.
- The method maintains strong performance across diverse backbones, including ResNet-50, MobileNet-V3, and EfficientNet.
- Tuning λ and 60–90 training epochs are sufficient to achieve saturated performance, with λ=1 and 60 epochs serving as a strong baseline.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.