File size: 1,150 Bytes
59075bc
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
---
license: cc-by-nc-4.0
tags:
- normal-estimation
- depth-estimation
- diffusion
- transparent-objects
library_name: diffusers
pipeline_tag: image-to-image
---

# TransNormal

Surface normal estimation for transparent objects using diffusion models with DINOv3 semantic guidance.

## Usage

```python
from transnormal import TransNormalPipeline, create_dino_encoder
import torch

# Load DINO encoder (download separately)
dino_encoder = create_dino_encoder(
    model_name="dinov3_vith16plus",
    weights_path="path/to/dinov3_vith16plus",
    projector_path="path/to/cross_attention_projector.pt",
    device="cuda",
    dtype=torch.bfloat16,
)

# Load pipeline
pipe = TransNormalPipeline.from_pretrained(
    "longxiang-ai/transnormal-v1",
    dino_encoder=dino_encoder,
    torch_dtype=torch.bfloat16,
)
pipe = pipe.to("cuda")

# Inference
normal_map = pipe("image.jpg", output_type="pil")
```

## Citation

```bibtex
@article{transnormal2025,
  title={TransNormal: Dense Visual Semantics for Diffusion-based Transparent Object Normal Estimation},
  author={Li, Mingwei and Fan, Hehe and Yang, Yi},
  year={2025}
}
```

## License

CC BY-NC 4.0