githubharald / SimpleHTR

Handwritten Text Recognition (HTR) system implemented with TensorFlow.
https://towardsdatascience.com/2326a3487cd5
MIT License
1.99k stars 894 forks source link

Assertion Error #10

Closed syedjafer closed 6 years ago

syedjafer commented 6 years ago

Traceback (most recent call last): File "main.py", line 139, in main() File "main.py", line 115, in main loader = DataLoader(FilePaths.fnTrain, Model.batchSize, Model.imgSize, Model.maxTextLen) File "/home/syedjafer/Documents/FinalYearProj/SimpleHTR/src/DataLoader.py", line 43, in init assert (len(lineSplit) >= 9) , "Working" AssertionError: Working

githubharald commented 6 years ago

there is something wrong with your words.txt file. Please look at the README, sections "Train model" and "FAQ", to see instructions on how to download the correct words.txt file.

syedjafer commented 6 years ago

yeah , i resolved it . Thanks

syedjafer commented 6 years ago

How do i train with my own dataset , but it resulted in , screenshot from 2018-09-30 21-36-14

My words .txt screenshot from 2018-09-30 21-37-44

My dataset screenshot from 2018-09-30 21-38-21

githubharald commented 6 years ago

your words.txt is wrong. It should throw an assertion - did you remove it? Please read the README - there you can find a link where a description can be found on how to create words.txt.

syedjafer commented 6 years ago

what does getNext function do , how to input my input images , screenshot from 2018-09-30 22-07-56

githubharald commented 6 years ago

this is up to you. The code is just a skeleton which everyone has to adapt to his or her dataset. You have to somehow let getNext() return a tuple containing the ground-truth text and image.

anidiatm41 commented 3 years ago

yeah , i resolved it . Thanks @syedjafer @githubharald can you please help me , how did you create word.txt file? I have 4000+ images, their full location and ground truths in an excel . Ground Truths are sentences having max length of 200+. PLs pls help me how to create words.txt file from them.

PFA a ref image .

test