mirror of
https://github.com/facebookresearch/pytorch3d.git
synced 2025-08-02 11:52:50 +08:00
pyre and lint fixes
Summary: Fixing several unused imports and pyre/linter warnings. Reviewed By: bottler Differential Revision: D22592491 fbshipit-source-id: 463383b9b73a545949475044fb5c531712f8482c
This commit is contained in:
parent
7e5bad475c
commit
4f78af6170
@ -368,7 +368,7 @@ def _load_obj(
|
||||
# startswith expects each line to be a string. If the file is read in as
|
||||
# bytes then first decode to strings.
|
||||
if lines and isinstance(lines[0], bytes):
|
||||
lines = [l.decode("utf-8") for l in lines]
|
||||
lines = [el.decode("utf-8") for el in lines]
|
||||
|
||||
for line in lines:
|
||||
if line.startswith("mtllib"):
|
||||
|
@ -1,9 +1,5 @@
|
||||
#!/usr/bin/env python3
|
||||
# Copyright (c) Facebook, Inc. and its affiliates. All rights reserved.
|
||||
|
||||
|
||||
from typing import NamedTuple
|
||||
|
||||
import torch
|
||||
from pytorch3d import _C
|
||||
|
||||
|
@ -5,7 +5,6 @@ from typing import NamedTuple, Optional
|
||||
import torch
|
||||
import torch.nn as nn
|
||||
|
||||
from ..cameras import get_world_to_view_transform
|
||||
from .rasterize_meshes import rasterize_meshes
|
||||
|
||||
|
||||
|
@ -4,9 +4,6 @@
|
||||
import torch
|
||||
import torch.nn as nn
|
||||
|
||||
from .rasterizer import Fragments
|
||||
from .utils import _clip_barycentric_coordinates, _interpolate_zbuf
|
||||
|
||||
|
||||
# A renderer class should be initialized with a
|
||||
# function for rasterization and a function for shading.
|
||||
|
@ -7,7 +7,6 @@ from typing import NamedTuple, Optional
|
||||
import torch
|
||||
import torch.nn as nn
|
||||
|
||||
from ..cameras import get_world_to_view_transform
|
||||
from .rasterize_points import rasterize_points
|
||||
|
||||
|
||||
|
@ -375,7 +375,7 @@ class Transform3d:
|
||||
"""
|
||||
other = Transform3d(device=self.device)
|
||||
if self._lu is not None:
|
||||
other._lu = [l.clone() for l in self._lu]
|
||||
other._lu = [elem.clone() for elem in self._lu]
|
||||
other._matrix = self._matrix.clone()
|
||||
other._transforms = [t.clone() for t in self._transforms]
|
||||
return other
|
||||
|
@ -9,10 +9,7 @@ from pytorch3d.ops.interp_face_attrs import (
|
||||
interpolate_face_attributes_python,
|
||||
)
|
||||
from pytorch3d.renderer.mesh.rasterizer import Fragments
|
||||
from pytorch3d.renderer.mesh.texturing import (
|
||||
interpolate_texture_map,
|
||||
interpolate_vertex_colors,
|
||||
)
|
||||
from pytorch3d.renderer.mesh.texturing import interpolate_vertex_colors
|
||||
from pytorch3d.structures import Meshes, Textures
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user