JDAI-CV / FaceX-Zoo

A PyTorch Toolbox for Face Recognition

Home Page:https://arxiv.org/pdf/2101.04407.pdf

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

a confusion in DSDG test.py

zhangxilun opened this issue · comments

Hi, I have a confusion while reading the code of test.py in DSDG project. As the paper mentioned, the final face anti-spoofing score is obtained by averaging the predicted values in the depth map. However, the score is obtained by the following code in the project:
` mu, logvar, map_x, x_concat, x_Block1, x_Block2, x_Block3, x_input = model(inputs[:, frame_t, :, :, :])

                score_norm = torch.sum(mu) / torch.sum(test_maps[:, frame_t, :, :])
                map_score += score_norm`

Why the score is the quotient between the sum of predicted depth map scores and the sum of actual depth map scores? Besides, the paper mentioned that the depth images of fake faces are all zeros, so will the denominator of the formula be zero? Thanks!