The dataset viewer is not available because its heuristics could not detect any supported data files. You can try uploading some data files, or configuring the data files location manually.
AmbHMEG: Ambiguous Handwritten Mathematical Expression Dataset
This repository provides a dataset of ambiguous handwritten mathematical expressions generated by AmbHMEG, a model for rendering LaTeX expressions as visually ambiguous math images. It also includes the pretrained AmbHMEG model used for dataset generation.
Contents
The resources are organized in the order of the data generation pipeline.
Training Dataset
mathwriting_with_graph.tar.zst
A preprocessed version of the MathWriting dataset with graph annotations used for training the AmbHMEG model.
Pretrained Model
gryphgen_graph_sd_mathwriting_epoch_50.pth
A model trained on the MathWriting dataset to generate handwritten mathematical expressions, including ambiguous variations.
Generated Dataset
mathwriting_amb.tar.zst
A dataset of ambiguously generated handwritten mathematical expressions produced by AmbHMEG.
Structure
mathwriting_amb/
basic/
test/
valid/
layout/
test/
valid/
symbol/
test/
valid/
Subsets
basic
Standard single-conditioned generated dataset.
layout
Dual-conditioned dataset:
- original expression
- expression with superscripts and subscripts removed
symbol
Dual-conditioned dataset:
- original expression
- expression where symbols are replaced with visually similar alternatives
Replacement Rules Used in Symbol Editing
pairs = [
("0", "6"),
("0", "8"),
("1", "7"),
("1", "9"),
("2", "7"),
("3", "8"),
("5", "6"),
("5", "8"),
("0", "O"),
("0", "o"),
("1", "l"),
("1", "I"),
("2", "z"),
("2", "Z"),
("5", "S"),
("6", "b"),
("8", "B"),
("9", "g"),
("t", "+"),
("c", "e"),
("u", "v"),
("v", "r"),
("m", "n"),
("a", "d"),
("i", "j"),
("x", r"\times"),
("O", "Q"),
("I", "J"),
("v", r"\nu"),
("o", r"\omicron"),
("p", r"\rho"),
("n", r"\eta"),
("u", r"\mu"),
("a", r"\alpha"),
("y", r"\gamma"),
("2", r"\zeta"),
("2", r"\gamma"),
("x", r"\chi"),
("w", r"\omega"),
("e", r"\epsilon"),
(r"\epsilon", r"\in"),
(r"\phi", r"\varphi"),
(r"\theta", r"\vartheta"),
(r"\pi", r"\varpi"),
("k", r"\kappa"),
(r"\sigma", "o"),
("r", r"\gamma"),
("z", r"\xi"),
(r"\beta", "B"),
("-", r"\sim"),
(r"\cdot", "."),
("1", "|"),
("|", "l"),
(r"\sum", "E"),
(r"\prod", r"\Pi"),
(r"\partial", "d"),
(r"\infty", "8"),
(r"\subset", "c"),
(r"\in", r"\epsilon"),
(r"\subseteq", r"\subset"),
(r"\approx", r"\sim"),
(r"\equiv", "="),
("0", r"\emptyset"),
(r"\emptyset", r"\phi"),
(r"\ell", "1"),
("C", "c"),
("I", "l"),
("I", "i"),
("K", "k"),
("M", "m"),
("N", "n"),
("O", "o"),
("P", "p"),
("S", "s"),
("U", "u"),
("V", "v"),
("W", "w"),
("X", "x"),
("Y", "y"),
("Z", "z"),
("I", "j"),
("L", "l"),
("Q", "q"),
("R", "r"),
(r"\Gamma", r"\gamma"),
(r"\Delta", r"\delta"),
(r"\Theta", r"\theta"),
(r"\Lambda", r"\lambda"),
(r"\Xi", r"\xi"),
(r"\Pi", r"\pi"),
(r"\Sigma", r"\sigma"),
(r"\Phi", r"\phi"),
(r"\Psi", r"\psi"),
(r"\Omega", r"\omega"),
(r"\Sigma", "E"),
(r"\Pi", r"\prod"),
]
Notes
This dataset contains data derived from and includes original MathWriting samples. It is subject to the terms of the MathWriting dataset license (CC BY-NC-SA 4.0).
Data Format
Each sample consists of an image and a corresponding label file.
- Image:
<id>.png - Label:
<id>.pkl(JSON-serializable structure)
Usage
Download and Extract
tar --zstd -xvf *.tar.zst
Training and Generation
Refer to the official repository:
https://github.com/pfnet-research/AmbHMEG
License
Code and Model
- Licensed under the MIT License
The model is trained on the MathWriting dataset, and its use and outputs may be subject to the dataset license.
Dataset
- Licensed under CC BY-NC-SA 4.0
- MathWriting Dataset https://github.com/google-research/google-research/tree/master/mathwriting
Usage Restrictions
- Commercial use is not allowed
- Derivative works must be shared under CC BY-NC-SA 4.0
- Attribution to the original MathWriting authors is required
Acknowledgements
We thank the authors of the MathWriting dataset for providing this resource.
- Downloads last month
- 54