text_plain_output_1.png
images_col = []
images_gray = []
for i, img_path in tqdm(enumerate(img_paths)):
    img = np.asarray(Image.open(img_path))
    if img.shape == (150, 150, 3):
        resized_image = tf.image.resize(img, [144, 144])
        images_col.append(resized_image)
        images_gray.append(tf.image.rgb_to_grayscale(resized_image))
images_col = np.asarray(images_col, dtype='int32')
images_gray = np.asarray(images_gray, dtype='int32')