All models

FaRL

FaRL's ViT-B/16 image encoder, pre-trained on face image-text pairs for face analysis tasks.

Image classification · 719 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 (17 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
86.2M
Operations
719
Framework
PyTorch
Recurrent
No
Published
CVPR 2022
Cited by
188 (as of 28 October 2026)
Authors
Yinglin Zheng, Hao Yang, Ting Zhang and others
License
MIT
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
m16609
Graph hash
cfb8191a6844b448eea9b4cda566381f482315b295c4d0013f8300ead76d1459
Skeleton hash
6e49017aa020f78bda9be4c3b063e626d64710259def945af2eb90e81f9e9719
Architecture hash
db3cbc3d6c68f2c104abb9b9de371e187d39d59315041d288f1c76a6b1f92062
Diagram SHA-256
2e382fcda55c3f6524b1ecc775126b733062ff1049f269b6e887344e6d984b3e
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

FaRL is a pre-trained transformer backbone for face analysis tasks. After pre-training, its image encoder can be reused for various downstream face tasks. FaRL shares its network structure with CLIP, so the released weights load into the CLIP VIT-B16 structure and are used exactly like CLIP.

The paper asks how to learn a universal facial representation that helps all face analysis tasks. Its answer has two parts: a contrastive loss learns high-level semantic meaning from image-text pairs. Masked image modeling is added alongside it so that the representation also draws on low-level information. The paper reports better transfer performance than previous pre-trained models. For the 16-epoch backbone, the README lists the paper's face parsing score on CelebAMask-HQ as an F1-mean of 89.56 and the repository's reproduction as 89.65.

Pre-training used LAION-Face, the human face subset of LAION-400M with 50 million image-text pairs, of which the 20M subset was used. Two base backbones are released, pre-trained for 16 and 64 epochs, and the README notes that the 64-epoch one improves further on most tasks.

Key idea. FaRL pre-trains a general face representation by combining image-text contrastive learning with masked image modeling.

  • farl
  • facial representation learning
  • faceclip
  • face analysis
  • face parsing
  • face alignment
  • laion-face
  • farl-base-patch16
  • face backbone

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

Cite the paper

@misc{zheng2022generalfacialrepresentationlearning,
      title={General Facial Representation Learning in a Visual-Linguistic Manner}, 
      author={Yinglin Zheng and Hao Yang and Ting Zhang and Jianmin Bao and Dongdong Chen and Yangyu Huang and Lu Yuan and Dong Chen and Ming Zeng and Fang Wen},
      year={2022},
      eprint={2112.03109},
      archivePrefix={arXiv},
      primaryClass={cs.CV},
      url={https://arxiv.org/abs/2112.03109}, 
}