code: def df2numpy(train_set):
      images = []
      for img_path in train_set["full_path"]:
          img = (
              Image.open(
                  "./drive/My Drive/mlin/celebs/imdb/" + img_path[0]
              )
              .resize((128, 128))
              .convert("L")
          )
          images.append(np.asarray(img, dtype="int32"))
  
      image_inputs = np.array(images)
  
      ages = train_set["age"].astype("int").to_numpy()
      return image_inputs, ages
  
file_path: autokeras/examples/celeb_age.py
imports: from datetime import datetime
  from datetime import timedelta
  import numpy
  import pandas
  import tensorflow
  from google.colab import drive
  from PIL import Image
  from scipy.io import loadmat
  import autokeras
label_desc: Use image node_id 2 for calling a global function with example usage: df2numpy(train_set) and returns: image_inputs,  ages