All models

RAN (Region Attention Network FER)

A facial expression recognizer that weighs crops of a face with self-attention and relation-attention modules.

Image classification · 472 operations Checked

100%

Showing the top corner; full diagram not loaded yetShowing a small copy; full diagram not loaded yetLarge diagram, not loaded yet

Open SVG

Loading diagram (163 KB)

Open in a new tab

Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.

At a glance

Parameters
11.2M
Operations
472
Framework
PyTorch
Recurrent
Yes
Published
IEEE Transactions on Image Processing (arXiv 2019)
Cited by
944 (as of 3 November 2026)
Authors
Kai Wang, Xiaojiang Peng, Jianfei Yang and others
Checked
Passed: the trace was replayed operation by operation and matched the model's own output for this input.

Files

The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.

Details
Stable ID
m19593
Graph hash
0498a231ac722205241a26d6d2f7554a6c475c539f0dbd51b53f7c02549e82ef
Skeleton hash
699d5d8c8cb2274837e64c21875a840b6fc0e5ae763b1ca7da0c1b6f7d7f020f
Architecture hash
07db1b7d49e3a3858d06c18226fbb902cf57c4050c0c66761e37b50190a097a6
Diagram SHA-256
b8c9141492e101f66eac3ed8bf94069e080519149a64637bf747ee6b5f3d1854
TorchLens version
2.36.0
Renderer
graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
Check
Forward pass replayed in PyTorch

What it is

RAN, the Region Attention Network, is a facial expression recognition model designed for faces that are occluded or seen in varied poses. The paper calls occlusion and pose variations two major obstacles for automatic facial expression recognition (FER), and observes that the performance of existing CNN methods degrades significantly under them.

A face image is cropped into several regions, and these regions, along with the original face, are fed into a backbone CNN for feature extraction. A self-attention module assigns an attention weight to each region using a fully-connected layer and the sigmoid function, and the region features are aggregated into a global representation. A relation-attention module then refines the weights by applying a similar attention mechanism to each region feature concatenated with the global representation. A region biased loss adds the constraint that one of the attention weights from the facial crops should be larger than that of the original face image by a margin.

With fixed position cropping there are five regions, three of them the top-left, top-right and center-down face regions at 0.75 scale ratio of the original face. For the backbone CNN the authors mainly use ResNet18 and VGG16. The paper reports accuracies of 89.16%, 59.5%, 86.9% and 56.4% on FERPlus, AffectNet, RAF-DB and SFEW, respectively. The authors also built six test datasets with occlusion and pose annotations from existing large-scale FER datasets.

Key idea. RAN aggregates a varied number of facial region features into a compact fixed-length representation with attention weights, and a region biased loss encourages high weights for the most important regions.

  • ran
  • region attention network
  • region attention networks
  • facial expression recognition
  • fer
  • occlusion robust
  • pose robust
  • region biased loss
  • rb-loss

AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.

Cite the paper

@misc{wang2019regionattentionnetworkspose,
      title={Region Attention Networks for Pose and Occlusion Robust Facial Expression Recognition}, 
      author={Kai Wang and Xiaojiang Peng and Jianfei Yang and Debin Meng and Yu Qiao},
      year={2019},
      eprint={1905.04075},
      archivePrefix={arXiv},
      primaryClass={cs.CV},
      url={https://arxiv.org/abs/1905.04075}, 
}