visual-feature-discovery
identifying print houses from scans of antique books
2 min readupdated
A collection of model weights for classifying scanned pages of colonial-era Korean periodicals across the four print houses that produced them. Built on AttriMIL (a multiple instance learning method for discovering visual features), ConvNeXtV2 Base, and Swin S3 Base 224 architectures by digital humanities researchers. Unlike standard classifiers, these models are evaluated using a strict held-out book split to prevent data leakage between pages of the same publication. This repository is useful for historians, archivists, and developers working on historical document analysis.
Key features
- Support for three architectures: the compact AttriMIL (12 MB weights) alongside larger baseline models ConvNeXtV2 Base and Swin S3 Base 224.
- Interpretable visual feature discovery across page fragments (16x16 and 8x8 pixel patches).
- Rigorous evaluation on unseen books (GroupKFold) across five cross-validation folds.
- Official weights accompanying a 2026 research paper, complete with open dataset metadata on Zenodo and source code on GitHub.
What you can do
- Automatically attribute archival scans of Korean periodicals to four historical print houses.
- Use the AttriMIL checkpoints and repository code as a foundation for interpretable classification of fonts, print characteristics, and scanning defects.
- Compare the behavior of patch-based models (AttriMIL) and standard vision transformers (Swin, ConvNeXtV2) under document-level versus page-level data splits.
Example
import torch
from huggingface_hub import hf_hub_download
from src.models.lightning_attrimil import LightningAttriMIL
path = hf_hub_download("aronvandepol/visual-feature-discovery", "attrimil_p8s4_flash_fold0.pth")
ckpt = torch.load(path, map_location="cpu", weights_only=True)
model = LightningAttriMIL(**ckpt["hyper_parameters"])
model.load_state_dict(ckpt["state_dict"])Read more
DetailsAccuracy on unseen books (held-out book): AttriMIL 16x16 — 84.52 ± 2.19%, Swin S3 Base 224 — 84.11 ± 1.81%, ConvNeXtV2 Base — 81.98 ± 2.40%.
With a random page-level split, baseline accuracy reaches 98.15%, though the authors warn this reflects overfitting to the style of individual books.
Trained on 57,583 pages from the Hyundam Mun'go collection (the raw images are not included in the repository).
License: CC-BY-4.0 for weights and MIT for code.










Comments