BEN2

BEN2 predicts a soft foreground alpha matte for background removal.

Task
background removal
Dimensioni
b at 1024 px
Installa
pip install libreyolo
Livello di supporto
Solo inferenza, dalla v1.6.0. Solo predizione, validazione ed esportazione. Le funzionalità di addestramento non si applicano.
Licenze
Codice MIT, pesi MIT. Uso commerciale

Install

bash
pip install "libreyolo"

Predict

Python
from libreyolo import LibreYOLO, SAMPLE_IMAGE model = LibreYOLO("LibreBEN2b-matte.pt", device="cpu")result = model(SAMPLE_IMAGE)print(result.matte.array.shape)result.save("cutout.png")

Prediction uses a fixed 1024-pixel canvas. Native prediction accepts batches; exports require batch 1. result.save() writes a transparent cutout. Training is not supported.

Validate

Python
from libreyolo import LibreYOLO, SAMPLE_IMAGE model = LibreYOLO("LibreBEN2b-matte.pt", device="cpu")# data: a matte dataset YAML, or a folder with images/ and mattes/ (grayscale alpha, same file stems)metrics = model.val(data="path/to/your/matte_dataset.yaml", workers=0)print(metrics)

Use the dataset format for this task. Validation explains the dataset requirements and returned metrics.

Export

TaskONNXTorchScriptExecuTorchTensorRTOpenVINOPaddleMNNRKNNncnnTFLiteCoreMLCore AI
Background removalBackground removal to ONNX: supportatoBackground removal to TorchScript: supportatoBackground removal to ExecuTorch: supportatoBackground removal to TensorRT: supportatoBackground removal to OpenVINO: supportatoBackground removal to Paddle: non supportatoBackground removal to MNN: non supportatoBackground removal to RKNN: non supportatoBackground removal to ncnn: supportatoBackground removal to TFLite: non supportatoBackground removal to CoreML: non supportatoBackground removal to Core AI: non supportato
Python
from libreyolo import LibreYOLO, SAMPLE_IMAGE model = LibreYOLO("LibreBEN2b-matte.pt", device="cpu")model.export(format="onnx")

Export setup lists format dependencies and loading exported artifacts.

Checkpoints

FileLicenza dei pesi
Background removal
LibreBEN2b-matte.ptmit

Oggi tutti i file elencati sopra sono presenti nell<link>organizzazione LibreYOLO</link> e vengono scaricati al primo utilizzo.

Licensing

Controlla la licenza nel repository Hugging Face degli specifici pesi che scarichi. Ogni checkpoint nell<link>organizzazione LibreYOLO</link> ne include una e non è sempre la stessa per tutta la famiglia. Quel repository è la fonte autorevole; il riepilogo seguente descrive le condizioni applicabili al momento dellultima verifica di questa pagina.

Questa è una descrizione delle licenze coinvolte, non una consulenza legale. Se la risposta è importante a fini commerciali, leggi personalmente le licenze e chiedi una consulenza indipendente.

Lavoro originale
BEN2, Prama LLC
Licenza upstream
MIT
Sorgente upstream
github.com/PramaLLC/BEN2
Codice LibreYOLO
MIT
Pesi
MIT, ripubblicati su huggingface.co/LibreYOLO
Interpretazione
The publisher declares MIT for the source and pretrained model.

Verificato con LibreYOLO v1.6.0. Le tabelle di supporto, i checkpoint e i dati dei benchmark in questa pagina vengono generati dalla libreria rilasciata e dai pesi pubblicati, non scritti a mano.

Architettura di BEN2

Scegli una variante o la vista della famiglia, poi un blocco per i dettagli. Apri il diagramma completo per ingrandire o scaricare SVG e PNG. I diagrammi sono in inglese.