seg_confusion_table — SEGMENTATION score op

• 数据种类:labels2d × labels2d → table

• 调用: import fullseye as fs; fs.ledger.seg_confusion_table(labels_pred, labels_true, *, background: 'int' = 0) -> 'Dict[str, object]'(要直接调用实现,import segeval; segeval.seg_confusion_table(labels_pred, labels_true, *, background: 'int' = 0) -> 'Dict[str, object]';从台账取用则 opssegmentation.get("seg_confusion_table"))

用法

标签对应的混淆表(行 = 真值,列 = 预测),并给出最大重叠匹配与一一对应(唯一性)标志(seg_confusion_table)。

table[i, j] = 同时具有真标签 labels_true[i] 和预测标签 labels_pred[j] 的像素数。对应按最大重叠: 真 i 的对象 = 非背景列中 table[i, :] 最大的列(pred_of_true,标签值,没有则为 −1), 预测 j 的对象 = 非背景行中最大的行(true_of_pred)。mutual_true[i] = 真 i 的对象反过来也选真 i, mutual_pred[j] 同理。claims[j] = 把预测 j 选为对象的真的个数。unique_matching = 所有非背景行、列都相互选中(= 1 对 1 的双射)。背景的行、列保留在表中,但从对应中排除。不是 Hungarian(总和最大的分配)而是 argmax,所以多个真可能选中 1 个大的预测 —— 这就是 claims ≥ 2 的标志。

返回值: table、labels_true / labels_pred(行、列的标签值)、row_sums / col_sums、pred_of_true / true_of_pred、mutual_true / mutual_pred、claims、unique_matching、n_true / n_pred(不含背景的个数)、n。

详细使用指南

• halcon_segmentation 族使用指南

背景知识指南(该算子背后的物理与约定)

• segmentation_scoring_and_worlds — 分割评分与带真值的合成世界 —— 哪种度量对哪种失效视而不见

参考(示例数据、文献)

• 示例数据目录(下载 URL / 许可证) —— 2-D 用 skimage.data(BSD/公有领域)加合成图,3-D 给出真实数据源(Stanford/PDS 等)的下载 URL。

• 算子来历与参考文献 —— 该算子族所依据的研究/方法出处。

• 算法的正典(作者、年份)与用途见上面的族使用指南。

可运行的示例(实际调用该算子并已验证的样例)

• (暂无)

类型可衔接的下一个算子(可接受 table 作为输入)

class_ndim_norm

同类别(score)

seg_dice_jaccard · seg_boundary_f · seg_hausdorff · seg_mean_surface_distance · seg_under_over_segmentation · seg_object_counts_match · seg_score_card


*Provenance: segeval.py — SEGMENTATION 算子登记表。本条目由 tools/opdocs.py md 自动生成(请勿手工编辑)。*

© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.