Xianhua-He / cvpr2024-face-anti-spoofing-challenge

Accepted by CVPR Workshop 2024
25 stars 2 forks source link

Reverse Results in TESTING #3

Closed zero-suger closed 1 month ago

zero-suger commented 1 month ago

Hi ~

First of all thank you such a hard work.

Currently, I am trying to TRAIN the FAS code with my custom dataset. As you explained on page, I extracted faces, made .pkl files then I made txt file to my image paths and as in code i made my txt file '{image_path} 0' in training and started TRAINING. In TRAINING the console showed 99 accurancy. But then I TESTED but for real faces it is giving all scores 0.00456, 0.023, etc, for spoof faces TESTING model is giving high scores 0.98, 0.87, 1, etc.

This is what i am not understanding. I did wrong in txt file labeling or missing something? Please help me to solve this out. Thank you !!!

Xianhua-He commented 1 month ago

@zero-suger Thank you very much for your interest in our work.

This code is designed for competition, Label: live=0, fake=1. The label may be the opposite of the label in your dataset. You need to check and modify your code. Note that in data augmentation, live samples will be converted into spoof samples through SDSC data augmentation.

I hope the above answers are helpful to you. If you have any other questions, you are welcome to raise an issue.

zero-suger commented 1 month ago

Thank you to reply~

I searched and TRAINED the model as you explained, and I have one more extra question, when I TESTED model with Screen Attacks (without any artifacts) or new type of attacks like half faces the model's prediction is too high .91 ~ real face. I read the paper and understand the model can catch artifacts and some jitter effects bcz of 2 generative models inside. Right? or I missed something ?

Thank you :)

Xianhua-He commented 1 month ago

@zero-suger The method proposed in our paper is only effective in detecting specific "unseen" attack types. Our method is effective when we forget "unseen" attack samples through specified data augmentation methods.

According to our company's past implementation experience in FAS tasks, data-driven is more important than model methods. Screen Attacks and other attack types, you should focus on collecting more high-quality data to be more effective. You can also forget more attack samples to train the model to detect Digital attacks.

By the way, we implemented the FAS model in actual business scenarios, and the training data reached 20 million. I hope the above answers are helpful to you.

Xianhua-He commented 1 month ago

@zero-suger Artifacts are what we obtain through data augmentation, allowing the model to more easily capture the small artifacts on the face of digital attacks. The method of constructing artifacts is similar to: https://arxiv.org/abs/2204.08376

zero-suger commented 1 month ago

Thank you, in advance. I got it (: