Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem of test the model on the single image? #391

Closed
Timthony opened this issue Mar 27, 2020 · 27 comments
Closed

Problem of test the model on the single image? #391

Timthony opened this issue Mar 27, 2020 · 27 comments

Comments

@Timthony
Copy link

If you want to test a single image you can do it with
python tools/test_shadownet.py --image_path PATH/TO/IMAGE
--weights_path PATH/TO/MODEL_WEIGHTS
--char_dict_path PATH/TO/CHAR_DICT_PATH
--ord_map_dict_path PATH/TO/ORD_MAP_PATH

"--weights_path PATH/TO/MODEL_WEIGHTS"
Whether the selection of weights can be used directly use "model/crnn_syn90k_saved_model/1"?
If can, I encountered some errors.

@MaybeShewill-CV
Copy link
Owner

@tensor-flower crnn_syn90k_saved_model/1是给tfservering用的模型 你测试单张图 需要下载ckpt模型文件 例如中文模型在这里 https://www.dropbox.com/sh/z22xsn4byddalv3/AAAiIxAHJKbqy44M73ow5znSa?dl=0

@MaybeShewill-CV
Copy link
Owner

@Timthony 可以参考 #390

@Timthony
Copy link
Author

Timthony commented Mar 27, 2020 via email

@MaybeShewill-CV
Copy link
Owner

@Timthony 英文的我这几天找时间重新上传下 之前上传的好像是个错误的权重文件:)

@Timthony
Copy link
Author

Timthony commented Mar 27, 2020 via email

@MaybeShewill-CV
Copy link
Owner

@Timthony 对 dropbox可能需要科学上网:)

@Timthony
Copy link
Author

Timthony commented Mar 27, 2020 via email

@MaybeShewill-CV
Copy link
Owner

@Timthony 模型链接已更新 https://www.dropbox.com/sh/y4eaunamardibnd/AAB4h8NkakASDoc6Ek4knEGIa?dl=0 可以下载尝试:)

@Timthony
Copy link
Author

Timthony commented Mar 27, 2020 via email

@Timthony
Copy link
Author

Timthony commented Mar 27, 2020 via email

@MaybeShewill-CV
Copy link
Owner

@Timthony 1.地址一样 但是模型文件不一样么 2. 你是怎么调用的 贴个command出来吧

@Timthony
Copy link
Author

Timthony commented Mar 27, 2020 via email

@Timthony
Copy link
Author

python tools/test_shadownet.py --image_path data/test_images/test_01.jpg --weights_path model/crnn_synth90k2/shadownet.ckpt --char_dict_path data/char_dict/char_dict_en.json --ord_map_dict_path data/char_dict/ord_map_en.json

python tools/test_shadownet.py --image_path data/test_images/test_01.jpg --weights_path model/crnn_synth90k2/shadownet.ckpt-80000 --char_dict_path data/char_dict/char_dict_en.json --ord_map_dict_path data/char_dict/ord_map_en.json

换成第二个时候可以了,经过测试现在输出也是准确的了,感谢!

@Timthony
Copy link
Author

这个英文的模型对数字也具有识别能力吗?

@MaybeShewill-CV
Copy link
Owner

@Timthony 1.是因为我上传的模型文件换了名字 没有同步更新readme 明天更新下 2.对数字有一定识别能力 但是主要要看你的应用场景和这个训练数据中的数据的domain gap是不是过大:)

@Timthony
Copy link
Author

好的。
对数字进行了简单测试,对于网页截图对12345识别有时也会出错。下图的识别
image

识别为:result: sralobhos

@MaybeShewill-CV
Copy link
Owner

@Timthony 你可以看下synth90k的数据集 就知道什么问题了:)

@Timthony
Copy link
Author

@Timthony 你可以看下synth90k的数据集 就知道什么问题了:)

看了下网站上synth90k的例子应该全是英文字符的,去不了学校没资源训练新模型--。

@MaybeShewill-CV
Copy link
Owner

@Timthony 有部分数字 但是比较少:)

@MaybeShewill-CV
Copy link
Owner

@Timthony 你可以试试中文模型 中文模型中的数字貌似还能多一点:)

@Timthony
Copy link
Author

Timthony commented Mar 28, 2020 via email

@MaybeShewill-CV
Copy link
Owner

@Timthony 那你可以尝试synthtext生成一部分训练数据 试试看:)

@Timthony
Copy link
Author

Timthony commented Mar 28, 2020 via email

@MaybeShewill-CV
Copy link
Owner

@Timthony 好的 没有别的问题我就close了:)

@Timthony
Copy link
Author

@Timthony 好的 没有别的问题我就close了:)

好的,-^_^-

@Lie-huo
Copy link

Lie-huo commented Mar 31, 2020

您好,我把中文权重下载下来后,没有shadownet.ckpt 文件,只有checkpoint,shadownet.ckpt-322000.data-00000-of-00001,shadownet.ckpt-322000.index,shadownet.ckpt-322000.meta四个文件,这怎么解决呢

@Cabbagehust2507
Copy link

Cabbagehust2507 commented Aug 25, 2020

您好,我把中文权重下载下来后,没有shadownet.ckpt 文件,只有checkpoint,shadownet.ckpt-322000.data-00000-of-00001,shadownet.ckpt-322000.index,shadownet.ckpt-322000.meta四个文件,这怎么解决呢

shadownet.ckpt consists of hadownet.ckpt-322000.data-00000-of-00001,shadownet.ckpt-322000.index,shadownet.ckpt-322000.meta

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants