PP-LiteSeg
PP-LiteSeg assigns a semantic class to each pixel using an STDC backbone and a fusion decoder.
- Задачі
- semantic segmentation
- Встановлення
pip install libreyolo- Рівень підтримки
- Підтримуваний, починаючи з v1.6.0. Додаткові придатні до навчання моделі: тести CI підтримують справними, а функції додають за нагоди.
- Ліцензії
- Код: MIT, ваги: Apache-2.0. Комерційне використання
Install
pip install "libreyolo"Predict
from libreyolo import LibreYOLO, SAMPLE_IMAGE model = LibreYOLO("LibrePPLiteSegt50-sem.pt", device="cpu")result = model(SAMPLE_IMAGE)print(result.semantic_mask)The t50 and b50 variants evaluate at (512, 1024); t75 and b75 evaluate at (768, 1536). Dimensions are (height, width).
Train
Training defaults to 800 epochs, batch 8 and amp=False. The default crop is (512, 1024) for t50/b50 and (768, 768) for t75/b75. Validation keeps the native rectangle. The recipe combines cross-entropy, Dice and edge losses with auxiliary heads.
Dataset setup describes the required training data.
from libreyolo import LibreYOLO model = LibreYOLO("LibrePPLiteSegt50-sem.pt", device="cpu")# Semantic segmentation dataset YAML: images plus single-channel class-ID masks.model.train(data="path/to/your/semantic.yaml", epochs=1, device="cpu", workers=0)Validate
from libreyolo import LibreYOLO model = LibreYOLO("LibrePPLiteSegt50-sem.pt", device="cpu")# Semantic segmentation dataset YAML with 19 Cityscapes classes, like cityscapes.yaml.metrics = model.val(data="path/to/your/semantic.yaml", workers=0)print(metrics)Use the dataset format for this task. Validation explains the dataset requirements and returned metrics.
Export
| Задача | ONNX | TorchScript | ExecuTorch | TensorRT | OpenVINO | Paddle | MNN | RKNN | ncnn | TFLite | CoreML | Core AI |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Semantic segmentation | Semantic segmentation to ONNX: підтримується | Semantic segmentation to TorchScript: підтримується | Semantic segmentation to ExecuTorch: не підтримується | Semantic segmentation to TensorRT: підтримується | Semantic segmentation to OpenVINO: підтримується | Semantic segmentation to Paddle: не підтримується | Semantic segmentation to MNN: не підтримується | Semantic segmentation to RKNN: не підтримується | Semantic segmentation to ncnn: не підтримується | Semantic segmentation to TFLite: не підтримується | Semantic segmentation to CoreML: не підтримується | Semantic segmentation to Core AI: не підтримується |
from libreyolo import LibreYOLO, SAMPLE_IMAGE model = LibreYOLO("LibrePPLiteSegt50-sem.pt", device="cpu")model.export(format="onnx")Export setup lists format dependencies and loading exported artifacts.
Checkpoints
| Файл | Ліцензія ваг |
|---|---|
| Semantic segmentation | |
| LibrePPLiteSegt50-sem.pt | apache-2.0 |
| LibrePPLiteSegb50-sem.pt | apache-2.0 |
| LibrePPLiteSegt75-sem.pt | apache-2.0 |
| LibrePPLiteSegb75-sem.pt | apache-2.0 |
Кожен наведений вище файл уже доступний у організації LibreYOLO і завантажується під час першого використання.
Licensing
Перевіряйте ліцензію в репозиторії Hugging Face конкретних ваг, які завантажуєте. Кожна контрольна точка в організації LibreYOLO має ліцензію, і вона не завжди однакова для всього сімейства. Цей репозиторій є авторитетним джерелом, а наведене нижче резюме описує умови на момент останньої перевірки сторінки.
Це опис відповідних ліцензій, а не юридична консультація. Якщо відповідь має комерційне значення, самостійно прочитайте ліцензії та зверніться по юридичну консультацію.
- Оригінальна робота
- PP-LiteSeg, PaddlePaddle
- Ліцензія першоджерела
- Apache-2.0
- Джерело першоджерела
- github.com/PaddlePaddle/PaddleSeg
- Код LibreYOLO
- MIT
- Ваги
- Apache-2.0, повторно опубліковано на huggingface.co/LibreYOLO
- Тлумачення
- The upstream implementation declares Apache-2.0. The STDC backbone also carries its original MIT attribution. The released checkpoints are converted from the Deci-AI/super-gradients Cityscapes artifacts; SuperGradients is released under Apache-2.0 and grants separate weight licenses only for YOLO-NAS, so these checkpoints carry Apache-2.0.