Skip to content

Relational matcher - #5

Merged
sidxz merged 5 commits into
mainfrom
relational-matcher
Jun 1, 2026
Merged

Relational matcher#5
sidxz merged 5 commits into
mainfrom
relational-matcher

Conversation

@sidxz

@sidxz sidxz commented Jun 1, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

sidxz and others added 5 commits May 31, 2026 18:44
Sliding-window tiling fragments small label boxes at tile boundaries and
runs the detector away from its 1280px training resolution. On real_test
(100 pages), full-image @1280 raises label recall 53%->80%, structure
recall 93%->99%, and cuts label false-positives ~5x vs tiling. detect_full
now defaults imgsz=1280; add scripts/finetune/lps/diag_label_recall.py
(conf x mode x class recall sweep + miss characterization).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
New geometry-only matcher (SetMatcher, ~105K params): transformer self-
attention over all page detections + log-space Sinkhorn optimal transport
with learnable dustbins for unmatched structures (SuperGlue-style),
adapted to structure-label pairing. A third BaseMatcher alongside
HungarianMatcher and the visual LPS.

On real_test it matches distance on clean-box assignment (99.2%), has the
best rejection of unlabelled structures (100%), and beats the LPS
end-to-end (F1 0.804 det-trained vs 0.772). Now the ChemPipeline default
(lazy import avoids relmatch<->pipeline circular import).

- structflo/cser/relmatch/: features, model, dataset (GT + DetMatch), matcher, train
- sf-train-relmatch entry point; cser-relmatcher in weights registry (v0.1, HF Hub)
- scripts/finetune/relmatch/: eval_compare(_all), prepare_det_data, sweep_margin
- publish_weights.py: cser-relmatcher support + create_repo, --filename, --no-registry, --yes
- ChemPipeline also threads imgsz=1280 to full-image detection

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
CLAUDE.md: relational matcher documented as the pipeline default in the
Matching strategies section. 01-quickstart notebook: uses the default
matcher and adds a 3-matcher comparison section, using a synthetic example
image only.

(The reframed paper drafts under docs/*draft*.md are updated on disk but
remain untracked per the repo's existing .gitignore rule.)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
… score diag

diag_e2e_decompose.py: add --mode {tiled,full640,full1280,full2048} to compare
inference strategies end-to-end. diag_lps_scores.py: dump LPS score
distributions on GT boxes (threshold-miss vs ranking-error decomposition).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@sidxz
sidxz merged commit 3033974 into main Jun 1, 2026
1 check passed
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