{"id":31211495,"url":"https://github.com/cyberagentailab/webcolor","last_synced_at":"2025-09-21T05:27:33.576Z","repository":{"id":84702474,"uuid":"551406747","full_name":"CyberAgentAILab/webcolor","owner":"CyberAgentAILab","description":"Official implementation of Generative Colorization of Structured Mobile Web Pages, WACV 2023.","archived":false,"fork":false,"pushed_at":"2023-12-07T01:54:21.000Z","size":2324,"stargazers_count":22,"open_issues_count":1,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-09-10T07:42:52.966Z","etag":null,"topics":["colorization","dataset","deep-learning","generative-ai","graphical-user-interface","pretrained-models","pytorch","pytorch-lightning","web-design"],"latest_commit_sha":null,"homepage":"https://arxiv.org/abs/2212.11541","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":"2022-10-14T10:43:34.000Z","updated_at":"2024-12-06T03:14:56.000Z","dependencies_parsed_at":"2025-09-10T05:39:01.100Z","dependency_job_id":"b1418816-7b97-41a6-9dde-eea8cbc500d3","html_url":"https://github.com/CyberAgentAILab/webcolor","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/CyberAgentAILab/webcolor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CyberAgentAILab%2Fwebcolor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CyberAgentAILab%2Fwebcolor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CyberAgentAILab%2Fwebcolor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CyberAgentAILab%2Fwebcolor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CyberAgentAILab","download_url":"https://codeload.github.com/CyberAgentAILab/webcolor/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CyberAgentAILab%2Fwebcolor/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":276195623,"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":["colorization","dataset","deep-learning","generative-ai","graphical-user-interface","pretrained-models","pytorch","pytorch-lightning","web-design"],"created_at":"2025-09-21T05:27:30.808Z","updated_at":"2025-09-21T05:27:33.567Z","avatar_url":"https://github.com/CyberAgentAILab.png","language":"Python","readme":"# Generative Colorization of Structured Mobile Web Pages\n\nOfficial implementation of Generative Colorization of Structured Mobile Web Pages, WACV 2023.\n\n[ArXiv](https://arxiv.org/abs/2212.11541) | [Dataset](docs/dataset.md) | [Pre-trained models](docs/pretrained_models.md)\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"assets/concept_image.png\" width=\"600px\"\u003e\u003c/img\u003e\n\u003c/p\u003e\n\n## Setup\n\n### Development environment\n\n-   Ubuntu 22.04, Python 3.10.9, Poetry 1.2.2\n-   CUDA 11.6, cuDNN 8.7.0\n-   PyTorch 1.12.1, PyTorch Lightning 1.8.6, Deep Graph Library 0.9.1\n-   (For taking screenshots) Google Chrome 108.0.5359.124, ChromeDriver 108.0.5359.71\n-   (For computing contrast violations) Lighthouse 9.6.8\n\n### Installation\n\n```bash\ngit clone https://github.com/CyberAgentAILab/webcolor.git\npoetry install\n```\n\nNote that we cannot guarantee or support operation in other environments, such\nas Windows. If you wish to install PyTorch or DGL for other CUDA versions,\nplease edit URLs in [pyproject.toml](pyproject.toml). You can find the commands\nto install Chrome, ChromeDriver, and Lighthouse on Ubuntu [here](docs/install_chrome.md).\n\n## Data preparation\n\n```bash\n./data/download.sh cache\n```\n\nFor details on the dataset, please see [this document](docs/dataset.md).\n\n## Colorization demo\n\n```bash\nMODEL_NAME=CVAE  # {CVAE,NAR,AR,Stats}\nBASE_URL=https://storage.googleapis.com/ailab-public/webcolor/checkpoints\npoetry run python demo.py --model $MODEL_NAME --ckpt_path ${BASE_URL}/${MODEL_NAME}.ckpt --upsampler_path ${BASE_URL}/Upsampler.ckpt --target random --out_path output/screenshot.png --num_save 3 --save_gt\n```\n\nThe above command performs automatic colorization using pre-trained models and\nproduces screenshots like the following.\n\n|CVAE #1|CVAE #2|CVAE #3|Real|\n|:---:|:---:|:---:|:---:|\n|![](assets/test_GB_www.warehouse.co.uk_12679.png)|![](assets/test_GB_www.warehouse.co.uk_12679_0.png)|![](assets/test_GB_www.warehouse.co.uk_12679_1.png)|![](assets/test_GB_www.warehouse.co.uk_12679_gt.png)|\n\n## Training\n\n```bash\nMODEL_NAME=CVAE  # {CVAE,NAR,AR,Stats,Upsampler}\npoetry run python -m webcolor.main fit --model $MODEL_NAME --trainer.accelerator gpu --trainer.devices 1\n```\n\nModel hyperparameters can be listed with `--model.help $MODEL_NAME`.\n\n## Evaluation\n\n```bash\nMODEL_NAME=CVAE  # {CVAE,NAR,AR,Stats,Upsampler}\nCKPT_PATH=https://storage.googleapis.com/ailab-public/webcolor/checkpoints/${MODEL_NAME}.ckpt  # Evaluate the pre-trained model\n# CKPT_PATH=lightning_logs/version_0/checkpoints/best.ckpt  # Evaluate your own trained model\npoetry run python -m webcolor.main test --model $MODEL_NAME --ckpt_path $CKPT_PATH --trainer.default_root_dir /tmp --trainer.accelerator gpu --trainer.devices 1\n```\n\nThe following command calculates Pixel-FCD and contrast violations and takes a\nlong time to complete (about four hours with 24 workers in our environment).\n\n```bash\nMODEL_NAME=CVAE  # {CVAE,NAR,AR,Stats}\nCKPT_PATH=https://storage.googleapis.com/ailab-public/webcolor/checkpoints/${MODEL_NAME}.ckpt\n# CKPT_PATH=lightning_logs/version_0/checkpoints/best.ckpt\nUPSAMPLER_PATH=https://storage.googleapis.com/ailab-public/webcolor/checkpoints/Upsampler.ckpt\n# UPSAMPLER_PATH=lightning_logs/version_1/checkpoints/best.ckpt\npoetry run python eval.py --num_workers 4 --model $MODEL_NAME --ckpt_path $CKPT_PATH --upsampler_path $UPSAMPLER_PATH\n```\n\nFor details on the pre-trained models, please see [this document](docs/pretrained_models.md).\n\n## Citation\n\n```bibtex\n@inproceedings{Kikuchi2023,\n    title = {Generative Colorization of Structured Mobile Web Pages},\n    author = {Kotaro Kikuchi and Naoto Inoue and Mayu Otani and Edgar Simo-Serra and Kota Yamaguchi},\n    booktitle = {IEEE/CVF Winter Conference on Applications of Computer Vision (WACV)},\n    year = {2023},\n    pages = {3639-3648},\n    doi = {10.1109/WACV56688.2023.00364}\n}\n```\n\n## Licence\n\nThe code is licensed under Apache-2.0 and the dataset is licensed under CC BY-NC-SA 4.0.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcyberagentailab%2Fwebcolor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcyberagentailab%2Fwebcolor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcyberagentailab%2Fwebcolor/lists"}