查看 Markdown

LingBot-Vision

LingBot-Vision 是 Robbyant 发布的一系列自监督 vision transformer 骨干,用以边界为中心的掩码建模训练,面向稠密空间感知。LibreYOLO 给这个骨干配上一个稠密 head,只支持一个任务:语义分割。

任务
semantic
尺寸
安装
pip install libreyolo
支持层级
已支持,自 v 起。起支撑作用的可训练家族:在 CI 里保持绿色,功能视情况落地。
上游
LingBot-Vision,由 Robbyant (Ant Group) 发布,采用 Apache-2.0 许可。论文源码
许可
代码采用 Apache-2.0,权重采用 Apache-2.0。商用

安装

LingBot-Vision 不需要任何可选 extra。它导入的一切都在基础安装里。

bash
pip install libreyolo

预测

权重在首次使用时从 Hugging Face 下载,并缓存在本地。

Python
from libreyolo import LibreYOLO, SAMPLE_IMAGE model = LibreYOLO("LibreLingBotVisions-sem.pt")result = model(SAMPLE_IMAGE, save=True) mask = result.semantic_maskprint(mask.data.shape, mask.classes)
CLI
libreyolo predict model=LibreLingBotVisions-sem.pt source=https://raw.githubusercontent.com/LibreYOLO/libreyolo/release/libreyolo/assets/parkour.jpg save=True

result.semantic_mask 承载稠密的类别图:.data 是一个按原图尺寸给出的 (H, W) 类别 id 张量,.classes 列出实际出现的类别 id。result.boxesNone,因为这里没有逐实例的检测结果。confiou 为了 API 一致而被接受, 但不会改变输出,因为模型返回的是每个像素一个类别,而不是可供过滤的检测结果。 数据源、流式处理和结果处理见预测

变体

已发布三种尺寸,s、b 和 l,从一个 11 亿参数的 ViT-g/16 教师模型蒸馏而来。教师 模型本身,也就是尺寸 g,在 LibreYOLO 里可以加载和微调,但 LibreYOLO 自己并不 托管 g 检查点(checkpoint)。

文件输入(px)权重许可
semantic
LibreLingBotVisions-sem.ptapache-2.0
LibreLingBotVisionb-sem.ptapache-2.0
LibreLingBotVisionl-sem.ptapache-2.0

上面的每个文件目前都在 LibreYOLO 组织中,并会在首次使用时下载。

训练

train() 微调一个已发布的检查点。默认配方是上游报告里的线性探针:ViT 骨干被 冻结,只训练 1x1 的稠密 head,与上面那些由 LibreYOLO 托管的权重的产出方式一致。 传 freeze_backbone=False 可以改成微调整个网络,并且要相应调低 lr0

Python(线性探针)
from libreyolo import LibreYOLO # 骨干默认冻结,与上游的评测协议一致:# 只训练 1x1 的稠密 headmodel = LibreYOLO("LibreLingBotVisions-sem.pt")model.train(data="my-dataset.yaml", epochs=20, imgsz=512, batch=16)
CLI
libreyolo train model=LibreLingBotVisions-sem.pt data=my-dataset.yaml \  epochs=20 imgsz=512 batch=16
完整微调
from libreyolo import LibreYOLO model = LibreYOLO("LibreLingBotVisions-sem.pt")model.train(    data="my-dataset.yaml", epochs=20, imgsz=512, batch=16,    freeze_backbone=False,)
多卡训练
libreyolo train model=LibreLingBotVisions-sem.pt data=my-dataset.yaml \  epochs=20 device=0,1 batch=32

数据集、数据增强、多卡训练和日志器见训练

验证

val() 返回一个由 metrics/ 开头的键组成的字典:mIoU 和像素精度,在任何采用你 训练所用格式的数据集上测量。

Python
from libreyolo import LibreYOLO model = LibreYOLO("LibreLingBotVisions-sem.pt")metrics = model.val(data="my-dataset.yaml") print(metrics["metrics/mIoU"])print(metrics["metrics/pixel_accuracy"])
CLI
libreyolo val model=LibreLingBotVisions-sem.pt data=my-dataset.yaml

导出

任务ONNXTorchScriptExecuTorchTensorRTOpenVINOPaddleMNNRKNNncnnTFLiteCoreMLCore AI
semanticsemantic to ONNX:支持semantic to TorchScript:支持semantic to ExecuTorch:支持semantic to TensorRT:支持semantic to OpenVINO:支持semantic to Paddle:不支持semantic to MNN:不支持semantic to RKNN:不支持semantic to ncnn:不支持semantic to TFLite:不支持semantic to CoreML:不支持semantic to Core AI:支持

导出的产物按文件后缀经由 LibreYOLO() 重新加载,所以一个 .onnx.engine 文件的表现和检查点一样,返回同样的 Results导出列出了每种 格式接受的参数。

Python
from libreyolo import LibreYOLO model = LibreYOLO("LibreLingBotVisions-sem.pt")model.export(format="onnx", imgsz=512)model.export(format="coreai", imgsz=512)
CLI
libreyolo export model=LibreLingBotVisions-sem.pt format=onnx imgsz=512
使用导出的文件
from libreyolo import LibreYOLO, SAMPLE_IMAGE # 工厂按文件后缀分发,所以导出的产物加载方式和任何检查点一样,# 返回的也是同一个 Results 对象model = LibreYOLO("LibreLingBotVisions-sem.onnx")result = model(SAMPLE_IMAGE) print(result.semantic_mask.data.shape)

检查点

这个家族已发布的全部权重文件。

文件输入(px)权重许可
semantic
LibreLingBotVisions-sem.ptapache-2.0
LibreLingBotVisionb-sem.ptapache-2.0
LibreLingBotVisionl-sem.ptapache-2.0

上面的每个文件目前都在 LibreYOLO 组织中,并会在首次使用时下载。

许可证

请检查你所下载的具体权重在 Hugging Face 仓库中的许可。LibreYOLO 组织里的每个检查点都附有许可,同一家族内也不一定相同。该仓库是权威来源;以下摘要说明本页上次验证时适用的情况。

这里只说明涉及的许可证,不构成法律意见。如果答案对商用很重要,请自行阅读许可证并咨询法律顾问。

原始工作
LingBot-Vision, Robbyant (Ant Group)
上游许可
Apache-2.0
LibreYOLO 代码
MIT
权重
采用 Apache-2.0 许可,重新发布在 huggingface.co/LibreYOLO
解读
Apache-2.0 is a permissive license, so these weights can be used in commercial and closed-source products. It asks you to keep its license text and attribution notices with any copy of the weights you redistribute, and it grants a patent license. The LibreYOLO-hosted checkpoints combine Robbyant's Apache-2.0 backbone weights with a dense segmentation head LibreYOLO trained itself, so the whole checkpoint file carries the same permissive terms end to end.

上游发布的说明写明,它的 ViT 建立在 Meta AI 发表的 DINOv2/DINOv3 架构之上。 Robbyant 以 Apache-2.0 许可分发他们的实现,而这次 LibreYOLO 的移植只依据 Robbyant 的仓库完成,从未取自 Meta 的 DINOv2 或 DINOv3 代码。

引用

@article{lingbot-vision2026,
  title={Vision Pretraining for Dense Spatial Perception},
  author={Fu, Zelin and Tan, Bin and Sun, Changjiang and Liu, Shaohui and Zheng, Kecheng and Xu, Yinghao and Zhu, Xing and Shen, Yujun and Xue, Nan},
  journal={arXiv preprint arXiv:2607.05247},
  year={2026}
}

复制自作者在 github.com/robbyant/lingbot-vision#-citation 上提供的引用块。

已针对 LibreYOLO v1.5.0 验证。本页的支持表、检查点和基准测试数据由已发布的库和权重生成,并非手工编写。