Object detection/recognition, pre-processing error
You have to create labels for each of the images and then split it into train and test. I believe you have 20,000 images - so you have to also have 1 label for each image not jus the 4 categories alone in an array. One of the most important steps in training a DNN model to do image classification (as is your case) or any image related task is creating labels (in your case) and otherwise annotations for other problem statements. I think you have just created a array of what your labels are and havent associated them with the actual image itself.