MCPcopy Create free account
hub / github.com/thygate/stable-diffusion-webui-depthmap-script / resizewithpool

Function resizewithpool

src/depthmap_generation.py:961–966  ·  view source on GitHub ↗
(img, size)

Source from the content-addressed store, hash-verified

959
960
961def resizewithpool(img, size):
962 i_size = img.shape[0]
963 n = int(np.floor(i_size / size))
964
965 out = skimage.measure.block_reduce(img, (n, n), np.max)
966 return out
967
968
969def calculateprocessingres(img, basesize, confidence=0.1, scale_threshold=3, whole_size_threshold=3000):

Callers 1

calculateprocessingresFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected