Post

Replies

Boosts

Views

Activity

How can I use iPhone true depth front camera to detect if the captured depth map of a face is a true 3d face or spoofed 2d image
I'm trying to implement anti-spoofing in iOS app using iphone true depth front camera. I have checked the following questions still can't find a proper working solution. I trained a coreML model using 22000 depth human face images and 22000 non-human face(objects,food etc) images. The accuracy of the model is very less. When testing out with flat 2d images shown on a smartphone screen I found that I get depth map even for flat 2D images like this. Even though the image is flat how does it give the depth map for the person shown in the flat 2D picture so the model thinks that it is a real face instead of a spoofed one. I implemented depth capture by following this documentation and I made sure that I get depth map instead of disparity map https://developer.apple.com/documentation/avfoundation/additional_data_capture/capturing_photos_with_depth My next approach was to use NCNN framework to implement anti-spoofing by using the model used in the Mini-vision android anti-spoofing sample. I rewrote their library in iOS by using the objective C++ wrapper for C++ as the sample was only available for android app. And I tested by feeding 80x80 UI-Image in a open cv matrix format it's accurracy is less than the android one. How can I solve this problem.
0
0
44
6h
CIImage property of UIImage is always nil
I'm trying to apply a Core Image filter to an UIImage. For that I want to get the CIImage format of the UIImage. I'm trying to obtain the CIImage of the UIImage as shown below. if let inputImage = self.orginalImageView.image{ if let ciImage = CIImage(image: inputImage){ print(ciImage) print(self.orginalImageView.image?.ciImage) } } } This method works. But one thing I noticed is that there is already a ciImage property and it inside UIImage and it is always nil. According to documentation ciImage The underlying Core Image data. var ciImage: CIImage? { get } Discussion If the UIImage object was initialized using a CGImage, the value of the property is nil. Does accessing image property of UIImage comes from CGImage so that the ciImage porperty is nil?
1
0
126
1w