{"id":31211483,"url":"https://github.com/cyberagentailab/canvas-vae","last_synced_at":"2025-09-21T05:27:22.175Z","repository":{"id":39753413,"uuid":"393226093","full_name":"CyberAgentAILab/canvas-vae","owner":"CyberAgentAILab","description":"Implementation of CanvasVAE: Learning to Generate Vector Graphic Documents, ICCV 2021","archived":false,"fork":false,"pushed_at":"2023-03-07T06:42:13.000Z","size":421,"stargazers_count":69,"open_issues_count":2,"forks_count":12,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-10T07:43:01.500Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CyberAgentAILab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2021-08-06T02:34:39.000Z","updated_at":"2025-08-14T07:40:43.000Z","dependencies_parsed_at":"2025-09-10T09:00:56.286Z","dependency_job_id":null,"html_url":"https://github.com/CyberAgentAILab/canvas-vae","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/CyberAgentAILab/canvas-vae","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CyberAgentAILab%2Fcanvas-vae","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CyberAgentAILab%2Fcanvas-vae/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CyberAgentAILab%2Fcanvas-vae/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CyberAgentAILab%2Fcanvas-vae/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CyberAgentAILab","download_url":"https://codeload.github.com/CyberAgentAILab/canvas-vae/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CyberAgentAILab%2Fcanvas-vae/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":276195622,"owners_count":25601151,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-21T02:00:07.055Z","response_time":72,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-09-21T05:27:16.935Z","updated_at":"2025-09-21T05:27:22.170Z","avatar_url":"https://github.com/CyberAgentAILab.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[Dataset](docs/crello-dataset.md) | [arXiv](https://arxiv.org/abs/2108.01249)\n\n# CanvasVAE\n\nOfficial tensorflow implementation of the following work.\n\n\u003e Kota Yamaguchi, CanvasVAE: Learning to Generate Vector Graphic Documents, ICCV 2021\n\n![Interpolation](docs/interpolation.svg)\n\n## Content\n\n- `bin`: Job launchers\n- `src/preprocess`: Preprocessing jobs to fetch and build TFRecord dataset\n- `src/pixel-vae`: PixelVAE trainer\n- `src/canvas-vae`: CanvasVAE trainer and evaluation\n\n## Setup\n\nInstall python dependencies. Perhaps this should be done inside `venv`.\n\n```bash\npip install -r requirements.txt\n```\n\nNote that Tensorflow has a version-specific system requirement for GPU environment.\nCheck if the\n[compatible CUDA/CuDNN runtime](https://www.tensorflow.org/install/source#gpu) is installed.\n\n## Crello experiments\n\nDownload and extract [Crello dataset](docs/crello-dataset.md). The following\nscript will download the dataset to `data/crello-dataset` directory.\n\n```bash\nbin/download_crello.sh\n```\n\nPrepare image data and learn a PixelVAE model for image embedding. The resulting\nimage encoder will be saved to `data/pixelvae/encoder`. This training takes\nlong. We recommend sufficient GPU resources to run this step (e.g., Tesla P100x4).\n\n```bash\nbin/generate_crello_image.sh\nbin/train_pixelvae.sh\n```\n\nThe training progress can be monitored via `tensorboard`:\n\n```bash\ntensorboard --logdir tmp/pixelvae/jobs\n```\n\nOnce a PixelVAE is trained, build the crello document dataset, and learn\nCanvasVAE models. The trainer script takes a few arguments to control\nhyperparameters.\nSee `src/canvas-vae/canvasvae/main.py` for the list of available options.\nThis step can be run in a single GPU environment (e.g., Tesla P100x1).\n\n```bash\nbin/generate_crello_document.sh\nbin/train_canvasvae.sh crello-document --latent-dim 512 --kl 32\n```\n\nThe trainer outputs logs, evaluation results, and checkpoints to\n`tmp/canvasvae/jobs/\u003cjob_id\u003e`. The training progress can be monitored\nvia `tensorboard`:\n\n```bash\ntensorboard --logdir tmp/canvasvae/jobs\n```\n\nThe resulting models can be further inspected in the notebook.\n\n- `notebooks/crello-analysis.ipynb`\n\n## RICO experiments\n\nDownload [UI SCREENSHOTS AND HIERARCHIES WITH SEMANTIC ANNOTATIONS](http://interactionmining.org/rico)\ndataset first. This seems to require Google account. In the following, we assume\nthe downloaded archive file is placed in `tmp/rico_dataset_v0.1_semantic_annotations.zip`.\n\nOnce downloaded, preprocess and learn CanvasVAE models.\n\n```bash\nbin/generate_rico.sh tmp/rico_dataset_v0.1_semantic_annotations.zip\nbin/train_canvasvae.sh rico --latent-dim 256 --kl 16\n```\n\nThe resulting models can be inspected in the notebook.\n\n- `notebooks/rico-analysis.ipynb`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcyberagentailab%2Fcanvas-vae","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcyberagentailab%2Fcanvas-vae","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcyberagentailab%2Fcanvas-vae/lists"}