标签: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
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
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
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
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
标签:targe rem text 版本号 demo dem dex python src
原文地址:https://www.cnblogs.com/xuehuiping/p/14699805.html