wangzhuo2019 / ssan Goto Github PK
View Code? Open in Web Editor NEWDomain Generalization via Shuffled Style Assembly for Face Anti-Spoofing, CVPR2022.
License: MIT License
Domain Generalization via Shuffled Style Assembly for Face Anti-Spoofing, CVPR2022.
License: MIT License
Nice work!!!
I have read your code carefully, but still have some doubts. How do you prepare datasets(OULU,CAISA,CFSD,REPLAY)? Can I put the video files in the folder? And can you provide the 'train_list_video.txt'?
Looking forward to your reply....
Can you give more detail about model for realtime, FPS
Thank you
Hi, thanks for the great work!
Just want to make sure the evaludation setting. The four mentioned datasets have their respective train/test split.
For the evaludation (Leave-1-out) in your case, do you use the train split of three sets for training and use the train split of the remaining one for testing? or do you use the test split of the remaining one for testing?
Thanks
Dear Authors
Thanks for the great work.
I was going through your code to understand how you have used each of the 4 datasets for cross dataset training and testing.
Observations:
As per the code in the data_merge file, you are loading the target dataset as your test set (which seems fine).
However, you seem to be using the target dataset as your validation set to compute the HTER and AUC scores after every epoch, and choose the epoch with the best score on the target dataset. training file for reference. Example: Lets choose OCIM protocol. For every epoch, you seem to be training on OCI and testing on M and choosing the epoch with the best score on M.
Questions:
Kindly request you to clarify the same.
Thanks
The implement of GRL maybe not correct?
Line 7 in f4c2cbc
The backword
function is need to inherit torch.autograd.Function
like this example in pytorch as follow:
https://pytorch.org/docs/stable/autograd.html#torch.autograd.Function
A simple implement might be:
from torch.autograd import Function
class GRL(Function):
@staticmethod
def forward(ctx: Any, input: torch.Tensor):
return input * 1.0
@staticmethod
def backward(ctx: Any, gradOutput: torch.Tensor):
return gradOutput.neg()
Is it normal for the contrast loss to be negative?even,the contrast loss can be reduced
"To make a comparison between them, the experiment of w/ SCL is conducted by implementing contrastive learning on selfassembly
directly."
这个实验具体是想证明什么,能详细说一下吗?谢谢
hi, according to the code and papers, I have a question for OULUNPU dataset in preprocess, it seems that crop_face_from_scene function only works on full image without cropping face in image?
https://github.com/wangzhuo2019/SSAN/blob/main/datasets/Load_OULUNPU_train.py#L14
def crop_face_from_scene(image, scale):
y1,x1,w,h = 0, 0, image.shape[1], image.shape[0]
y2=y1+w
x2=x1+h
y_mid=(y1+y2)/2.0
x_mid=(x1+x2)/2.0
w_scale=scale/1.5*w
h_scale=scale/1.5*h
h_img, w_img = image.shape[0], image.shape[1]
y1=y_mid-w_scale/2.0
x1=x_mid-h_scale/2.0
y2=y_mid+w_scale/2.0
x2=x_mid+h_scale/2.0
y1=max(math.floor(y1),0)
x1=max(math.floor(x1),0)
y2=min(math.floor(y2),w_img)
x2=min(math.floor(x2),h_img)
region=image[x1:x2,y1:y2]
return region
Thank you for open-sourcing the code.
It would be great if you could share the training and testing logs so that we can compare our implementation with yours.
Could you give me the train_list_video.txt?
Thank you for open-sourcing this wonderful work. We are researchers from different fields and would like to leverage your work for our own works. However, we are not well-versed in FAS, so it would be quite challenging for us to obtain the datasets and train the model from scratch.
We are not interested in obtaining all the pre-trained weights in the paper. Our goal is simply to acquire the specific weight necessary for successfully running the inference process of your project.
Could you share the pre-trained weight that necessary for successfully running the inference process of your project?
Thank you very much.
epoch:305, mini-batch:1800, lr=0.0001, binary_loss=0.0015, constra_loss=-0.9984, adv_loss=0.0002, Loss=-0.9967
大佬,目前模型loss基本已经收敛,adv_loss为啥接近0呢?我的理解:接近0说明域判别器能够对content feature进行域标签分类,而我们期待的是提取域无关的特征迷糊判别器,adv_loss不应该为0。不知道哪里出了问题。请大佬指教,非常感谢
solved.
Hi,
Thank for sharing your great work!
Do you have the datasets that authors used in their paper. Particularly OULU-NPU and Idiap Replay-Attack datasets, since the owners of these datasets may no long maintain their website. It would be nice if you can share them!
Thanks
Hi, thanks for the great Job!
I would like to know how I should modify the code if I use the protocol of Large-Scale FAS Benchmarks? And how do I pre-process the data? Just like SSDG does(https://github.com/taylover-pei/SSDG-CVPR2020)? I saw that you mentioned pre-processing the data similar to CDCN, but I didn't find how they do it on the website.
请问在oulu-npu训练集和测试集中,如何从avi取出需要的帧
Hi, we would like to use SSAN to determine whether a face image is live or spoof. If we input the image into the SSAN model, we can obtain a score output by the model. How can we utilize this score to determine whether the face image is live or spoof?
Thank you.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.