diff --git a/pytorch3d/common/__init__.py b/pytorch3d/common/__init__.py index 432febd04..8f5d84e96 100644 --- a/pytorch3d/common/__init__.py +++ b/pytorch3d/common/__init__.py @@ -4,7 +4,7 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. -from .types import Device, get_device, make_device +from .datatypes import Device, get_device, make_device __all__ = [k for k in globals().keys() if not k.startswith("_")] diff --git a/pytorch3d/common/types.py b/pytorch3d/common/datatypes.py similarity index 100% rename from pytorch3d/common/types.py rename to pytorch3d/common/datatypes.py diff --git a/pytorch3d/datasets/r2n2/r2n2.py b/pytorch3d/datasets/r2n2/r2n2.py index 4223d6245..a7bb604ee 100644 --- a/pytorch3d/datasets/r2n2/r2n2.py +++ b/pytorch3d/datasets/r2n2/r2n2.py @@ -13,7 +13,7 @@ import numpy as np import torch from PIL import Image -from pytorch3d.common.types import Device +from pytorch3d.common.datatypes import Device from pytorch3d.datasets.shapenet_base import ShapeNetBase from pytorch3d.renderer import HardPhongShader from tabulate import tabulate diff --git a/pytorch3d/datasets/r2n2/utils.py b/pytorch3d/datasets/r2n2/utils.py index 3fe0ebf1a..a8da0fdf9 100644 --- a/pytorch3d/datasets/r2n2/utils.py +++ b/pytorch3d/datasets/r2n2/utils.py @@ -9,7 +9,7 @@ import numpy as np import torch -from pytorch3d.common.types import Device +from pytorch3d.common.datatypes import Device from pytorch3d.datasets.utils import collate_batched_meshes from pytorch3d.ops import cubify from pytorch3d.renderer import ( diff --git a/pytorch3d/datasets/shapenet_base.py b/pytorch3d/datasets/shapenet_base.py index 075769214..f1d21208f 100644 --- a/pytorch3d/datasets/shapenet_base.py +++ b/pytorch3d/datasets/shapenet_base.py @@ -8,7 +8,7 @@ from typing import Dict, List, Optional, Tuple import torch -from pytorch3d.common.types import Device +from pytorch3d.common.datatypes import Device from pytorch3d.io import load_obj from pytorch3d.renderer import ( FoVPerspectiveCameras, diff --git a/pytorch3d/io/mtl_io.py b/pytorch3d/io/mtl_io.py index 950636497..7429ec16f 100644 --- a/pytorch3d/io/mtl_io.py +++ b/pytorch3d/io/mtl_io.py @@ -13,7 +13,7 @@ import torch import torch.nn.functional as F from iopath.common.file_io import PathManager -from pytorch3d.common.types import Device +from pytorch3d.common.datatypes import Device from pytorch3d.io.utils import _open_file, _read_image diff --git a/pytorch3d/io/obj_io.py b/pytorch3d/io/obj_io.py index 08e1b2b30..42571de8f 100644 --- a/pytorch3d/io/obj_io.py +++ b/pytorch3d/io/obj_io.py @@ -16,7 +16,7 @@ import torch from iopath.common.file_io import PathManager from PIL import Image -from pytorch3d.common.types import Device +from pytorch3d.common.datatypes import Device from pytorch3d.io.mtl_io import load_mtl, make_mesh_texture_atlas from pytorch3d.io.utils import PathOrStr, _check_faces_indices, _make_tensor, _open_file from pytorch3d.renderer import TexturesAtlas, TexturesUV diff --git a/pytorch3d/io/pluggable.py b/pytorch3d/io/pluggable.py index f0e019b43..5516d7fd6 100644 --- a/pytorch3d/io/pluggable.py +++ b/pytorch3d/io/pluggable.py @@ -10,7 +10,7 @@ from typing import Deque, Optional, Union from iopath.common.file_io import PathManager -from pytorch3d.common.types import Device +from pytorch3d.common.datatypes import Device from pytorch3d.structures import Meshes, Pointclouds from .obj_io import MeshObjFormat diff --git a/pytorch3d/io/pluggable_formats.py b/pytorch3d/io/pluggable_formats.py index 450a02d00..8973b7c70 100644 --- a/pytorch3d/io/pluggable_formats.py +++ b/pytorch3d/io/pluggable_formats.py @@ -9,7 +9,7 @@ from typing import Optional, Tuple from iopath.common.file_io import PathManager -from pytorch3d.common.types import Device +from pytorch3d.common.datatypes import Device from pytorch3d.io.utils import PathOrStr from pytorch3d.structures import Meshes, Pointclouds diff --git a/pytorch3d/io/utils.py b/pytorch3d/io/utils.py index 0e820fede..1dd2d5861 100644 --- a/pytorch3d/io/utils.py +++ b/pytorch3d/io/utils.py @@ -14,7 +14,7 @@ from iopath.common.file_io import PathManager from PIL import Image -from ..common.types import Device +from ..common.datatypes import Device @contextlib.contextmanager diff --git a/pytorch3d/renderer/cameras.py b/pytorch3d/renderer/cameras.py index 2dcc9110c..42fd6471a 100644 --- a/pytorch3d/renderer/cameras.py +++ b/pytorch3d/renderer/cameras.py @@ -11,7 +11,7 @@ import numpy as np import torch import torch.nn.functional as F -from pytorch3d.common.types import Device +from pytorch3d.common.datatypes import Device from pytorch3d.transforms import Rotate, Transform3d, Translate from .utils import TensorProperties, convert_to_tensors_and_broadcast diff --git a/pytorch3d/renderer/lighting.py b/pytorch3d/renderer/lighting.py index 4cc93fc51..76fbe3a75 100644 --- a/pytorch3d/renderer/lighting.py +++ b/pytorch3d/renderer/lighting.py @@ -8,7 +8,7 @@ import torch import torch.nn.functional as F -from ..common.types import Device +from ..common.datatypes import Device from .utils import TensorProperties, convert_to_tensors_and_broadcast diff --git a/pytorch3d/renderer/materials.py b/pytorch3d/renderer/materials.py index 929fd856b..738808b72 100644 --- a/pytorch3d/renderer/materials.py +++ b/pytorch3d/renderer/materials.py @@ -7,7 +7,7 @@ import torch -from ..common.types import Device +from ..common.datatypes import Device from .utils import TensorProperties diff --git a/pytorch3d/renderer/mesh/shader.py b/pytorch3d/renderer/mesh/shader.py index e1fd3e642..aecf6e8fb 100644 --- a/pytorch3d/renderer/mesh/shader.py +++ b/pytorch3d/renderer/mesh/shader.py @@ -10,7 +10,7 @@ import torch import torch.nn as nn -from ...common.types import Device +from ...common.datatypes import Device from ...structures.meshes import Meshes from ..blending import ( BlendParams, diff --git a/pytorch3d/renderer/utils.py b/pytorch3d/renderer/utils.py index e0af59e87..0e2b7fa2f 100644 --- a/pytorch3d/renderer/utils.py +++ b/pytorch3d/renderer/utils.py @@ -14,7 +14,7 @@ import torch import torch.nn as nn -from ..common.types import Device, make_device +from ..common.datatypes import Device, make_device class TensorAccessor(nn.Module): diff --git a/pytorch3d/structures/meshes.py b/pytorch3d/structures/meshes.py index f498ac500..027a60b11 100644 --- a/pytorch3d/structures/meshes.py +++ b/pytorch3d/structures/meshes.py @@ -8,7 +8,7 @@ import torch -from ..common.types import Device, make_device +from ..common.datatypes import Device, make_device from . import utils as struct_utils diff --git a/pytorch3d/structures/pointclouds.py b/pytorch3d/structures/pointclouds.py index 6847ef3d8..bc990c11d 100644 --- a/pytorch3d/structures/pointclouds.py +++ b/pytorch3d/structures/pointclouds.py @@ -10,7 +10,7 @@ import numpy as np import torch -from ..common.types import Device, make_device +from ..common.datatypes import Device, make_device from . import utils as struct_utils diff --git a/pytorch3d/structures/volumes.py b/pytorch3d/structures/volumes.py index cf8530e1a..d96964f99 100644 --- a/pytorch3d/structures/volumes.py +++ b/pytorch3d/structures/volumes.py @@ -9,7 +9,7 @@ import torch -from ..common.types import Device, make_device +from ..common.datatypes import Device, make_device from ..transforms import Scale, Transform3d from . import utils as struct_utils diff --git a/pytorch3d/transforms/rotation_conversions.py b/pytorch3d/transforms/rotation_conversions.py index 949863a56..bc369206c 100644 --- a/pytorch3d/transforms/rotation_conversions.py +++ b/pytorch3d/transforms/rotation_conversions.py @@ -9,7 +9,7 @@ import torch import torch.nn.functional as F -from ..common.types import Device +from ..common.datatypes import Device """ diff --git a/pytorch3d/transforms/transform3d.py b/pytorch3d/transforms/transform3d.py index a3dea2127..180f341fc 100644 --- a/pytorch3d/transforms/transform3d.py +++ b/pytorch3d/transforms/transform3d.py @@ -10,7 +10,7 @@ import torch -from ..common.types import Device, get_device, make_device +from ..common.datatypes import Device, get_device, make_device from ..common.workaround import _safe_det_3x3 from .rotation_conversions import _axis_angle_rotation