I am following sentdex face recognition video. I am using my own pics for training the model which are very large in size so I changed the size of my pics into 256x256 with the help of cv2.reshape() here is the code I'm using for resizing. I did it 10 time for 10 pics you can make use of loop for it.
import cv2
#paste the path where you have face recognition file
#for me it is '/home/Desktop/ml/face_reco'
path = str(input("paste you file path here: "))
IMG_SIZE = 256
# convert to array
img_array = cv2.imread(path)
new_array = cv2.resize(img_array, (IMG_SIZE, IMG_SIZE))
#save the resized pic with some new name
cv2.imwrite('/home/Desktop/ml/face_reco/known_faces/vardhan/new.png',new_array)
when I use these newly resized pics as the input for the model then it's raising an error list index out of range because the encoding array is empty in line 38 of sentdex code and I don't know why encoding array is empty for new pics which was not empty for the original pics.