MCPcopy Create free account
hub / github.com/MaureenZOU/TSAM / _sample_fix_offset

Method _sample_fix_offset

src/data_loader/transform_flow.py:241–243  ·  view source on GitHub ↗
(self, image_w, image_h, crop_w, crop_h)

Source from the content-addressed store, hash-verified

239 return crop_pair[0], crop_pair[1], w_offset, h_offset
240
241 def _sample_fix_offset(self, image_w, image_h, crop_w, crop_h):
242 offsets = self.fill_fix_offset(self.more_fix_crop, image_w, image_h, crop_w, crop_h)
243 return random.choice(offsets)
244
245 @staticmethod
246 def fill_fix_offset(more_fix_crop, image_w, image_h, crop_w, crop_h):

Callers 1

_sample_crop_sizeMethod · 0.95

Calls 1

fill_fix_offsetMethod · 0.95

Tested by

no test coverage detected