Download code/tt_moge/reference/utils3d/__init__.py from changh95/moge-2-p150: direct link, hf CLI and curl.
- Browser
- Download file 880 Bytes
-
https://huggingface.co/changh95/moge-2-p150/resolve/main/code/tt_moge/reference/utils3d/__init__.py
- Command line
-
hf download hf://changh95/moge-2-p150/code/tt_moge/reference/utils3d/__init__.py
-
curl -L -o __init__.py https://huggingface.co/changh95/moge-2-p150/resolve/main/code/tt_moge/reference/utils3d/__init__.py
880 Bytes
| """ | |
| A collection of useful functions for 3D computer vision and graphics researchers in Python. | |
| - Use `utils3d.{function}` to call the function automatically selecting the backend based on the input type (Numpy ndarray or Pytorch tensor). | |
| - Use `utils3d.{np/pt}.{function}` to specifically call the Numpy or Pytorch version. | |
| """ | |
| import importlib | |
| from typing import TYPE_CHECKING | |
| from .helpers import lazy_import, lazy_import_from | |
| try: | |
| from .interface import * | |
| except ImportError: | |
| pass | |
| __all__ = ['numpy', 'torch', 'np', 'pt'] | |
| lazy_import(globals(), '.numpy', 'numpy') | |
| lazy_import(globals(), '.numpy', 'np') | |
| lazy_import(globals(), '.torch', 'torch') | |
| lazy_import(globals(), '.torch', 'pt') | |
| if TYPE_CHECKING: | |
| from . import numpy | |
| from . import numpy as np # short alias | |
| from . import torch | |
| from . import torch as pt # short alias | |
| from . import io |