--- library_name: ultralytics pipeline_tag: image-segmentation datasets: - BreadTopo/jumper-segmentation license: agpl-3.0 tags: [computer-vision, breadboard, jumper-wire, instance-segmentation] --- # Jumper Instance Segmentation English | [简体中文](#chinese) This model segments individual jumper wires in breadboard images. It provides wire masks to BreadTopo's segmentation pairing route and the behavior-cloning tracing route. The model alone does not determine which breadboard holes are connected. ## Model details | Item | Description | | --- | --- | | Architecture | Ultralytics YOLO11s instance segmentation | | Input | Breadboard image; the recorded synthetic evaluation used `imgsz=1280` | | Output | A detection box, confidence and instance mask for each predicted wire | | Classes | One class: `wire` | | Parameters | 10,082,675, counted from the released checkpoint | | Weights | `model.pt`, release `1.0` | | SHA-256 | `f3017c5214ec299c2c1f35923d555fc2c05491cac004267d747f117e217e232a` | ## Technical approach The checkpoint uses Conv and C3k2 feature blocks, followed by SPPF and C2PSA modules. Upsampling and concatenation fuse features at multiple scales; the segmentation head receives three feature levels and produces per-instance masks alongside detections. The model predicts a mask for each wire. In BreadTopo's Seg route, the separate [endpoint pose model](https://huggingface.co/BreadTopo/jumper-endpoint-pose) locates wire endpoints; the board mapping module estimates hole positions. Endpoint-to-mask assignment and pairing use these predictions to produce hole pairs. The BC route uses masks as wire identity cues for a separate tracing policy. The released segmentation labels describe visible wire masks with centerline bridging across gaps and polygon simplification. Predicted masks may overlap or merge near crossings. A mask by itself does not establish an electrical connection or guarantee a correct hole pair. ## Training data and procedure The recorded configuration used `yolo11s-seg.pt`, image size 1280, batch size 16, seed 0 and a target of 100 epochs. The final historical epoch count is not confirmed. The [segmentation dataset](https://huggingface.co/datasets/BreadTopo/jumper-segmentation) contains synthetic images and YOLO polygon labels, with train/validation/test splits by scene group. The release copy has per-file checksums, but the historical run did not retain a training-time per-file hash manifest or a source Git SHA. The exact training input bytes therefore cannot be independently established from the surviving record. ## Evaluation ### Frozen synthetic test The following results evaluate **the complete Seg pairing route**, using predicted endpoint detections and ground-truth board-hole locations, on 94 synthetic test images. They are not standalone mask AP scores. | Metric | Result | | --- | ---: | | Strict hole-pair precision | 0.8081 | | Strict hole-pair recall | 0.6434 | | Strict hole-pair F1 | 0.7164 | | Images with an exact pair set | 51/94 (54.26%) | - Evaluation ID: `seg-pairs-83236eb4c2852991` - Metric version: `strict-hole-pairs-v2` - Settings: CPU, image size 1280, confidence 0.25, endpoint assignment radius 25 px; endpoint pose is an auxiliary model. - A predicted pair counts as correct when its two hole IDs match a ground-truth pair. An exact image has the same predicted and ground-truth pair sets. ### Real-photo validation On 30 validation photos with automatic board mapping and the endpoint pose model, the Seg route achieved strict hole-pair F1 **0.6483** and exact pair sets on **14/30** images. - Evaluation ID: `photo-real-val-v1-current-b1-pairs` - Metric version: `strict-hole-pairs-v2` - This is a small validation set from one scene group, including 22 wired photos and 8 empty-board photos. It has been used for repeated development comparisons and is not an independent final test. Its settings differ from the synthetic test. ## Use Install the dependencies described in the [BreadTopo README](https://github.com/ikuika/BreadTopo), then run its local GUI with `--public-models` and choose **Seg**. The GUI downloads pinned weights and verifies their SHA-256. For raw segmentation predictions: ```python from huggingface_hub import hf_hub_download from ultralytics import YOLO weights = hf_hub_download( "BreadTopo/jumper-instance-segmentation", "model.pt", revision="cc59eee44ed96ea2644ebb5700d1a0e584894e5d", ) model = YOLO(weights) results = model.predict("board.png", imgsz=1280, conf=0.25, iou=0.7, device="cpu") ``` Raw masks do not include endpoint pairing or hole IDs. ## Limitations and intended use The model targets jumper wires, not resistors or other components. It was trained on synthetic images; real photos can differ in illumination, camera angle, wire color, occlusion, board appearance and crossings. Board and endpoint errors also affect hole-pair results. Inspect outputs before using them for circuit analysis. ## Related resources and license - [BreadTopo source and GUI](https://github.com/ikuika/BreadTopo) - [Segmentation dataset](https://huggingface.co/datasets/BreadTopo/jumper-segmentation) - [Endpoint pose model](https://huggingface.co/BreadTopo/jumper-endpoint-pose) - Code and model: [GNU AGPL-3.0](https://www.gnu.org/licenses/agpl-3.0.html) # 跳线实例分割模型 [English](#jumper-instance-segmentation) | 简体中文 该模型分割面包板图片中的每根跳线,为 BreadTopo 的分割辅助配对和行为克隆追踪提供掩膜。模型本身不直接判断跳线连接了哪些孔位。 ## 模型架构与输入输出 采用 Ultralytics YOLO11s 实例分割架构,只有一个 `wire` 类。输入面包板图像,输出每根预测跳线的检测框、置信度和实例掩膜;实际权重参数量为 10,082,675。发行权重为 `model.pt`,版本 `1.0`,SHA-256 为 `f3017c5214ec299c2c1f35923d555fc2c05491cac004267d747f117e217e232a`。 ## 技术路线 权重中的特征网络由 Conv、C3k2、SPPF 和 C2PSA 等模块组成,通过上采样与拼接融合多尺度特征;分割头接收三个尺度的特征,同时输出检测结果与实例掩膜。 Seg 路线先由本模型预测跳线掩膜,再结合独立的[端点 pose 模型](https://huggingface.co/BreadTopo/jumper-endpoint-pose)和板面孔位识别,完成端点归属和孔对配对。BC 路线则把掩膜用作线身份提示,交给独立追踪策略。分割标签使用可见线掩膜,并沿中心线连接缺口,再简化为多边形。 交叉处的掩膜可能融合或相互遮挡;单凭掩膜不能保证孔对正确。 ## 训练数据与过程 记录的训练配置使用 `yolo11s-seg.pt`、1280 图像尺寸、batch 16、随机种子 0,目标 100 轮;历史记录无法确认最终训练轮数。[分割数据集](https://huggingface.co/datasets/BreadTopo/jumper-segmentation)包含按场景组划分的合成图和 YOLO 多边形标签。发布副本已有逐文件校验,但训练时未保留逐文件输入哈希或源码 Git SHA,因此不能独立确认训练时的精确输入字节。 ## 评估结果 **冻结合成测试集**:94 张图,使用真值板面孔位和预测端点,评估完整 Seg 孔对配对流程;并非独立的掩膜 AP。 | 指标 | 结果 | | --- | ---: | | 严格孔对精确率 | 0.8081 | | 严格孔对召回率 | 0.6434 | | 严格孔对 F1 | 0.7164 | | 整图孔对集合完全一致 | 51/94(54.26%) | 评测 ID:`seg-pairs-83236eb4c2852991`;指标版本:`strict-hole-pairs-v2`。使用 CPU、图像尺寸 1280、置信度 0.25、端点归属半径 25 px 和端点 pose 辅助模型。 **实拍验证集**:30 张照片,使用自动板面与端点 pose 模型,严格孔对 F1 为 **0.6483**,整图完全一致 **14/30**。评测 ID:`photo-real-val-v1-current-b1-pairs`;指标版本:`strict-hole-pairs-v2`。该集合来自同一场景组(22 张接线图、8 张空板),已反复用于开发比较,并非独立最终测试;其设置与合成测试不同。 ## 使用方法与限制 按照 [BreadTopo README](https://github.com/ikuika/BreadTopo) 安装并启动 `--public-models`,在 GUI 选择 **Seg**。英文部分提供固定 commit 的原始掩膜推理示例;直接调用 YOLO 不包含端点配对和孔号。 模型面向跳线,不识别电阻等其他元件;合成训练与实拍图像的光照、视角、颜色、遮挡和交叉可能不同。板面或端点识别错误也会影响孔对,使用结果前应人工核对。 ## 相关资源与许可证 - [项目源码与 GUI](https://github.com/ikuika/BreadTopo) - [分割数据集](https://huggingface.co/datasets/BreadTopo/jumper-segmentation) - [端点 pose 模型](https://huggingface.co/BreadTopo/jumper-endpoint-pose) - 代码和模型:[GNU AGPL-3.0](https://www.gnu.org/licenses/agpl-3.0.html)