isseu / emotion-recognition-neural-networks

Emotion recognition using DNN with tensorflow
MIT License
835 stars 308 forks source link

error while parsing dataset #43

Closed manthanSoriya closed 6 years ago

manthanSoriya commented 6 years ago

while running cvs_to_numpy.py I encountered this error. Can someone help me with it?

for index, row in data.iterrows(): emotion = emotion_to_vec(row['emotion']) image = data_to_image(row['pixels']) if image is not None: labels.append(emotion) images.append(image)

labels.append(emotion)

    #images.append(flip_image(image))
else:
    print "Error"
index += 1
print "Progreso: {}/{} {:.2f}%".format(index, total, index * 100.0 / total)

inside this for loop I don't understand why execution goes into this else case. Because of this else case error is occurring while data parsing

(48, 48) Progreso: 1/35887 0.00% Error Progreso: 2/35887 0.01% (48, 48) Progreso: 3/35887 0.01% Error Progreso: 4/35887 0.01% (48, 48) Progreso: 5/35887 0.01% (48, 48) Progreso: 6/35887 0.02% Error Progreso: 7/35887 0.02% (48, 48) Progreso: 8/35887 0.02% (48, 48) Progreso: 9/35887 0.03% (48, 48) Progreso: 10/35887 0.03% (48, 48) Progreso: 11/35887 0.03% Error Progreso: 12/35887 0.03% Error Progreso: 13/35887 0.04% Error Progreso: 14/35887 0.04% (48, 48) Progreso: 15/35887 0.04% (48, 48) Progreso: 16/35887 0.04% Error Progreso: 17/35887 0.05% Error Progreso: 18/35887 0.05% Error Progreso: 19/35887 0.05% Error Progreso: 20/35887 0.06% Error Progreso: 21/35887 0.06% Error Progreso: 22/35887 0.06% (48, 48) Progreso: 23/35887 0.06% Error Progreso: 24/35887 0.07% Error Progreso: 25/35887 0.07% (48, 48) Progreso: 26/35887 0.07% Error Progreso: 27/35887 0.08% Error Progreso: 28/35887 0.08% Error Progreso: 29/35887 0.08% Error Progreso: 30/35887 0.08% (48, 48) Progreso: 31/35887 0.09% Error Progreso: 32/35887 0.09% Error Progreso: 33/35887 0.09% (48, 48) Progreso: 34/35887 0.09% Error Progreso: 35/35887 0.10% (48, 48) Progreso: 36/35887 0.10% (48, 48) Progreso: 37/35887 0.10% (48, 48) Progreso: 38/35887 0.11% (48, 48) Progreso: 39/35887 0.11% Error Progreso: 40/35887 0.11% (48, 48) Progreso: 41/35887 0.11% (48, 48) Progreso: 42/35887 0.12% Error

NomiMalik0207 commented 6 years ago

@manthanSoriya I think this is problem in the built in algorithm of face detection. The algorithm of open CV is not so good. when that algo did not detect image an error is shown in training .. :)

isseu commented 6 years ago

The comment of @NomiMalik0207 is correct. When OpenCV can't find a face I just skip it. Also the quality of the dataset is not perfect.