[Models](/models)/[Segmentation](/models?category=segmentation)/ZhengPeng7/BiRefNet

HFSegmentationMIT

# BiRefNet

by ZhengPeng7

High-resolution foreground segmentation for object masks and visual evidence cleanup

824Kdl/month

0.2B classparams

[HuggingFace](https://huggingface.co/ZhengPeng7/BiRefNet)[Run it on your own data, free](https://studio.mixpeek.com/namespaces/create?mode=managed&utm_source=homepage&utm_medium=model_page&utm_campaign=mvs_onramp)

Identifiers

Model ID

`ZhengPeng7/BiRefNet`

## Deploy BiRefNet

Single-tenant

Mixpeek has no managed extractor for this model. On a single-tenant deployment you upload the weights and a custom plugin serves them next to the rest of your pipeline.

[Read the customer-hosted guide](https://mixpeek.com/docs/customer-hosted/overview) [Talk to us about single-tenant](/demo)

## Overview

BiRefNet is the official checkpoint for Bilateral Reference for High-Resolution Dichotomous Image Segmentation. It targets foreground/background masks, salient object segmentation, and related cases where the useful evidence is an object region rather than the whole image.

On Mixpeek, BiRefNet can turn images or sampled video frames into mask metadata. Agents can use those masks to filter frames with clear foreground objects, crop objects before embedding, or remove distracting background before downstream OCR, detection, captioning, or similarity search.

## Architecture

Image-segmentation model for high-resolution dichotomous segmentation. The Hugging Face card lists Transformers support through AutoModelForImageSegmentation, MIT licensing, and tags for background removal, mask generation, camouflaged object detection, and salient object detection.

## Mixpeek SDK Integration

IngestRetrieve

// No extractor parameter takes a Hugging Face model id (checked against
// GET /v1/discovery/extractors, which returns 13), so BiRefNet runs
// on your side and the output is upserted through POST
// /v1/namespaces/{namespace\_id}/documents/upsert. On Enterprise the other
// path is to upload the weights instead: POST /v1/namespaces/{id}/models
// accepts the huggingface format and a custom plugin loads them.
const res = await fetch(
  "https://api.mixpeek.com/v1/namespaces/ns\_your\_namespace/documents/upsert",
  {
    method: "POST",
    headers: {
      Authorization: "Bearer API\_KEY",
      "Content-Type": "application/json",
    },
    body: JSON.stringify({
      collection\_id: "col\_your\_collection",
      documents: \[
        {
          document\_id: "asset-00412",
          // Boxes, masks, depth maps and anomaly scores are structured
          // results, not vectors. They go in payload and are reachable
          // through pre\_filters on a retriever, not through similarity.
          payload: {
            detections: modelOutput,
            source\_key: "archive/2026/asset-00412",
          },
        },
      \],
    }),
  },
);

// No managed alternative for an open label set. Two extractors do emit a
// bbox, for the one thing each detects: document\_graph\_extractor@v1 per
// layout block, face\_identity\_extractor@v1 per face. Nothing ships that
// returns masks, depth maps or anomaly scores.

## Capabilities

*   Foreground/background mask generation
*   High-resolution dichotomous image segmentation
*   Background removal and object isolation
*   Useful pre-processing for embeddings, OCR, and VLM captioning
*   MIT license

## Use Cases on Mixpeek

Index object masks for visual search and filtering

Crop foreground products before embedding or captioning

Clean screenshots and image evidence before OCR

Find frames where the foreground object occupies enough of the scene

## Benchmarks

Dataset

Metric

Score

Source

Hugging Face

Monthly downloads

824K

HF model metadata, June 2026

BiRefNet task coverage

Segmentation tags

DIS, camouflaged, salient object

BiRefNet model card

## Performance

Input SizeImages or sampled video frames

GPU LatencyInput dependent

GPU ThroughputBatch dependent

GPU MemoryModel dependent

Run before visual embeddings when foreground isolation improves retrieval quality

## Common Pipeline Companions

[

nomic-ai/nomic-embed-vision-v1.5

Embed foreground crops for visual retrieval

](/model/nomic-ai/nomic-embed-vision-v1.5)[

google/owlv2-large-patch14-ensemble

Add open-vocabulary labels to segmented regions

](/model/google/owlv2-large-patch14-ensemble)[

depth-anything/DA3-LARGE-1.1

Combine masks with depth for spatial retrieval filters

](/model/depth-anything/DA3-LARGE-1.1)

## Explore on Mixpeek

[

More Segmentation models

Compare alternatives in this category

](/models?category=segmentation)[

Best Computer Vision APIs

Hand-picked tools & platforms compared

](/curated-lists/best-computer-vision-apis)[

Mask-Aware Retrieval

Deep-dive technical guide

](/guides/mask-aware-retrieval-for-ai-agents)[

Feature Extractors

See how Mixpeek runs models as extractors

](/extractors)[

Mixpeek Vector Store

Store & search embeddings at scale

](/mvs)[

Pricing

Usage-based pricing for pipelines

](/pricing)[

All Curated Lists

Compare models, APIs & infrastructure

](/curated-lists)

### Specification

FrameworkHF

OrganizationZhengPeng7

FeatureSegmentation

Outputmask + label

Modalitiesvideo, image

RetrieverMask Filter

Parameters0.2B class

LicenseMIT

Downloads/mo824K

[

### Research Paper

Bilateral Reference for High-Resolution Dichotomous Image Segmentation

arxiv.org](https://arxiv.org/abs/2401.03407)

### Build a pipeline with BiRefNet

Add this model to a processing pipeline alongside other extractors. Combine with retrieval stages for end-to-end search.

[Run it on your own data, free](https://studio.mixpeek.com/namespaces/create?mode=managed&utm_source=homepage&utm_medium=model_page&utm_campaign=mvs_onramp)

### Alternative Models

[

facebook/sam-vit-huge

Segmentation

](/model/facebook/sam-vit-huge)[

facebook/sam2.1-hiera-large

Segmentation

](/model/facebook/sam2.1-hiera-large)[

facebook/sam3

Segmentation

](/model/facebook/sam3)[

facebook/sam3.1

Segmentation

](/model/facebook/sam3.1)