MCPcopy Create free account
hub / github.com/OUCMachineLearning/OUCML / merge

Function merge

GAN/datadownloader/utils.py:15–22  ·  view source on GitHub ↗
(images, size)

Source from the content-addressed store, hash-verified

13 [resize_w, resize_w])
14
15def merge(images, size):
16 h, w = images.shape[1], images.shape[2]
17 img = np.zeros((h * size[0], w * size[1], 3))
18 for idx, image in enumerate(images):
19 i = idx % size[1]
20 j = idx // size[1]
21 img[j * h: j * h + h, i * w: i * w + w, :] = image
22 return img
23
24def transform(image, npx=64, is_crop=True, resize_w=64):
25 if is_crop:

Callers 1

imsaveFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected