API DOC for KPU.face_encode and KPU.face_compare in face recognition demo

Is there documentation on what KPU.face_encode and KPU.face_compare does specifically?

I saw they are used in https://github.com/sipeed/MaixPy_scripts/blob/master/machine_vision/face_recognization/demo_face_recognization.py

They do work when I run them but curious if there is any documentation on it? I assume face_compare is just some kind of cosine similarity.

I am not sure what face_encode does.

Here is a reference in MaixPY github where this was explained after i posted on this forum: https://github.com/sipeed/MaixPy/issues/342

face_encode() - convert the float value to range [-128, 127] according to the float value range of model output.

face_compare() - cosine similarity of encoded features, normalized to 0 to 100. Normalization is (similarity / 2 + 0.5 ) * 100.