OCR PSEnet定位

github源码:

git clone https://github.com/WenmuZhou/PSENet.pytorch

git clone https://gitee.com/zhou_rx/PSENet.pytorch.git

pip install Polygon3,pip install colorlog

数据格式:

训练:

python train.py

问题:

PSENet.pytorch/pse$ make
......
g++: error: unrecognized command line option ‘-fno-plt’
Makefile:10: recipe for target 'pse.so' failed
make: *** [pse.so] Error 1

解决方法:

https://blog.csdn.net/forest_world/article/details/105883339

测试(需要继续训练和调参):

def draw_bbox(img_path, result, color=(255, 0, 0),thickness=2):
    if isinstance(img_path, str):
        img_path = cv2.imread(img_path)
        # img_path = cv2.cvtColor(img_path, cv2.COLOR_BGR2RGB)
    img_path = img_path.copy()
    for point in result:
        point = point.astype(int)
        cv2.line(img_path, tuple(point[0]), tuple(point[1]), (0, 0, 255), thickness)
        cv2.line(img_path, tuple(point[1]), tuple(point[2]), (0, 255, 0), thickness)
        cv2.line(img_path, tuple(point[2]), tuple(point[3]), (255, 0, 0), thickness)
        cv2.line(img_path, tuple(point[3]), tuple(point[0]), (0, 0, 0), thickness)
    return img_path

                                                                                            测试图片来源百度

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值