nviolante commited on
Commit
f2f18e4
·
verified ·
1 Parent(s): 2c71af2

Add model card

Browse files
Files changed (1) hide show
  1. README.md +131 -2
README.md CHANGED
@@ -1,5 +1,134 @@
1
  ---
2
  license: other
3
- license_name: inria
4
- license_link: LICENSE
 
 
 
 
 
 
 
 
5
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: other
3
+ language:
4
+ - en
5
+ tags:
6
+ - diffusion
7
+ - image-harmonization
8
+ - lighting
9
+ - 3d-gaussian-splatting
10
+ - computer-vision
11
+ - flux
12
+ pipeline_tag: image-to-image
13
  ---
14
+
15
+ # Lighting-Consistent Object Transfer Across Radiance Fields
16
+
17
+ **Paper:** [PDF](https://repo-sam.inria.fr/nerphys/dot3d/dot3d.pdf) | **Project Page:** [dot3d](https://repo-sam.inria.fr/nerphys/dot3d) | **HAL:** [hal-05657202](https://inria.hal.science/hal-05657202v1)
18
+
19
+ **Authors:** Nicolas Violante¹ · George Kopanas² · Linus Franke¹ · Julien Philip³ · George Drettakis¹
20
+
21
+ > ¹Inria, Université Côte d'Azur · ²Google DeepMind · ³Eyeline Labs
22
+
23
+ ---
24
+
25
+ ## Model Description
26
+
27
+ DOT3D is a diffusion-based image harmonization model that corrects lighting inconsistencies when compositing objects from one scene into another. It is the 2D harmonization backbone of a complete 3D pipeline for transferring objects between 3D Gaussian Splatting (3DGS) captures.
28
+
29
+ When an object is extracted from a source scene and naively pasted into a target scene, the result is unrealistic due to mismatched lighting. DOT3D harmonizes each rendered view of the composite to match the target scene's lighting, and these views are then consolidated via 3DGS post-optimization.
30
+
31
+ The model is built on [FLUX.1-schnell](https://huggingface.co/black-forest-labs/FLUX.1-schnell) and fine-tuned on a heterogeneous dataset combining synthetic, generated, and real image pairs (inconsistent composite input → consistent output).
32
+
33
+ Two variants are available:
34
+
35
+ | Variant | Inputs | Checkpoint |
36
+ |---|---|---|
37
+ | **Image-Mask** | Composite image + binary mask of inserted object | `image-mask/` |
38
+ | **Image-Background** | Composite image + original background | `image-background/` |
39
+
40
+ ---
41
+
42
+ ## Usage
43
+
44
+ ### Installation
45
+
46
+ ```bash
47
+ git clone https://github.com/nviolante25/dot3d.git
48
+ cd dot3d
49
+ conda create -n dot3d python=3.10 -y
50
+ conda activate dot3d
51
+ export CUDA_VERSION=cu121 # adjust to your system
52
+ bash install.sh
53
+ ```
54
+
55
+ ### Image-Mask variant
56
+
57
+ ```python
58
+ from PIL import Image
59
+ from huggingface_hub import snapshot_download
60
+ from wrappers import DOT3DHarmonizationWrapper
61
+
62
+ snapshot_download(repo_id="nviolante/dot3d", allow_patterns="image-mask/*", local_dir="checkpoints")
63
+
64
+ wrapper = DOT3DHarmonizationWrapper("checkpoints/image-mask")
65
+
66
+ image = Image.open("composite.png").convert("RGB")
67
+ mask = Image.open("mask.png").convert("RGB")
68
+
69
+ result = wrapper.predict_image(image, mask, num_inference_steps=4)
70
+ result["prediction"].save("harmonized.png")
71
+ ```
72
+
73
+ ### Image-Background variant
74
+
75
+ ```python
76
+ snapshot_download(repo_id="nviolante/dot3d", allow_patterns="image-background/*", local_dir="checkpoints")
77
+
78
+ wrapper = DOT3DHarmonizationWrapper("checkpoints/image-background")
79
+
80
+ image = Image.open("composite.png").convert("RGB")
81
+ background = Image.open("background.png").convert("RGB")
82
+
83
+ result = wrapper.predict_image(image, background, num_inference_steps=4)
84
+ result["prediction"].save("harmonized.png")
85
+ ```
86
+
87
+ ---
88
+
89
+ ## Training Data
90
+
91
+ The model was trained on a heterogeneous mixture of image pairs (inconsistent composite, consistent ground truth):
92
+
93
+ - **Blender** — synthetic renders with controlled relighting
94
+ - **FLUX-generated** — synthetically composited pairs produced with a generative model
95
+ - **ORIDA** — real image pairs from [ORIDA](https://hello-jinwoo.github.io/orida/) with relighting supervision
96
+
97
+ Full dataset: [`nviolante/dot3d`](https://huggingface.co/datasets/nviolante/dot3d)
98
+
99
+ ---
100
+
101
+ ## Evaluation
102
+
103
+ Evaluated on PSNR, SSIM, LPIPS, FID, and KID on the test splits of all three datasets. Pre-computed 3D results are available at [results_3d](https://huggingface.co/datasets/nviolante/dot3d/tree/main/results_3d).
104
+
105
+ ---
106
+
107
+ ## Hardware Requirements
108
+
109
+ | Task | Hardware |
110
+ |---|---|
111
+ | Training | 4× H100 (96 GB VRAM) |
112
+ | 3D post-optimization | 1× H100 (96 GB VRAM) |
113
+ | Inference (harmonization only) | Consumer GPU |
114
+
115
+ ---
116
+
117
+ ## BibTeX
118
+
119
+ ```bibtex
120
+ @article{violante2026dot3d,
121
+ author = {Violante, Nicolás and Kopanas, George and Franke, Linus and Philip, Julien and Drettakis, George},
122
+ title = {Lighting-Consistent Object Transfer Across Radiance Fields},
123
+ journal = {Computer Graphics Forum (Proceedings of the Eurographics Symposium on Rendering)},
124
+ year = {2026},
125
+ volume = 45,
126
+ number = 4
127
+ }
128
+ ```
129
+
130
+ ---
131
+
132
+ ## Acknowledgments
133
+
134
+ Funded by the European Union ERC Advanced Grants [NERPHYS](https://project.inria.fr/nerphys) (101141721) and [EXPLORER](https://cordis.europa.eu/project/id/101097259) (101097259). Experiments used the [Grid'5000](https://www.grid5000.fr) testbed. The authors thank Adobe and NVIDIA for software and hardware donations.