BEN2
BEN2 predicts a soft foreground alpha matte for background removal.
- Aufgaben
- background removal
- Größen
- b at 1024 px
- Installation
pip install libreyolo- Supportstufe
- Nur Inferenz, seit v1.6.0. Nur Vorhersage, Validierung und Export. Trainingsfunktionen sind nicht verfügbar.
- Lizenzen
- Code MIT, Gewichte MIT. Kommerzielle Nutzung
Install
pip install "libreyolo"Predict
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
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
| Aufgabe | ONNX | TorchScript | ExecuTorch | TensorRT | OpenVINO | Paddle | MNN | RKNN | ncnn | TFLite | CoreML | Core AI |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Background removal | Background removal to ONNX: unterstützt | Background removal to TorchScript: unterstützt | Background removal to ExecuTorch: unterstützt | Background removal to TensorRT: unterstützt | Background removal to OpenVINO: unterstützt | Background removal to Paddle: nicht unterstützt | Background removal to MNN: nicht unterstützt | Background removal to RKNN: nicht unterstützt | Background removal to ncnn: unterstützt | Background removal to TFLite: nicht unterstützt | Background removal to CoreML: nicht unterstützt | Background removal to Core AI: nicht unterstützt |
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
| Datei | Lizenz der Gewichte |
|---|---|
| Background removal | |
| LibreBEN2b-matte.pt | mit |
Jede oben aufgeführte Datei ist heute in der LibreYOLO-Organisation verfügbar und wird bei der ersten Verwendung heruntergeladen.
Licensing
Prüfe die Lizenz im Hugging-Face-Repository der konkreten Gewichte, die du herunterlädst. Jeder Checkpoint in der LibreYOLO-Organisation hat eine Lizenz, und sie ist innerhalb einer Familie nicht immer gleich. Dieses Repository ist die maßgebliche Quelle. Die Zusammenfassung unten beschreibt den Stand bei der letzten Verifizierung dieser Seite.
Dies ist eine Beschreibung der beteiligten Lizenzen und keine Rechtsberatung. Wenn die Antwort kommerziell relevant ist, lies die Lizenzen selbst und hole eigenen Rechtsrat ein.
- Originalarbeit
- BEN2, Prama LLC
- Upstream-Lizenz
- MIT
- Upstream-Quelle
- github.com/PramaLLC/BEN2
- LibreYOLO-Code
- MIT
- Gewichte
- MIT, erneut unter huggingface.co/LibreYOLO veröffentlicht
- Einordnung
- The publisher declares MIT for the source and pretrained model.