rshaojimmy / maddog Goto Github PK
View Code? Open in Web Editor NEW[CVPR 2019] Pytorch codes for Multi-adversarial Discriminative Deep Domain Generalization for Face Presentation Attack Detection
[CVPR 2019] Pytorch codes for Multi-adversarial Discriminative Deep Domain Generalization for Face Presentation Attack Detection
hello. Thanks for sharing your code. How can I use my own dataset for testing this model?
I only have a gtx1080ti.
Is it enough to run this code successfully?
Looking forward to your reply.
class FeatExtractor(nn.Module):
def __init__(self, in_channels=6):
super(FeatExtractor, self).__init__()
self.inc = inconv(in_channels, 64)
self.down1 = DOWN(64, 128)
self.down2 = DOWN(128, 128)
self.down3 = DOWN(128, 128)
def forward(self, x):
dx1 = self.inc(x)
dx2 = self.down1(dx1)
dx3 = self.down2(dx2)
dx4 = self.down3(dx3)
re_dx2 = F.adaptive_avg_pool2d(dx2, 32)
re_dx3 = F.adaptive_avg_pool2d(dx3, 32)
catfeat = torch.cat([re_dx2, re_dx3, dx4],1)
Hi, could you explain for me that
I have x with shape torch.Size([1, 6, 288, 288])
so when use FeatExtractor i get an issus that
re_dx2.shape = torch.Size([1, 128, 32, 32])
re_dx3.shape = torch.Size([1, 128, 32, 32])
dx4.shape = torch.Size([1, 128, 36, 36])
3 output must be the same shape but the dx4 have a diffirent shape for torch.cat
Can you explain this issue is relating to pytorch version or the input size
I'm using pytorch 1.11.0+cu113 now
Thank you.
Anyone with this error while running training?
Good job. But I have a question about the depth map.
I wonder what is the range of your depth map used in your paper? [0:1] or [0:255]?
When Iuse the PRNet to generate the depth map, I think the range of values of the depth map are [0: 255], so how should I do?
Thank you very much.
Thanks for your open source code.
When I read your implement of the function Pre_train,I found that you use torch.nn.MSELoss
It is not correspond to the implement of the paper,which uses K-way classification with a crossentropy loss and does not use DepthEsmator
.
It confused me for a lot time.
Thank you for your help.
关于gan()函数收敛问题?怎么做才能使得gan()收敛?
FileNotFoundError: [Errno 2] No such file or directory: '../../../datasets/OULU\image_list_real.txt'd
We had encountered this error when running the code, does anyone know the solution?
It seems that there is no data file
Hello, how do you set the sampling ratio when processing the video, I found that the images I sampled are almost the same; there is another problem, because the image sizes of different datasets are inconsistent. What about resizing them? Is it resize directly? Looking forward to hearing from you
您好,请教一下:
1、为什么每个域需要一个判别器呢?感觉可以多个域共用一个域判别器呀,是因为要和每个域的特征提取器相对应吗?
2、感觉域特征提取器也可以多个域共用一个呀,即直接对抗训练文中的G
您好,请问您的工作MADDoG和RFmetaFAS中的ROC曲线图是如何绘制的呢?如果方便的话,能分享一下对比方法以及MADDoG和RFmetaFAS的FAR & FRR数据吗?谢谢您!
Hey , thank you for sharing this with us. I want to try your idea on other dataset that is related to natural images (domain generalization) , this dataset is called PACS dataset each domain has seven classes and we have 4 different domains [art painting , sketch, photo, cartoon]. Do you think it is applicable ? Do you know what should I modify to make it work ? and what to take in consideration when doing that ?
Looking forward to hearing from you .
Congratulations, you have done a great job.
But I have two questions about the code:
From you code, I could only see that you just calculate the ACC (Score) for training and testing?
How do you choose the best model to get the lowest HTER score on the target domain?
Can you share the code that calculate the HTER and AUC?
Thank you very much.
Looking forward to your reply!
Thanks for your open source code
But I had some problems initializing the model
File "/home/wky/3d-face-anti-spoofing/code/CVPR2019-MADDoG-master/misc/utils.py", line 48, in weights_init_xavier
init.uniform_(m.weight.data, 1.0, 0.02)
File "/home/wky/virtual/face-anti-spoofing/lib/python3.5/site-packages/torch/nn/init.py", line 88, in uniform_
return no_grad_uniform(tensor, a, b)
File "/home/wky/virtual/face-anti-spoofing/lib/python3.5/site-packages/torch/nn/init.py", line 14, in no_grad_uniform
return tensor.uniform_(a, b)
RuntimeError: Expected a_in <= b_in to be true, but got false. (Could this error message be improved? If so, please report an enhancement request to PyTorch.)
When I exchange 0.02 and 1, it works fine, but I'm not sure if it will affect the result.
Another problem is that kaiming initialization is more suitable for the RELU activation function, but you use Xavier initialization in your code, could you please tell me why you chose it?
Thanks
Looking forward to your reply
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.