开源软件名称:ctpn
开源软件地址:https://gitee.com/hengk/ctpn
开源软件介绍:
ctpn项目介绍使用tensorflow对文字检测网络(Connectionist Text Proposal Network)的复现,代码简单易懂,适合初学者学习if you are in china ,you can visit https://gitee.com/hengk/ctpn. 软件架构软件架构说明 core datalayer.py 根据网络输入的image和label数据生成计算loss时需要的数据 resnet.py 网络中的cnn模块 lstm.py 网络中的rnn模块 loss.py 网络的loss计算方式 proposallayer.py 将网络输出的数据转化为最后的Proposal region textdetector.py conect the proposal boxes c_utils.c 使用纯c写的nms算法以及iou算法 c_textproposalconnector.c 使用纯c写的基于图的文本构造算法 c_datalayer.c to handle training data c_proosallayer.c to handle the output of newwork make.sh 将uitls.c 编译为 so文件 data prehandle.py 对图片进行前期的预处理,包括对gt_box的分割,还有对图片的宽高比进行排序
使用说明标签的生成在data目录下面,首先生成新的图片以及对应的标签(因为要将源标签拆分为宽度为16的框框,以及对原图进行大小的缩放) python prehandle.py -g [src_iamge_folder] [src_label_folder] [new_image_folder] [new_label_folder] 然后生成一个文件,里面内容是图片按照宽高比进行排序所得 python prehandle.py -s [image_folder] [file] 在core目录下生成c_utils.so ./make.sh 训练参数设置在Config.py中设置一些参数 测试程序 调用 python test.py [src_image] [dst_image]来测试
4.图片效果 |
请发表评论