FASNet icon indicating copy to clipboard operation
FASNet copied to clipboard

My results always return 1.

Open superxi opened this issue 7 years ago • 6 comments

I just use the FASNet.py,run on Keras(Using TensorFlow backend) using the weights REPLAY-ftweights18.h5.I Pre-processing the input data ( find the face and cropped to a window sized 96 pixels ).But the result always return 1.Does anyone know why?

superxi avatar Jun 07 '18 03:06 superxi

I do have found the fact that the uploaded model pretrained from replay/3dmad database will kill too much live faces(dont remember the ratio but quite high) on other databases, though they do work well on single database. To verify this, you can change the inference code and just get predicted prob instead of the the class. And than, print the value. I believe you will find the reason.

Cross-database validation still a big problem here so far as i know.

Personally, i choose other approaches to detect attack, since i dont think a cropped and resized face contain sufficient info to tell difference here. what is worse, in practical scene, you could not handle the uploaded image quality, and this has never been considered in most available database.

cvtower avatar Jun 17 '18 10:06 cvtower

@cvtower return 1 means live face, or attack face? and I found that it returns 1 when prob > 0.5 and it returns 0 when prob < 0.5.

Jason-xin avatar Jun 26 '18 06:06 Jason-xin

@cvtower In NUAA dataset, all test images return 1. In all real face images, 2735 images with prob=1, and the remaining 627 images with prob>0.9. In all attack images, 1903 images with prob=1, and the remaining 3858 images with prob>0.9.

What's a terrible performance!

Jason-xin avatar Jun 26 '18 07:06 Jason-xin

@Jason-xin 1 is attack.0 is real. I suggest you train your own model.I trained on replay-attack and the acc is 0.96.

nihilityworld avatar Jun 29 '18 08:06 nihilityworld

@cvtower So what other approaches you apply. Can you please specify?

amit2319 avatar Aug 30 '18 11:08 amit2319

@cvtower I find predict_class always outputs 1 whatever the predict_proba's output is (0, 1).

wang5566 avatar Nov 08 '18 09:11 wang5566