Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

thanks your work,and a question about GPU #4

Open
YRQ66 opened this issue Feb 11, 2023 · 4 comments
Open

thanks your work,and a question about GPU #4

YRQ66 opened this issue Feb 11, 2023 · 4 comments

Comments

@YRQ66
Copy link

YRQ66 commented Feb 11, 2023

Thank you for your work. I want to ask about the requirements for the size of gpu memory to train

@rainyl
Copy link
Collaborator

rainyl commented Feb 12, 2023

In my situation, I trained it using a RTX 3080Ti GPU with 12G memory and a batch size of 16, the GPU memory was almost fully occupied. I think with lower batch size, 8G may be also enough but need more time.
Hoping my answer can help you :)

@YRQ66
Copy link
Author

YRQ66 commented Feb 12, 2023

1676211819913
I found a problem. When I tried to train, the verification process took a lot of time, as shown in the figure. In addition, I found that the dataset is different from the common MathJax fonts. At present, I am trying to build a larger dataset, which is expected to exceed 100K. It is expected that I will open it here soon. In the future, I will also try to build a handwritten dataset (which may take longer). Thank you again for your work

@rainyl
Copy link
Collaborator

rainyl commented Feb 13, 2023

the verification process took a lot of time

Well, I guess it may be due to the first time of loading data from hard drive, when setting pin_memory=True for DataLoader, the rest data loading process will be fast.
Also, the current collate_fn is not clever and need to be improved.
If the validation process is really slow, you can set conf.eval_batch to a smaller value, the default is 0x3f3f3f and in most condition the whole validation dataset will be included.

the dataset is different from the common MathJax fonts

image
In order to enhance the dataset, I included several common formula fonts (the font will influence the OCR result greatly), I remember that the font used by MathJax is similar to TimesNewRoman or STIX or XITS (please correct it if I am wrong), so the formula rendered by MathJax should be recognizable by this program.

It is really great that you are trying to complete the dataset, I think for open-sourced LaTex formula OCR project, the most important thing is actually the high-quality dataset itself, the current dataset contains a lot of errors, many formula can't render or rendered not as expected. I am looking forward to your works.

@YRQ66
Copy link
Author

YRQ66 commented Feb 13, 2023

Thank you for your help, which will continue to inspire me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants