Skip to content

Commit 534f59b

Browse files
committed
code regulation
1 parent dc91cbf commit 534f59b

File tree

5 files changed

+20
-13
lines changed

5 files changed

+20
-13
lines changed

embodiedscan/datasets/transforms/multiview.py

+2
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ class AggregateMultiViewPoints(BaseTransform):
117117
save_slices (int): Whether to save the index range of
118118
the points in the current point cloud.
119119
"""
120+
120121
def __init__(self,
121122
coord_type: str = 'DEPTH',
122123
save_slices: bool = False) -> None:
@@ -170,6 +171,7 @@ class ConstructMultiSweeps(BaseTransform):
170171
points, gt_bboxes_3d, gt_labels_3d,
171172
visible_instance_masks, visible_occupancy_masks
172173
"""
174+
173175
def __init__(self):
174176
super().__init__()
175177

embodiedscan/models/dense_heads/fcaf3d_head.py

+13-10
Original file line numberDiff line numberDiff line change
@@ -868,7 +868,10 @@ def __init__(self,
868868
pts_center_threshold: int,
869869
center_loss: dict = dict(type='mmdet.CrossEntropyLoss',
870870
use_sigmoid=True),
871-
bbox_loss: dict = dict(type='BBoxCDLoss', mode='l1', loss_weight=1.0, group='g8'),
871+
bbox_loss: dict = dict(type='BBoxCDLoss',
872+
mode='l1',
873+
loss_weight=1.0,
874+
group='g8'),
872875
cls_loss: dict = dict(type='mmdet.FocalLoss'),
873876
decouple_bbox_loss: bool = False,
874877
decouple_groups: int = 3,
@@ -1232,22 +1235,22 @@ def _loss_by_feat_single(self, center_preds: List[Tensor],
12321235
(bbox_pred_center, bbox_targ_size,
12331236
bbox_targ_euler),
12341237
dim=-1),
1235-
pos_bbox_targets,
1236-
reduction_override='none')
1238+
pos_bbox_targets,
1239+
reduction_override='none')
12371240
corner_bbox_loss += self.decouple_weights[
12381241
1] * self.bbox_loss(torch.concat(
12391242
(bbox_targ_center, bbox_pred_size,
12401243
bbox_targ_euler),
12411244
dim=-1),
1242-
pos_bbox_targets,
1243-
reduction_override='none')
1245+
pos_bbox_targets,
1246+
reduction_override='none')
12441247
corner_bbox_loss += self.decouple_weights[
12451248
2] * self.bbox_loss(torch.concat(
12461249
(bbox_targ_center, bbox_targ_size,
12471250
bbox_pred_euler),
12481251
dim=-1),
1249-
pos_bbox_targets,
1250-
reduction_override='none')
1252+
pos_bbox_targets,
1253+
reduction_override='none')
12511254
bbox_sizes = bbox_targ_size.norm(
12521255
dim=-1)[:, None].clamp(min=0.1)
12531256
corner_bbox_loss = (corner_bbox_loss /
@@ -1272,11 +1275,11 @@ def _loss_by_feat_single(self, center_preds: List[Tensor],
12721275
if self.decouple_groups == 4:
12731276
corner_bbox_loss += self.decouple_weights[
12741277
3] * self.bbox_loss(decode_bbox_preds,
1275-
pos_bbox_targets)
1278+
pos_bbox_targets)
12761279

12771280
else:
1278-
corner_bbox_loss += self.bbox_loss(
1279-
decode_bbox_preds, pos_bbox_targets)
1281+
corner_bbox_loss += self.bbox_loss(decode_bbox_preds,
1282+
pos_bbox_targets)
12801283

12811284
bbox_loss = corner_bbox_loss
12821285

embodiedscan/models/detectors/embodied_det3d.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ class Embodied3DDetector(BaseModel):
3434
bbox_head (dict): Config dict of box head.
3535
neck (dict, optional): Config dict of neck. Defaults to None.
3636
neck_3d (dict, optional): Config dict of 3D neck. Defaults to None.
37-
neck_lidar (dict, optional): Config dict of lidar neck. Defaults to None.
37+
neck_lidar (dict, optional): Config dict of lidar neck.
38+
Defaults to None.
3839
coord_type (str): Type of Box coordinates. Default to CAMERA.
3940
train_cfg (dict, optional): Config dict of training hyper-parameters.
4041
Defaults to None.

embodiedscan/models/detectors/sparse_featfusion_single_stage.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ class SparseFeatureFusionSingleStage3DDetector(BaseModel):
3535
bbox_head (dict): Config dict of box head.
3636
neck (dict, optional): Config dict of neck. Defaults to None.
3737
neck_3d (dict, optional): Config dict of 3D neck. Defaults to None.
38-
neck_lidar (dict, optional): Config dict of lidar neck. Defaults to None.
38+
neck_lidar (dict, optional): Config dict of lidar neck.
39+
Defaults to None.
3940
coord_type (str): Type of Box coordinates. Default to CAMERA.
4041
train_cfg (dict, optional): Config dict of training hyper-parameters.
4142
Defaults to None.

install.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -109,4 +109,4 @@ def install_requires(fname):
109109
if args.mode == 'run' or args.mode == 'all':
110110
install_requires('requirements/run.txt')
111111

112-
run_subprocess([sys.executable, '-m', 'pip', 'install', '-e', '.'])
112+
run_subprocess([sys.executable, '-m', 'pip', 'install', '-e', '.'])

0 commit comments

Comments
 (0)