参考GitHub源码:https://github.com/YoungMiao/crnn
应demo大师文章要求,我再补充下,推荐下,这个平台挺好
1.环境搭建
1.1 基础环境
- Ubuntu14.04 + CUDA
- opencv2.4 + pytorch + lmdb +wrap_ctc
安装lmdb apt-get install lmdb
1.2 安装pytorch
pip,linux,cuda8.0,python2.7:pip install http://download.pytorch.org/whl/cu80/torch-0.1.12.post2-cp27-none-linux_x86_64.whl
参考:http://pytorch.org/
1.3 安装wrap_ctc
git clone https://github.com/baidu-research/warp-ctc.git`
cd warp-ctc
mkdir build; cd build
cmake ..
make
GPU版在环境变量中添加
export CUDA_HOME="/usr/local/cuda"
cd pytorch_binding
python setup.py install