{"id":29207485,"url":"https://github.com/CVMI-Lab/TEXGen","last_synced_at":"2025-07-02T19:03:08.075Z","repository":{"id":264122329,"uuid":"892398905","full_name":"CVMI-Lab/TEXGen","owner":"CVMI-Lab","description":"[SIGGRAPH Asia \u0026 TOG 2024] This is the official implementation of our SIGGRAPH Asia journal artical: TEXGen: a Generative Diffusion Model for Mesh Textures","archived":false,"fork":false,"pushed_at":"2024-12-15T10:29:30.000Z","size":135533,"stargazers_count":172,"open_issues_count":1,"forks_count":2,"subscribers_count":24,"default_branch":"main","last_synced_at":"2024-12-15T11:26:49.342Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CVMI-Lab.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}},"created_at":"2024-11-22T03:17:35.000Z","updated_at":"2024-12-15T10:29:35.000Z","dependencies_parsed_at":"2024-11-22T07:01:35.697Z","dependency_job_id":null,"html_url":"https://github.com/CVMI-Lab/TEXGen","commit_stats":null,"previous_names":["cvmi-lab/texgen"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/CVMI-Lab/TEXGen","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CVMI-Lab%2FTEXGen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CVMI-Lab%2FTEXGen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CVMI-Lab%2FTEXGen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CVMI-Lab%2FTEXGen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CVMI-Lab","download_url":"https://codeload.github.com/CVMI-Lab/TEXGen/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CVMI-Lab%2FTEXGen/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263199744,"owners_count":23429460,"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","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-07-02T19:01:43.449Z","updated_at":"2025-07-02T19:03:08.065Z","avatar_url":"https://github.com/CVMI-Lab.png","language":"Python","funding_links":[],"categories":["Textrue Generation"],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n\n  \u003ch2 align=\"center\"\u003eTEXGen: a Generative Diffusion Model for Mesh Textures\u003cbr\u003e\n\u003cspan style=\"color: #8e44ad; font-size: smaller;\"\u003e(SIGGRAPH Asia 2024, Journal Track, Best Paper Honorable Mention)\u003c/span\u003e\n\u003c/h2\u003e\n  \u003cp align=\"center\"\u003e\n    \u003ca href=\"https://xinyu-andy.github.io/\"\u003e\u003cstrong\u003eXin Yu\u003c/strong\u003e\u003c/a\u003e\n    ·\n    \u003ca href=\"https://yuanze.me\"\u003e\u003cstrong\u003eZe Yuan\u003c/strong\u003e\u003c/a\u003e\n    ·\n    \u003ca href=\"https://scholar.google.com/citations?user=b7ZJV9oAAAAJ\u0026hl=en\"\u003e\u003cstrong\u003eYuan-Chen Guo\u003c/strong\u003e\u003c/a\u003e\n    ·\n    \u003ca href=\"https://scholar.google.com/citations?user=sjFapgUAAAAJ\u0026hl=zh-CN\"\u003e\u003cstrong\u003eYing-Tian Liu\u003c/strong\u003e\u003c/a\u003e\n    ·\n    \u003ca href=\"https://sites.google.com/view/jianhuiliu/home\"\u003e\u003cstrong\u003eJianHui Liu\u003c/strong\u003e\u003c/a\u003e\n    ·\n    \u003ca href=\"https://scholar.google.com/citations?user=a7AMvgkAAAAJ\u0026hl=zh-CN\"\u003e\u003cstrong\u003eYangguang Li\u003c/strong\u003e\u003c/a\u003e\n    ·\n    \u003ca href=\"https://yanpei.me\"\u003e\u003cstrong\u003eYan-Pei Cao\u003c/strong\u003e\u003c/a\u003e\n    ·\n    \u003ca href=\"https://scholar.google.com/citations?user=Dqjnn0gAAAAJ\u0026hl=zh-CN\"\u003e\u003cstrong\u003eDing Liang\u003c/strong\u003e\u003c/a\u003e\n    ·\n    \u003ca href=\"https://xjqi.github.io/\"\u003e\u003cstrong\u003eXiaojuan Qi\u003c/strong\u003e\u003c/a\u003e\n    ·\n    \u003c/a\u003e\n    \u003cbr\u003e\n    \u003cbr\u003e\n        \u003ca href=\"https://arxiv.org/abs/2411.14740\"\u003e\u003cimg src='https://img.shields.io/badge/arXiv-TEXGen-red' alt='Paper PDF'\u003e\u003c/a\u003e\n        \u003ca href='https://cvmi-lab.github.io/TEXGen/'\u003e\u003cimg src='https://img.shields.io/badge/Project_Page-TEXGen-green' alt='Project Page'\u003e\u003c/a\u003e\n        \u003c/a\u003e\n    \u003cbr\u003e\n    \u003cb\u003eThe University of Hong Kong \u0026nbsp; | \u0026nbsp;  VAST  | \u0026nbsp;  Beihang University | \u0026nbsp;  Tsinghua University\u003c/b\u003e\n  \u003c/p\u003e\n  \u003ctable align=\"center\"\u003e\n    \u003ctr\u003e\n    \u003ctd\u003e\n      \u003cimg src=\"static/teaser.jpg\"\u003e\n    \u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/table\u003e\n\nTEXGen is a feed-forward texture generation model which diffuses albedo texture map directly on the UV domain.\n\n## :rocket: :rocket: :rocket: **News**\n- **[2024-12-15]**: Release the inference code.\n\n\n## Requirements\nThe training process requires at least one GPU with VRAM bigger than 40GB. We test the whole pipeline using Nvidia A100 gpu. Other GPUs are not tested but may be fine. For testing only, a GPU with 24GB VRAM will be fine.\n\n## Environment\n#### Docker Image\nFor convenience, it is welcomed to use our built-up docker image to run TEXGen.\n```shell\ndocker run -it yuanze1024/texgen_release:v1 bash \n```\n\n#### From Scratch\nNote that it could be really tricky to build an environment from scratch, so we strongly recommend you to use our docker image. You can also build your environment on your own:\n```shell\napt-get install libgl1 libglib2.0-0 libsm6 libxrender1 libxext6 libssl-dev build-essential g++ libboost-all-dev libsparsehash-dev git-core perl libegl1-mesa-dev libgl1-mesa-dev -y\nconda create -n texgen python=3.10 -y\nconda activate texgen\nconda install ninja -y\nconda install -c \"nvidia/label/cuda-11.8.0\" cuda-toolkit -y\nconda install pytorch==2.1.0 torchvision==0.16.0 pytorch-cuda=11.8 -c pytorch -c nvidia -y\nconda install h5py pyyaml -c anaconda -y\nconda install sharedarray tensorboard tensorboardx yapf addict einops scipy plyfile termcolor timm gxx=11.1.0 lightning -c conda-forge -y\nconda install pytorch-cluster pytorch-scatter pytorch-sparse -c pyg -y\npip install -r requirements.txt\n```\n\n## Usage\nWe provide the example testing data in `assets/models`. You can organize your own customized data as below:\n```shell\n$YOUR_DATA_PATH\n├── 34 # which is the first two character of the model id\n│   └── 3441609f539b46b38e7ab1213660cf3e # the unique id of a 3D model\n│       ├── model.mtl\n│       ├── model.obj\n│       └── model.png # albedo texture map\n```\nFor the model indices input, see `assets/input_list/test_input.jsonl` for an example, where `result` represents the textual prompt.\n\n#### Inference\nFor sanity checking, you can run the following code snippet.\n```shell\nCHECKPOINT_PATH=\"assets/checkpoints/texgen_v1.ckpt\"\n# assume single gpu\npython launch.py --config configs/texgen_test.yaml --test --gpu 0 data.eval_scene_list=\"assets/input_list/test_input.jsonl\" exp_root_dir=outputs_test name=test tag=test system.weights=$CHECKPOINT_PATH\n```\nThe results will be put in `\u003cexp_root_dir\u003e/\u003cname\u003e/\u003ctag\u003e@\u003ctime\u003e`. \n\n#### Model Checkpoint\nYou can download our [trained checkpoint](https://huggingface.co/Andyx/TEXGen/tree/main), and put it under `assets/checkpoints`. Note that the released model is trained with Flow Matching which is different from the paper version, since we find it more stable. Check this [blog](https://diffusionflow.github.io/) to understand the connection between Flow Matching and Diffusion.\n\nDuring the whole process, some components (e.g. CLIP, time scheduler) from HuggingFace are required. So make sure you have the access to HF or to their checkpoints. The relevant components are listed here:\n```text\nlambdalabs/sd-image-variations-diffusers\nstabilityai/stable-diffusion-2-depth\n```\n\n## Citation\n```bib\n@article{10.1145/3687909,\n    author = {Yu, Xin and Yuan, Ze and Guo, Yuan-Chen and Liu, Ying-Tian and Liu, Jianhui and Li, Yangguang and Cao, Yan-Pei and Liang, Ding and Qi, Xiaojuan},\n    title = {TEXGen: a Generative Diffusion Model for Mesh Textures},\n    journal = {ACM Trans. Graph.},\n    volume = {43},\n    number = {6},\n    year = {2024},\n    issn = {0730-0301},\n    doi = {10.1145/3687909},\n    articleno = {213},\n    numpages = {14},\n    keywords = {generative model, texture generation}\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FCVMI-Lab%2FTEXGen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FCVMI-Lab%2FTEXGen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FCVMI-Lab%2FTEXGen/lists"}