Image-to-Image
Safetensors
clementchadebec commited on
Commit
bbf2f69
·
verified ·
1 Parent(s): 553b834

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +65 -3
README.md CHANGED
@@ -1,3 +1,65 @@
1
- ---
2
- license: cc-by-nc-4.0
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: cc-by-nc-4.0
3
+ base_model:
4
+ - stabilityai/stable-diffusion-xl-base-1.0
5
+ tags:
6
+ - image-to-image
7
+ inference: false
8
+ ---
9
+ # ✨ Latent Bridge Matching for Normals Estimation ✨
10
+
11
+ Latent Bridge Matching (LBM) is a new, versatile and scalable method proposed in [LBM: Latent Bridge Matching for Fast Image-to-Image Translation](https://arxiv.org/abs/2503.07535) that relies on Bridge Matching in a latent space to achieve fast image-to-image translation.
12
+ This model was trained to estimate the normal map from a given input image.
13
+ See also our [live demo](https://huggingface.co/spaces/jasperai/LBM_relighting) for image relighting and official [Github repo](https://github.com/gojasper/LBM).
14
+
15
+ ## How to use?
16
+ To use this model you need first to install the associated `lbm` library by running the following
17
+ ```bash
18
+ pip install git+https://github.com/gojasper/LBM.git
19
+ ```
20
+
21
+ Then, you can infer with the model on your input images
22
+ ```python
23
+ import torch
24
+ from diffusers.utils import load_image
25
+ from lbm.inference import evaluate, get_model
26
+
27
+ # Load model
28
+ model = get_model(
29
+ "jasperai/LBM_relighting",
30
+ torch_dtype=torch.bfloat16,
31
+ device="cuda",
32
+ )
33
+
34
+ # Load a source image
35
+ source_image = load_image(
36
+ "https://huggingface.co/jasperai/LBM_relighting/resolve/main/assets/source_image.jpg"
37
+ )
38
+
39
+ # Perform inference
40
+ output_image = evaluate(model, source_image, num_sampling_steps=1)
41
+ ```
42
+
43
+ ## Metrics
44
+ This model achieves the following metrics
45
+
46
+ | Metrics | mean ↓ | 11.25 ↑ | 30.0 ↑ |
47
+ |---------|--------|---------|--------|
48
+ | NYUv2 | 15.5 | 62.5 | 84.9 |
49
+ | ScanNet | 14.1 | 65.8 | 87.0 |
50
+ | iBims | 16.9 | 68.3 | 82.7 |
51
+ | Sintel | 32.2 | 24.0 | 58.6 |
52
+
53
+ ## License
54
+ This code is released under the Creative Commons BY-NC 4.0 license.
55
+
56
+ ## Citation
57
+ If you find this work useful or use it in your research, please consider citing us
58
+ ```bibtex
59
+ @article{chadebec2025lbm,
60
+ title={LBM: Latent Bridge Matching for Fast Image-to-Image Translation},
61
+ author={Clément Chadebec and Onur Tasar and Sanjeev Sreetharan and Benjamin Aubin},
62
+ year={2025},
63
+ journal = {arXiv preprint arXiv:2503.07535},
64
+ }
65
+ ```