Downloads · 30 days
354
4% of all-time downloads
adsfda/NiRNE
NiRNE is a image-to-image model from adsfda. Use it when you need one image transformed into another. It is set up for diffusers. The card lists the license as apache-2.0.
This repository contains the weights of NiRNE, the image-to-normal estimator of Hi3DGen
Downloads · 30 days
354
4% of all-time downloads
All-time downloads
9.3K
Public
Repo size
5.3 GB
Likes
0
Public
Click a slice to open those files.
.bin5.3 GB · 100%
From the Hugging Face model README
This repository contains the weights of NiRNE, the image-to-normal estimator of Hi3DGen
See the Github repository: https://github.com/lzt02/NiRNE regarding installation instructions.
The model can then be used as follows:
import torch
from PIL import Image
# Load an image
input_image = Image.open("path/to/your/image.jpg")
# Create predictor instance
predictor = torch.hub.load("lzt02/NiRNE", "NiRNE", trust_repo=True)
# Generate normal map using alpha channel for masking
normal_map = predictor(rgba_image, data_type="object") # Will mask out background, if alpha channel is avalible, else use birefnet
# Apply the model to the image
normal_image = predictor(input_image)
# Save or display the result
normal_image.save("output/normal_map.png")