|
|
@@ -0,0 +1,62 @@
|
|
|
+## COCODet 指标说明
|
|
|
+
|
|
|
+COCODet 是基于 COCO 数据集标准的目标检测评估指标,在您的项目中通过 `mmeval.COCODetection` 实现。主要包含以下指标:
|
|
|
+
|
|
|
+### 核心指标
|
|
|
+- **mAP (mean Average Precision)**: 平均精度均值,是检测任务的主要评估指标
|
|
|
+- **mAR (mean Average Recall)**: 平均召回率均值
|
|
|
+- **AP@IoU=0.5**: IoU阈值为0.5时的平均精度
|
|
|
+- **AP@IoU=0.75**: IoU阈值为0.75时的平均精度
|
|
|
+- **AP@IoU=0.5:0.95**: IoU阈值从0.5到0.95(步长0.05)的平均精度
|
|
|
+
|
|
|
+## 在 OmniDocBench 中的使用场景
|
|
|
+
|
|
|
+根据您的代码和配置文件,COCODet 主要用于以下检测任务:
|
|
|
+
|
|
|
+### 1. Layout Detection (版面检测)
|
|
|
+在 layout_detection.yaml 中配置,用于评估文档版面元素检测:
|
|
|
+
|
|
|
+```yaml
|
|
|
+detection_eval: # 由 DetectionEval 类处理
|
|
|
+ metrics:
|
|
|
+ - COCODet # 使用 COCODet 指标
|
|
|
+```
|
|
|
+
|
|
|
+检测的版面元素包括:
|
|
|
+- `title` - 标题
|
|
|
+- `text` - 正文文本
|
|
|
+- `figure` - 图片
|
|
|
+- `table` - 表格
|
|
|
+- `abandon` - 页眉页脚等
|
|
|
+
|
|
|
+### 2. Formula Detection (公式检测)
|
|
|
+在 formula_detection.yaml 中配置,评估公式检测效果:
|
|
|
+
|
|
|
+- `isolate_formula` - 行间公式检测
|
|
|
+- `inline_formula` - 行内公式检测
|
|
|
+
|
|
|
+### 3. 数据处理流程
|
|
|
+
|
|
|
+在 detection_eval.py 中,`DetectionEval` 类通过以下方式使用 COCODet:
|
|
|
+
|
|
|
+```python
|
|
|
+detect_matrix = dataset.coco_det_metric(
|
|
|
+ predictions=dataset.samples['preds'],
|
|
|
+ groundtruths=dataset.samples['gts']
|
|
|
+)
|
|
|
+```
|
|
|
+
|
|
|
+数据来源于 `DetectionDataset` 类,该类负责:
|
|
|
+- 加载真实标注数据 (ground truth)
|
|
|
+- 加载模型预测结果 (predictions)
|
|
|
+- 格式转换和类别映射
|
|
|
+
|
|
|
+### 4. 评估优势
|
|
|
+
|
|
|
+COCODet 指标特别适合文档检测任务因为:
|
|
|
+- **多尺度评估**: 通过不同IoU阈值评估检测精度
|
|
|
+- **类别无关**: 可以评估多种文档元素类型
|
|
|
+- **标准化**: 与计算机视觉领域标准一致,便于比较
|
|
|
+- **全面性**: 同时考虑精度和召回率
|
|
|
+
|
|
|
+这使得 OmniDocBench 能够全面评估各种文档理解模型在版面分析和公式检测任务上的性能表现。
|