Skip to content

Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.

feat(rembg): offer BiRefNet for cutouts where hair and thin edges decide the mesh

nirholas9f94864301fb
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 88fe2b850..665f9cf6b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -9,6 +9,7 @@ Public history for [three.ws](https://three.ws), newest first. New pages come fr
- **My Creations** (`/mine`): Everything you have made on three.ws in one newest-first grid: the agents you built, the 3D avatars you saved, and every model you forged, including models forged in this browser before you had an account. Open, edit, or copy a link to any of them in one click.
- **3D generation and the whole site keep working when our asset storage does not**: Early on 2026-09-07 our object storage stopped accepting the platform's credential, and because every generation parks its reference image there, 3D generation stopped on the website and in ChatGPT at the same time, agent registration could not store its manifest, and images loaded through our CDN stopped resolving. Three things changed so that a storage fault is never again a blank page. Avatars, thumbnails and models now fall back to the bucket's public domain automatically, so the site keeps rendering. When generation genuinely cannot run you get a plain message saying storage is recovering and to try again shortly, instead of a raw error from the storage vendor. And our own health checks now watch the storage credential directly and treat a silent forge as an outage rather than a quiet hour, so we hear about this class of failure before you do. `[fix, infra]`
- **A payment we cannot read now comes back with the price list, not a bare error**: When an agent pays one of our x402 endpoints and the payment header arrives mangled (truncated in transit, double-encoded, wrapped by a proxy), the answer used to be a plain 400 error with no prices in it, so the agent had nothing left to work from and no way to retry. Every rejected payment now returns the ordinary 402 with the full list of accepted rails, tokens and amounts attached, exactly as it does when a payment is simply missing. That is what the x402 spec and the OKX seller SDK both do, and it means a paying agent can always read the quote again and try once more. Only a real server fault answers without a quote. (`/docs/okx-marketplace`) `[fix, improvement]`
+- **A sharper cutout for images with hair, fur, or fine edges**: Background removal now offers BiRefNet as an optional model alongside the fast default. The default model smears wispy boundaries into a soft halo, and because every image-to-3D lane rebuilds geometry from the cut-out subject, that halo turned into real polygons on the finished mesh. BiRefNet keeps hair strands, fur, foliage, and thin straps intact. It takes about six seconds against the default's one, so it stays opt-in: pass model "birefnet" on the background-removal endpoint or pick it from the MCP tool when the edge is what matters. `[improvement, feature]`
- **Archived news stories with emoji in their summary keep their search listing**: Google Search Console flagged an archived story page for unparsable structured data. The cause: the archive trims a publisher summary to a fixed length before serving it, and the cut landed in the middle of an emoji, leaving half a character in the page data that search engines read. Trimming is now character-aware, so it never splits an emoji, a flag, or an accented letter, and the page data is checked for half characters before it is written. Around one archived story in seven thousand carried the flaw; all of them serve a valid listing now. The same fix covers the story summaries shown in link previews and the shared page descriptions across the site. (`/markets/news`) `[fix, infra]`
- **Blender tools now open three.ws avatars, which Blender alone cannot**: Most three.ws avatars are delivered in a compressed form that Blender flatly cannot read: point stock Blender at one and it refuses the file. That made the new Blender tools useless on exactly the models this platform produces. Compressed models are now unpacked automatically before Blender opens them, for both of the common compression schemes, with nothing extra to install and your original file left untouched. The answer tells you when it happened. `[fix, sdk]`
- **Keyboard focus is visible again on every /play HUD button, and the AGI filter counts clear AA contrast**: Six buttons on the /play world HUD (friends, jobs, avatar, wardrobe, shop and buy) had lost their keyboard focus ring: the page never defined the shared focus-ring colour those buttons outline with, so the browser dropped the outline entirely and a keyboard player could not see where they were. The ring is back. On /agi, the count inside a selected filter chip measured 4.37:1 against its background at 11px, just under the 4.5:1 AA floor; it now uses the primary ink and clears it comfortably. (`/play`) `[fix, improvement]`
diff --git a/api/_lib/service-catalog/services/pipeline-rembg.js b/api/_lib/service-catalog/services/pipeline-rembg.js
index a2bd07140..f1eabc3c9 100644
--- a/api/_lib/service-catalog/services/pipeline-rembg.js
+++ b/api/_lib/service-catalog/services/pipeline-rembg.js
@@ -34,7 +34,7 @@ export default {
},
model: {
type: 'string',
- enum: ['rmbg2', 'u2net', 'isnet', 'u2net_human_seg', 'silueta'],
+ enum: ['rmbg2', 'birefnet', 'u2net', 'isnet', 'u2net_human_seg', 'silueta'],
default: 'rmbg2',
},
},
diff --git a/api/_mcp3d/tools/studio.js b/api/_mcp3d/tools/studio.js
index e8b933873..48b1b3ae0 100644
--- a/api/_mcp3d/tools/studio.js
+++ b/api/_mcp3d/tools/studio.js
@@ -1211,10 +1211,10 @@ export const toolDefs = [
},
model: {
type: 'string',
- enum: ['rmbg2', 'u2net', 'isnet', 'u2net_human_seg', 'silueta'],
+ enum: ['rmbg2', 'birefnet', 'u2net', 'isnet', 'u2net_human_seg', 'silueta'],
default: 'rmbg2',
description:
- 'Background removal model. rmbg2 is highest quality; u2net_human_seg is optimised for people.',
+ 'Background removal model. rmbg2 is the fast default; birefnet (BiRefNet) keeps hair and thin edges intact at about six times the compute; u2net_human_seg is optimised for people.',
},
},
required: ['image_url'],
diff --git a/api/forge-rembg.js b/api/forge-rembg.js
index e2a33d3d4..f260803a8 100644
--- a/api/forge-rembg.js
+++ b/api/forge-rembg.js
@@ -21,7 +21,7 @@ import { createRegenProvider } from './_providers/gcp.js';
// Provider job ids are base64url JSON envelopes (packJobId in _providers/gcp.js)
// and run several hundred chars — a 64-char cap 400s every poll.
const JOB_ID_RE = /^[A-Za-z0-9_-]{20,600}$/;
-const VALID_MODELS = new Set(['rmbg2', 'u2net', 'isnet', 'u2net_human_seg', 'silueta']);
+const VALID_MODELS = new Set(['rmbg2', 'birefnet', 'u2net', 'isnet', 'u2net_human_seg', 'silueta']);
function unconfigured(res) {
return json(res, 503, {
diff --git a/api/x402/pipeline-rembg.js b/api/x402/pipeline-rembg.js
index cba3a5d05..c6de77f9a 100644
--- a/api/x402/pipeline-rembg.js
+++ b/api/x402/pipeline-rembg.js
@@ -30,7 +30,7 @@ import pipelineRembgListing from '../_lib/service-catalog/services/pipeline-remb
const ROUTE = '/api/x402/pipeline-rembg';
const SLUG = 'pipeline-rembg';
-const VALID_MODELS = new Set(['rmbg2', 'u2net', 'isnet', 'u2net_human_seg', 'silueta']);
+const VALID_MODELS = new Set(['rmbg2', 'birefnet', 'u2net', 'isnet', 'u2net_human_seg', 'silueta']);
// Single source of truth: api/_lib/service-catalog/services/pipeline-rembg.js is
// the storefront listing copy — importing it here keeps the live 402 challenge
@@ -52,7 +52,7 @@ export const INPUT_SCHEMA = {
type: 'string',
enum: [...VALID_MODELS],
default: 'rmbg2',
- description: 'Segmentation model — rmbg2 (default, general), u2net_human_seg (people), isnet, u2net, silueta.',
+ description: 'Segmentation model. rmbg2 (default, general, ~1s), birefnet (BiRefNet, cleanest hair and thin edges, ~6s), u2net_human_seg (people), isnet, u2net, silueta.',
},
},
};
diff --git a/data/changelog.json b/data/changelog.json
index dabd50d2f..794b126f1 100644
--- a/data/changelog.json
+++ b/data/changelog.json
@@ -26892,6 +26892,15 @@
"tags": [
"fix"
]
+ },
+ {
+ "date": "2026-09-07",
+ "title": "A sharper cutout for images with hair, fur, or fine edges",
+ "summary": "Background removal now offers BiRefNet as an optional model alongside the fast default. The default model smears wispy boundaries into a soft halo, and because every image-to-3D lane rebuilds geometry from the cut-out subject, that halo turned into real polygons on the finished mesh. BiRefNet keeps hair strands, fur, foliage, and thin straps intact. It takes about six seconds against the default's one, so it stays opt-in: pass model \"birefnet\" on the background-removal endpoint or pick it from the MCP tool when the edge is what matters.",
+ "tags": [
+ "improvement",
+ "feature"
+ ]
}
]
}
diff --git a/docs/oss-adoption-2026-09.md b/docs/oss-adoption-2026-09.md
new file mode 100644
index 000000000..c6fb291e8
--- /dev/null
+++ b/docs/oss-adoption-2026-09.md
@@ -0,0 +1,248 @@
+# Open-source adoption plan, September 2026
+
+A survey of open-source repos, npm packages, and model weights that three.ws
+does **not** already use, ranked by what they would actually change here, with
+the exact file each one lands in.
+
+This is the decision document. Its sibling
+[popular-3d-github-repos.md](popular-3d-github-repos.md) is a popularity
+snapshot of the whole 3D ecosystem; that one answers "what exists", this one
+answers "what should we adopt, and where does it go".
+
+## How this list was built
+
+Three passes, run on 2026-09-07:
+
+1. **Gap detection.** A presence sweep of ~120 candidate project names across
+ `src/`, `api/`, `workers/`, `packages/`, `services/`, and `scripts/`. Anything
+ already wired (Kokoro TTS, `@pixiv/three-vrm`, Make-It-Animatable, TRELLIS,
+ Hunyuan3D 2.0/2.1, TripoSG, MDM, QuadriFlow, xatlas, meshoptimizer, Colyseus,
+ Yjs, Rapier, gltf-transform) was dropped from the list. This document only
+ contains things the repo genuinely lacks.
+2. **Verification.** Every license, star count, and last-push date below came
+ from the GitHub REST API or the npm registry directly, not from a blog. The
+ "best of 2026" listicles were checked and discarded: several assert a
+ "TRELLIS.2" release that does not exist in `microsoft/TRELLIS`.
+3. **Measurement, where a claim was cheap to test.** The BiRefNet latency
+ numbers below were measured locally rather than quoted.
+
+Star counts are as of the sweep date and drift.
+
+---
+
+## Shipped in this pass
+
+### BiRefNet as an optional background-removal model
+
+**[ZhengPeng7/BiRefNet](https://github.com/ZhengPeng7/BiRefNet)** (MIT, 4.2k
+stars, last push 2026-09-02).
+
+The [rembg worker](../workers/rembg/) ran four DIS/U2Net-family models. Those
+smear a soft boundary (hair, fur, foliage, a thin strap) into a halo, and since
+every image-to-3D lane reconstructs geometry from the matted subject, that halo
+becomes real polygons on the finished mesh.
+
+The pinned `rembg==2.0.59` already ships BiRefNet sessions; the worker's model
+allowlist simply did not include them. `birefnet-general-lite` is now a
+selectable model (short alias `birefnet`) across the worker, `api/forge-rembg.js`,
+the x402 pipeline, the service catalog, and the MCP studio tool.
+
+Measured on 4 threads with the repo's pinned `onnxruntime==1.28.0`, best of three
+warm runs at 677x1024:
+
+| Model | Weights | Latency |
+|---|---|---|
+| `isnet-general-use` (default) | 170 MB | 1.0 s |
+| `birefnet-general-lite` | 214 MB | 6.0 s |
+
+Six times the compute is worth it on a hero image and not worth it on a batch,
+so the default is unchanged and the policy tests pin it that way. Details and
+the model-choice table: [workers/rembg/README.md](../workers/rembg/README.md).
+
+Note the license trap this avoids: **RMBG-2.0** is the model most "best
+background removal" write-ups recommend, it is built on BiRefNet, and it is
+CC BY-NC 4.0. BiRefNet itself is MIT.
+
+---
+
+## Tier 1: adopt next
+
+### 1. Spark, for the splat surfaces
+
+**[sparkjsdev/spark](https://github.com/sparkjsdev/spark)**
+(`@sparkjsdev/spark`, MIT, 3.6k stars, npm 2.1.0) from World Labs.
+
+Today [src/splat-viewer.js](../src/splat-viewer.js) drives
+`@mkkellogg/gaussian-splats-3d`, which reads `.ply`, `.splat`, and `.ksplat`,
+and runs its own `Viewer` with its own renderer and controls, separate from the
+rest of the app's three.js scene. Two consequences:
+
+- **We cannot open the formats modern captures actually ship.** PlayCanvas's
+ **SOG** is roughly 15-20x smaller than the equivalent PLY, and Niantic's
+ **[spz](https://github.com/nianticlabs/spz)** (MIT) is about 10x smaller.
+ A capture that is a 1 GB PLY is a ~42 MB SOG. On a page whose whole premise is
+ "open any splat scene in a browser", not reading the compressed formats is the
+ single biggest functional gap the viewer has.
+- **Splats cannot share a scene with meshes.** Spark renders splats as ordinary
+ `THREE.Object3D`s inside an existing scene, with correct depth sorting against
+ mesh geometry, and supports transforms, color editing, displacement, and
+ skeletal animation on splats.
+
+Spark reads PLY (including compressed), SPZ, SPLAT, KSPLAT, and SOG.
+
+**Where it lands:** [src/splat-viewer.js](../src/splat-viewer.js) (368 lines) and
+`src/forge-studio/lab/lab.js`, the only two consumers of the current library.
+The teardown path is the delicate part: the current file releases the WebGL
+context by hand because the old library's `dispose()` stops short of it, and a
+Spark object living in a normal scene changes that shape entirely.
+
+**Why it matters beyond the viewer:** a splat that can live in the main avatar
+scene is the missing half of item 3 below.
+
+### 2. OpenTelemetry, for fleet observability
+
+**[open-telemetry/opentelemetry-js](https://github.com/open-telemetry/opentelemetry-js)**
+(Apache-2.0, 3.5k stars).
+
+The platform runs 115 Cloud Scheduler crons and 30-plus Cloud Run services, and
+the only cross-cutting instrumentation is Sentry error capture
+([api/_lib/sentry.js](../api/_lib/sentry.js)). There is no distributed trace, so
+a slow `/forge` request that fans out to rembg, a mesh lane, rig, and texture
+cannot be attributed to a stage without reading four services' logs by hand.
+
+GCP has a first-party OTLP endpoint, so this is a pre-approved-surface adoption
+with no new vendor: the Node SDK plus the Cloud Trace exporter in
+[server/index.mjs](../server/index.mjs), and `traceparent` propagated on the
+worker fetches in `api/_providers/gcp.js`.
+
+**Where it lands:** `server/index.mjs` (boot), `api/_providers/gcp.js` (context
+propagation to the workers), and each Python worker's FastAPI app for the far
+end of the span.
+
+### 3. LHM, for one-selfie photoreal humans
+
+**[aigc3d/LHM](https://github.com/aigc3d/LHM)** (Apache-2.0, 2.7k stars,
+ICCV 2025).
+
+[workers/avatar-reconstruction](../workers/avatar-reconstruction/) fits a selfie
+onto a fixed-topology Wolf3D template: MediaPipe landmarks, a TPS texture warp,
+and a geometry morph. That is a sound, CPU-cheap, commercially clean design, and
+it is bounded by the template. It cannot produce hair, clothing, or body shape
+that the template does not already have.
+
+LHM reconstructs an **animatable** 3D human from a single image and drives it
+with SMPL-X pose, which is the interface our retargeter already thinks in.
+Published inference times are 1.41 s (LHM-MINI, 16 GB), 2.01 s (LHM-500M), and
+6.57 s (LHM-1B). It outputs 3D Gaussians, with a mesh export path.
+
+This is why it is listed after Spark: LHM's native output is splats, and Spark
+is what would let that render on the existing avatar stage next to GLB avatars
+instead of in a walled-off viewer. Adopted together they are one feature,
+"photoreal animatable avatar from one photo", not two.
+
+**Where it lands:** a new GPU lane beside the existing reconstruction worker, not
+a replacement. The template path stays as the CPU-cheap default and the
+guaranteed-riggable fallback.
+
+### 4. Real part segmentation
+
+[workers/segment](../workers/segment/) is deliberately pure geometry: connected
+components first, then geometric splitting. That is exactly right for an
+assembled model and it has a known blind spot, which its own README is honest
+about: a generative lane emits a single watertight blob, and connected-component
+analysis has nothing to separate.
+
+Two MIT options fill that in, and they solve different halves:
+
+- **[wgsxm/PartCrafter](https://github.com/wgsxm/PartCrafter)** (MIT, 2.5k stars,
+ NeurIPS 2025) generates the parts directly from a single image, so parts come
+ out of the *generation* step rather than being recovered afterwards. That is a
+ change to the forge pipeline, not to the segment worker.
+- **[VAST-AI-Research/HoloPart](https://github.com/VAST-AI-Research/HoloPart)**
+ (MIT, 665 stars) does amodal part completion: it recovers each part as a whole
+ object, including the hidden geometry where parts meet, which is what makes a
+ split part actually usable as a swappable component.
+
+**Avoid [nv-tlabs/PartField](https://github.com/nv-tlabs/PartField).** It is the
+best-known name in this space and its NVIDIA License clause 3.3 restricts use to
+non-commercial research and educational purposes. It cannot ship here.
+
+**Where it lands:** PartCrafter as a forge lane option; HoloPart as a stage
+inside [workers/segment](../workers/segment/) that runs after the geometric
+split when the caller asks for complete parts.
+
+---
+
+## Tier 2: worth a lane, not urgent
+
+| Project | License | Why | Lands in |
+|---|---|---|---|
+| [DreamTechAI/Direct3D-S2](https://github.com/DreamTechAI/Direct3D-S2) | MIT (1.3k stars) | Sparse-voxel latent diffusion at gigascale resolution; a genuinely different geometry prior from TRELLIS and Hunyuan | New `workers/model-direct3d-s2`, as a peer of the existing mesh backends |
+| [stepfun-ai/Step1X-3D](https://github.com/stepfun-ai/Step1X-3D) | Apache-2.0 (888 stars) | Two-stage geometry then texture, fully open including training code | Same, another forge backend |
+| [huanngzh/MV-Adapter](https://github.com/huanngzh/MV-Adapter) | Apache-2.0 (1.3k stars, ICCV 2025) | [workers/texture](../workers/texture/) hand-rolls multiview consistency with SDXL plus ControlNet-Depth and a back-projection pass; MV-Adapter is a purpose-built multiview-consistent adapter for exactly that | `workers/texture/`, replacing the per-view generation step and keeping the existing UV bake |
+| [microsoft/MoGe](https://github.com/microsoft/MoGe) | MIT (2.9k stars; GitHub misreports this as unlicensed, the LICENSE file is MIT) | Accurate monocular geometry, useful as a depth prior for image-to-3D conditioning and for `/capture` on a single photo | `workers/model-video2scene/` as a single-image path |
+| [facebookresearch/map-anything](https://github.com/facebookresearch/map-anything) | Apache-2.0 (3.7k stars) | Universal feed-forward metric 3D reconstruction. Prefer it over VGGT, which is the more famous model in this category and is not permissively licensed (see below) | `workers/model-video2scene/`, beside LingBot-Map |
+| [playcanvas/supersplat](https://github.com/playcanvas/supersplat) | MIT (10k stars) | A full splat editor. Once Spark lands, this is the reference for what a three.ws splat editing surface should do, and its SOG writer is the export path | Reference plus `@playcanvas/splat-transform` (MIT) as the server-side SOG encoder |
+| [EricGuo5513/momask-codes](https://github.com/EricGuo5513/momask-codes) | MIT (1.3k stars) | [workers/model-text2motion](../workers/model-text2motion/) chose MDM over MoMask on license grounds; the repo is MIT, so that call is worth re-testing on quality. Check the HumanML3D training-data terms separately from the code license before acting | `workers/model-text2motion/mdm_sampler.py` is already the only model-specific file, by design |
+
+---
+
+## License traps
+
+Every one of these is a well-known, high-star project that looks adoptable and
+is not, or is not on the terms its popularity implies. Checked against the
+actual LICENSE file, not the GitHub sidebar.
+
+| Project | Reality |
+|---|---|
+| `briaai/RMBG-2.0` | CC BY-NC 4.0, commercial use needs a paid license. It is built on BiRefNet, which is MIT. Use BiRefNet |
+| `nv-tlabs/PartField` | NVIDIA License 3.3: non-commercial research and education only |
+| `facebookresearch/vggt` | Custom "VGGT License v1" with an Acceptable Use Policy and pass-through redistribution terms, not an OSI license. MapAnything (Apache-2.0) covers the same ground |
+| `ByteDance-Seed/Depth-Anything-3` | Split licensing. DA3-SMALL, DA3-BASE, DA3MONO-LARGE, DA3METRIC-LARGE are Apache-2.0; DA3-LARGE, DA3-GIANT, and the DA3NESTED series are CC BY-NC 4.0. The repo code is Apache-2.0, so the checkpoint choice is the whole question |
+| `zju3dv/GVHMR` | Custom Zhejiang University terms, not permissive |
+| `graphdeco-inria/hierarchical-3d-gaussians` | Inherits the INRIA 3DGS license, which is non-commercial |
+
+`microsoft/MoGe` is the inverse case: GitHub reports no license, and the LICENSE
+file is plain MIT.
+
+---
+
+## Deliberately not recommended
+
+- **A new JS 3D engine** (Babylon, PlayCanvas engine, Needle). three.js is the
+ foundation and the entire `avatar-sdk` public contract. Spark is recommended
+ precisely because it extends three.js instead of replacing it.
+- **A client-side search library** (Orama, MiniSearch). Search here runs against
+ Postgres over records the browser does not hold, and `@leeoniya/ufuzzy` already
+ covers in-page filtering.
+- **`transformers.js` as a general runtime.** `onnxruntime-web` is already the
+ in-browser inference path and Kokoro TTS already runs on it. Adding a second
+ runtime buys nothing unless a specific model needs it.
+- **`spz-js`.** It is the obvious way to add `.spz` support without touching the
+ renderer, and it depends on the entire `playcanvas` engine to do it. Spark
+ reads `.spz` natively.
+- **UniRig.** Already evaluated and retired here in favour of Make-It-Animatable
+ (see [workers/rig/README.md](../workers/rig/README.md)); its live instance
+ produced unusable 22-bone skeletons. Noting only that upstream has moved since
+ that call, so it is a re-test candidate rather than a closed question.
+
+---
+
+## Re-running this sweep
+
+The gap detection is a grep, and it is worth re-running whenever a lane is
+rebuilt:
+
+```bash
+# Does the repo already use a given project, anywhere that matters?
+grep -ril 'PartCrafter' src api workers packages services scripts | grep -v node_modules
+
+# Verify a license and its activity from the source, not a blog.
+curl -s https://api.github.com/repos/wgsxm/PartCrafter |
+ node -e "let s='';process.stdin.on('data',d=>s+=d).on('end',()=>{const j=JSON.parse(s);
+ console.log(j.full_name, j.license?.spdx_id, j.stargazers_count, j.pushed_at)})"
+
+# A NOASSERTION spdx_id means "GitHub could not classify it", not "no license".
+# Read the file.
+curl -s https://raw.githubusercontent.com/wgsxm/PartCrafter/main/LICENSE | head -20
+```
diff --git a/docs/popular-3d-github-repos.md b/docs/popular-3d-github-repos.md
index 2d8fbc9a8..06e339ef8 100644
--- a/docs/popular-3d-github-repos.md
+++ b/docs/popular-3d-github-repos.md
@@ -10,6 +10,10 @@ A sweep of 22 3D-related GitHub topics and keyword queries (`3d`, `threejs`, `we
## Quick read for three.ws
+> This file ranks the ecosystem by stars. For what three.ws should actually
+> adopt out of it, with licenses verified and the file each candidate lands
+> in, see [oss-adoption-2026-09.md](oss-adoption-2026-09.md).
+
- **three.js (#1, ~113k)** dwarfs everything else in web 3D — it is the foundation this platform is built on.
- The **pmndrs / React ecosystem** dominates the React side: `react-three-fiber` (#5), `drei` (#42), `uikit` (#179). Framework wrappers exist for every stack: `troisjs/trois` + `Tresjs/tres` (Vue), `threlte` (Svelte), `gre/gl-react` (React shaders).
- The fastest-growing cluster is **NeRF + Gaussian Splatting** — `gaussian-splatting` (#10), `instant-ngp` (#16), `nerfstudio` (#33), `supersplat` (#48), `gsplat` (#96), plus generative 3D (`TRELLIS`, `Hunyuan3D`, `stable-dreamfusion`). This is where web-3D capture is heading and worth tracking for the platform roadmap.
diff --git a/public/changelog.json b/public/changelog.json
index 9c0ea1a55..6a8fc9af5 100644
--- a/public/changelog.json
+++ b/public/changelog.json
@@ -1,5 +1,5 @@
{
- "generated_at": "2026-09-07T15:50:24.725Z",
+ "generated_at": "2026-09-07T16:12:40.223Z",
"generated_by": "scripts/build-page-index.mjs from data/pages.json + data/changelog.json",
"site": {
"name": "three.ws",
@@ -38,6 +38,17 @@
"improvement"
]
},
+ {
+ "date": "2026-09-07",
+ "type": "update",
+ "title": "A sharper cutout for images with hair, fur, or fine edges",
+ "summary": "Background removal now offers BiRefNet as an optional model alongside the fast default. The default model smears wispy boundaries into a soft halo, and because every image-to-3D lane rebuilds geometry from the cut-out subject, that halo turned into real polygons on the finished mesh. BiRefNet keeps hair strands, fur, foliage, and thin straps intact. It takes about six seconds against the default's one, so it stays opt-in: pass model \"birefnet\" on the background-removal endpoint or pick it from the MCP tool when the edge is what matters.",
+ "link": null,
+ "tags": [
+ "improvement",
+ "feature"
+ ]
+ },
{
"date": "2026-09-07",
"type": "update",
diff --git a/public/changelog.xml b/public/changelog.xml
index 96caaa72e..d56bef3ef 100644
--- a/public/changelog.xml
+++ b/public/changelog.xml
@@ -30,6 +30,14 @@
<category>fix</category>
<description>When an agent pays one of our x402 endpoints and the payment header arrives mangled (truncated in transit, double-encoded, wrapped by a proxy), the answer used to be a plain 400 error with no prices in it, so the agent had nothing left to work from and no way to retry. Every rejected payment now returns the ordinary 402 with the full list of accepted rails, tokens and amounts attached, exactly as it does when a payment is simply missing. That is what the x402 spec and the OKX seller SDK both do, and it means a paying agent can always read the quote again and try once more. Only a real server fault answers without a quote.</description>
</item>
+ <item>
+ <title>A sharper cutout for images with hair, fur, or fine edges</title>
+ <link>https://three.ws/changelog</link>
+ <guid isPermaLink="false">2026-09-07:A sharper cutout for images with hair, fur, or fine edges</guid>
+ <pubDate>Mon, 07 Sep 2026 12:00:00 GMT</pubDate>
+ <category>improvement</category>
+ <description>Background removal now offers BiRefNet as an optional model alongside the fast default. The default model smears wispy boundaries into a soft halo, and because every image-to-3D lane rebuilds geometry from the cut-out subject, that halo turned into real polygons on the finished mesh. BiRefNet keeps hair strands, fur, foliage, and thin straps intact. It takes about six seconds against the default's one, so it stays opt-in: pass model &quot;birefnet&quot; on the background-removal endpoint or pick it from the MCP tool when the edge is what matters.</description>
+ </item>
<item>
<title>Archived news stories with emoji in their summary keep their search listing</title>
<link>https://three.ws/markets/news</link>
diff --git a/scripts/audit-docs.mjs b/scripts/audit-docs.mjs
index 622897189..59a6845fc 100644
--- a/scripts/audit-docs.mjs
+++ b/scripts/audit-docs.mjs
@@ -339,6 +339,7 @@ const UNPUBLISHED_DOCS = new Map([
['openai-community-3d-studio-post', 'internal: forum post drafted for an external developer community'],
['openai-community-physical-world-post', 'internal: forum post drafted for an external developer community'],
['open-source-friday-plan', 'internal: program application plan and stream runsheet, not a reader-facing product doc'],
+ ['oss-adoption-2026-09', 'internal: engineering adoption plan naming unshipped lanes, sibling of popular-3d-github-repos'],
['oracle-trading-mcp-plan', 'internal: build order for the Oracle and trading-agent MCP servers, not a reader-facing product doc'],
['nvidia-apps-catalog-listing', 'internal: paste-ready listing copy and portal steps for the NVIDIA Inception catalog'],
['nvidia-apps-catalog-request', 'internal: outbound email asking NVIDIA to publish the catalog listing'],
diff --git a/workers/rembg/Dockerfile b/workers/rembg/Dockerfile
index 6036c1624..b9e834197 100644
--- a/workers/rembg/Dockerfile
+++ b/workers/rembg/Dockerfile
@@ -13,8 +13,9 @@ RUN pip install -r /app/requirements.txt
# rembg downloads ONNX model weights on first use; pre-cache the two the service
# can warm at startup so cold starts never hit the network. Models live in
-# /root/.u2net/. u2net_human_seg and silueta stay lazy: they are rarely asked
-# for, and baking all four would add ~350 MB to every pull.
+# /root/.u2net/. u2net_human_seg, silueta and birefnet-general-lite stay lazy:
+# they are rarely asked for, and baking all five would add ~570 MB to every
+# pull. The first birefnet request therefore pays a one-time 214 MB download.
RUN python -c "import rembg; rembg.new_session('u2net')" && \
python -c "import rembg; rembg.new_session('isnet-general-use')"
diff --git a/workers/rembg/README.md b/workers/rembg/README.md
index 68cca9070..61c751b3d 100644
--- a/workers/rembg/README.md
+++ b/workers/rembg/README.md
@@ -3,9 +3,11 @@
FastAPI service that **strips the background from an image and returns a
transparent PNG**. It wraps the [`rembg`](https://github.com/danielgatis/rembg)
library (MIT) and its ONNX salient-object-detection models: `u2net`,
-`isnet-general-use`, `u2net_human_seg`, and `silueta`. The default model is
-`isnet-general-use`; the legacy aliases `rmbg2` and `isnet` resolve to it, so
-older callers keep working. Every mesh backend reconstructs better geometry from
+`isnet-general-use`, `u2net_human_seg`, `silueta`, and
+[`birefnet-general-lite`](https://github.com/ZhengPeng7/BiRefNet) (MIT). The
+default model is `isnet-general-use`; the legacy aliases `rmbg2` and `isnet`
+resolve to it, so older callers keep working, and `birefnet` is the short name
+for the BiRefNet tier. Every mesh backend reconstructs better geometry from
a cleanly cut-out subject, so this runs ahead of the image-to-3D models (except
[model-triposg](../model-triposg/), which removes backgrounds in-process).
@@ -44,9 +46,35 @@ Request (`RemoveRequest`):
`three.ws-rembg/1.0 (background removal worker; +https://three.ws)`, which is
what hosts like Wikimedia require before they will serve a bot.
- `model`: optional, default `"rmbg2"`. One of `u2net`, `isnet-general-use`,
- `u2net_human_seg`, `silueta`, or the aliases `rmbg2` / `isnet`
- (which resolve to `isnet-general-use`). Unknown names fall back to the default
- model. Pick `u2net_human_seg` for people: it is trained on human matting.
+ `u2net_human_seg`, `silueta`, `birefnet-general-lite`, or the aliases
+ `rmbg2` / `isnet` (which resolve to `isnet-general-use`) and `birefnet`
+ (which resolves to `birefnet-general-lite`). Unknown names fall back to the
+ default model. Pick `u2net_human_seg` for people: it is trained on human
+ matting. Pick `birefnet` when the edge is the point: see
+ [Choosing a model](#choosing-a-model).
+
+### Choosing a model
+
+| Model | Weights | One 677x1024 removal | Use it for |
+|---|---|---|---|
+| `isnet-general-use` (default, alias `rmbg2` / `isnet`) | 170 MB | 1.0 s | Everything by default. Fast, and good enough for a hard-edged subject |
+| `u2net` | 168 MB | ~1 s | The older general model, kept for callers that pinned it |
+| `u2net_human_seg` | lazy download | ~1 s | People, when you want a body silhouette rather than the most salient object |
+| `silueta` | lazy download | ~1 s | A small-footprint U2Net variant |
+| `birefnet-general-lite` (alias `birefnet`) | 214 MB, lazy download | 6.0 s | Hair, fur, foliage, thin straps: any soft or wispy boundary the DIS/U2Net family turns into a halo |
+
+The two exact figures (1.0 s and 6.0 s) were measured on this repo's pinned
+`onnxruntime==1.28.0` with ONNX Runtime capped to 4 threads, matching the
+deployed service's 4 vCPUs, best of three runs on a warm session at 677x1024.
+The `~1 s` rows are the U2Net-family figures this README already documented
+above and were not re-measured.
+
+Why the tier exists: every image-to-3D lane reconstructs geometry from the
+matted subject, so a halo of leftover background around the hair becomes real
+polygons in the mesh. BiRefNet's bilateral reference architecture keeps that
+boundary, which is worth six seconds on a hero image and is not worth it on a
+batch. It stays opt-in for exactly that reason, and the policy tests pin the
+default so a future edit cannot promote it silently.
Response (the returned `model` is the resolved canonical name):
@@ -93,7 +121,7 @@ finished task stays pollable for an hour, and the map is capped at 2000 entries
"gpu_available": false,
"execution_providers": ["AzureExecutionProvider", "CPUExecutionProvider"],
"models_loaded": ["isnet-general-use"],
- "models_available": ["u2net", "isnet-general-use", "u2net_human_seg", "silueta"],
+ "models_available": ["u2net", "isnet-general-use", "u2net_human_seg", "silueta", "birefnet-general-lite"],
"default_model": "isnet-general-use",
"tasks_tracked": 0,
"task_retention_s": 3600.0,
@@ -117,7 +145,9 @@ finished task stays pollable for an hour, and the map is capped at 2000 entries
Weights for the two startup-capable models are **baked into the image** at build
time (the Dockerfile pre-caches `u2net` and `isnet-general-use` into
`/root/.u2net/`), so no GCS weights volume is mounted and cold starts do not hit
-the network. `u2net_human_seg` and `silueta` download on first request.
+the network. `u2net_human_seg`, `silueta` and `birefnet-general-lite` download on
+first request; BiRefNet's weights are 214 MB, so its very first call on a fresh
+instance pays that download once before it answers.
## Run locally
diff --git a/workers/rembg/main.py b/workers/rembg/main.py
index cf8c1f5cf..cefe8d1cc 100644
--- a/workers/rembg/main.py
+++ b/workers/rembg/main.py
@@ -5,8 +5,9 @@ transparent PNG, using rembg (MIT) and its ONNX salient-object-detection models.
API contract:
POST /remove { image: data-uri|url, model?: name }
→ 202 { task_id, status: "queued", model }
- model is one of u2net | isnet-general-use | u2net_human_seg | silueta.
- The legacy aliases "rmbg2" and "isnet" resolve to isnet-general-use.
+ model is one of u2net | isnet-general-use | u2net_human_seg | silueta |
+ birefnet-general-lite. The legacy aliases "rmbg2" and "isnet" resolve to
+ isnet-general-use; "birefnet" resolves to birefnet-general-lite.
GET /tasks/:id → { task_id, status, result_url?, error? }
@@ -14,8 +15,10 @@ API contract:
gpu_available, execution_providers }
No GPU required: the models run on ONNX Runtime's CPU provider in ~1-2 s for the
-inference step. Only the default model is loaded at startup (the rest load
-lazily on first use) so cold starts stay fast and /remove returns instantly.
+inference step, except birefnet-general-lite, which trades about 6 s per image
+for a markedly cleaner edge. Only the default model is loaded at startup (the
+rest load lazily on first use) so cold starts stay fast and /remove returns
+instantly.
Environment variables:
API_KEY shared bearer secret (required)
diff --git a/workers/rembg/rembg_policy.py b/workers/rembg/rembg_policy.py
index 0395640ff..7085e0076 100644
--- a/workers/rembg/rembg_policy.py
+++ b/workers/rembg/rembg_policy.py
@@ -16,12 +16,29 @@ from typing import Iterable
# Canonical rembg model names. The friendly aliases keep the public API contract
# stable for callers that still send "rmbg2" / "isnet" (names this service
# advertised before it ran on rembg); both resolve to rembg's general-purpose
-# model. api/forge-rembg.js still accepts and forwards them.
-CANONICAL_MODELS = ("u2net", "isnet-general-use", "u2net_human_seg", "silueta")
+# model. api/forge-rembg.js still accepts and forwards them, and "birefnet" is
+# the short name for the BiRefNet quality tier below.
+CANONICAL_MODELS = (
+ "u2net",
+ "isnet-general-use",
+ "u2net_human_seg",
+ "silueta",
+ "birefnet-general-lite",
+)
DEFAULT_MODEL = "isnet-general-use"
+
+# birefnet-general-lite is the quality tier, not the default. BiRefNet resolves
+# hair strands and thin silhouette edges that the DIS/U2Net family smears into a
+# halo, which is exactly what the image-to-3D lanes reconstruct geometry from.
+# It costs real time on a CPU instance: measured on 4 threads with the pinned
+# onnxruntime, one 677x1024 removal takes 6.0 s against isnet-general-use's
+# 1.0 s, and its weights are 214 MB against isnet's 170 MB. Callers that care
+# about the edge (a person, fur, foliage, anything with a soft boundary) ask for
+# it by name; everything else keeps the fast default.
MODEL_ALIASES = {
"rmbg2": DEFAULT_MODEL,
"isnet": DEFAULT_MODEL,
+ "birefnet": "birefnet-general-lite",
}
# A task is terminal once it reaches one of these; anything else is still in
diff --git a/workers/rembg/test_rembg_policy.py b/workers/rembg/test_rembg_policy.py
index f50f2aaae..1180af1d0 100644
--- a/workers/rembg/test_rembg_policy.py
+++ b/workers/rembg/test_rembg_policy.py
@@ -50,6 +50,14 @@ for name in CANONICAL_MODELS:
check("legacy alias rmbg2 resolves", canonical_model("rmbg2") == "isnet-general-use")
check("legacy alias isnet resolves", canonical_model("isnet") == "isnet-general-use")
+check("birefnet alias resolves to the lite weights",
+ canonical_model("birefnet") == "birefnet-general-lite")
+# The BiRefNet tier is opt-in: it costs about 6x the CPU time of the default, so
+# a regression that promoted it to the default would quietly six-times the
+# latency of every forge cutout. Pin the default explicitly.
+check("the default stays the fast model", DEFAULT_MODEL == "isnet-general-use")
+check("birefnet is reachable but not the default",
+ "birefnet-general-lite" in CANONICAL_MODELS and DEFAULT_MODEL != "birefnet-general-lite")
check("whitespace is trimmed", canonical_model(" u2net ") == "u2net")
check("unknown name falls back", canonical_model("segment-anything") == DEFAULT_MODEL)
check("empty name falls back", canonical_model("") == DEFAULT_MODEL)