clks-wzz / PRNet-Depth-Generation

A implementaion of depth generation based on [PRNet](https://github.com/YadiraF/PRNet), which was used in the paper ***Exploiting Temporal and Depth Information for Multi-frame Face Anti-spoofing***
MIT License
95 stars 31 forks source link

How do you use it for anti spoofing? #1

Open bcba25 opened 5 years ago

bcba25 commented 5 years ago

The thing is dosn't matter you put replay image, printed photo or mask photo, it still generates depth model with no difference from real face

clks-wzz commented 5 years ago

For replay image and printed photo, they are both planar. You can set 0 (all black) to the depth map of planar attacks. As far as current research is concerned, depth supervised method is not a good choice for mask attacks, because they have a similar depth to the real face.

clks-wzz commented 5 years ago

You can refer to this paper: https://arxiv.org/abs/1811.05118

bcba25 commented 5 years ago

@clks-wzz I've tried this method for replay photo and printed one from IDPRO dataset and its not working. What this method is protect from ?

For replay image and printed photo, they are both planar. You can set 0 (all black) to the depth map of planar attacks.

where exactly is this setting ? Thanks

clks-wzz commented 5 years ago

What's your preprocessing method and network architecture? You can provide more details about the implementation.

bcba25 commented 5 years ago

@clks-wzz I'm using different architectures, what I've tried with this repo is using Generate_Depth_Image.py on spoofed images, and they all generating real like depth map. Thats why I'm asking how will this help if let's say I want to train VGG16 on depth maps images ? I thought for spoofed images it will be blank

clks-wzz commented 5 years ago

Please refer to this paper: https://arxiv.org/abs/1811.05118 to get the proper usage of depth images.

For spoofing images, we force their depth value of the whole map to all zero, which discriminates the living faces and spoofing faces.

harrismohammed commented 5 years ago

I can force the spoofed images to 0, as i know the Spoofed and Real images. This can help my model train. I won't be able to force it in real time! I hope there is some way around it, which would naturally get 0 as depth for spoofed images.

leelongch commented 5 years ago

The thing is dosn't matter you put replay image, printed photo or mask photo, it still generates depth model with no difference from real face How to solve the "The passed save_path is not a valid checkpoint: ./Data/net-data/256_256_resfcn256_weight", thanks!

clks-wzz commented 5 years ago

I can force the spoofed images to 0, as i know the Spoofed and Real images. This can help my model train. I won't be able to force it in real time! I hope there is some way around it, which would naturally get 0 as depth for spoofed images.

This project is a fast implementation of depth generation for the training of face anti-spoofing. We will open source the training codes in the future. 💃

HOLYlmx commented 4 years ago

Recently I tried to run this code. I have some questions on how to implement the code in antispoofing. 1.In practical network of antispoofing , is depth-generate a independent network? what i want to express is that when i want to use depth information in my own network ,can I use PRnet to generate depth map of the dataset first ,then I use the genereted depth map in another net work. 2.how can i get the 32*32 arrays of coressbonding depth map to denote depth information, I coundn't find it -(
It's the first time I try with code , these questions really bothered me for a long time ,If you can answer, that will be very helpful for me. Thanks a lot ; )