Enable Face Attribute Recognition
The face attributes such as age, gender, emotions, etc. present in the filter set for detected face analysis during a case investigation.
Face attribute recognition can be automatically enabled and configured during the FindFace installation. If you skip this step, you can manually do so afterwards. Face attribute recognition works on both GPU- and CPU-acceleration.
Do the following:
Open the
/etc/findface-extraction-api.iniconfiguration file.sudo vi /etc/findface-extraction-api.ini
Specify the relevant recognition models in the
extractorssection, as shown in the example below. Be sure to indicate the right acceleration type for each model, matching the acceleration type offindface-extraction-api: CPU or GPU. Be aware thatfindface-extraction-apion CPU can work only with CPU-models, whilefindface-extraction-apion GPU supports both CPU- and GPU-models.extractors: face_age: faceattr/age.v2.gpu.fnk face_beard: faceattr/beard.v0.gpu.fnk face_emotions: faceattr/emotions.v1.gpu.fnk face_gender: faceattr/gender.v2.gpu.fnk face_glasses3: faceattr/glasses3.v0.gpu.fnk face_medmask3: faceattr/medmask3.v2.gpu.fnk face_headpose: faceattr/headpose.v2.gpu.fnk
The following models are available:
Face attribute
Acceleration
Configure as follows
age
CPU
face_age: faceattr/age.v2.cpu.fnkGPU
face_age: faceattr/age.v2.gpu.fnkgender
CPU
face_gender: faceattr/gender.v2.cpu.fnkGPU
face_gender: faceattr/gender.v2.gpu.fnkemotions
CPU
face_emotions: faceattr/emotions.v1.cpu.fnkGPU
face_emotions: faceattr/emotions.v1.gpu.fnkglasses
CPU
face_glasses3: faceattr/glasses3.v0.cpu.fnkGPU
face_glasses3: faceattr/glasses3.v0.gpu.fnkbeard
CPU
face_beard: faceattr/beard.v0.cpu.fnkGPU
face_beard: faceattr/beard.v0.gpu.fnkface mask
CPU
face_medmask3: faceattr/medmask3.v2.cpu.fnkGPU
face_medmask3: faceattr/medmask3.v2.gpu.fnkhead pose
CPU
face_headpose: faceattr/headpose.v2.cpu.fnkGPU
face_headpose: faceattr/headpose.v2.gpu.fnkTip
To leave a recognition model disabled, pass the empty value
""to the relevant parameter. Do not remove the parameter itself. Otherwise, the system will be searching for the default model.extractors: face_age: "" face_beard: "" face_emotions: "" face_gender: "" face_glasses3: "" face_medmask3: ""
Note
You can find face attribute recognition models at
/usr/share/findface-data/models/faceattr/.ls /usr/share/findface-data/models/faceattr/ age.v2.cpu.fnk age.v2.gpu.fnk beard.v0.cpu.fnk beard.v0.gpu.fnk emotions.v1.cpu.fnk emotions.v1.gpu.fnk gender.v2.cpu.fnk gender.v2.gpu.fnk glasses3.v0.cpu.fnk glasses3.v0.gpu.fnk medmask3.v2.cpu.fnk medmask3.v2.gpu.fnk liveness.colombo.cpu.fnk liveness.colombo.gpu.fnk liveness.pacs.v0.cpu.fnk liveness.pacs.v0.gpu.fnk quality.v1.cpu.fnk quality.v1.gpu.fnk
Restart
findface-extraction-api.sudo systemctl restart findface-extraction-api
To display the face attribute recognition results in the event list, open the
/etc/findface-security/config.pyconfiguration file.sudo vi /etc/findface-security/config.py
Specify the required models in the following line of the
FFSECURITYsection, subject to the list of enabled models:FFSECURITY = { ... 'FACE_EVENTS_FEATURES': ['gender', 'age', 'emotions', 'beard', 'glasses', 'medmask', ''headpose'] ... }
Restart
findface-security.sudo systemctl restart findface-security