ragulin / face-recognition-server

An face recognition experiment with WebRTC, Websockets, OpenCV and Python.
215 stars 91 forks source link

predict error #4

Open daimajia opened 10 years ago

daimajia commented 10 years ago

[E 140101 23:41:21 websocket:306] Uncaught exception in /predict Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/tornado/websocket.py", line 303, in wrapper return callback(_args, *_kwargs) File "server.py", line 55, in on_message self.process(image) File "server.py", line 104, in process result = opencv.predict(cv_image) File "/root/School/Face/face-recognition-server-master/opencv.py", line 100, in predict cropped = to_grayscale(crop_faces(cv_image, faces)) File "/root/School/Face/face-recognition-server-master/opencv.py", line 41, in crop_faces return img[y:y+h,x:x+w] File "/usr/local/lib/python2.7/dist-packages/PIL/Image.py", line 512, in getattr raise AttributeError(name) AttributeError: getitem

crosofg commented 7 years ago

How to do prediction?