MCPcopy Create free account
hub / github.com/dcharatan/flowmap / compute_patch_cropped_shape

Function compute_patch_cropped_shape

flowmap/misc/cropping.py:30–39  ·  view source on GitHub ↗
(
    shape: tuple[int, int],
    patch_size: int,
)

Source from the content-addressed store, hash-verified

28
29
30def compute_patch_cropped_shape(
31 shape: tuple[int, int],
32 patch_size: int,
33) -> tuple[int, int]:
34 h, w = shape
35
36 h_new = (h // patch_size) * patch_size
37 w_new = (w // patch_size) * patch_size
38
39 return h_new, w_new
40
41
42def center_crop_images(

Callers 2

subsample_framesFunction · 0.85
patch_crop_batchFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected