Comments (20)
I try to train 50 epoch and then test on test set. I have a problem with this code.
score_norm = torch.sum(map_x)/torch.sum(val_maps[:,frame_t,:,:])
I found for spoof samples, this denominator is always zero. Then, it may lead toscore_norm = inf
.Traceback (most recent call last): File "train_CDCN.py", line 445, in <module> train_test() File "train_CDCN.py", line 409, in train_test val_threshold, test_threshold, val_ACC, val_ACER, test_ACC, test_APCER, test_BPCER, test_ACER, test_ACER_test_threshold = performances(map_score_val_filename, map_score_test_filename) ValueError: Input contains NaN, infinity or a value too large for dtype('float64').
Can you help solve this problem? I'm confused about the meaning of this line of code
You can consider val_maps as the mask of face. The score normalization operation aims to only calculate the mean value of depth at the facial area.
from cdcn.
Hi . I am also wondering if use 'score_norm = torch.mean(map_x)' as the score of network , it will not be regularized between 0-1 . As we don't know the score range, how to set the threshold ?
I think you can try arbitrary other normalization ways or not normaliztion like 'mean' . It might drop the performance slightly. I don't think it will influence too much. Because the threshold is calculated from EER automatically. What you should do is to keep the same normaliztion/non-normaliztion in your both val and test phase.
from cdcn.
I think the code score_norm = torch.sum(map_x)/torch.sum(val_maps[:,frame_t,:,:]) means the normalization of the score. If the mean score of the ground truth depth map is 0.80( for instance), and the mean value of the predicted depth map is 0.70, then the normalization score is 7/8=0.875, and this is the final score of this prediction. If the final score is close to 1, then the model infers the result is real. You can use this normalized prediction score as the final score to get the threshold. What puzzles me is that @ZitongYu didn't provide a spoof situation. in a spoof video, torch.sum(val_maps[:,frame_t,:,:] is zero as depth map is a plane. How do you avoid the zero denominator problem? @ZitongYu Till now I implement this method using score_norm = torch.sum(map_x) , I dropout the denominator part, I will update my results recently.
from cdcn.
Hi all, Can anyone explain how to calculate a threshold ? Because if i use the evaluation code from the author, the threshold isn't correct.
from cdcn.
You can follow Load_OULUNPU_valtest.py.
Or you can just easily try 'score_norm = torch.mean(map_x)'
from cdcn.
Hi . I am also wondering if use 'score_norm = torch.mean(map_x)' as the score of network , it will not be regularized between 0-1 . As we don't know the score range, how to set the threshold ?
from cdcn.
Hi . I am also wondering if use 'score_norm = torch.mean(map_x)' as the score of network , it will not be regularized between 0-1 . As we don't know the score range, how to set the threshold ?
I think you can try arbitrary other normalization ways or not normaliztion like 'mean' . It might drop the performance slightly. I don't think it will influence too much. Because the threshold is calculated from EER automatically. What you should do is to keep the same normaliztion/non-normaliztion in your both val and test phase.
Hello, in order to abandon depth map during test phase, can I do the normalization without using depth map for both val and test phase ? Do you have any suggestions for doing this ? And if I use the same threshold for the val and test phase, will the performance fall sharply?
from cdcn.
Hi . I am also wondering if use 'score_norm = torch.mean(map_x)' as the score of network , it will not be regularized between 0-1 . As we don't know the score range, how to set the threshold ?
Have you tried training the model with any other normalization ?
from cdcn.
@clks-wzz
@xiao-keeplearning
@baorave @superxi @
Can you please tell me about the map_dir and am confused about the train, test and dev images. because in OULU-NPU dataset they provide only the videos,....
Thanks in advance
from cdcn.
I think the code score_norm = torch.sum(map_x)/torch.sum(val_maps[:,frame_t,:,:]) means the normalization of the score. If the mean score of the ground truth depth map is 0.80( for instance), and the mean value of the predicted depth map is 0.70, then the normalization score is 7/8=0.875, and this is the final score of this prediction. If the final score is close to 1, then the model infers the result is real. You can use this normalized prediction score as the final score to get the threshold. What puzzles me is that @ZitongYu didn't provide a spoof situation. in a spoof video, torch.sum(val_maps[:,frame_t,:,:] is zero as depth map is a plane. How do you avoid the zero denominator problem? @ZitongYu Till now I implement this method using score_norm = torch.sum(map_x) , I dropout the denominator part, I will update my results recently.
你好,请问你知道怎么解决分母为0 的情况了吗?
from cdcn.
from cdcn.
@xiao-keeplearning @ZitongYu @superxi @baorave @clks-wzz
I have finished mt training part and i got my model,
can anyone please tell me how to go into the test part,..?
because in CVPR2020_paper_codes, we have train.py which includes train, test and Val,
can anyone please tell me how to go into the test when I did with the train
from cdcn.
@punitha-valli Could you share your trained model, or detail process/environments for training phase?
from cdcn.
from cdcn.
@punitha-valli 你好,请问是每隔几秒钟将OULU数据集划分为图片的呢 非常感谢 您是否能分享一下 生成depth map和.dat文件的代码 或者数据 非常感谢 再次谢谢您
from cdcn.
@xiao-keeplearning @ZitongYu @superxi @baorave @clks-wzz
I have finished mt training part and i got my model,
can anyone please tell me how to go into the test part,..?
because in CVPR2020_paper_codes, we have train.py which includes train, test and Val,
can anyone please tell me how to go into the test when I did with the train
@punitha-valli @xuhangxuhang
Can you share me how to test my trained model?
Many thanks
from cdcn.
from cdcn.
@punitha-valli thanks for your help. I'm so appreciated.
In testing, I wonder that why author using binary_mask for testing? I'm so confused it
from cdcn.
from cdcn.
Just to compare the map from Cdcn and with the binary mark, It's upto you ,. You can skip the binary mark part
…
On Fri, Jun 11, 2021, 1:34 PM luan1412167 @.***> wrote: @punitha-valli https://github.com/punitha-valli thanks for your help. I'm so appreciated. In testing, I wonder that why author using binary_mask for testing? I'm so confused it — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#5 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMM7B23V4ZITS6X53TO4CMTTSGN7RANCNFSM4LSMKGGA .
Many thank you for your information.
from cdcn.
Related Issues (20)
- 不开放预训练模型
- 多模态下训练速度有点慢!
- MTCNN details for face detection
- dual cdc parametres HOT 1
- 训练数据能share一下吗 ?
- About face region
- 预训练的权重 HOT 1
- Dataset balancing for OULU-NPU HOT 6
- Cross-dataset test
- 关于val的最佳阈值的选择
- How to convert .avi files to get .jpg and .dat files
- How to abstract images from videos?
- oulu_npu数据集 HOT 1
- Datasets sharing HOT 3
- How to choose val threshold to test data without label
- 能否share下数据集? HOT 2
- 关于数据集
- how is the folder structure of train and validation?
- Dataset for research purposes
- dataset share
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cdcn.