LinXueyuanStdio / LaTeX_OCR_PRO

:art: 数学公式识别增强版:中英文手写印刷公式、支持初级符号推导(数据结构基于 LaTeX 抽象语法树)Math Formula OCR Pro, supports handwrite, Chinese-mixed formulas and simple symbol reasoning (based on LaTeX AST).

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Please make sure you have the correct access rights WHEN I Run 'git submodule update'

ArtificialZeng opened this issue · comments

Please make sure you have the correct access rights
and the repository exists.
fatal: clone of 'git@github.com:LinXueyuanStdio/Data-for-LaTeX_OCR.git' into submodule path '/home/ailab/LaTeX_OCR/LaTeX_OCR_PRO/data' failed
Failed to clone 'data'. Retry scheduled
Cloning into '/home/ailab/LaTeX_OCR/LaTeX_OCR_PRO/data'...
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
fatal: clone of 'git@github.com:LinXueyuanStdio/Data-for-LaTeX_OCR.git' into submodule path '/home/ailab/LaTeX_OCR/LaTeX_OCR_PRO/data' failed
Failed to clone 'data' a second time, aborting

Or you can download the data by yourself from https://github.com/LinXueyuanStdio/Data-for-LaTeX_OCR
Just rename the dir Data-for-LaTeX_OCR to data and put it under /home/ailab/LaTeX_OCR/LaTeX_OCR_PRO.

/bin/sh: 1: magick: not found
[Errno 2] No such file or directory: 'data/small/images/val/23.png'
[Errno 2] No such file or directory: 'data/small/images/val/25.png'
[Errno 2] No such file or directory: 'data/small/images/val/28.png'
/bin/sh: 1: magick: not found
/bin/sh: 1: magick: not found
[Errno 2] No such file or directory: 'data/small/images/val/26.png'
/bin/sh: 1: magick: not found
[Errno 2] No such file or directory: 'data/small/images/val/27.png'
[Errno 2] No such file or directory: 'data/small/images/val/29.png'
Building vocab...

  • done. 0/0 tokens added to vocab.
    Writing vocab...
    Traceback (most recent call last):
    File "build.py", line 44, in
    main()
    File "/home/ailab/anaconda3/envs/tf_1.12/lib/python3.5/site-packages/click/core.py", line 829, in call
    return self.main(*args, **kwargs)
    File "/home/ailab/anaconda3/envs/tf_1.12/lib/python3.5/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
    File "/home/ailab/anaconda3/envs/tf_1.12/lib/python3.5/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
    File "/home/ailab/anaconda3/envs/tf_1.12/lib/python3.5/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
    File "build.py", line 40, in main
    write_vocab(vocab, vocab_config.path_vocab)
    File "/home/ailab/LaTeX_OCR_PRO/model/utils/text.py", line 138, in write_vocab
    print("- done. {} tokens".format(i+1))
    UnboundLocalError: local variable 'i' referenced before assignment
    makefile:34: recipe for target 'build-small' failed
    make: *** [build-small] Error 1

sometimes magick may fail to generate png properly. You should check the files in data dir to determine whether all the files exist or not. If not, just call magick to generate the specific file once again.