All models

AlphaGAN Matting

An encoder-decoder generator that predicts an alpha matte from an image and its trimap, trained adversarially.

Segmentation · 233 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 (33 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
40.3M
Operations
233
Framework
PyTorch
Recurrent
No
Published
BMVC 2018
Cited by
92 (as of 27 October 2026)
Authors
Sebastian Lutz, Konstantinos Amplianitis, Aljosa Smolic
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
m14673
Graph hash
29caa76582a13241adf18cc652cb13e2bd6d7bad90bc8a703ca2e7c8aa6a24e1
Skeleton hash
ac0a827cb952dfb523bcd0f0a54dd29daddc2b7d3354de28c0efccc69274cea8
Architecture hash
58731feb44635baa85afbd542a7ab7f74cd65f88d0728d2bf99477b9718b4c93
Diagram SHA-256
802528776005255cc0f6f79b856698e0f15613e79922c23df14b2b6bb0462ac8
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

AlphaGAN is a generative adversarial network (GAN) for natural image matting, which its paper presents as the first GAN for the task. Its generator takes an image with the trimap appended as a fourth channel and attempts to predict the correct alpha. The discriminator is trained on images composited with the ground-truth alpha and with the predicted alpha, so it learns to recognize images that have been composited well.

The generator's encoder is a Resnet50 pretrained on Imagenet, with the convolutions in its 3rd and 4th blocks converted to dilated convolutions for a final output stride of 8. An atrous spatial pyramid pooling (ASPP) module follows, resampling features at several scales. The first layer is changed to accept the 4-channel input, with the extra channel initialized with zeros. The decoder is kept simple: several convolution layers and skip connections from the encoder, which reuse local information to capture fine structures. A final sigmoid scales the output between 0 and 1, as needed for an alpha prediction. The discriminator is the PatchGAN introduced by Isola et al.

The authors build on the encoder-decoder matting network of Xu et al. and train on the same dataset. On the alphamatting online benchmark, the paper reports the leading results at the time for the gradient error and comparable results on the other measures. The PyTorch code behind this model is an unofficial implementation, and its author notes that its results are not as good as the paper's.

Key idea. AlphaGAN trains an encoder-decoder alpha matte generator with an added adversarial loss from a discriminator that learns to classify well-composited images.

  • alphagan
  • alphagan matting
  • image matting
  • natural image matting
  • alpha matte
  • alpha matting
  • trimap
  • gan matting

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

Cite the paper

@misc{lutz2018alphagangenerativeadversarialnetworks,
      title={AlphaGAN: Generative adversarial networks for natural image matting}, 
      author={Sebastian Lutz and Konstantinos Amplianitis and Aljosa Smolic},
      year={2018},
      eprint={1807.10088},
      archivePrefix={arXiv},
      primaryClass={cs.CV},
      url={https://arxiv.org/abs/1807.10088}, 
}