You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I ran the program, it showed me all the info including 'saving paths..' then I encountered this error,
OpenCV Error: Bad argument (Empty training data was given. You'll need more than one sample to learn a model.) in train, file /io/opencv_contrib/modules/face/src/fisher_faces.cpp, line 71
Traceback (most recent call last):
File "server.py", line 121, in <module>
main()
File "server.py", line 114, in main
opencv.train()
File "/home/sashank/face-recognition-server/opencv.py", line 89, in train
model.train(images,labels)
cv2.error: /io/opencv_contrib/modules/face/src/fisher_faces.cpp:71: error: (-5) Empty training data was given. You'll need more than one sample to learn a model. in function train
Turns out, the images and labels lists are empty.
Checked the 'load_images_from_db()' function and I figured that this code, doesn't even run -
That's because it isn't entering the for image in label.image_set: loop!
I have no idea whats wrong and I'm struggling with this from a long time. The only changes I made to the original code are,
Changed label.save() to label[0].save() and image.save() to image[0].save() since I was encountering the
image.save()
AttributeError: 'tuple' object has no attribute 'save'
and image = Image.get_or_create(path=path, label = label) to image = Image.get_or_create(path=path) since i was having this error -
cursor.execute(sql, params or ())
peewee.OperationalError: near ",": syntax error
Really require help with this. Thanks a lot.
The text was updated successfully, but these errors were encountered:
When I ran the program, it showed me all the info including 'saving paths..' then I encountered this error,
Turns out, the images and labels lists are empty.
Checked the 'load_images_from_db()' function and I figured that this code, doesn't even run -
That's because it isn't entering the
for image in label.image_set:
loop!I have no idea whats wrong and I'm struggling with this from a long time. The only changes I made to the original code are,
Changed
label.save()
tolabel[0].save()
andimage.save()
toimage[0].save()
since I was encountering theand
image = Image.get_or_create(path=path, label = label)
toimage = Image.get_or_create(path=path)
since i was having this error -Really require help with this. Thanks a lot.
The text was updated successfully, but these errors were encountered: