修改配置文件

This commit is contained in:
2026-04-07 16:23:21 +08:00
parent b78032f80c
commit ea1fc21dc4
+12 -1
View File
@@ -149,6 +149,17 @@ def export_to_excel(sorted_classes, class_counts_detail, class_counts,
note_cell.border = make_border()
ws.row_dimensions[last_row].height = 22
# ── 备注行:采样目标说明 ─────────────────────────────────────
remark_row = last_row + 1
ws.merge_cells(f"A{remark_row}:F{remark_row}")
remark_cell = ws[f"A{remark_row}"]
remark_cell.value = "现阶段目标:每个类别至少 100 张样本。后期可根据实际情况调整阈值。高质量样本越多,模型泛化能力越强。"
remark_cell.font = make_font(color="64748B", size=9)
remark_cell.alignment = center
remark_cell.fill = make_fill("EFF6FF")
remark_cell.border = make_border()
ws.row_dimensions[remark_row].height = 18
# ── 列宽自适应 ───────────────────────────────────────────────
col_widths = [40, 8, 8, 8, 8, 12]
for col_idx, width in enumerate(col_widths, start=1):
@@ -239,7 +250,7 @@ def count_images_by_class(dataset_root: str, output_file: str = None,
# 按数量降序排列
sorted_classes = sorted(class_counts.items(), key=lambda x: x[1], reverse=True)
min_threshold = 10
min_threshold = 100
insufficient_count = 0
# ── 控制台输出 ──────────────────────────────────────────────