Skip to content

Commit

Permalink
Replace relative imports in generic_model.py with absolute ones
Browse files Browse the repository at this point in the history
Summary: - Replace all the relative imports for generic models to absolute import: (from . import y => from pytorch3.x import y)

Reviewed By: shapovalov

Differential Revision: D43620682

fbshipit-source-id: 937318b339b5020d17b511a891c7b000ff659328
  • Loading branch information
EmGarr authored and facebook-github-bot committed Feb 28, 2023
1 parent 33b49ce commit d388881
Showing 1 changed file with 43 additions and 33 deletions.
76 changes: 43 additions & 33 deletions pytorch3d/implicitron/models/generic_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,58 +17,68 @@
import tqdm
from omegaconf import DictConfig
from pytorch3d.common.compat import prod
from pytorch3d.implicitron.models.metrics import (
RegularizationMetricsBase,
ViewMetricsBase,

from pytorch3d.implicitron.models.base_model import (
ImplicitronModelBase,
ImplicitronRender,
)
from pytorch3d.implicitron.models.renderer.base import ImplicitronRayBundle
from pytorch3d.implicitron.tools import image_utils, vis_utils
from pytorch3d.implicitron.tools.config import (
expand_args_fields,
registry,
run_auto_creation,
from pytorch3d.implicitron.models.feature_extractor import FeatureExtractorBase
from pytorch3d.implicitron.models.feature_extractor.resnet_feature_extractor import ( # noqa
ResNetFeatureExtractor,
)
from pytorch3d.implicitron.tools.rasterize_mc import rasterize_sparse_ray_bundle
from pytorch3d.implicitron.tools.utils import cat_dataclass
from pytorch3d.renderer import utils as rend_utils

from pytorch3d.renderer.cameras import CamerasBase

if TYPE_CHECKING:
from visdom import Visdom

from .base_model import ImplicitronModelBase, ImplicitronRender
from .feature_extractor import FeatureExtractorBase
from .feature_extractor.resnet_feature_extractor import ResNetFeatureExtractor # noqa
from .global_encoder.global_encoder import GlobalEncoderBase
from .implicit_function.base import ImplicitFunctionBase
from .implicit_function.idr_feature_field import IdrFeatureField # noqa
from .implicit_function.neural_radiance_field import ( # noqa
from pytorch3d.implicitron.models.global_encoder.global_encoder import GlobalEncoderBase
from pytorch3d.implicitron.models.implicit_function.base import ImplicitFunctionBase
from pytorch3d.implicitron.models.implicit_function.idr_feature_field import ( # noqa
IdrFeatureField,
)
from pytorch3d.implicitron.models.implicit_function.neural_radiance_field import ( # noqa
NeRFormerImplicitFunction,
NeuralRadianceFieldImplicitFunction,
)
from .implicit_function.scene_representation_networks import ( # noqa
from pytorch3d.implicitron.models.implicit_function.scene_representation_networks import ( # noqa
SRNHyperNetImplicitFunction,
SRNImplicitFunction,
)
from .implicit_function.voxel_grid_implicit_function import ( # noqa
from pytorch3d.implicitron.models.implicit_function.voxel_grid_implicit_function import ( # noqa
VoxelGridImplicitFunction,
)
from pytorch3d.implicitron.models.metrics import (
RegularizationMetricsBase,
ViewMetricsBase,
)

from .renderer.base import (
from pytorch3d.implicitron.models.renderer.base import (
BaseRenderer,
EvaluationMode,
ImplicitFunctionWrapper,
ImplicitronRayBundle,
RendererOutput,
RenderSamplingMode,
)
from .renderer.lstm_renderer import LSTMRenderer # noqa
from .renderer.multipass_ea import MultiPassEmissionAbsorptionRenderer # noqa
from .renderer.ray_sampler import RaySamplerBase
from .renderer.sdf_renderer import SignedDistanceFunctionRenderer # noqa
from .view_pooler.view_pooler import ViewPooler
from pytorch3d.implicitron.models.renderer.lstm_renderer import LSTMRenderer # noqa
from pytorch3d.implicitron.models.renderer.multipass_ea import ( # noqa
MultiPassEmissionAbsorptionRenderer,
)
from pytorch3d.implicitron.models.renderer.ray_sampler import RaySamplerBase
from pytorch3d.implicitron.models.renderer.sdf_renderer import ( # noqa
SignedDistanceFunctionRenderer,
)
from pytorch3d.implicitron.models.view_pooler.view_pooler import ViewPooler
from pytorch3d.implicitron.tools import image_utils, vis_utils
from pytorch3d.implicitron.tools.config import (
expand_args_fields,
registry,
run_auto_creation,
)

from pytorch3d.implicitron.tools.rasterize_mc import rasterize_sparse_ray_bundle
from pytorch3d.implicitron.tools.utils import cat_dataclass
from pytorch3d.renderer import utils as rend_utils
from pytorch3d.renderer.cameras import CamerasBase


if TYPE_CHECKING:
from visdom import Visdom
logger = logging.getLogger(__name__)


Expand Down

0 comments on commit d388881

Please sign in to comment.