Hi I am loading an image from a file and i need to convert it from an numpy array to either a dictionary , list or tuple . Any suggestions pls ?
1 | initial version |
Hi I am loading an image from a file and i need to convert it from an numpy array to either a dictionary , list or tuple . Any suggestions pls ?
2 | retagged |
Hi I am loading an image from a file and i need to convert it from an numpy array to either a dictionary , list or tuple . Any suggestions pls ?
3 | No.3 Revision |
Hi I am loading an image from a file and i need to convert it from an numpy array to either a dictionary , list or tuple . Any suggestions pls ?
I am loading an image from a file using face = cv2.imread('faces/face.jpg') Then passing face to this method
results = classify(models,face)
def classify(models, dataSet):
results = {}
for trueClazz in CLASSES:
count = 0
correct = 0
print("Class,Predicted Class,Problem")
predClazz, prob = predict(models, dataSet)
print "%s,%s,%f" % (trueClazz,predClazz, prob)
count += 1
print('classifying')
return results
The error is :
File "C:\Python27\lib\site-packages\svm.py", line 71, in gen_svm_nodearray
raise TypeError('xi should be a dictionary, list or tuple')
TypeError: xi should be a dictionary, list or tuple