Skip to content

Commit

Permalink
Add PR reference in comment
Browse files Browse the repository at this point in the history
  • Loading branch information
Min-Sheng committed Jan 4, 2023
1 parent 679284e commit 25c6efa
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions mmdet/datasets/pipelines/formatting.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,8 @@ def __call__(self, results):
# `numpy.transpose()` followed by `numpy.ascontiguousarray()`
# If image is already contiguous, use
# `torch.permute()` followed by `torch.contiguous()`
# Refer to https://github.com/open-mmlab/mmdetection/pull/9533
# for more details
if not img.flags.c_contiguous:
img = np.ascontiguousarray(img.transpose(2, 0, 1))
img = to_tensor(img)
Expand Down

0 comments on commit 25c6efa

Please sign in to comment.