Skip to content

Commit

Permalink
Lint
Browse files Browse the repository at this point in the history
  • Loading branch information
Min-Sheng authored and vincentwu1 committed Dec 28, 2022
1 parent 219f797 commit 6b8a1b0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions mmdet/datasets/pipelines/formatting.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ class DefaultFormatBundle:
"proposals", "gt_bboxes", "gt_labels", "gt_masks" and "gt_semantic_seg".
These fields are formatted as follows.
- img: (1)transpose (or permute) & to tensor, (2)to DataContainer (stack=True)
- img: (1)transpose & to tensor, (2)to DataContainer (stack=True)
- proposals: (1)to tensor, (2)to DataContainer
- gt_bboxes: (1)to tensor, (2)to DataContainer
- gt_bboxes_ignore: (1)to tensor, (2)to DataContainer
Expand Down Expand Up @@ -232,7 +232,9 @@ def __call__(self, results):
if not img.flags.c_contiguous:
img = np.ascontiguousarray(img.transpose(2, 0, 1))
results['img'] = DC(
to_tensor(img), padding_value=self.pad_val['img'], stack=True)
to_tensor(img),
padding_value=self.pad_val['img'],
stack=True)
else:
results['img'] = DC(
to_tensor(img).permute(2, 0, 1).contiguous(),
Expand Down

0 comments on commit 6b8a1b0

Please sign in to comment.