# ZHKKKe/MODNet

A Trimap-Free Portrait Matting Solution in Real Time [AAAI 2022]

Repository: https://github.com/ZHKKKe/MODNet
Canonical: https://ross.abutalabs.com/products/modnet
Language: Python
License: Apache-2.0
License Family: permissive
Topics: portrait-matting
Last push: 2024-05-06T14:28:28+00:00

## Health v2 (maintenance only)
Score: 32/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 0, release rhythm 35, longevity 100
- inputs: {"age_days": 2109, "days_push": 849, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 4355, forks 679 (observed 2026-08-28T04:08:46.447924+00:00)

## What it is
MODNet is a deep learning model for real-time portrait matting (background removal) that requires only an RGB image as input, with no trimap needed. It was published at AAAI 2022 and includes demos for portrait image and video matting.

## Use cases
- remove background from portrait photos
- real-time portrait video matting from webcam
- extract alpha matte from a person in an image
- blur or replace video call background
- green screen replacement without a green screen
- segment people from photos for compositing

## When to choose
- you need fast, real-time person segmentation from plain RGB images or video
- you want trimap-free portrait matting without manual annotation
- you need a lightweight model that runs on common PCs or mobile devices

## When to avoid
- you need general object segmentation beyond human portraits
- you need pixel-perfect hair and edge detail on complex backgrounds
- you need an actively developed project with frequent updates

## Facets
- artifact type: library
- maturity: maintenance
- function: image-processing, computer-vision, machine-learning, deep-learning
- domain: computer-vision, image-processing, machine-learning, deep-learning
- platform: python, cross-platform
- tags: portrait-matting, background-removal, alpha-matting, real-time, segmentation, green-screen, video-matting, linux

## Member repositories
- ZHKKKe/MODNet (main) score 32

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:08:46.447924+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T18:21:30.096297+00:00, confidence not recorded.
  - readme: https://github.com/ZHKKKe/MODNet (fetched 2026-08-28T04:08:46.447924+00:00, sha a159b8305cf1)
- Data as of 2026-08-30T08:39:29.467469+00:00.
