代码用的这个:https://github.com/liuheng92/tensorflow_PSENet
作者代码质量很好,根据他的步骤来就行。我把需要注意的地方写一下:
1.作者使用的Python2,python3需要修改的地方有2处
1.1 utils_tool.py12行:
import queue改成:
try:
import queue
except ImportError:
import Queue as queue
1.2 eval.py 228行:
xrange改成range
2.g++版本不够的话,pse是不能编译。我是4.8版本的,所以要升级一下。同时,用python3的话,把pse/Makefile文件中的,
第一行:$(shell python-config --cflags)改成$(shell python3-config --cflags)
第二行:$(shell python-config --ldflags)改成$(shell python3-config --ldflags)
不要去下载源码编译,很浪费时间。https://www.jianshu.com/p/a54c882ac513通过这个blog去升级就行。
3.model下载下来之后没有checkpoint这个文件,自己新建一个:
model_checkpoint_path: "./model.ckpt"
all_model_checkpoint_paths: "./model.ckpt"
4.数据集下下来,放在data/icdar2015下面即可(自己创建这个文件夹)