AstarLight / Lets_OCR

A repository for OCR, which inlcudes some classical OCR algorithms Pytorch implementation such as CTPN, EAST and CRNN.
MIT License
656 stars 327 forks source link

请教:为什么运行train.py 在lmdb.open()时,总是说 not such a file or directory. 我确定目录存在的。 #47

Open eratio opened 5 years ago

eratio commented 5 years ago

Exception has occurred: Error /home/leon/ocr/LetsOCR/data/train_lmdb: No such file or directory File "/home/leon/ocr/LetsOCR/lib/dataset.py", line 25, in init meminit=False)

配置文件: raw_folder = '' train_data = "/home/leon/ocr/LetsOCR/data/train_lmdb" test_data = "/home/leon/ocr/LetsOCR/data/test_lmdb"

harrymore commented 5 years ago

lmdb打开的文件路径需要是utf8格式,如果你是使用python3运行这个程序,需要将配置改为: train_data = "/home/leon/ocr/LetsOCR/data/train_lmdb".encode("utf8") test_data = "/home/leon/ocr/LetsOCR/data/test_lmdb".encode("utf8")

wjx-git commented 5 years ago

可能是权限不够,运行chmod 777 train_lmdb试试

eratio commented 5 years ago

问题已解决,谢谢了!

On Jun 12, 2019, at 4:36 PM, wjx-git notifications@github.com wrote:

可能是权限不够,运行chmod 777 train_lmdb试试

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/AstarLight/Lets_OCR/issues/47?email_source=notifications&email_token=AAHBZJISZ2EYFRSVBQZU7XDP2CYPHA5CNFSM4HLFL352YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXPVLPI#issuecomment-501175741, or mute the thread https://github.com/notifications/unsubscribe-auth/AAHBZJIAET4GEAITMZ3LITDP2CYPHANCNFSM4HLFL35Q.

ShangLe0607 commented 5 years ago

@eratio 你好,你这个是怎么解决的,我运行train.py会报错,请问这是为什么呢

Corrupted image for 1689 Corrupted image for 5364 [root@localhost crnn]#

iloveOREO commented 5 years ago

问题已解决,谢谢了! On Jun 12, 2019, at 4:36 PM, wjx-git @.***> wrote: 可能是权限不够,运行chmod 777 train_lmdb试试 — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub <#47?email_source=notifications&email_token=AAHBZJISZ2EYFRSVBQZU7XDP2CYPHA5CNFSM4HLFL352YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXPVLPI#issuecomment-501175741>, or mute the thread https://github.com/notifications/unsubscribe-auth/AAHBZJIAET4GEAITMZ3LITDP2CYPHANCNFSM4HLFL35Q.

请问你是怎么解决的,可以分享一下吗?

nursinghoming commented 4 years ago

@eratio 你好,你这个是怎么解决的,我运行train.py会报错,请问这是为什么呢

Corrupted image for 1689 Corrupted image for 5364 [root@localhost crnn]#

这个问题怎么解决呢?

iloveOREO commented 4 years ago

@eratio 你好,你这个是怎么解决的,我运行train.py会报错,请问这是为什么呢 Corrupted image for 1689 Corrupted image for 5364 [root@localhost crnn]#

这个问题怎么解决呢?

你可以看看这个issue https://github.com/AstarLight/Lets_OCR/issues/56#issuecomment-501531117