MCPcopy Create free account
hub / github.com/KeepTryingTo/Pytorch-GAN / resize

Function resize

SRGAN/reSize.py:11–19  ·  view source on GitHub ↗
(imgsPath = 'test_images/')

Source from the content-addressed store, hash-verified

9import cv2
10
11def resize(imgsPath = 'test_images/'):
12 imgs = os.listdir(imgsPath)
13 for index,imgName in enumerate(imgs):
14 imgPath = os.path.join(imgsPath,imgName)
15 print(imgPath)
16 img = cv2.imread(imgPath)
17 img = cv2.resize(img,(24,24),interpolation=cv2.INTER_CUBIC)
18 cv2.imwrite(os.path.join(imgsPath,imgName),img)
19 print('done......')
20
21if __name__ == '__main__':
22 resize()

Callers 1

reSize.pyFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected