MCPcopy Index your code
hub / github.com/FoundationVision/ByteTrack / _mirror

Function _mirror

yolox/data/data_augment.py:180–186  ·  view source on GitHub ↗
(image, boxes)

Source from the content-addressed store, hash-verified

178
179
180def _mirror(image, boxes):
181 _, width, _ = image.shape
182 if random.randrange(2):
183 image = image[:, ::-1]
184 boxes = boxes.copy()
185 boxes[:, 0::2] = width - boxes[:, 2::-2]
186 return image, boxes
187
188
189def preproc(image, input_size, mean, std, swap=(2, 0, 1)):

Callers 1

__call__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected