master -> main

Summary: Replace master with main in hard coded paths or mentions in documentation

Reviewed By: bottler

Differential Revision: D30696097

fbshipit-source-id: d5ff67bb026d90d1543d10ab027f916e8361ca69
This commit is contained in:
Georgia Gkioxari 2021-09-01 05:32:28 -07:00 committed by Facebook GitHub Bot
parent 1b8d86a104
commit 835e662fb5
2 changed files with 11 additions and 11 deletions

View File

@ -31,7 +31,7 @@ SYNSET_DICT_DIR = Path(__file__).resolve().parent
MAX_CAMERA_DISTANCE = 1.75 # Constant from R2N2.
VOXEL_SIZE = 128
# Intrinsic matrix extracted from Blender. Taken from meshrcnn codebase:
# https://github.com/facebookresearch/meshrcnn/blob/master/shapenet/utils/coords.py
# https://github.com/facebookresearch/meshrcnn/blob/main/shapenet/utils/coords.py
BLENDER_INTRINSIC = torch.tensor(
[
[2.1875, 0.0, 0.0, 0.0],
@ -295,7 +295,7 @@ class R2N2(ShapeNetBase): # pragma: no cover
# Intrinsic matrix extracted from the Blender with slight modification to work with
# PyTorch3D world space. Taken from meshrcnn codebase:
# https://github.com/facebookresearch/meshrcnn/blob/master/shapenet/utils/coords.py
# https://github.com/facebookresearch/meshrcnn/blob/main/shapenet/utils/coords.py
K = torch.tensor(
[
[2.1875, 0.0, 0.0, 0.0],

View File

@ -25,11 +25,11 @@ from pytorch3d.transforms import Transform3d
# Empirical min and max over the dataset from meshrcnn.
# https://github.com/facebookresearch/meshrcnn/blob/master/shapenet/utils/coords.py#L9
# https://github.com/facebookresearch/meshrcnn/blob/main/shapenet/utils/coords.py#L9
SHAPENET_MIN_ZMIN = 0.67
SHAPENET_MAX_ZMAX = 0.92
# Threshold for cubify from meshrcnn:
# https://github.com/facebookresearch/meshrcnn/blob/master/configs/shapenet/voxmesh_R50.yaml#L11
# https://github.com/facebookresearch/meshrcnn/blob/main/configs/shapenet/voxmesh_R50.yaml#L11
CUBIFY_THRESH = 0.2
# Default values of rotation, translation and intrinsic matrices for BlenderCamera.
@ -101,7 +101,7 @@ def collate_batched_R2N2(batch: List[Dict]): # pragma: no cover
def compute_extrinsic_matrix(azimuth, elevation, distance): # pragma: no cover
"""
Copied from meshrcnn codebase:
https://github.com/facebookresearch/meshrcnn/blob/master/shapenet/utils/coords.py#L96
https://github.com/facebookresearch/meshrcnn/blob/main/shapenet/utils/coords.py#L96
Compute 4x4 extrinsic matrix that converts from homogeneous world coordinates
to homogeneous camera coordinates. We assume that the camera is looking at the
@ -151,7 +151,7 @@ def read_binvox_coords(
): # pragma: no cover
"""
Copied from meshrcnn codebase:
https://github.com/facebookresearch/meshrcnn/blob/master/shapenet/utils/binvox_torch.py#L5
https://github.com/facebookresearch/meshrcnn/blob/main/shapenet/utils/binvox_torch.py#L5
Read a binvox file and return the indices of all nonzero voxels.
@ -194,7 +194,7 @@ def read_binvox_coords(
def _compute_idxs(vals, counts): # pragma: no cover
"""
Copied from meshrcnn codebase:
https://github.com/facebookresearch/meshrcnn/blob/master/shapenet/utils/binvox_torch.py#L58
https://github.com/facebookresearch/meshrcnn/blob/main/shapenet/utils/binvox_torch.py#L58
Fast vectorized version of index computation.
@ -247,7 +247,7 @@ def _compute_idxs(vals, counts): # pragma: no cover
def _read_binvox_header(f): # pragma: no cover
"""
Copied from meshrcnn codebase:
https://github.com/facebookresearch/meshrcnn/blob/master/shapenet/utils/binvox_torch.py#L99
https://github.com/facebookresearch/meshrcnn/blob/main/shapenet/utils/binvox_torch.py#L99
Read binvox header and extract information regarding voxel sizes and translations
to original voxel coordinates.
@ -311,7 +311,7 @@ def _read_binvox_header(f): # pragma: no cover
def align_bbox(src, tgt): # pragma: no cover
"""
Copied from meshrcnn codebase:
https://github.com/facebookresearch/meshrcnn/blob/master/tools/preprocess_shapenet.py#L263
https://github.com/facebookresearch/meshrcnn/blob/main/tools/preprocess_shapenet.py#L263
Return a copy of src points in the coordinate system of tgt by applying a
scale and shift along each coordinate axis to make the min / max values align.
@ -341,7 +341,7 @@ def align_bbox(src, tgt): # pragma: no cover
def voxelize(voxel_coords, P, V): # pragma: no cover
"""
Copied from meshrcnn codebase:
https://github.com/facebookresearch/meshrcnn/blob/master/tools/preprocess_shapenet.py#L284
https://github.com/facebookresearch/meshrcnn/blob/main/tools/preprocess_shapenet.py#L284
but changing flip y to flip x.
Creating voxels of shape (D, D, D) from voxel_coords and projection matrix.
@ -388,7 +388,7 @@ def voxelize(voxel_coords, P, V): # pragma: no cover
def project_verts(verts, P, eps=1e-1): # pragma: no cover
"""
Copied from meshrcnn codebase:
https://github.com/facebookresearch/meshrcnn/blob/master/shapenet/utils/coords.py#L159
https://github.com/facebookresearch/meshrcnn/blob/main/shapenet/utils/coords.py#L159
Project vertices using a 4x4 transformation matrix.