其他分享
首页 > 其他分享> > 动手-文字检测-PSENet

动手-文字检测-PSENet

作者:互联网

借助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,ctw1500,demo,py,600e,动手,PSENet,检测,fpnf
来源: https://www.cnblogs.com/xuehuiping/p/14699805.html