Answers for "transform jpg image into array for conv2d"

0

transform jpg image into array for conv2d

all_images = []
for image_path in os.listdir(path):
  img = io.imread(image_path , as_grey=True)
  img = img.reshape([WIDTH, HEIGHT, 1])
  all_images.append(img)
x_train = np.array(all_images)
Posted by: Guest on September-28-2020

Python Answers by Framework

Browse Popular Code Answers by Language