MCPcopy Create free account
hub / github.com/FoundationVision/ByteTrack / __call__

Method __call__

tutorials/motr/transforms.py:333–343  ·  view source on GitHub ↗
(self, imgs: list, targets: list)

Source from the content-addressed store, hash-verified

331 self.max_size = max_size
332
333 def __call__(self, imgs: list, targets: list):
334 ret_imgs = []
335 ret_targets = []
336 w = random.randint(self.min_size, min(imgs[0].width, self.max_size))
337 h = random.randint(self.min_size, min(imgs[0].height, self.max_size))
338 region = T.RandomCrop.get_params(imgs[0], [h, w])
339 for img_i, targets_i in zip(imgs, targets):
340 img_i, targets_i = crop_mot(img_i, targets_i, region)
341 ret_imgs.append(img_i)
342 ret_targets.append(targets_i)
343 return ret_imgs, ret_targets
344
345class MotRandomShift(object):
346 def __init__(self, bs=1):

Callers

nothing calls this directly

Calls 1

crop_motFunction · 0.85

Tested by

no test coverage detected