face_recognition.py example not working


I tried to run face_recognition.py example but seems not working.
img = image.Image(“data/%s/1.pgm”%(SUB)).mask_ellipse()
AttributeError: ‘Image’ object has no attribute ‘mask_ellipse’


Ibrahim, can you help out here?

I think my firmware is not updated to the last version.
So When I try to upgrade my firmware from 1.5.0 to the last version, I faced another issue:
“Error: No such file or directory!”, I tried on Mac and machine windows. same problem.


We’ll, as far as I know face_recognition wasn’t a feature that really worked. Ibrahim wrote that script so I can’t comment much on it.

Hi, please follow the instructions in the comments:

Before running the example:

  1. Download the AT&T faces database http://www.cl.cam.ac.uk/Research/DTG/attarchive/pub/data/att_faces.zip
  2. Exract and copy the orl_faces directory to the SD card root.

Note this is very very simple face recognition so don’t expect great results :slight_smile:

I met the same issue…

firmwave version 2.9.0, windows 10
I have already saved the file according to the steps.
It says: AttributeError: ‘Image’ object has no attribute ‘mask_ellipse’

But on firmware version 2.7.0 , this example is ok.

Hi, I accidentally removed this method since I did not know where it was used. It will be added back.

hi im having the same issue “AttributeError: ‘Image’ object has no attribute ‘mask_ellipse’”
with firmware 3.0.0

Ah, yes. I think we’ve added it back in for v3.1.0 which we will release soon.

Still have this error on v 3.2.0

AttributeError: ‘Image’ object has no attribute ‘mask_ellipse’

K, I’ll get this fixed for the next firmware release.

Hello, the link states that the requested URL file was not found on the server

That’s a very old feature, post and links…Try searching Google for that database, alternatively you may get better results with EdgeImpulse, I think @kwagyeman trained a model to do that.