text_plain_output_2.png application_vnd.jupyter.stderr_output_1.png
from tensorflow.keras.preprocessing.image import load_img, img_to_array

import numpy as np

import pandas as pd

data = pd.read_csv('../input/hardfakevsrealfaces/data.csv')

height, width = (128, 128)
X = np.empty((data.shape[0], height, width, 3))
for i in range(data.shape[0]):
    img = load_img('../input/hardfakevsrealfaces/{}/{}.jpg'.format(data.loc[i, 'label'], data.loc[i, 'images_id']), target_size=(height, width))
    X[i] = img_to_array(img)
X.shape