hello I am trying to train this model that is used to detect if a person's eye is open or closed. I want to read .jpg images from dataset folder using opencv library in python. The code is
def load_images(self,dataframe):
output = np.zeros((len(dataframe),self.image_shape[0],self.image_shape[1]))
for index,row in dataframe.iterrows():
img = cv2.imread(row["file_location"].replace(row["file_location"],"home/samuel/Desktop/eye-closed/dataset_B_FacialImages"))
if img is None:
print ("Cv2 error: Unable to read from '"+row["file_location"].replace(row["file_location"],"home/samuel/dataset/eye-closed/dataset_B_Eye_Images/closedLeftEyes/*.jpg")+"'")
continue
img = cv2.cvtColor(img,cv2.COLOR_BGR2GRAY)
output[index] = img
return output
I is giving me the error
Cv2 error: Unable to read from 'home/samuel/dataset/eye-closed/dataset_B_Eye_Images/closedLeftEyes/*.jpg'
I don't know what is wrong. Can anyone help me with this?