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

Method __call__

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

Source from the content-addressed store, hash-verified

441
442class MotCenterCrop(CenterCrop):
443 def __call__(self, imgs, targets):
444 image_width, image_height = imgs[0].size
445 crop_height, crop_width = self.size
446 crop_top = int(round((image_height - crop_height) / 2.))
447 crop_left = int(round((image_width - crop_width) / 2.))
448 ret_imgs = []
449 ret_targets = []
450 for img_i, targets_i in zip(imgs, targets):
451 img_i, targets_i = crop(img_i, targets_i, (crop_top, crop_left, crop_height, crop_width))
452 ret_imgs.append(img_i)
453 ret_targets.append(targets_i)
454 return ret_imgs, ret_targets
455
456
457class RandomHorizontalFlip(object):

Callers

nothing calls this directly

Calls 1

cropFunction · 0.85

Tested by

no test coverage detected