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

Method __call__

tutorials/motr/transforms.py:434–439  ·  view source on GitHub ↗
(self, img, target)

Source from the content-addressed store, hash-verified

432 self.size = size
433
434 def __call__(self, img, target):
435 image_width, image_height = img.size
436 crop_height, crop_width = self.size
437 crop_top = int(round((image_height - crop_height) / 2.))
438 crop_left = int(round((image_width - crop_width) / 2.))
439 return crop(img, target, (crop_top, crop_left, crop_height, crop_width))
440
441
442class MotCenterCrop(CenterCrop):

Callers

nothing calls this directly

Calls 1

cropFunction · 0.85

Tested by

no test coverage detected