InsightFace-tensorflow icon indicating copy to clipboard operation
InsightFace-tensorflow copied to clipboard

Is there any problem about get_embd.py?

Open YJingyu opened this issue 5 years ago • 3 comments

Thanks for your contribution. When I use get_embd.py to extract embedding with pretrained model, I put face images in read_path, I find when I put three images in read_path or four images in read_path, for same image, I get different embedding. For example, when there are three images in read_path, the embedding of '002.png' is [0.222, 0.1999,0.4445...], but when there are four images in read_path, the embedding of '002.png' become [0.111, 0.4888,0.7779...], they are different.

YJingyu avatar May 22 '19 07:05 YJingyu

@YJingyu I am sorry that there is a bug in get_embd.py. Now the bug has been fixed. Thank you for using my code.

luckycallor avatar May 24 '19 08:05 luckycallor

@luckycallor Thanks for your reply, I know where you modified, thanks a lot. I find following your steps, I can get a good result in LFW dataset, even close to your result. So I want to use the pre-trained model to recognize the face images spider from website, I create two folders, REGISTER used to get embedding for every person, QUERY used to recognize the person in REGISTER or not, but the result is not good. I think maybe there are some mistakes in my code not the model. So do you have plan to write a test code such as compare.py to compare the embeddins get from the pre-trained model for knowing that the faces are similar or not, I think it is very useful.

YJingyu avatar May 24 '19 09:05 YJingyu

Thanks for the code,

I have a problem. I line 21 I have something lke this: parser.add_argument('--read_path', type=str, default='images/', help='path to image file or directory to images')

my images directory s like:

  • id1/ -- id1_1.png
  • id2/ -- id2_1.png

but in img = misc.imread(path) it s trying to read id1 as an image. I think load_image should try to read all the images in the id1. But it is reading id1. How to solve this problem?

Trans-SVSR avatar Oct 04 '19 09:10 Trans-SVSR