Open leelongch opened 4 years ago
Check the original PRnet Implementation and download the missing file in Data/net-data/....
add 256_256_resfcn256_weight.index file
where to get 256_256_resfcn256_weight. index file ?
where to get 256_256_resfcn256_weight. index file ?
https://github.com/YadiraF/PRNet/blob/master/Data/net-data/256_256_resfcn256_weight.index
I don't think these are exactly the same weights, since there shouldn't be a depth map for fake images
The depth map for fake images is set to 0, you can found the detail in related papers. This code for generating the facial depth map for training.
I’m talking about this. He will issue the same card for the original and fake image. It should immediately generate 0 to fake. The article had a link to this repository.
@leelongch @sonfire86 @xiao-keeplearning @harrismohammed @clks-wzz your code, it will be a great help Thanks for sharing Even the Dlib= False, and Open_cv= False, at here
def init(self, is_dlib = False, is_opencv = False, prefix = 'E:\yzu\lab\face anti spoofing\PRNet-Depth-Generation-master'):
It should pass into here
self.pos_predictor = PosPrediction(self.resolution_inp, self.resolution_op) prn_path = os.path.join(prefix,'Data\net-data\256_256_resfcn256_weight') if not os.path.isfile(prn_path +'.data-00000-of-00001'): print("please download PRN trained model first.") exit() self.pos_predictor.restore(prn_path)
for further process,
but in my case, its still gives the error like this,
AttributeError: 'PRN' object has no attribute 'face_detector'
How to carry out this, thanks in advance
The passed save_path is not a valid checkpoint: ./Data/net-data/256_256_resfcn256_weight