Skip to content

a simple model that implemented sketch to code

Notifications You must be signed in to change notification settings

li-car-fei/sketch2code

 
 

Repository files navigation

更改部分说明

仅在sever.py中进行少量代码更改,包括适配高版本pytorch依赖,接口逻辑与前端适配

前端部分

https://github.com/li-car-fei/react-visual-design

Sketch2code

Preview

Generating HTML Code from a hand-drawn wireframe

a simple deep learning model that takes hand-drawn web mockups and converts them into working HTML code. It uses an image captioning architecture to generate its HTML markup from hand-drawn website wireframes.

Heavily inspired by Ashwin Kumar's blog post, For more information, check out his post: Automating front-end development with deep learning

Model architecture

model

Download the data

bash get_data.sh

Docker demo settings

docker pull mzbac/sketch2code
docker run -p 5000:5000 mzbac/sketch2code

browser to localhost:5000

Load pre-trained weights

encoder = torch.load('model_weights/encoder_resnet34_0.061650436371564865.pt')
decoder = torch.load('model_weights/decoder_resnet34_0.061650436371564865.pt')

Pre-trained weight preview:

loss_0.061

Pre-trained model's BLEU score

  • 0.974

About

a simple model that implemented sketch to code

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Jupyter Notebook 52.7%
  • Python 46.4%
  • Other 0.9%