1def import_images(path_list):
2 path_len = len(path_list)
3 images = numpy.zeros((path_len, 224, 224, 3), dtype = numpy.float64)
4
5 for pos in range(path_len):
6 testimg = cv2.imread(path_list[pos])
7
8 if(testimg is not None):
9 testimg = cv2.cvtColor(testimg, cv2.COLOR_BGR2RGB)
10 testimg = cv2.resize(testimg, (224, 224))
11 images[pos, :, :, :] = testimg
12 return images
13