All models

modnet_portrait_matting

Portrait matting network that predicts an alpha matte from a single RGB image, with no trimap.

Segmentation · 36 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 (52 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
27.3K
Operations
36
Framework
PyTorch
Recurrent
No
Published
AAAI (arXiv 2020)
Cited by
156 (as of 9 October 2026)
Authors
Zhanghan Ke, Jiayu Sun, Kaican Li 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
m12031
Graph hash
6b1be6450f7cf6cedce98d4ec37f906995ee9a784f2399a1a45857d1238fbe91
Skeleton hash
ea4efb595c17b7f1637b903b4bcb7775aeef3f7a70b28398fd49aba471d2f752
Architecture hash
64191b6e5e0aaf7790d023978367390f819590497513874a8ae573a59e959a6b
Diagram SHA-256
2a2d932a75965d4a93305b8909c4ad7b99550716729b1e906b624c29ffc38dfe
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.modnet_portrait_matting:build_modnet_portrait_matting: build({})

What it is

MODNet does portrait matting: it predicts an alpha matte that can be used to extract the people in an image. It works from a single input image, without the trimap, a mask of foreground, background and unknown regions, that most matting methods take as an extra input. The paper's objection to earlier methods is that they need auxiliary inputs that are costly to obtain or run several computationally expensive stages.

The authors divide the matting objective into three parts, semantic estimation, detail prediction and semantic-detail fusion, and optimize them simultaneously through three branches of one network. In the paper the low-resolution semantic branch is MobileNetV2, chosen for real-time use. A high-resolution branch processes the transition region around the portrait. The fusion branch is a plain CNN module that combines semantics and details into the final alpha matte. An efficient ASPP module (e-ASPP) fuses multi-scale features for the semantic branch, and the paper puts it at 1% of the parameters and computational overhead of the original ASPP.

The paper reports 67 frames per second on a GTX 1080Ti GPU with an input size of 512 × 512. It also introduces PPM-100, a benchmark of 100 finely annotated portrait images with various backgrounds. On PPM-100 the paper finds that MODNet outperforms other trimap-free methods on both MSE and MAD but cannot outperform trimap-based ones.

Key idea. MODNet splits trimap-free portrait matting into semantic estimation, detail prediction and semantic-detail fusion, and optimizes the three simultaneously in one network that takes a single RGB image.

  • MODNet
  • matting objective decomposition network
  • portrait matting
  • trimap-free matting
  • alpha matte
  • real-time matting
  • background removal
  • e-ASPP
  • PPM-100

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

Cite the paper

@misc{ke2022modnetrealtimetrimapfreeportrait,
      title={MODNet: Real-Time Trimap-Free Portrait Matting via Objective Decomposition}, 
      author={Zhanghan Ke and Jiayu Sun and Kaican Li and Qiong Yan and Rynson W. H. Lau},
      year={2022},
      eprint={2011.11961},
      archivePrefix={arXiv},
      primaryClass={cs.CV},
      url={https://arxiv.org/abs/2011.11961}, 
}