yule-li / CosFace

Tensorflow implementation for paper CosFace: Large Margin Cosine Loss for Deep Face Recognition
285 stars 99 forks source link

Some details confuses me. #5

Closed LCorleone closed 5 years ago

LCorleone commented 6 years ago

hi, first excellent job! but I have some problems.

  1. In train_multi_gpu.py, your '_parse_function' use

    image = tf.subtract(image,127.5)
    image = tf.div(image,128.)

    However, when testing, you use prewhiten function

    def prewhiten(x):
    mean = np.mean(x)
    std = np.std(x)
    std_adj = np.maximum(std, 1.0/np.sqrt(x.size))
    y = np.multiply(np.subtract(x, mean), 1/std_adj)
    return y  

    It is a little different from above! Will these two different operations of image preprocessing degrades the performance when testing?

  2. thank you for providing the pretrained model! Will you release the newest model?

yule-li commented 5 years ago

I'm sorry that I forget updating the test.py. Now the image preprocess within train phase and test phase is consistent. The lastest trained model is here.

LCorleone commented 5 years ago

@yule-li Thank you so much!I test on my own dataset and it seems that the performance is enhanced.

Gabit07 commented 5 years ago

@yule-li Thank you so much!I test on my own dataset and it seems that the performance is enhanced.

Hello, I am just curious how many datasets did you use on training?

LCorleone commented 5 years ago

@Gabit07 hello, webface dataset. But till now i find cosface is not so good for face verification. Arcface is more accurate.

Gabit07 commented 5 years ago

wow, thank you for your quick reply!

Gabit07 commented 5 years ago

@Gabit07 hello, webface dataset. But till now i find cosface is not so good for face verification. Arcface is more accurate.

which implementation in github do you recommend to try?

LCorleone commented 5 years ago

@Gabit07 Insightface based on mxnet.