Skip to content

Rebuild ExcelTableCNN: working TableSense-inspired detector with PBR, grid-context backbone, and measured results (v0.3.0)#6

Merged
Flagro merged 4 commits into
mainfrom
remediate_exceltablecnn
Jul 7, 2026
Merged

Rebuild ExcelTableCNN: working TableSense-inspired detector with PBR, grid-context backbone, and measured results (v0.3.0)#6
Flagro merged 4 commits into
mainfrom
remediate_exceltablecnn

Conversation

@Flagro

@Flagro Flagro commented Jul 7, 2026

Copy link
Copy Markdown
Owner

Why

Neither of the repo's two model implementations ever worked: one computed no
RPN loss (loss collapsed to ~0 while learning nothing), the other crashed on
construction, and the data layer produced zero-area ground-truth boxes and
constant border features. No tests, no packaging, no CI.

What

  • One model path: torchvision Faster R-CNN based; legacy + experimental
    code archived; package restructured into data/model/training/evaluation.
  • Fixed data pipeline: 30-channel featurization (paper's scheme) with
    parity-tested openpyxl and native xlrd backends — no LibreOffice
    needed
    for .xls; half-open box convention; file-hash tensor caching;
    MD5-verified corpus downloads.
  • Detector upgrades: corpus-tuned anchors (GT coverage @IOU≥0.7:
    45%→71%), PBR boundary snapping (per-edge offset classification →
    cell-exact boxes), and a novel grid-context backbone (row/column
    density priors + axial strip pooling — not in TableSense).
  • Tooling: excel-table-cnn-train/eval/detect CLIs, per-component loss
    logging, device=auto (CUDA→CPU; MPS tested, opt-in), EoB-0/EoB-2
    metrics, uv packaging (uv.lock, no requirements.txt), CI.
  • 106 tests, incl. the keystone gate: overfit one sheet to EoB-0.

Results (240 train sheets, 40 epochs, CPU, held-out 30 sheets / 67 tables)

Configuration EoB-0 R/P EoB-2 R/P
v1 baseline 0 / 0 23.9% / 41.0%
+ paper levers (30ch, anchors, 14×14) 0 / 0 19.4% / 24.1%
+ PBR 10.4% / 14.3% 29.9% / 40.8%
+ grid-context (full) 16.4% / 25.6% 40.3% / 62.8%

Paper reference: 91.3/86.5 EoB-2 — on 25× more training data. Next lever:
full-corpus GPU run (notebooks/train_kaggle_colab.ipynb).

@Flagro Flagro self-assigned this Jul 7, 2026
@Flagro Flagro changed the title (fix) Refactor ExcelTableCNN current implementation to fix zero loss issue Rebuild ExcelTableCNN: working TableSense-inspired detector with PBR, grid-context backbone, and measured results (v0.3.0) Jul 7, 2026
@Flagro Flagro merged commit e81574f into main Jul 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant