Instructions to use zeyuren2002/EvalMDE with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use zeyuren2002/EvalMDE with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("zeyuren2002/EvalMDE", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
File size: 997 Bytes
40a3ea8 | 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 | """ data sample
"""
class Sample():
def __init__(self, img=None,
depth=None, depth_mask=None,
normal=None, normal_mask=None,
intrins=None, flipped=False,
dataset_name='dataset', scene_name='scene', img_name='img',
info={}):
self.img = img # input image
self.depth = depth # depth - GT
self.depth_mask = depth_mask # depth - valid_mask
self.normal = normal # surface normals - GT
self.normal_mask = normal_mask # surface normals - valid_mask
self.intrins = intrins # camera intrinsics
self.flipped = flipped # True when the image is flipped during augmentation
self.dataset_name = dataset_name
self.scene_name = scene_name
self.img_name = img_name
# other info (this is a dict containing any additional information)
self.info = info |