Add predict sample code for lstm+ctc ocr. Also update it's README.md #4365

Merged
merged 1 commit into from Jan 11, 2017

Projects

None yet

3 participants

@BobLiu20
Contributor

I think a predict sample code for lstm+ctc ocr is very useful.

Related issue point: issue

@BobLiu20 BobLiu20 Add predict sample code for lstm+ctc ocr. Also update it's README.md
597d213
@piiswrong
Member

Thanks. Somehow I missed this. Merged

@piiswrong piiswrong merged commit d6328a5 into dmlc:master Jan 11, 2017

3 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
default Build finished.
Details
@fanlu
fanlu commented Jan 12, 2017 edited

When I compile make in mxnet/amalgamation
The following error occurred
/workspace/mxnet/amalgamation/../include/mxnet/base.h:15:21: fatal error: nnvm/op.h: 没有那个文件或目录
@BobLiu20 @piiswrong
@antinucleon When this can be done?

@BobLiu20
Contributor

@fanlu Hi , first of all your compile error has no direct bearing upon the PR.

I guess you are using a incorrect git clone to get source code. checking this page.
and take care:

git clone https://github.com/dmlc/mxnet.git --recursive

do not lost --recursive argument in here.

@fanlu
fanlu commented Jan 15, 2017

@BobLiu20 I have used the compiler before --recursive, the latest cod include the nnvm module, but you fork out of the time there is no such this module. This should be inside the issue #4667

@fanlu
fanlu commented Jan 19, 2017

@BobLiu20 I forked your branch from https://github.com/BobLiu20/mxnet, and I got an error

plugin/warpctc/./warpctc-inl.h:123:5: error: 'ctcComputeInfo' was not declared in this scope
ctcComputeInfo info;
^
plugin/warpctc/./warpctc-inl.h:125:7: error: 'info' was not declared in this scope
info.loc = CTC_CPU;
^
plugin/warpctc/./warpctc-inl.h:175:61: error: 'info' was not declared in this scope
input_lengths.size(), info,
^
Makefile:197: recipe for target 'build/plugin/warpctc/warpctc.o' failed
make: *** [build/plugin/warpctc/warpctc.o] Error 1
make: *** Waiting for unfinished jobs....
can you help me about this problum? thx

@BobLiu20
Contributor

@fanlu Hi, Regrading to this issue, a solution appear in this site. You can get the reason and solution after review it.

@fanlu
fanlu commented Jan 20, 2017

@BobLiu20 It worked, thx

2017-01-19 14:00:13,361 Saved checkpoint to "model-0010.params"
iter
2017-01-19 14:04:21,496 Epoch[9] Validation-Accuracy=0.958906
2017-01-19 14:04:21,505 Saved checkpoint to "ocr-0010.params"

the Validation-Accuracy is 0.958906, but the Inference is almost wrong
admin@8f585fd:/export/App/work/data/bob_mxnet/example/warpctc$ python ocr_predict.py
the num is 764, Result: 74454
admin@8f585fd:/export/App/work/data/bob_mxnet/example/warpctc$ python ocr_predict.py
the num is 558, Result: 758
admin@8f585fd:/export/App/work/data/bob_mxnet/example/warpctc$ python ocr_predict.py
the num is 5117, Result: 7117
admin@8f585fd:/export/App/work/data/bob_mxnet/example/warpctc$ python ocr_predict.py
the num is 447, Result: 907
admin@8f585fd:/export/App/work/data/bob_mxnet/example/warpctc$ python ocr_predict.py
the num is 708, Result: 708
admin@8f585fd:/export/App/work/data/bob_mxnet/example/warpctc$ python ocr_predict.py
the num is 519, Result: 7842
admin@8f585fd:/export/App/work/data/bob_mxnet/example/warpctc$ python ocr_predict.py
the num is 416, Result: 7416
admin@8f585fd:/export/App/work/data/bob_mxnet/example/warpctc$ python ocr_predict.py
the num is 302, Result: 7302
admin@8f585fd:/export/App/work/data/bob_mxnet/example/warpctc$ python ocr_predict.py
the num is 728, Result: 7428

@rravu3 rravu3 pushed a commit to rravu3/mxnet that referenced this pull request Jan 21, 2017
@BobLiu20 BobLiu20 + Rahul Ravu Add predict sample code for lstm+ctc ocr. Also update it's README.md (#… 06b55c9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment