BEN2

BEN2 predicts a soft foreground alpha matte for background removal.

Tâches
background removal
Tailles
b at 1024 px
Installer
pip install libreyolo
Niveau de support
Inférence uniquement, depuis v1.6.0. Prédiction, validation et export uniquement. Les fonctionnalités d'entraînement ne s'appliquent pas.
Licences
Code MIT, poids MIT. Usage commercial

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

TâcheONNXTorchScriptExecuTorchTensorRTOpenVINOPaddleMNNRKNNncnnTFLiteCoreMLCore AI
Background removalBackground removal to ONNX : pris en chargeBackground removal to TorchScript : pris en chargeBackground removal to ExecuTorch : pris en chargeBackground removal to TensorRT : pris en chargeBackground removal to OpenVINO : pris en chargeBackground removal to Paddle : non pris en chargeBackground removal to MNN : non pris en chargeBackground removal to RKNN : non pris en chargeBackground removal to ncnn : pris en chargeBackground removal to TFLite : non pris en chargeBackground removal to CoreML : non pris en chargeBackground removal to Core AI : non pris en charge
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

FichierLicence des poids
Background removal
LibreBEN2b-matte.ptmit

Tous les fichiers ci-dessus sont actuellement disponibles dans l<link>organisation LibreYOLO</link> et sont téléchargés à la première utilisation.

Licensing

Vérifiez la licence dans le dépôt Hugging Face des poids précis que vous téléchargez. Chaque checkpoint de l<link>organisation LibreYOLO</link> en possède une, et elles ne sont pas toujours identiques au sein dune même famille. Ce dépôt fait autorité ; le résumé ci-dessous décrit les conditions applicables lors de la dernière vérification de cette page.

Ceci décrit les licences concernées et ne constitue pas un conseil juridique. Si la réponse a une importance commerciale, lisez vous-même les licences et consultez votre propre avocat.

Travail d'origine
BEN2, Prama LLC
Licence du projet d'origine
MIT
Source du projet d'origine
github.com/PramaLLC/BEN2
Code de LibreYOLO
MIT
Poids
MIT, republiés sur huggingface.co/LibreYOLO
Interprétation
The publisher declares MIT for the source and pretrained model.

Vérifié avec LibreYOLO v1.6.0. Les tableaux de support, les checkpoints et les chiffres de benchmark de cette page sont générés à partir de la bibliothèque publiée et des poids publiés, et non rédigés à la main.

Architecture de BEN2

Choisissez une variante ou la vue de la famille, puis un bloc pour les détails. Ouvrez le schéma complet pour zoomer ou télécharger SVG et PNG. Les schémas sont en anglais.