{"id":51482882,"url":"https://github.com/moatifbutt/numcolor","last_synced_at":"2026-07-07T03:30:32.219Z","repository":{"id":365908593,"uuid":"1274291732","full_name":"moatifbutt/numcolor","owner":"moatifbutt","description":null,"archived":false,"fork":false,"pushed_at":"2026-06-19T11:43:11.000Z","size":2094,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-19T13:17:14.113Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/moatifbutt.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2026-06-19T11:13:40.000Z","updated_at":"2026-06-19T11:43:16.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/moatifbutt/numcolor","commit_stats":null,"previous_names":["moatifbutt/numcolor"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/moatifbutt/numcolor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moatifbutt%2Fnumcolor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moatifbutt%2Fnumcolor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moatifbutt%2Fnumcolor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moatifbutt%2Fnumcolor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/moatifbutt","download_url":"https://codeload.github.com/moatifbutt/numcolor/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moatifbutt%2Fnumcolor/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35213815,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-07T02:00:07.222Z","response_time":90,"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":"2026-07-07T03:30:31.571Z","updated_at":"2026-07-07T03:30:32.173Z","avatar_url":"https://github.com/moatifbutt.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# NumColor: Precise Numeric Color Control in Text-to-Image Generation\n\n\u003e **Accepted at European Conference on Computer Vision 2026** 🎉\n\n**[Muhammad Atif Butt](https://scholar.google.com/citations?user=vf7PeaoAAAAJ\u0026hl=en)**, **[Diego Hernández](https://scholar.google.com/citations?user=6SBoE-YAAAAJ\u0026hl=en)**, **[Alexandra Gomez-Villa](https://scholar.google.com/citations?user=A2dhwNgAAAAJ\u0026hl=en)**, **[Kai Wang](https://scholar.google.com/citations?user=j14vd0wAAAAJ\u0026hl=en)**, **[Javier Vazquez-Corral](https://scholar.google.com/citations?user=gjnuPMoAAAAJ\u0026hl=en)**, **[Joost van de Weijer](https://scholar.google.com/citations?user=Gsw2iUEAAAAJ\u0026hl=en)**\n\nComputer Vision Center (CVC), Barcelona, Spain.\nComputer Sciences Department, Universitat Autònoma de Barcelona, Barcelona, Spain.\nProgram of Computer Science, City University of Hong Kong (Dongguan), China.\nCity University of Hong Kong, China.\n\n[![Paper](https://img.shields.io/badge/Paper-arXiv-b31b1b.svg)](https://arxiv.org/pdf/2603.13547)\n\n---\n\n## Overview\n\nNumColor is a two-stage framework for **precise numerical color control** in text-to-image diffusion models. Given a natural language prompt containing hex color codes (e.g., `\"a #FF5733 car next to a #2E86AB building\"`), NumColor produces images whose object colors faithfully match the specified numeric values.\n\nThe framework introduces:\n\n- **Color Token Aggregator (CTA):** A tokenizer-agnostic, learned module that detects and aggregates fragmented color tokens (hex codes / CSS-style color references) into coherent, injectable representations.\n- **ColorBook:** A perceptually-structured color codebook trained on Lambertian-rendered data with calibrated D65 illumination, enabling precise mapping from numeric color specifications to T5 embedding space.\n- **NumColor-Data:** A 500K synthetic dataset for training color-grounded conditioning.\n\n## Method\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"assets/nucolor_method.svg\" alt=\"NumColor Method Overview\" width=\"90%\"\u003e\n\u003c/p\u003e\n\nNumColor replaces fragmented color-token embeddings with ColorBook entries **before contextualization** in the T5 text encoder. This allows the color embeddings to flow through self-attention alongside text tokens, binding colors to their target objects without modifying the diffusion backbone.\n\n## Results\n\n\u003cp align=\"center\"\u003e\n     \u003c!-- \u003csource srcset=\"assets/nucolor_method.svg\" type=\"image/svg+xml\"\u003e --\u003e\n     \u003cimg src=\"assets/qualitative_results.png\" alt=\"Qualitative Results of NumColor + FLUX.1\" width=\"90%\"\u003e\n\u003c/p\u003e\n\nNumColor preserves the base model's pretrained named-color understanding: FLUX.1 achieves 81.27% accuracy on natural color prompts, while NumColor + FLUX.1 attains 80.04% on the same set.\n\n## Release\n\n\u003e 🚧 **Code, pretrained models, and the NumColor-Data will be released soon.** Please ⭐ this repository to be notified.\n\nPlanned releases:\n\n- [ ] Training and inference code\n- [ ] Pretrained CTA and ColorBook checkpoints (FLUX.1)\n- [ ] NumColor-Data (500K synthetic training set)\n\n## Citation\n\nIf you find this work useful, please cite:\n\n```bibtex\n@article{butt2026numcolor,\n  title={NumColor: Precise Numeric Color Control in Text-to-Image Generation},\n  author={Butt, Muhammad Atif and Hernandez, Diego and Gomez-Villa, Alexandra and Wang, Kai and Vazquez-Corral, Javier and Van De Weijer, Joost},\n  journal={arXiv preprint arXiv:2603.13547},\n  year={2026}\n}\n```\n\n## Acknowledgements\n\nComputational resources were provided by the Leonardo HPC cluster (CINECA). We are thankful for that.\n\n## Contact\n\nFor questions or collaborations, please contact [Muhammad Atif Butt](mailto:mabutt@cvc.uab.es) or open an issue in this repository.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoatifbutt%2Fnumcolor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmoatifbutt%2Fnumcolor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoatifbutt%2Fnumcolor/lists"}