动手-文字检测-PSENet

2021-05-30 00:05

阅读:438

标签:targe   rem   text   版本号   demo   dem   dex   python   src   

借助mmocr框架,测试几种算法的效果。

这是一个文字检测和文字识别库,集成了很多的模型,包括PSENet、PixelLink等等

安装参考 https://mmocr.readthedocs.io/en/latest/install.html

(base) xuehp@haomeiya009:~/git$ conda create -n open-mmlab python=3.7 -y
(base) xuehp@haomeiya009:~/git$ conda activate open-mmlab
(open-mmlab) xuehp@haomeiya009:~/git$ conda install pytorch==1.5.0 torchvision==0.6.0 cudatoolkit=10.1 -c pytorch
(open-mmlab) xuehp@haomeiya009:~/git$ pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/cu101/torch1.5.0/index.html   注意版本号一致
pip install mmdet==2.11.0
(open-mmlab) xuehp@haomeiya009:~/git$ git clone https://github.com/open-mmlab/mmocr.git
cd mmocr
pip install -r requirements.txt
pip install -v -e .
export PYTHONPATH=$(pwd):$PYTHONPATH

测试1-作者提供的图片

python demo/image_demo.py demo/demo_text_det.jpg configs/textdet/psenet/psenet_r50_fpnf_600e_ctw1500.py models/psenet_r50_fpnf_600e_ctw1500_20210401-216fed50.pth demo/demo_text_det_pred.jpg

技术图片

测试2

python demo/image_demo.py data_for_test/test1/WX20210304-104122@2x.jpg configs/textdet/psenet/psenet_r50_fpnf_600e_ctw1500.py models/psenet_r50_fpnf_600e_ctw1500_20210401-216fed50.pth data_for_test/WX20210304-104122@2x.result.jpg
技术图片

测试3

python demo/image_demo.py data_for_test/WX20210304-104250@2x.png configs/textdet/psenet/psenet_r50_fpnf_600e_ctw1500.py models/psenet_r50_fpnf_600e_ctw1500_20210401-216fed50.pth data_for_test/WX20210304-104250@2x.result.png

技术图片

测试4

python demo/image_demo.py data_for_test/WX20210304-104344@2x.png configs/textdet/psenet/psenet_r50_fpnf_600e_ctw1500.py models/psenet_r50_fpnf_600e_ctw1500_20210401-216fed50.pth data_for_test/WX20210304-104344@2x.result.png
技术图片

动手-文字检测-PSENet

标签:targe   rem   text   版本号   demo   dem   dex   python   src   

原文地址:https://www.cnblogs.com/xuehuiping/p/14699805.html


评论


亲,登录后才可以留言!