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

Return unbalanced latex equations #7

Closed
GopinathCool opened this issue Apr 30, 2021 · 4 comments
Closed

Return unbalanced latex equations #7

GopinathCool opened this issue Apr 30, 2021 · 4 comments

Comments

@GopinathCool
Copy link

I tested with lot of images, but for most of the images it results in an unbalanced latex equation, do you have any idea to resolve it?
I also attached the produced latex equation and image for reference.

$$U_{s2A_{-}k}=\bar{\cal B}{s}{s\bar{G}^{+}}\cdot\bar{Y}{s2A{-}\bar{k}}+\bar{\cal B}{r}\frac{\displaystyle\frac{\displaystyle\cal L}{m}^{2}}{\displaystyle\frac{\displaystyle\cal L}{\displaystyle\frac{\displaystyle\cal E}{m}}{\displaystyle\cal P}{s}\cdot\bar{\cal A}{2}\cdot\bar{\cal I}{s22}\cdot\bar{Y}{s2\bar{\cal B}{-}\bar{\cal F}{s}}{\displaystyle\cal E}{s2\bar{\cal F}{-}\displaystyle\cal A}^{-}\left(\frac{\displaystyle\frac{\displaystyle\frac{\displaystyle\cal E}{m}\cdot\bar{\cal S}{s}}{\displaystyle\cal E}{s}^{2}}\right)\cdot\bar{\mathrm Y}{s4\bar{\cal B}{s2}\cdot\bar{\cal A}{s2}\displaystyle\cal E{s}\bar{\cal F}_{s}\right},$$
patent_8_60

@lukas-blecher
Copy link
Owner

Hi, thank you for your interest in the project.
I can see 2 or 3 problems with the Image:

  1. The image is a bitmask (no gradient from black to white). The network has not trained on bitmask images.
  2. Underscores are underrepresented in the training set
  3. I don't recognize the font. Maybe the network has problems with that

When I rerender the image:
image
The model returns

U_{s t a k.\,k}=R_{s G2}\cdot Y_{s a A.\,k}+R_{r}\frac{L_{m}^{2}}{L_{r}^{2}}\cdot Y_{s1A F_{2}\,k}-\omega_{\psi s}\cdot\sigma_{2}L_{s2}\cdot Y_{s b P\,k}-\omega_{\psi s}\cdot\sigma_{2}L_{s a b F\,k}\cdot Y_{s1B F\,k}-\left(\frac{L_{m}\cdot R_{r}}{L_{r}^{2}}\right)\cdot\Psi_{r A k}

image
Which is not unbalanced and is fairly close to the input image.

I will take note and also train on a small subset of bitmask images. That should sort it out for the most part but will take some time.

@GopinathCool
Copy link
Author

Thanks for your answer, the latex you have provided well balanced and also close to the image. But just one question how would be able to achieve that, do I need to update any part of the code?
It will be really helpful, if you could update and provide your model to handle bitmask images also.

@GopinathCool
Copy link
Author

I have seen your recent commit, do I need to retrain the model with your formulae.zip images to handle bitmask images?

@lukas-blecher
Copy link
Owner

I have trained a new model (slightly different architecture) with the new commit 005648b.
The font is still hard to read for the model but it works. If you have problems try to change the temperature.

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