赞 | 170 |
VIP | 6 |
好人卡 | 208 |
积分 | 230 |
经验 | 137153 |
最后登录 | 2024-11-18 |
在线时间 | 8639 小时 |
Lv5.捕梦者
- 梦石
- 0
- 星屑
- 22973
- 在线时间
- 8639 小时
- 注册时间
- 2011-12-31
- 帖子
- 3367
|
本機PaintsChainer on CPU動作版本part2
本帖最后由 tseyik 于 2017-3-23 18:37 编辑
本機PaintsChainer on CPU動作版本part2
以下用PiP安装chainer(主役)opencv-python(画像処理) pillow(画像処理)
CMD進入指令模式
pip install chainer
實行後會自動安裝下列文件(實際安装版本會新一点)
Collecting chainer
Downloading chainer-1.20.0.1.tar.gz (1.2MB)
100% |################################| 1.2MB 164kB/s
Collecting filelock (from chainer)
Downloading filelock-2.0.7.tar.gz
Collecting nose (from chainer)
Downloading nose-1.3.7-py3-none-any.whl (154kB)
100% |################################| 163kB 109kB/s
Collecting numpy>=1.9.0 (from chainer)
Downloading numpy-1.12.0-cp35-none-win_amd64.whl (7.7MB)
100% |################################| 7.7MB 61kB/s
Collecting protobuf (from chainer)
Downloading protobuf-3.1.0.post1-py2.py3-none-any.whl (347kB)
100% |################################| 348kB 240kB/s
Collecting six>=1.9.0 (from chainer)
Downloading six-1.10.0-py2.py3-none-any.whl
Requirement already satisfied: setuptools in e:\python35\lib\site-packages (from protobuf->chainer)
Installing collected packages: filelock, nose, numpy, six, protobuf, chainer
Running setup.py install for filelock ... done
Running setup.py install for chainer ... done
Successfully installed chainer-1.20.0.1 filelock-2.0.7 nose-1.3.7 numpy-1.12.0 protobuf-3.1.0.post1 six-1.
pip install opencv-python
ollecting opencv-python
Downloading opencv_python-3.2.0.6-cp35-cp35m-win_amd64.whl (22.1MB)
100% |################################| 22.1MB 32kB/s
Requirement already satisfied: numpy>=1.11.3 in e:\python35\lib\site-packages (from opencv-python)
Installing collected packages: opencv-python
Successfully installed opencv-python-3.2.0.6
pip install pillow
Collecting pillow
Downloading Pillow-4.0.0-cp35-cp35m-win_amd64.whl (1.5MB)
100% |################################| 1.5MB 195kB/s
Collecting olefile (from pillow)
Downloading olefile-0.44.zip (74kB)
100% |################################| 81kB 1.7MB/s
Installing collected packages: olefile, pillow
Running setup.py install for olefile ... done
Successfully installed olefile-0.44 pillow-4.0.0
實行完上面三個可用下面的指令驗測一下
pip list --format=columns
Package Version
------------- -----------
chainer 1.20.0.1
filelock 2.0.7
nose 1.3.7
numpy 1.12.0
olefile 0.44
opencv-python 3.2.0.6
Pillow 4.0.0
pip 9.0.1
protobuf 3.1.0.post1
setuptools 28.8.0
six 1.10.0
要確認以上部分都要有(版本有差異也没関係),
PaintsChainerCPU動作
用文本輸入下面文字,存成***.bat
py server.py -g -1
GPU: -1
start
load model
serving at localhost : 8000
實行後用 http://localhost:8000/static 開啓PaintsChainer
注在上篇下載中己内置;執行1-serve,再執行r2-open-site就可開PaintsChainer
実行結果的画像色異常時(赤と青のチャンネルが入れ替わる)BGR>RGB更改必要(計5個)。
in cgi_exe.py:
change cv2.COLOR_YUV2BGR to cv2.COLOR_YUV2RGB
in img2imgDataset.py:
change cv2.COLOR_BGR2YUV to cv2.COLOR_RGB2YUV
叧外要在https://paintschainer.preferred.tech/downloads/下載models文件
(liner_f unet_128_standard unet_512_standard)
放在「PaintsChainer-master」→「cgi-bin」→「paint_x2_unet」下新作成的『models』文件夾中。
CPU:2600K win7u64bit AMD R9-270 64bitfirefox(52.0.1)
|
评分
-
查看全部评分
|