https://github.com/tal-tech/san
Syntax-Aware Network for Handwritten Mathematical Expression Recognition
https://github.com/tal-tech/san
Last synced: about 1 year ago
JSON representation
Syntax-Aware Network for Handwritten Mathematical Expression Recognition
- Host: GitHub
- URL: https://github.com/tal-tech/san
- Owner: tal-tech
- Created: 2022-05-31T07:03:23.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2023-02-21T14:56:06.000Z (over 3 years ago)
- Last Synced: 2025-04-03T05:12:34.135Z (about 1 year ago)
- Language: Python
- Size: 30.4 MB
- Stars: 92
- Watchers: 13
- Forks: 22
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Syntax-Aware Network for Handwritten Mathematical Expression Recognition
This is the official pytorch implementation of [SAN](https://arxiv.org/abs/2203.01601) (CVPR'2022).

### Environment
```
python==3.8.5
numpy==1.22.2
opencv-python==4.5.5.62
PyYAML==6.0
tensorboardX==2.5
torch==1.6.0+cu101
torchvision==0.7.0+cu101
tqdm==4.64.0
```
### Train
```
python train.py --config path_to_config_yaml
```
### Inference
```
python inference.py --config path_to_config_yaml --image_path path_to_image_folder --label_path path_to_label_folder
```
```
Example:
python inference.py --config 14.yaml --image_path data/14_test_images --label_path data/test_caption.txt
```
### Dataset
CROHME:
```
Download the dataset from: https://github.com/JianshuZhang/WAP/tree/master/data
```
HME100K
```
Download the dataset from the official website: https://ai.100tal.com/dataset
```
### Citation
If you find this dataset helpful for your research, please cite the following paper:
```
@inproceedings{yuan2022syntax,
title={Syntax-Aware Network for Handwritten Mathematical Expression Recognition},
author={Yuan, Ye and Liu, Xiao and Dikubab, Wondimu and Liu, Hui and Ji, Zhilong and Wu, Zhongqin and Bai, Xiang},
booktitle={Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition},
pages={4553--4562},
year={2022}
}
```