Spaces:
Runtime error
Runtime error
Download eval/utils.py from uva-cv-lab/SAB3R: direct link, hf CLI and curl.
- Browser
- Download file 346 Bytes
-
https://huggingface.co/spaces/uva-cv-lab/SAB3R/resolve/main/eval/utils.py
- Command line
-
hf download hf://spaces/uva-cv-lab/SAB3R/eval/utils.py
-
curl -L -o utils.py https://huggingface.co/spaces/uva-cv-lab/SAB3R/resolve/main/eval/utils.py
346 Bytes
| import torch | |
| import numpy as np | |
| import torchvision | |
| default_seg_target_transform = torchvision.transforms.Compose( | |
| [ | |
| torchvision.transforms.Resize((224, 224)), | |
| torchvision.transforms.Lambda(lambda x: torch.tensor(np.array(x))), | |
| ] | |
| ) | |
| class DummyArgs: | |
| def __init__(self, **kwargs): | |
| self.__dict__.update(kwargs) | |