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: 665 Bytes
d547008 | 1 2 3 4 5 6 7 8 9 10 11 12 13 | from evalmde.utils.depth import load_data
# gt_depth, gt_intr, gt_valid = load_data('sample_data/gt_depth.npz')
# pr_depth, pr_intr, pr_valid = load_data('sample_data/curv_low_freq__0.200_10.0.npz')
gt_depth, gt_intr, gt_valid = load_data('sample_data_2/gt_depth.npz')
pr_depth, pr_intr, pr_valid = load_data('sample_data_2/depthpro_gt_focal.npz')
from evalmde.metrics.rel_normal import compute_rel_normal
from evalmde.metrics.sawa_h import compute_sawa_h
sawa_h = compute_sawa_h(pr_depth, pr_intr, pr_valid, gt_depth, gt_intr, gt_valid)
rel_normal = compute_rel_normal(pr_depth, pr_intr, pr_valid, gt_depth, gt_intr, gt_valid)
print(f'{sawa_h=}, {rel_normal=}')
|