donot modify boxes in `BoxMode.convert`. (fix
Summary: Pull Request resolved:
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
+import copy
import numpy as np
from enum import Enum, unique
from typing import Iterator, List, Tuple, Union
@@ -49,7 +50,7 @@ class BoxMode(Enum):
4,
), "BoxMode.convert takes either a 4-tuple/list or a Nx4 array/tensor"
else:
- arr = box
+ arr = copy.deepcopy(box) # avoid modifying the input box
assert to_mode.value < 2 and from_mode.value < 2, "Relative mode not yet supported!"
