TransNormal / README.md
Longxiang-ai's picture
Upload folder using huggingface_hub
59075bc verified
metadata
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

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

@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