Skip to content

tutorial on how to use attention based image captioning model to perform sketch 2 code task

Notifications You must be signed in to change notification settings

VincentK1991/Sketch2code_with_attention

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sketch2code_with_attention

Tutorial on how to use attention based image captioning model to perform sketch 2 code task, implemented in Pytorch.

For more information, read this blog post.

This repo contains the encoder-decoder model in the model folder. The dataset is not provided here. But you can download it here:

wget https://s3-us-west-2.amazonaws.com/sketch2code/data.zip -O data/all_data.zip

then unzip

unzip data/all_data.zip -d data/all_data

For the pre-processing step, please refer to the pre-processing notebook in the notebook folder.

The code to run training/validation is "train.py".

python train.py --epochs=20 --encoder_lr=1e-4 --decoder_lr=1e-4 --train_data='insert-your-train-data-here' --val_data='insert-your-validation-data-here' --val_every=2 --model_name='Jun09_2020' --grad_clip=5.0

For the visualization step, please refer to the visualization notebook in the notebook folder.

About

tutorial on how to use attention based image captioning model to perform sketch 2 code task

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages