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

Method __call__

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

Source from the content-addressed store, hash-verified

415
416class MotRandomSizeCrop(RandomSizeCrop):
417 def __call__(self, imgs, targets):
418 w = random.randint(self.min_size, min(imgs[0].width, self.max_size))
419 h = random.randint(self.min_size, min(imgs[0].height, self.max_size))
420 region = T.RandomCrop.get_params(imgs[0], [h, w])
421 ret_imgs = []
422 ret_targets = []
423 for img_i, targets_i in zip(imgs, targets):
424 img_i, targets_i = crop(img_i, targets_i, region)
425 ret_imgs.append(img_i)
426 ret_targets.append(targets_i)
427 return ret_imgs, ret_targets
428
429
430class CenterCrop(object):

Callers

nothing calls this directly

Calls 1

cropFunction · 0.85

Tested by

no test coverage detected