From a7babfb358f01b1c41ba428f0050cf2e53b3f305 Mon Sep 17 00:00:00 2001 From: lu_cao Date: Thu, 23 Aug 2018 15:12:41 +0800 Subject: [PATCH] modified setup-cpu.sh and setup.sh --- models/text.data | 6 ++++++ setup-cpu.sh | 7 ++++--- setup.sh | 6 +++--- 3 files changed, 13 insertions(+), 6 deletions(-) create mode 100644 models/text.data diff --git a/models/text.data b/models/text.data new file mode 100644 index 0000000..553d96f --- /dev/null +++ b/models/text.data @@ -0,0 +1,6 @@ +classes= 2 +train = train.txt +valid = test.txt +names = ../models/text.names +backup = backup + diff --git a/setup-cpu.sh b/setup-cpu.sh index 61084fd..7752ea2 100644 --- a/setup-cpu.sh +++ b/setup-cpu.sh @@ -1,12 +1,13 @@ ##CPU 环境配置,支持linux\macOs conda create -n chineseocr python=3.6 pip scipy numpy jupyter ipython ##运用conda 创建python环境 source activate chineseocr -pip install easydict opencv-contrib-python,Cython -i https://pypi.tuna.tsinghua.edu.cn/simple/ ##选择国内源,速度更快 +git submodule init && git submodule update +cd darknet/ && make && cd .. +pip install easydict opencv-contrib-python Cython -i https://pypi.tuna.tsinghua.edu.cn/simple/ ##选择国内源,速度更快 pip install -U pillow -i https://pypi.tuna.tsinghua.edu.cn/simple/ pip install h5py lmdb mahotas pandas -i https://pypi.tuna.tsinghua.edu.cn/simple/ pip install requests pip install web.py==0.40.dev0 conda install pytorch=0.2.0 torchvision -c soumith -cd detector/utils -sh make-for-cpu.sh +pushd detector/utils && sh make-for-cpu.sh && popd diff --git a/setup.sh b/setup.sh index 7e7f503..9f6aae4 100644 --- a/setup.sh +++ b/setup.sh @@ -1,12 +1,12 @@ ##环境配置,支持linux\macOs conda create -n chineseocr python=3.6 pip scipy numpy jupyter ipython ##运用conda 创建python环境 source activate chineseocr -pip install easydict opencv-contrib-python,Cython -i https://pypi.tuna.tsinghua.edu.cn/simple/ ##选择国内源,速度更快 +git submodule init && git submodule update +pip install easydict opencv-contrib-python Cython -i https://pypi.tuna.tsinghua.edu.cn/simple/ ##选择国内源,速度更快 pip install -U pillow -i https://pypi.tuna.tsinghua.edu.cn/simple/ pip install h5py lmdb mahotas pandas,requests -i https://pypi.tuna.tsinghua.edu.cn/simple/ pip install web.py==0.40.dev0 conda install pytorch=0.2.0 cuda80 torchvision -c soumith -cd detector/utils -sh make.sh +pushd detector/utils && sh make-for-cpu.sh && popd