sketch-code 草图自动生成HTML

1.环境搭建:
2.项目地址:

sketch-code: https://github.com/ashnkumar/sketch-code

步骤1

安装了git,随意在一个盘符中,“右键”–> “Git Bash Here”–>在窗口中拉取项目:

git clone https://github.com/ashnkumar/sketch-code.git

拉取的项目如下:
在这里插入图片描述

步骤2

安装依赖:cmd到拉取的项目根路径下(python 3.5安装好)
在这里插入图片描述

pip install -r requirements.txt

这是requirements.txt文件中的内容,没有的话,创建一个

Keras==2.1.2
tensorflow==1.4.0
nltk==3.2.5
opencv-python==3.3.0.10
numpy==1.13.1
h5py==2.7.1
matplotlib==2.0.2
Pillow==4.3.0
tqdm==4.17.1
scipy==1.0.0

pip下载依赖慢的话,可以配置镜像:https://blog.csdn.net/qq_24671941/article/details/84109697

步骤3

cmd到下拉的项目目录:sketch-code\scripts下---->右键“”—>“Git Bash Here”
在这里插入图片描述
依次输入命令:

sh get_data.sh
sh get_pretrained_model.sh

官方的那个有斜杠,复制笔者的就可以了!

python convert_single_image.py --png_path ../examples/drawn_example1.png  --output_folder ./generated_html  --model_json_file ../bin/model_json.json  --model_weights_file ../bin/weights.h5

根据路径下的图片“…/examples/drawn_example1.png” 生成html
到项目src目录看看最后的成果吧!!
在这里插入图片描述

csdn博客非windows
https://blog.csdn.net/weixin_40193776/article/details/80261048

  • 3
    点赞
  • 11
    收藏
    觉得还不错? 一键收藏
  • 13
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 13
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值