├── .gitignore ├── LICENSE ├── README.md ├── __init__.py ├── configs ├── datasets │ ├── config-im2latex-kaggle-600.yaml │ ├── config-im2latex-kaggle.yaml │ ├── dataset-im2latexv2.yaml │ └── dataset-realFormula.yaml └── im2latexv2-cvt.yaml ├── create_dataset.py ├── data ├── test.png └── vocabs │ ├── im2latexv2.vocab │ └── token_types2.csv ├── inference.py ├── model.py ├── model_parts ├── CNNEncoder.py ├── TransformerDecoder.py ├── counting.py ├── cvt.py ├── dcn.py ├── focal_transformer.py ├── regionvit.py ├── swin_transformer_v2.py └── utils.py ├── preprocessing ├── __init__.py ├── collect_formulas.py ├── config_latex.py ├── formula2image.py ├── generate_latex_vocab.py ├── generate_vocab.py ├── generate_vocab_kaggle.py ├── improve_tokens.py ├── preprocess_crohme19.py ├── preprocess_crohme23.py ├── preprocess_crohme_csv2txt.py ├── preprocess_crohme_txt2csv.py ├── preprocess_filter.py ├── preprocess_formulas.py ├── preprocess_images.py ├── preprocess_inftyMDB-1.py ├── preprocess_latex.js ├── remove_formulas_with_rare_tokens.py ├── templates │ ├── resources │ │ ├── aastex631.cls │ │ ├── acl.sty │ │ └── macros.tex │ ├── templates.py │ └── templates2.py └── third_party │ ├── katex │ ├── .#katex.js │ ├── README.md │ ├── cli.js │ ├── katex.js │ ├── package.json │ └── src │ │ ├── Lexer.js │ │ ├── Options.js │ │ ├── ParseError.js │ │ ├── Parser.js │ │ ├── Settings.js │ │ ├── Style.js │ │ ├── buildCommon.js │ │ ├── buildHTML.js │ │ ├── buildMathML.js │ │ ├── buildTree.js │ │ ├── delimiter.js │ │ ├── domTree.js │ │ ├── environments.js │ │ ├── fontMetrics.js │ │ ├── fontMetricsData.js │ │ ├── functions.js │ │ ├── mathMLTree.js │ │ ├── parseData.js │ │ ├── parseTree.js │ │ ├── symbols.js │ │ └── utils.js │ ├── match-at │ ├── README.md │ ├── lib │ │ ├── __tests__ │ │ │ └── matchAt-test.js │ │ └── matchAt.js │ └── package.json │ └── multi-bleu.perl ├── requirements.txt ├── tools ├── __init__.py ├── convert_dataset.py ├── data_utils.py ├── dataloader.py ├── get_formula_line.py ├── image_utils.py ├── insprect_dataset.py ├── parser.py ├── render_prediction.py └── utils.py ├── train.py └── trainer.py /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felix-schmitt/MathNet/HEAD/.gitignore -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felix-schmitt/MathNet/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felix-schmitt/MathNet/HEAD/README.md -------------------------------------------------------------------------------- /__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /configs/datasets/config-im2latex-kaggle-600.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felix-schmitt/MathNet/HEAD/configs/datasets/config-im2latex-kaggle-600.yaml -------------------------------------------------------------------------------- /configs/datasets/config-im2latex-kaggle.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felix-schmitt/MathNet/HEAD/configs/datasets/config-im2latex-kaggle.yaml -------------------------------------------------------------------------------- /configs/datasets/dataset-im2latexv2.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felix-schmitt/MathNet/HEAD/configs/datasets/dataset-im2latexv2.yaml -------------------------------------------------------------------------------- /configs/datasets/dataset-realFormula.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felix-schmitt/MathNet/HEAD/configs/datasets/dataset-realFormula.yaml -------------------------------------------------------------------------------- /configs/im2latexv2-cvt.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felix-schmitt/MathNet/HEAD/configs/im2latexv2-cvt.yaml -------------------------------------------------------------------------------- /create_dataset.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felix-schmitt/MathNet/HEAD/create_dataset.py -------------------------------------------------------------------------------- /data/test.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felix-schmitt/MathNet/HEAD/data/test.png -------------------------------------------------------------------------------- /data/vocabs/im2latexv2.vocab: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felix-schmitt/MathNet/HEAD/data/vocabs/im2latexv2.vocab -------------------------------------------------------------------------------- /data/vocabs/token_types2.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felix-schmitt/MathNet/HEAD/data/vocabs/token_types2.csv -------------------------------------------------------------------------------- /inference.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felix-schmitt/MathNet/HEAD/inference.py -------------------------------------------------------------------------------- /model.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felix-schmitt/MathNet/HEAD/model.py -------------------------------------------------------------------------------- /model_parts/CNNEncoder.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felix-schmitt/MathNet/HEAD/model_parts/CNNEncoder.py -------------------------------------------------------------------------------- /model_parts/TransformerDecoder.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felix-schmitt/MathNet/HEAD/model_parts/TransformerDecoder.py -------------------------------------------------------------------------------- /model_parts/counting.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felix-schmitt/MathNet/HEAD/model_parts/counting.py -------------------------------------------------------------------------------- /model_parts/cvt.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felix-schmitt/MathNet/HEAD/model_parts/cvt.py -------------------------------------------------------------------------------- /model_parts/dcn.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felix-schmitt/MathNet/HEAD/model_parts/dcn.py -------------------------------------------------------------------------------- /model_parts/focal_transformer.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felix-schmitt/MathNet/HEAD/model_parts/focal_transformer.py -------------------------------------------------------------------------------- /model_parts/regionvit.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felix-schmitt/MathNet/HEAD/model_parts/regionvit.py -------------------------------------------------------------------------------- /model_parts/swin_transformer_v2.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felix-schmitt/MathNet/HEAD/model_parts/swin_transformer_v2.py -------------------------------------------------------------------------------- /model_parts/utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felix-schmitt/MathNet/HEAD/model_parts/utils.py -------------------------------------------------------------------------------- /preprocessing/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /preprocessing/collect_formulas.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felix-schmitt/MathNet/HEAD/preprocessing/collect_formulas.py -------------------------------------------------------------------------------- /preprocessing/config_latex.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felix-schmitt/MathNet/HEAD/preprocessing/config_latex.py -------------------------------------------------------------------------------- /preprocessing/formula2image.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felix-schmitt/MathNet/HEAD/preprocessing/formula2image.py -------------------------------------------------------------------------------- /preprocessing/generate_latex_vocab.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felix-schmitt/MathNet/HEAD/preprocessing/generate_latex_vocab.py -------------------------------------------------------------------------------- /preprocessing/generate_vocab.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felix-schmitt/MathNet/HEAD/preprocessing/generate_vocab.py -------------------------------------------------------------------------------- /preprocessing/generate_vocab_kaggle.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felix-schmitt/MathNet/HEAD/preprocessing/generate_vocab_kaggle.py -------------------------------------------------------------------------------- /preprocessing/improve_tokens.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felix-schmitt/MathNet/HEAD/preprocessing/improve_tokens.py -------------------------------------------------------------------------------- /preprocessing/preprocess_crohme19.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felix-schmitt/MathNet/HEAD/preprocessing/preprocess_crohme19.py -------------------------------------------------------------------------------- /preprocessing/preprocess_crohme23.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felix-schmitt/MathNet/HEAD/preprocessing/preprocess_crohme23.py -------------------------------------------------------------------------------- /preprocessing/preprocess_crohme_csv2txt.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felix-schmitt/MathNet/HEAD/preprocessing/preprocess_crohme_csv2txt.py -------------------------------------------------------------------------------- /preprocessing/preprocess_crohme_txt2csv.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felix-schmitt/MathNet/HEAD/preprocessing/preprocess_crohme_txt2csv.py -------------------------------------------------------------------------------- /preprocessing/preprocess_filter.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felix-schmitt/MathNet/HEAD/preprocessing/preprocess_filter.py -------------------------------------------------------------------------------- /preprocessing/preprocess_formulas.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felix-schmitt/MathNet/HEAD/preprocessing/preprocess_formulas.py -------------------------------------------------------------------------------- /preprocessing/preprocess_images.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felix-schmitt/MathNet/HEAD/preprocessing/preprocess_images.py -------------------------------------------------------------------------------- /preprocessing/preprocess_inftyMDB-1.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felix-schmitt/MathNet/HEAD/preprocessing/preprocess_inftyMDB-1.py -------------------------------------------------------------------------------- /preprocessing/preprocess_latex.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felix-schmitt/MathNet/HEAD/preprocessing/preprocess_latex.js -------------------------------------------------------------------------------- /preprocessing/remove_formulas_with_rare_tokens.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felix-schmitt/MathNet/HEAD/preprocessing/remove_formulas_with_rare_tokens.py -------------------------------------------------------------------------------- /preprocessing/templates/resources/aastex631.cls: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felix-schmitt/MathNet/HEAD/preprocessing/templates/resources/aastex631.cls -------------------------------------------------------------------------------- /preprocessing/templates/resources/acl.sty: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felix-schmitt/MathNet/HEAD/preprocessing/templates/resources/acl.sty -------------------------------------------------------------------------------- /preprocessing/templates/resources/macros.tex: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felix-schmitt/MathNet/HEAD/preprocessing/templates/resources/macros.tex -------------------------------------------------------------------------------- /preprocessing/templates/templates.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felix-schmitt/MathNet/HEAD/preprocessing/templates/templates.py -------------------------------------------------------------------------------- /preprocessing/templates/templates2.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felix-schmitt/MathNet/HEAD/preprocessing/templates/templates2.py -------------------------------------------------------------------------------- /preprocessing/third_party/katex/.#katex.js: -------------------------------------------------------------------------------- 1 | srush@beaker.12118:1471814512 -------------------------------------------------------------------------------- /preprocessing/third_party/katex/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felix-schmitt/MathNet/HEAD/preprocessing/third_party/katex/README.md -------------------------------------------------------------------------------- /preprocessing/third_party/katex/cli.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felix-schmitt/MathNet/HEAD/preprocessing/third_party/katex/cli.js -------------------------------------------------------------------------------- /preprocessing/third_party/katex/katex.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felix-schmitt/MathNet/HEAD/preprocessing/third_party/katex/katex.js -------------------------------------------------------------------------------- /preprocessing/third_party/katex/package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felix-schmitt/MathNet/HEAD/preprocessing/third_party/katex/package.json -------------------------------------------------------------------------------- /preprocessing/third_party/katex/src/Lexer.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felix-schmitt/MathNet/HEAD/preprocessing/third_party/katex/src/Lexer.js -------------------------------------------------------------------------------- /preprocessing/third_party/katex/src/Options.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felix-schmitt/MathNet/HEAD/preprocessing/third_party/katex/src/Options.js -------------------------------------------------------------------------------- /preprocessing/third_party/katex/src/ParseError.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felix-schmitt/MathNet/HEAD/preprocessing/third_party/katex/src/ParseError.js -------------------------------------------------------------------------------- /preprocessing/third_party/katex/src/Parser.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felix-schmitt/MathNet/HEAD/preprocessing/third_party/katex/src/Parser.js -------------------------------------------------------------------------------- /preprocessing/third_party/katex/src/Settings.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felix-schmitt/MathNet/HEAD/preprocessing/third_party/katex/src/Settings.js -------------------------------------------------------------------------------- /preprocessing/third_party/katex/src/Style.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felix-schmitt/MathNet/HEAD/preprocessing/third_party/katex/src/Style.js -------------------------------------------------------------------------------- /preprocessing/third_party/katex/src/buildCommon.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felix-schmitt/MathNet/HEAD/preprocessing/third_party/katex/src/buildCommon.js -------------------------------------------------------------------------------- /preprocessing/third_party/katex/src/buildHTML.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felix-schmitt/MathNet/HEAD/preprocessing/third_party/katex/src/buildHTML.js -------------------------------------------------------------------------------- /preprocessing/third_party/katex/src/buildMathML.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felix-schmitt/MathNet/HEAD/preprocessing/third_party/katex/src/buildMathML.js -------------------------------------------------------------------------------- /preprocessing/third_party/katex/src/buildTree.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felix-schmitt/MathNet/HEAD/preprocessing/third_party/katex/src/buildTree.js -------------------------------------------------------------------------------- /preprocessing/third_party/katex/src/delimiter.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felix-schmitt/MathNet/HEAD/preprocessing/third_party/katex/src/delimiter.js -------------------------------------------------------------------------------- /preprocessing/third_party/katex/src/domTree.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felix-schmitt/MathNet/HEAD/preprocessing/third_party/katex/src/domTree.js -------------------------------------------------------------------------------- /preprocessing/third_party/katex/src/environments.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felix-schmitt/MathNet/HEAD/preprocessing/third_party/katex/src/environments.js -------------------------------------------------------------------------------- /preprocessing/third_party/katex/src/fontMetrics.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felix-schmitt/MathNet/HEAD/preprocessing/third_party/katex/src/fontMetrics.js -------------------------------------------------------------------------------- /preprocessing/third_party/katex/src/fontMetricsData.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felix-schmitt/MathNet/HEAD/preprocessing/third_party/katex/src/fontMetricsData.js -------------------------------------------------------------------------------- /preprocessing/third_party/katex/src/functions.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felix-schmitt/MathNet/HEAD/preprocessing/third_party/katex/src/functions.js -------------------------------------------------------------------------------- /preprocessing/third_party/katex/src/mathMLTree.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felix-schmitt/MathNet/HEAD/preprocessing/third_party/katex/src/mathMLTree.js -------------------------------------------------------------------------------- /preprocessing/third_party/katex/src/parseData.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felix-schmitt/MathNet/HEAD/preprocessing/third_party/katex/src/parseData.js -------------------------------------------------------------------------------- /preprocessing/third_party/katex/src/parseTree.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felix-schmitt/MathNet/HEAD/preprocessing/third_party/katex/src/parseTree.js -------------------------------------------------------------------------------- /preprocessing/third_party/katex/src/symbols.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felix-schmitt/MathNet/HEAD/preprocessing/third_party/katex/src/symbols.js -------------------------------------------------------------------------------- /preprocessing/third_party/katex/src/utils.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felix-schmitt/MathNet/HEAD/preprocessing/third_party/katex/src/utils.js -------------------------------------------------------------------------------- /preprocessing/third_party/match-at/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felix-schmitt/MathNet/HEAD/preprocessing/third_party/match-at/README.md -------------------------------------------------------------------------------- /preprocessing/third_party/match-at/lib/__tests__/matchAt-test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felix-schmitt/MathNet/HEAD/preprocessing/third_party/match-at/lib/__tests__/matchAt-test.js -------------------------------------------------------------------------------- /preprocessing/third_party/match-at/lib/matchAt.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felix-schmitt/MathNet/HEAD/preprocessing/third_party/match-at/lib/matchAt.js -------------------------------------------------------------------------------- /preprocessing/third_party/match-at/package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felix-schmitt/MathNet/HEAD/preprocessing/third_party/match-at/package.json -------------------------------------------------------------------------------- /preprocessing/third_party/multi-bleu.perl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felix-schmitt/MathNet/HEAD/preprocessing/third_party/multi-bleu.perl -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felix-schmitt/MathNet/HEAD/requirements.txt -------------------------------------------------------------------------------- /tools/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tools/convert_dataset.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felix-schmitt/MathNet/HEAD/tools/convert_dataset.py -------------------------------------------------------------------------------- /tools/data_utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felix-schmitt/MathNet/HEAD/tools/data_utils.py -------------------------------------------------------------------------------- /tools/dataloader.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felix-schmitt/MathNet/HEAD/tools/dataloader.py -------------------------------------------------------------------------------- /tools/get_formula_line.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felix-schmitt/MathNet/HEAD/tools/get_formula_line.py -------------------------------------------------------------------------------- /tools/image_utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felix-schmitt/MathNet/HEAD/tools/image_utils.py -------------------------------------------------------------------------------- /tools/insprect_dataset.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felix-schmitt/MathNet/HEAD/tools/insprect_dataset.py -------------------------------------------------------------------------------- /tools/parser.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felix-schmitt/MathNet/HEAD/tools/parser.py -------------------------------------------------------------------------------- /tools/render_prediction.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felix-schmitt/MathNet/HEAD/tools/render_prediction.py -------------------------------------------------------------------------------- /tools/utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felix-schmitt/MathNet/HEAD/tools/utils.py -------------------------------------------------------------------------------- /train.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felix-schmitt/MathNet/HEAD/train.py -------------------------------------------------------------------------------- /trainer.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/felix-schmitt/MathNet/HEAD/trainer.py --------------------------------------------------------------------------------