Skip to content

feat: add U2NetP foreground segmentation model presets - #1587

Merged
barhanc merged 8 commits into
mainfrom
@bh/object-background-removal
Oct 29, 2026
Merged

barhanc merged 8 commits into
mainfrom
@bh/object-background-removal

Conversation

@barhanc

@barhanc barhanc commented Oct 29, 2026 •

Copy link
Copy Markdown
Member

Description

Adds generic foreground segmentation model for objects.

The other linked model (BiRefNet) is too heavy for on-device inference.

Introduces a breaking change?

  • Yes
  • No

Type of change

  • Bug fix (change which fixes an issue)
  • New feature (change which adds functionality)
  • Documentation update (improves or adds clarity to existing documentation)
  • Other (chores, tests, code style improvements etc.)

Tested on

  • iOS
  • Android

Testing instructions

Screenshots

Related issues

Closes #1569

Checklist

  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have updated the documentation accordingly
  • My changes generate no new warnings

Additional notes

@barhanc barhanc self-assigned this Oct 29, 2026
@barhanc barhanc added the model Issues related to exporting, improving, fixing ML models label Oct 29, 2026
@barhanc
barhanc force-pushed the @bh/object-background-removal branch from fb9fa95 to ed0b8c5 Compare October 29, 2026 13:27
@msluszniak
msluszniak self-requested a review October 29, 2026 13:30
@barhanc
barhanc marked this pull request as draft October 29, 2026 13:41
@msluszniak
msluszniak removed their request for review October 29, 2026 13:44
@barhanc
barhanc marked this pull request as ready for review October 29, 2026 15:29
@barhanc
barhanc requested a review from msluszniak October 29, 2026 15:29
@msluszniak

Copy link
Copy Markdown
Member

Ok, xnnpack and coreml worked correctly on iOS, now Android and we should be ready to go.

@msluszniak msluszniak left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Android worked as well on both xnnpack and vulkan. :)

@barhanc
barhanc merged commit 2e4cf78 into main Oct 29, 2026
7 checks passed
@barhanc
barhanc deleted the @bh/object-background-removal branch October 29, 2026 16:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

model Issues related to exporting, improving, fixing ML models

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add general background removal

2 participants