Add withoutBG open ONNX alpha-matting / background-removal model to Inference
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 35/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Tranquilla
- Stack tecnologico
- huggingface, numpy, python
Direzione di ricerca
Inizia leggendo il workflow depth_estimation@v1 esistente e i pattern dei modelli in inference_models. Controlla come sono organizzati i registri dei modelli, i test delle predizioni e i test di letterboxing e unpadding. Il lavoro è completato quando il modello ONNX withoutBG dispone di un task e di un confezionamento dei pesi concordati, della copertura dell’integrazione, della documentazione e degli avvisi richiesti.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Search before asking
- I have searched the Inference issues and found no similar feature requests.
Description
I'd like to add withoutBG Open Weights as a foundation alpha matting / background removal model to inference / inference_models.
Model: https://huggingface.co/withoutbg/withoutbg-openweights-onnx
I'm the author and trainer of this model.
What it is
- Self-contained ONNX model (opset 18, ~455 MB, fp32)
- Pipeline combines Depth Anything V2 (embedded in the graph) with a ConvNeXt-based matting head built on a DINOv3 ConvNeXt backbone
- No trimap required. Takes an RGB image as input and produces a soft alpha matte
- Fixed 448×448 input using letterboxing. A sidecar JSON documents the input/output names, tensor shapes, and SHA-256 checksum
I/O contract
| Name | Shape | Dtype | Range | |
|---|---|---|---|---|
| Input | rgb |
[1, 3, 448, 448] |
float32 |
[0, 1] NCHW |
| Output | alpha |
[1, 1, 448, 448] |
float32 |
[0, 1] |
Pre/post-processing is straightforward:
- Letterbox the longest side to 448.
- Pad to the top left.
- Run the ONNX model.
- Remove the padding.
- Resize the alpha matte back to the original image size.
- Optionally produce an RGBA cutout.
Proposed integration (v1)
- Add an ONNX model class to
inference_modelswithfrom_pretrained, plus a registry entry under a new task such asimage-mattingorbackground-removal(happy to follow the maintainers' preference). - Add a workflow block modeled after
depth_estimation@v1that outputsalpha(NUMPY_ARRAY_KIND) together with an optional cutout or visualization image. - Add documentation, unit tests for letterboxing and unpadding, a prediction test, and the required license and third-party notices.
- Add an HTTP
/inferadapter later if it makes sense.
Licensing
- Model weights: Apache-2.0
- Third-party components:
- Depth Anything V2: Apache-2.0
- DINOv3: Meta's DINOv3 license, consistent with how DINOv3 classification models are already documented in this repository
Questions
- What task type would you prefer for the registry?
- How would you prefer to package the weights and assign model IDs? Roboflow model package or direct download from Hugging Face?
- Any concerns about shipping a fused ONNX model that includes DINOv3 ConvNeXt components?
I'm happy to put together the implementation once we're aligned on the above.
Use case
- Background removal (soft alpha, not a hard mask)
- Product & portrait isolation where fine details matter (hair, edges) and instance / semantic segmentation is not enough
- Image compositing (alpha + original -> cutout / new background)
Additional
See model outputs: https://withoutbg.com/open-model/results
Are you willing to submit a PR?
- Yes I'd like to help by submitting a PR!
- Lingua principale
- Python
- Stelle
- 2.5k
- Fork
- 340
- Merge medio
- 2g 19h
- PR unite (30g)
- 92
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di roboflow/inference
-
Allow Pillow 13 in inference-sdkForse di nuovo libera Una pull request per questa issue è stata chiusa senza essere unita. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 80/100
roboflow/inference#3335 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
roboflow/inference#3173 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
roboflow/inference#2993 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Add context manager (__enter__ / __exit__) support to InferencePipelineForse già presa @KushagraKanaujia l’ha presa 67 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
roboflow/inference#2744 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
roboflow/inference#1913 · 1 commento · 2 reazioni ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di roboflow/inference
Issue simili
-
Contributing instructionsAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
dbt-labs/spark-utils#51 ·
-
bug pydanty:is-working
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
pydantic/pydantic-ai#13444 ·
I maintainer di solito rispondono entro 1 giorno
-
good first issue help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
-
good first issue help wanted
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 72/100
-
changelog investigate
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 68/100
ramnes/notion-sdk-py#502 ·