mirror of
https://github.com/facebookresearch/pytorch3d.git
synced 2025-08-02 20:02:49 +08:00
rename types to avoid clash
Summary: There are cases where importing pytorch3d seems to fail (internally at Meta) because of a clash between the builtin types module and ours, so rename ours. Reviewed By: patricklabatut Differential Revision: D34426817 fbshipit-source-id: f175448db6a4967a9a3f7bb6f595aad2ffb36455
This commit is contained in:
parent
0e88b21de6
commit
f816568735
@ -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("_")]
|
||||
|
@ -13,7 +13,7 @@ from typing import Dict, List, Optional
|
||||
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
|
||||
|
@ -9,7 +9,7 @@ from typing import Dict, List
|
||||
|
||||
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 (
|
||||
|
@ -8,7 +8,7 @@ import warnings
|
||||
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,
|
||||
|
@ -13,7 +13,7 @@ import numpy as np
|
||||
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
|
||||
|
||||
|
||||
|
@ -16,7 +16,7 @@ import numpy as np
|
||||
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
|
||||
|
@ -10,7 +10,7 @@ from pathlib import Path
|
||||
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
|
||||
|
@ -9,7 +9,7 @@ import pathlib
|
||||
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
|
||||
|
||||
|
@ -14,7 +14,7 @@ import torch
|
||||
from iopath.common.file_io import PathManager
|
||||
from PIL import Image
|
||||
|
||||
from ..common.types import Device
|
||||
from ..common.datatypes import Device
|
||||
|
||||
|
||||
@contextlib.contextmanager
|
||||
|
@ -11,7 +11,7 @@ from typing import List, Optional, Sequence, Tuple, Union
|
||||
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
|
||||
|
@ -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
|
||||
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
import torch
|
||||
|
||||
from ..common.types import Device
|
||||
from ..common.datatypes import Device
|
||||
from .utils import TensorProperties
|
||||
|
||||
|
||||
|
@ -10,7 +10,7 @@ from typing import Optional
|
||||
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,
|
||||
|
@ -14,7 +14,7 @@ import numpy as np
|
||||
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):
|
||||
|
@ -8,7 +8,7 @@ from typing import List, Union
|
||||
|
||||
import torch
|
||||
|
||||
from ..common.types import Device, make_device
|
||||
from ..common.datatypes import Device, make_device
|
||||
from . import utils as struct_utils
|
||||
|
||||
|
||||
|
@ -10,7 +10,7 @@ from typing import List, Optional, Sequence, Tuple, Union
|
||||
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
|
||||
|
||||
|
||||
|
@ -9,7 +9,7 @@ from typing import List, Optional, Tuple, Union
|
||||
|
||||
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
|
||||
|
||||
|
@ -9,7 +9,7 @@ from typing import Optional
|
||||
import torch
|
||||
import torch.nn.functional as F
|
||||
|
||||
from ..common.types import Device
|
||||
from ..common.datatypes import Device
|
||||
|
||||
|
||||
"""
|
||||
|
@ -10,7 +10,7 @@ from typing import List, Optional, Union
|
||||
|
||||
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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user