Scene-text visual-style encoder (Chinese/English, DINOv2-B)
This public inference artifact encodes the visual style of tightly cropped Chinese or English scene text. It separates an overall representation into typography-oriented and appearance-oriented embeddings and supports within-language and cross-language similarity search. It is not an OCR model. The opaque repository name is not an access-control mechanism.
Outputs
z_global [N,256]: overall typography and appearance.z_font [N,128]: font/typography-oriented representation.z_appearance [N,128]: fill, stroke, shadow, and opacity-oriented representation.style_tokens [N,8,768]: local research tokens; not validated as generator conditioning.
The three z_* tensors are L2-normalized. Preprocessing preserves aspect ratio and pads inputs to
112 x 448. The complete fine-tuned DINOv2 ViT-B/14 backbone is included.
Install and use
git clone https://github.com/zqpresent/aaazhouquandecangku.git
cd aaazhouquandecangku
python -m pip install -e .
opaque-encoder download zqpresent/m8f4d1c9a6e2b7035d14 --local-dir weights
opaque-encoder encode --model weights --input crops --output styles.npz --device cpu --local-files-only
Training and evaluation scope
Training used 10,000,000 bilingual counterfactual groups, 32 views per group, and 320,000,000 scene exposures from 4,014 font faces / 2,374 families. No old English replay pool was used.
On a paired synthetic test containing 53 faces / 27 families unseen to both this model and the previous model by file and glyph signatures, three fixed render seeds (24,576 images) gave font R@1 of 87.88% for Chinese-to-Chinese, 81.37% for English-to-English, 63.43% for Chinese-to-English, and 61.08% for English-to-Chinese retrieval.
These are controlled synthetic retrieval measurements, not real-photograph accuracy. Similar font families, low text/background contrast, uncropped scenes, other scripts, and generator conditioning remain unvalidated or difficult. Public access does not make the opaque name a security boundary.
verification.json records source-to-export numerical parity. Training-only classifiers, optimizer
state, data manifests, source paths, and training history are not included in the inference weights.
The loader verifies the SHA-256 digest declared in config.json.