1 环境配置
- 使用anaconda新建一个虚拟环境
$ conda create -n mace python=3.6
- 安装Python依赖
pip install jinja2==2.10
pip install pyyaml==3.12
pip install sh==1.12.14
pip install numpy==1.14.0
pip install six==1.11.0
pip install filelock
pip install google
pip install protobuf
pip install tensorflow==1.8.0
- 安装CMake
wget http://www.cmake.org/files/v3.11/cmake-3.11.3.tar.gz
tar xf cmake-3.11.3.tar.gz
cd cmake-3.11.3
./configure
sudo make
sudo make install
ln -sf your_cmake3.11.3_path/bin/* /usr/bin/
cmake --version
cmake version 3.11.3
CMake suite maintained and supported by Kitware (kitware.com/cmake).
2 拉取代码
git clone https://github.com/XiaoMi/mace.git
git clone https://github.com/XiaoMi/mace-models.git
3 模型转换
python tools/converter.py convert --config=../mace-models/realtime-style-transfer/realtime_style_transfer_wreck.yml
4 安卓部署
见https://zhuanlan.zhihu.com/p/66662510
网友评论