# xuebinqin/U-2-Net

The code for our newly accepted paper in Pattern Recognition 2020: "U^2-Net: Going Deeper with Nested U-Structure for Salient Object Detection."

Repository: https://github.com/xuebinqin/U-2-Net
Canonical: https://ross.abutalabs.com/products/u-2-net
Language: Python
License: Apache-2.0
License Family: permissive
Topics: computer-vision, deep-learning, image-background-removal, image-processing, image-segmentation, u-2-net, u2net
Last push: 2024-06-26T04:16:45+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": 2312, "days_push": 798, "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 9853, forks 1619 (observed 2026-08-28T04:10:37.500445+00:00)

## What it is
Official PyTorch implementation of U^2-Net, a nested U-structure deep network for salient object detection, published in Pattern Recognition 2020. It provides pretrained models commonly used for image background removal, portrait drawing, and object segmentation.

## Use cases
- remove background from images
- salient object detection in photos
- segment the main subject of an image
- generate portrait sketches from photos
- run object segmentation on mobile apps
- preprocess images for e-commerce product photos

## When to choose
- you need lightweight, accurate salient object detection with pretrained weights
- you want background removal to power a larger pipeline or app
- you want a well-cited research model with an Apache-2.0 license

## When to avoid
- you need general-purpose semantic segmentation of many object classes
- you need actively developed features or frequent updates
- you need real-time video segmentation on CPU-only hardware

## Facets
- artifact type: library
- maturity: maintenance
- function: image-processing, computer-vision, deep-learning, machine-learning
- domain: computer-vision, image-processing, deep-learning, machine-learning
- platform: python, cross-platform
- tags: salient-object-detection, image-segmentation, background-removal, u2net, pytorch, portrait-generation, gpu

## Member repositories
- xuebinqin/U-2-Net (main) score 32

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:10:37.500445+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-29T17:20:53.788762+00:00, confidence not recorded.
  - readme: https://github.com/xuebinqin/U-2-Net (fetched 2026-08-28T04:10:37.500445+00:00, sha 3415ba426f90)
- Data as of 2026-08-30T08:39:29.467469+00:00.
