hqqasw / FaceTool

A tool for face detection, alignment and verification

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How can I use the `extract_feature`

liliangqi opened this issue · comments

Hi, I'd like to know how to use method extract_feature of class FaceNet that defined in utils/face_net.py. The parameter list consists of "image", "score_name", "crop_size" and "image_size".

  1. Should "image" be the original image or a cropped one that only contains a face?
  2. What is the "score_name"? Is it a string just as in easy_extract_features?
  3. Is easy_extract_features very different from extract_feature?

Thanks.

commented
  1. The image should be aligned by "face landmarks", just as what is done in "easy_extract_features". After alignment, there is no difference between cropped or not.
  2. Yes, just a string. More specific, it is the name of a layer. Usually it can be "feature" or "res5c" or something else. For more details of the names of layers, you can refer the "prototxt".
  3. "easy_extract_features" is "align faces" + "extract feature".

Cool! Thank you very much.