b9fc4e3a1b9dc019640164b57d49ecba56364bfa,src/main.py,,validate,#,85
Before Change
model = Model(loader.charList, useBeamSearch)
// save characters of model for inference mode
open(fnCharList, "w").write(str().join(loader.charList))
print("Validate NN")
loader.validationSet()
numOK = 0
After Change
for i in range(len(recognized)):
dist = editdistance.eval(recognized[i], batch.gtTexts[i])
numErr += dist
numTotal += len(batch.gtTexts[i])
print("[OK]" if dist==0 else "[ERR:%d]" % dist,""" + batch.gtTexts[i] + """, "->", """ + recognized[i] + """)
// print validation result
charErrorRate = numErr / numTotal
print("Character error rate: %f%%" % (charErrorRate*100.0))
return charErrorRate
def infer(model, fnImg):
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances
Project Name: githubharald/SimpleHTR
Commit Name: b9fc4e3a1b9dc019640164b57d49ecba56364bfa
Time: 2018-08-16
Author: harald_scheidl@hotmail.com
File Name: src/main.py
Class Name:
Method Name: validate
Project Name: daavoo/pyntcloud
Commit Name: b1004960919dd1671da86dad6c465d4b6ad69d62
Time: 2017-04-07
Author: daviddelaiglesiacastro@gmail.com
File Name: pyntcloud/plot/points.py
Class Name:
Method Name: plot_points
Project Name: pyinstaller/pyinstaller
Commit Name: 4ae8821baddddf8bbca75f4b4d4a105abe838eb8
Time: 2018-03-30
Author: h.goebel@crazy-compilers.com
File Name: PyInstaller/building/build_main.py
Class Name: Analysis
Method Name: _write_warnings