[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-82164":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":9,"language":10,"languages":9,"totalLinesOfCode":9,"stars":11,"forks":12,"watchers":13,"openIssues":14,"contributorsCount":14,"subscribersCount":14,"size":14,"stars1d":14,"stars7d":15,"stars30d":16,"stars90d":14,"forks30d":14,"starsTrendScore":14,"compositeScore":17,"rankGlobal":9,"rankLanguage":9,"license":18,"archived":19,"fork":19,"defaultBranch":20,"hasWiki":21,"hasPages":19,"topics":22,"createdAt":9,"pushedAt":9,"updatedAt":23,"readmeContent":24,"aiSummary":25,"trendingCount":14,"starSnapshotCount":14,"syncStatus":26,"lastSyncTime":27,"discoverSource":28},82164,"pixlrelight","mlfarinha\u002Fpixlrelight","mlfarinha","PIXLRelight: Controllable Relighting via Intrinsic Conditioning",null,"Python",61,6,29,0,3,33,47.34,"MIT License",false,"main",true,[],"2026-06-12 04:01:37","\u003Cdiv align=\"center\">\n\u003Ch1>PIXLRelight: Controllable Relighting via Intrinsic Conditioning\u003C\u002Fh1>\n\n\u003Ca href=\"https:\u002F\u002Fmlfarinha.github.io\u002Fpixl-relight\u002Fresources\u002Fpreprint.pdf\" target=\"_blank\" rel=\"noopener noreferrer\">\n    \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FPaper-PIXLRelight-b31b1b\" alt=\"Paper PDF\">\n\u003C\u002Fa>\n\u003Ca href=\"https:\u002F\u002Farxiv.org\u002Fabs\u002F2605.18735\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FarXiv-2605.18735-b31b1b\" alt=\"arXiv\">\u003C\u002Fa>\n\u003Ca href=\"https:\u002F\u002Fmlfarinha.github.io\u002Fpixl-relight\u002F\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FProject_Page-green\" alt=\"Project Page\">\u003C\u002Fa>\n\u003Ca href=\"https:\u002F\u002Fhuggingface.co\u002Fmlfarinha\u002Fpixlrelight\">\u003Cimg src='https:\u002F\u002Fimg.shields.io\u002Fbadge\u002F%F0%9F%A4%97%20Hugging%20Face-Model-blue' alt=\"HF Model\">\u003C\u002Fa>\n\n**[Perceptual Intelligence and Extended Reality Lab, University of Oxford](https:\u002F\u002Fpixl.cs.ox.ac.uk\u002F)**\n\n[Miguel Farinha](https:\u002F\u002Fmlfarinha.github.io\u002F) &emsp; [Ronald Clark](https:\u002F\u002Fronnie-clark.co.uk\u002F)\n\n\u003C\u002Fdiv>\n\n```bibtex\n@article{farinha2026pixlrelight,\n  title   = {PIXLRelight: Controllable Relighting via Intrinsic Conditioning},\n  author  = {Farinha, Miguel and Clark, Ronald},\n  journal = {arXiv preprint arXiv:2605.18735},\n  year    = {2026}\n}\n```\n\n## Overview\n\nPIXLRelight is a feed-forward model for physically controllable single-image relighting. Given a source photograph and a target lighting condition — specified either as an RGB image or as a path-traced Blender Cycles render — it produces a relit version of the source under the new illumination in under a tenth of a second.\n\n\u003Cdiv align=\"center\">\n\n![PIXLRelight demo](.\u002Fassets\u002Fdemo.gif)\n\n\u003C\u002Fdiv>\n\n## Quick Start\n\nClone the repository and install the dependencies in a fresh environment:\n\n```bash\ngit clone git@github.com:mlfarinha\u002Fpixlrelight.git\ncd pixlrelight\n\nconda create -n pixlrelight python=3.11 -y\nconda activate pixlrelight\npip install -r requirements.txt\n```\n\nThe model weights and config are hosted on [Hugging Face](https:\u002F\u002Fhuggingface.co\u002Fmlfarinha\u002Fpixlrelight) and downloaded automatically on first run.\n\n## Inference\n\nPIXLRelight supports two ways to specify the target lighting condition.\n\n### Mode 1 — Target RGB image\n\nThe bundled intrinsic decomposer (Marigold-IID-Lighting) extracts albedo, diffuse shading, and non-diffuse residuals from a reference photograph, which then condition the relighting model. Use this mode when you have a real photograph of the target illumination.\n\nLay out each sample as a folder containing a `source.*` and a `target.*` image:\n\n```\nsamples\u002F\n├── room00\u002F\n│   ├── source.jpg\n│   └── target.jpg\n├── room01\u002F\n│   ├── source.jpg\n│   └── target.jpg\n└── ...\n```\n\n### Mode 2 — Blender Cycles render passes\n\nFor physically controllable lighting, condition on a path-traced render of a coarse 3D reconstruction of the scene under user-specified PBR lights. The render passes are loaded directly from disk and converted into the same intrinsic representation the model is trained on. Use this mode when you want full PBR control over the target illumination.\n\nDrop the Cycles passes (auto-discovered by filename) into the sample folder alongside `source.*`:\n\n```\nsamples\u002F\n├── ...\n├── room02\u002F\n│   ├── source.jpg\n│   ├── diffuse_color.exr\n│   ├── diffuse_direct.exr\n│   ├── diffuse_indirect.exr\n│   ├── glossy_color.exr\n│   ├── glossy_direct.exr\n│   ├── glossy_indirect.exr\n│   ├── transmission_color.exr        # optional group\n│   ├── transmission_direct.exr\n│   ├── transmission_indirect.exr\n│   ├── volume_direct.exr             # optional group\n│   ├── volume_indirect.exr\n│   ├── emission.exr                  # optional\n│   └── environment.exr               # optional\n└── ...\n```\n\nThe passes must be HDR EXR files in linear colour space — Cycles' default. If you're exporting through Blender's compositor, make sure the output node is set to OpenEXR with the colour space set to Linear (not sRGB). Filename matching is case- and separator-insensitive, so `Diffuse Color.exr`, `diffuse_color.exr`, and `Diffuse-Color.exr` all resolve to the same pass.\n\n### Running inference\n\nThe same command handles both modes, single samples, and batches:\n\n```bash\npython infer.py --input_dir samples\u002F --output_dir outputs\u002F\n```\n\n- **Layout A (single sample):** `--input_dir` is a sample directory; outputs land directly in `--output_dir`.\n- **Layout B (batch):** `--input_dir` contains sample subdirectories; outputs mirror the subdir structure under `--output_dir`.\n\nEach input is auto-classified per sample by what's on disk: if `target.*` is present, Mode 1 is used; if Cycles passes are present, Mode 2 is used (and takes precedence if both are available). For each sample, a single `\u003Csource_stem>_relit.png` is written next to (or under) `--output_dir`.\n\n\u003Cdetails>\n\u003Csummary>\u003Cstrong>Useful flags\u003C\u002Fstrong>\u003C\u002Fsummary>\n\n| Flag | Description |\n|---|---|\n| `--target_size` | Side length the source is resized to before the trunk (default: 512). Outputs are returned at the source's native resolution regardless. |\n| `--preprocess_mode` | `crop` or `pad` (default: `crop`). |\n| `--inpaint` | Inpaint zero-pixel edges in the Cycles passes (helpful for coarse reconstructions with missing geometry). |\n| `--percentile` | Percentile for the joint shading\u002Fresidual normalisation when loading Cycles passes (default: 98). |\n| `--dtype` | `float32`, `float16`, or `bfloat16` (default: `float32`). |\n| `--device` | Default: `cuda`. |\n| `--no_overwrite` | Skip samples whose relit output already exists. |\n| `--config_path`, `--ckpt_path` | Local overrides; if unset, downloaded from `--hf_repo_id`. |\n\nRun `python infer.py --help` for the full list.\n\n\u003C\u002Fdetails>\n\n## How it works\n\nAt a high level, PIXLRelight bridges physically based rendering (PBR) and learned image synthesis through a shared intrinsic conditioning that can be obtained from either real photographs (via Marigold-IID-Lighting) or PBR renders (via Cycles). A transformer-based neural renderer applies the target illumination to the source photograph, preserving fine image detail through a per-pixel affine modulation applied at the source's native resolution.\n\nFor full details — training data, architecture, ablations, and additional qualitative results — see the [paper](https:\u002F\u002Farxiv.org\u002Fabs\u002F2605.18735) and [project page](https:\u002F\u002Fmlfarinha.github.io\u002Fpixl-relight\u002F).\n\n## Acknowledgements\n\nThanks to these great repositories: [VGGT](https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Fvggt), [Depth Anything 3](https:\u002F\u002Fgithub.com\u002FDepthAnything\u002FDepth-Anything-3), [DINOv3](https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Fdinov3), [Marigold](https:\u002F\u002Fgithub.com\u002Fprs-eth\u002FMarigold), and many other inspiring works in the community.\n\n## License\n\nCode in this repository is released under the [MIT License](.\u002FLICENSE). The model weights, hosted [on Hugging Face](https:\u002F\u002Fhuggingface.co\u002Fmlfarinha\u002Fpixlrelight), are released under the [Creative Commons Attribution-NonCommercial 4.0 International (CC BY-NC 4.0)](https:\u002F\u002Fcreativecommons.org\u002Flicenses\u002Fby-nc\u002F4.0\u002F) license.","PIXLRelight 是一个用于物理可控单图像重照明的前馈模型。它能够根据给定的源照片和目标光照条件（可以是RGB图像或Blender Cycles渲染）生成在新光照下的重照明版本，整个过程耗时不到十分之一秒。该项目采用Python编写，利用了内在分解技术来提取源图像的反照率、漫反射阴影等信息，以实现对不同光照条件下图像的真实感调整。特别适用于需要快速改变图片光照效果而不损失真实感的应用场景，如虚拟现实环境构建、影视后期处理及游戏开发等领域。",2,"2026-06-11 04:07:55","CREATED_QUERY"]