# zhengpeng7/birefnet

**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/zhengpeng7-birefnet).**

3,173 stars · 250 forks · Python · mit

## Links

- GitHub: https://github.com/ZhengPeng7/BiRefNet
- Homepage: https://www.birefnet.top
- awesome-repositories: https://awesome-repositories.com/repository/zhengpeng7-birefnet.md

## Topics

`background-removal` `birefnet` `camouflaged-object-detection` `dichotomous-image-segmentation` `high-resolution-image-segmentation` `image-segmentation` `salient-object-detection`

## Description

BiRefNet is a PyTorch image segmentation framework designed for high-precision binary mask generation. It functions as a bilateral image segmentation model used to isolate foreground objects from complex backgrounds, as well as a specialized tool for camouflaged object detection and industrial defect detection.

The project is designed for export to the ONNX format, which facilitates cross-platform deployment and inference. It supports custom model fine-tuning on user-provided image and mask datasets to adapt the model for specialized professional use cases.

The system covers high-resolution image processing for dichotomous segmentation and automated quality control for industrial inspection. It includes utilities for model accuracy evaluation using standard metrics across benchmark datasets.

## Tags

### Artificial Intelligence & ML

- [Image Segmentations](https://awesome-repositories.com/f/artificial-intelligence-ml/neural-networks/image-segmentations.md) — Implements a deep learning model designed to partition images into high-resolution foreground and background masks.
- [Refinement Networks](https://awesome-repositories.com/f/artificial-intelligence-ml/bi-directional-sequence-processors/refinement-networks.md) — Implements a bi-directional refinement network to iteratively improve the precision of segmentation mask boundaries.
- [Camouflaged Object Detectors](https://awesome-repositories.com/f/artificial-intelligence-ml/computer-vision-systems/computer-vision/object-detection-tracking/object-detection/camouflaged-object-detectors.md) — Provides specialized tools for identifying and segmenting objects that are hidden or blended into their environments.
- [Image Segmentation](https://awesome-repositories.com/f/artificial-intelligence-ml/computer-vision-systems/image-segmentation.md) — Extracts high-precision masks to isolate a single object from its background. ([source](https://www.birefnet.top/))
- [Binary Segmentations](https://awesome-repositories.com/f/artificial-intelligence-ml/computer-vision-systems/image-segmentation/binary-segmentations.md) — Provides supervised binary segmentation to distinguish a single foreground object from its background.
- [Binary Mask Generators](https://awesome-repositories.com/f/artificial-intelligence-ml/computer-vision-systems/image-segmentation/object-mask-generators/point-based-mask-generators/binary-mask-generators.md) — Generates precise pixel-level binary masks for high-resolution industrial and medical imagery.
- [Encoder-Decoder Architectures](https://awesome-repositories.com/f/artificial-intelligence-ml/encoder-decoder-architectures.md) — Utilizes an encoder-decoder structure to extract semantic features and restore spatial resolution for masking.
- [PyTorch Semantic Segmentation Libraries](https://awesome-repositories.com/f/artificial-intelligence-ml/pytorch-semantic-segmentation-libraries.md) — Provides a PyTorch-based framework for training and evaluating high-precision binary image segmentation.
- [Segmentation Model Training](https://awesome-repositories.com/f/artificial-intelligence-ml/computer-vision-systems/image-segmentation/segmentation-model-training.md) — Supports fine-tuning segmentation models on custom user-provided image and mask datasets.
- [Feature Map Upsamplers](https://awesome-repositories.com/f/artificial-intelligence-ml/feature-alignment/feature-map-upsamplers.md) — Uses bilinear interpolation to restore spatial resolution of feature maps during the decoding process.
- [ONNX Model Exporters](https://awesome-repositories.com/f/artificial-intelligence-ml/machine-learning/infrastructure/model-deployment-and-serving/serialization-and-export-formats/onnx-model-exporters.md) — Transforms trained model weights into the standardized ONNX format for cross-platform deployment. ([source](https://cdn.jsdelivr.net/gh/zhengpeng7/birefnet@main/README.md))
- [ONNX Model Exports](https://awesome-repositories.com/f/artificial-intelligence-ml/machine-learning/infrastructure/model-deployment-and-serving/serialization-and-export-formats/onnx-model-exports.md) — Enables conversion of vision models into the ONNX format for cross-engine compatibility.

### Part of an Awesome List

- [Vision Model Fine-Tuning](https://awesome-repositories.com/f/awesome-lists/ai/model-training-and-fine-tuning/vision-model-fine-tuning.md) — Supports adapting the pretrained segmentation model to specialized professional use cases using custom image and mask datasets. ([source](https://cdn.jsdelivr.net/gh/zhengpeng7/birefnet@main/README.md))

### Graphics & Multimedia

- [AI Foreground Isolation](https://awesome-repositories.com/f/graphics-multimedia/video-post-production-effects/ai-foreground-isolation.md) — Extracts high-resolution masks to isolate primary subjects from complex backgrounds.
- [High-Resolution Masking Pipelines](https://awesome-repositories.com/f/graphics-multimedia/high-resolution-masking-pipelines.md) — Produces precise binary masks for complex, high-resolution images used in industrial and medical contexts. ([source](https://www.birefnet.top))

### Business & Productivity Software

- [Quality Defect Detection](https://awesome-repositories.com/f/business-productivity-software/manufacturing-planning-tools/quality-defect-detection.md) — Provides automated segmentation to detect defect patterns and anomalies in manufacturing components during the production process. ([source](https://www.birefnet.top))

### Data & Databases

- [Model Weight Conversions](https://awesome-repositories.com/f/data-databases/vector-data-formats/format-conversion-utilities/model-weight-conversions.md) — Serializes model weights into the ONNX format to enable high-performance hardware-accelerated inference.
