gca_matting
A matting network that predicts an alpha matte with a guided contextual attention module.
Segmentation · 29 operations Checked
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
- Task
- Segmentation
- Parameters
- 14.4K
- Operations
- 29
- Framework
- PyTorch
- Recurrent
- No
- Published
- AAAI (arXiv 2020)
- Cited by
- 6 (as of 5 October 2026)
- Authors
- Yaoyi Li, Hongtao Lu
- Checked
- Passed: the trace was replayed operation by operation and matched the model's own output for this input.
Files
The file opened in a new tab. Use your browser's Save command there to keep it.
The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.
Details
- Stable ID
- m11881
- Graph hash
- f8c1f87255eb1e13e168443bfc08b4cf2d8617316007f6ce4013ff4915378b7e
- Skeleton hash
- ae24c992abd6f739db24cb3fad268cfaa9567949a2ae97fef07bfefe823e7b88
- Architecture hash
- 862fd935d6964bf65dd70d8c4fcc1a04d006c5a1f3c6cca079a1d79a30f8403a
- Diagram SHA-256
- 9bf8bbbab0c719249d60bc3ccc65270c283c61f6209f40e432c7683727d2bb5c
- TorchLens version
- 2.35.3
- Renderer
- graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
- Check
- Forward pass replayed in PyTorch
How this diagram was made
menagerie.classics.gca_matting:build_gca_matting: build({}) What it is
GCA Matting is a network for natural image matting, the task of predicting an alpha matte that gives the opacity of a foreground at each pixel. The paper observes that many deep learning methods yield blurry structures or textures in the semitransparent area, and attributes this to the local ambiguity of transparent objects.
Its answer is a guided contextual attention (GCA) module, which propagates high-level opacity information globally based on a learned low-level affinity. The paper describes two feature flows, and the alpha features come from a 6-channel input that concatenates the original image and the trimap. Low-level image features are generated only from the input image. Unknown patches then share high-level alpha features with each other under the guidance of similarity between those low-level image features.
The module is combined with a customized U-Net. The paper places two guided contextual attention blocks symmetrically in the encoder and decoder. Training uses only one loss, the absolute difference between predicted and ground-truth alpha matte averaged over the unknown area. On the Composition-1k testing set, the paper reports a sum of absolute differences of 35.28 for the full model against 40.62 for its baseline without the module.
Key idea. A guided contextual attention module propagates high-level opacity information globally, guided by learned low-level affinity, inside an end-to-end matting network.
- gca matting
- gca-matting
- guided contextual attention
- natural image matting
- image matting
- alpha matting
- alpha matte
- trimap
AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.
Cite the paper
@misc{li2020naturalimagemattingguided,
title={Natural Image Matting via Guided Contextual Attention},
author={Yaoyi Li and Hongtao Lu},
year={2020},
eprint={2001.04069},
archivePrefix={arXiv},
primaryClass={cs.CV},
url={https://arxiv.org/abs/2001.04069},
}