Ucas-HaoranWei / GOT-OCR2.0

Official code implementation of General OCR Theory: Towards OCR-2.0 via a Unified End-to-end Model
3.2k stars 237 forks source link

will make a tiny math mistake for comprehensive math code #14

Open veya2ztn opened 1 week ago

veya2ztn commented 1 week ago

Excelent Job~! Allow me post a case with 99.9% correction but 0.1% math error case. Please parse below image

test4

with mutlicrop commend

python3 GOT/demo/run_ocr_2.0_crop.py  --model-name  ../GOT_weights/ --image-file test4.png --render

You may get

image

Error 1: $c{10}^{-}$ becom $c{10}^{-1}$ Error 2: short √: $\sqrt{\left(\sigma{2} \Sigma{20}(\epsilon \tau)+1-\sigma{2}\right)^{2}-4 \eta{2} \sigma{2}\Sigma{20}} $ become $\sqrt{\left(\sigma{2} \Sigma{20}(\epsilon \tau)+1-\sigma{2}\right)^{2}-4 \eta{2} \sigma{2}}\Sigma{20} $ Otherwise, it is perfect~!

Notice you need render it in KaTeX rather than default --render since the default mathpix skip render the block array math. The KaTeX code below.

<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>KaTeX Example</title>
  <!-- Include KaTeX CSS -->
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.3/dist/katex.min.css">
  <!-- Include KaTeX JavaScript -->
  <script defer src="https://cdn.jsdelivr.net/npm/katex@0.16.3/dist/katex.min.js"></script>
  <script defer src="https://cdn.jsdelivr.net/npm/katex@0.16.3/dist/contrib/auto-render.min.js"
    onload="renderMathInElement(document.body);"></script>
</head>

<body>
common part \([18,34,40,\). In conclusion, we obtain the (adimensional) uniform expansions at zeroth order as
\[
\left\{\begin{array}{l}
s_{10}^{u n}(\tau)=\Sigma_{10}(\epsilon \tau)+s_{10}(\tau)-1=\Sigma_{10}(\epsilon \tau) \\
s_{20}(\tau)=s_{20}(\tau)+\Sigma_{20}(\epsilon \tau)=\Sigma_{20}(\epsilon \tau) \\
c_{10}^{u n}(\tau)=\Gamma_{10}(\epsilon \tau)+c_{10}(\tau)-c_{10}^{-1} \\
=\frac{\left(\sigma_{1} \Sigma_{10}(\epsilon \tau)+1-\sigma_{1}\right)-\sqrt{\left(\sigma_{1} \Sigma_{10}(\epsilon
\tau)+1-\sigma_{1}\right)^{2}-4 \eta_{1} \sigma_{1}} \Sigma_{10}(\epsilon \tau)}{2 \eta_{1}} \\
+\frac{1}{\eta_{1} \sigma_{1}}\left[\frac{e^{\sqrt{\Delta} \tau}-1}{c_{10}^{+} e^{\sqrt{\Delta}
\tau}-c_{10}^{-1}}\right]-c_{10}^{-1} \\
c_{20}^{u n}(\tau)=\Gamma_{20}(\epsilon \tau)+c_{20}(\tau) \\
=\frac{\left(\sigma_{2} \Sigma_{20}(\epsilon \tau)+1-\sigma_{2}\right)-\sqrt{\left(\sigma_{2} \Sigma_{20}(\epsilon
\tau)+1-\sigma_{2}\right)^{2}-4 \eta_{2} \sigma_{2}} \Sigma_{20}(\epsilon \tau)}{2 \eta_{2} \sigma_{2}}
\end{array}\right.
\]
Let us now pass to the first-order approximation, starting again from system (24) for the inner solutions. We have
\[
\begin{array}{l}
\frac{\mathrm{d} s_{11}}{\mathrm{d} \tau}=-c_{10}(\tau)=-\frac{1}{\eta_{1} \sigma_{1}}\left[\frac{e^{\sqrt{\Delta}
\tau}-1}{c_{10}^{+} e^{\sqrt{\Delta} \tau}-c_{10}^{-1}}\right], \quad s_{11}(0)=0 \\
\frac{\mathrm{d} s_{21}}{\mathrm{d} \tau}=c_{10}(\tau)-\frac{\eta_{2} k_{2}}{\eta_{1}
k_{1}}c_{20}(\tau)=c_{10}(\tau)=\frac{1}{\eta_{1} \sigma_{1}}\left[\frac{e^{\sqrt{\Delta} \tau}-1}{c_{10}^{+}
e^{\sqrt{\Delta} \tau}-c_{10}^{-1}}\right], \quad s_{21}(0)=0 \\
\left\{\begin{array}{l}
\frac{\mathrm{d} c_{11}}{\mathrm{d} \tau}=2 \eta_{1} \sigma_{1} c_{10} c_{11}-\left[\sigma_{1} s_{11} c_{10}+(\sigma_{1}
s_{10}+1-\sigma_{1}) c_{11}\right]+s_{11} \\
=2 \eta_{1} \sigma_{1} c_{10} c_{11}-\left[\sigma_{1} s_{11} c_{10}+c_{11}\right]+s_{1}=\left(2 \eta_{1} \sigma_{1}
c_{10}-1\right) c_{11}+s_{11}\left(1-\sigma_{1} c_{10}\right) \\
c_{11}(0)=0
\end{array}\right. \\
\left\{\begin{array}{l}
\frac{\mathrm{d} c_{21}}{\mathrm{d} \tau}=h\left[2 \eta_{2} \sigma_{2} c_{20} c_{21}-\left(\sigma_{2}
s_{20}+1-\sigma_{2}\right) c_{21}-\sigma_{2} s_{21} c_{20}+s_{21}\right] \\
=h\left[\left(\sigma_{2}-1\right) c_{21}+s_{21}\right] \\
c_{21}(0)=0
\end{array}\right.
\end{array}
\]
As in , the solutions of Eqs. \((41,42)\) are the following:
\[
\left\{\begin{array}{l}
s_{11}(\tau)=-s_{21}(\tau)=-c_{10}^{+} \tau+\frac{1}{\eta_{1} \sigma_{1}} \ln \left[\frac{\left(c_{10}^{+}
e^{\sqrt{\Delta} \tau}-c_{10}^{-}\right) \eta_{1} \sigma_{1}}{\sqrt{\Delta}}\right] \\
=-c_{10}^{-}(\tau)+\frac{1}{\eta_{1} \sigma_{1}}\left[-\ln \left(\sqrt{\Delta} c_{10}^{-}\right)+\ln
\left(1-\frac{c_{10}^{-} e^{-\sqrt{\Delta} \tau}}{c_{10}^{+}}\right)\right]
\end{array}\right.
\]
For \(\tau \rightarrow 0\), we need to expand the solution up to the second order in \(\tau\), obtaining \(s_{11}(\tau)
\sim-\frac{1}{2} \tau^{2}\). This implies that at the very beginning of the reaction,
\[
\bar{S}_{1}^{\prime}(t) \sim S_{\mathrm{T}}\left[1-\frac{1}{2} a_{1}^{2} K_{1} E_{1 \mathrm{T}} t^{2}\right] ; \quad
\bar{S}_{2}^{\prime}(t) \sim \frac{1}{2} a_{1}^{2} K_{1} S_{\mathrm{T}} E_{1 \mathrm{T}} t^{2}
\]
Also this asymptotic result can be used in the interpolation of the experimental data, in order to estimate the kinetic
parameters of the reaction. Let us underline that the approximation at zeroth order, \(\bar{S}_{1}(t) \cong
S_{\mathrm{T}}\), gives too few information, while the computation of the first-order term yields a much more precise
approximation of \(\bar{S}_{1}(t)\) in the early stages of the transient reaction, when experimental data can be used to
find the kinetic parameter values. The possibility to give numerical tools to find estimates of the kinetic parameters
(which are, in general, hard to estimate) is one of the main reasons for the computation of the first-order corrections,
mainly of the inner solutions.
</body>

</html>
Ucas-HaoranWei commented 1 week ago

Thank you for your promotion and suggestions!