# zhkkke/modnet

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/zhkkke-modnet).**

4,331 stars · 678 forks · Python · Apache-2.0

## Links

- GitHub: https://github.com/ZHKKKe/MODNet
- awesome-repositories: https://awesome-repositories.com/repository/zhkkke-modnet.md

## Topics

`portrait-matting`

## Description

MODNet is a deep learning image segmenter and portrait matting model designed to isolate human subjects from backgrounds. It generates high-quality alpha mattes for images and video using only standard RGB input, removing the requirement for manual trimap guides.

The framework is optimized for real-time inference and provides utilities to export pre-trained model weights into specialized formats for deployment on target hardware.

The project covers the full workflow for portrait isolation, including supervised matting model training on labeled datasets, real-time video background removal, and edge hardware deployment.

## Tags

### Artificial Intelligence & ML

- [Portrait Segmentation](https://awesome-repositories.com/f/artificial-intelligence-ml/neural-networks/image-segmentations/portrait-segmentation.md) — Isolates human portraits from backgrounds using a specialized deep learning segmentation model. ([source](https://github.com/zhkkke/modnet#readme))
- [AI Subject Isolation](https://awesome-repositories.com/f/artificial-intelligence-ml/ai-subject-isolation.md) — Extracts human silhouettes by identifying the primary subject using an RGB-based segmentation model.
- [Trimap-Free Alpha Estimation](https://awesome-repositories.com/f/artificial-intelligence-ml/computer-vision-systems/image-segmentation/object-mask-generators/point-based-mask-generators/binary-mask-generators/mask-and-trimap-synthesis/trimap-free-alpha-estimation.md) — Predicts high-quality alpha transparency masks directly from RGB input without requiring manual trimap guides.
- [Detection Model Training](https://awesome-repositories.com/f/artificial-intelligence-ml/custom-model-training/detection-model-training.md) — Trains custom portrait matting and segmentation models using supervised training on labeled datasets. ([source](https://github.com/zhkkke/modnet#readme))
- [Inference Model Deployment](https://awesome-repositories.com/f/artificial-intelligence-ml/inference-model-deployment.md) — Converts pre-trained matting weights into optimized compute graphs for efficient hardware execution.
- [Edge Hardware Optimizations](https://awesome-repositories.com/f/artificial-intelligence-ml/machine-learning/infrastructure/model-optimization-and-inference/training-algorithms/machine-learning-optimization/ml-performance-profilers/hardware-specific-model-optimizations/edge-hardware-optimizations.md) — Optimizes model weights and formats to reduce inference latency and memory footprint on resource-constrained edge devices.
- [Matting Model Training](https://awesome-repositories.com/f/artificial-intelligence-ml/matting-model-training.md) — Supports training and optimizing portrait matting models using supervised datasets of labeled image pairs.
- [On-Device Inference Exports](https://awesome-repositories.com/f/artificial-intelligence-ml/model-training/model-exporting/production-inference-exports/on-device-inference-exports.md) — Provides utilities to export pre-trained model weights into formats optimized for edge hardware deployment.
- [Visual Stream Processing](https://awesome-repositories.com/f/artificial-intelligence-ml/multimodal-agent-capabilities/real-time-streaming/visual-stream-processing.md) — Analyzes video frames sequentially with low latency to maintain consistent subject isolation during playback.
- [Supervised Model Weight Optimization](https://awesome-repositories.com/f/artificial-intelligence-ml/supervised-model-weight-optimization.md) — Optimizes model weights for accurate edge detection using supervised training on labeled image pairs.

### Part of an Awesome List

- [Neural Networks and Deep Learning](https://awesome-repositories.com/f/awesome-lists/ai/neural-networks-and-deep-learning.md) — Implements a deep neural network architecture for pixel-level subject isolation and alpha matte generation.
- [Background removal](https://awesome-repositories.com/f/awesome-lists/more/background-removal.md) — Listed in the “Background removal” section of the Ailia Models awesome list.

### Graphics & Multimedia

- [Deep Learning Video Matting Tools](https://awesome-repositories.com/f/graphics-multimedia/deep-learning-video-matting-tools.md) — Implements a deep learning framework to separate human subjects from backgrounds in images and video.
- [Image Background Removal](https://awesome-repositories.com/f/graphics-multimedia/image-background-removal.md) — Generates alpha mattes to isolate foreground subjects from backgrounds using only standard RGB input.
- [Real-Time Portrait Matting](https://awesome-repositories.com/f/graphics-multimedia/real-time-portrait-matting.md) — Removes backgrounds from images and videos of people in real time without requiring manual trimaps.
- [Temporal Video Background Removal](https://awesome-repositories.com/f/graphics-multimedia/temporal-video-background-removal.md) — Isolates human subjects from video streams while ensuring temporal consistency across frames for clean alpha mattes.

### DevOps & Infrastructure

- [Multi-Format Exporters](https://awesome-repositories.com/f/devops-infrastructure/deployment-management/model-export-formats/multi-format-exporters.md) — Provides a toolkit to convert models into multiple optimized formats for cross-platform hardware deployment. ([source](https://github.com/zhkkke/modnet#readme))
