Documentation ¶
Index ¶
- type EKYCPipeline
- func (c *EKYCPipeline) CropFaceIDCard(img gocv.Mat) (*gocv.Mat, error)
- func (c *EKYCPipeline) CropSelfie(img gocv.Mat) (*gocv.Mat, error)
- func (c *EKYCPipeline) ExtractFaceVector(img gocv.Mat, lmk *tensor.Dense) ([]float32, error)
- func (c *EKYCPipeline) FaceAntiSpoofingActiveVerify(imgFar, imgMid, imgNear gocv.Mat, lmkFar, lmkMid, lmkNear *tensor.Dense) (*config.FaceAntiSpoofingVerify, error)
- func (c *EKYCPipeline) FaceAntiSpoofingPassiveVerify(fImgFar, fImgMid, fImgNear gocv.Mat) (*config.FaceAntiSpoofingVerify, error)
- func (c *EKYCPipeline) FaceQualityVerify(imgFar, imgMid, imgNear gocv.Mat, lmkFar, lmkMid, lmkNear *tensor.Dense) (float32, bool, error)
- func (c *EKYCPipeline) GetFaceLandmarks5(batchImages []gocv.Mat) ([]*tensor.Dense, error)
- func (c *EKYCPipeline) PersonIDCardVerify(cardImg, ImgFar gocv.Mat, lmkFar *tensor.Dense) (float32, bool, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EKYCPipeline ¶
type EKYCPipeline struct { FaceID *modules.FaceIDClient FaceQuality *modules.FaceQualityClient FaceHelper *modules.FaceHelperClient FaceASFull *modules.FaceAntiSpoofingClient FaceASCrop *modules.FaceAntiSpoofingClient }
EKYCPipeline defines the structure of the EKYC pipeline
func NewEKYCPipeline ¶
func NewEKYCPipeline(tritonClient *gotritonclient.TritonGRPCClient) (*EKYCPipeline, error)
NewEKYCPipeline initializes new pipelines.
func (*EKYCPipeline) CropFaceIDCard ¶
CropFaceIDCard extracts face roi from input id card image.
Inputs:
- img (gocv.Mat): Capture face image.
Outputs:
- img (*gocv.Mat): ROI of the face.
func (*EKYCPipeline) CropSelfie ¶
CropSelfie extracts face roi from input image.
Inputs:
- img (gocv.Mat): Capture face image.
Outputs:
- img (*gocv.Mat): ROI of the face.
func (*EKYCPipeline) ExtractFaceVector ¶
ExtractFaceVector extracts face from inputs image as slice of float32.
Inputs:
- img (gocv.Mat): Capture face image.
- lmk (*tensor.Dense): img landmarks.
Outputs:
- vector ([]float32): Vector representations of input face image.
func (*EKYCPipeline) FaceAntiSpoofingActiveVerify ¶
func (c *EKYCPipeline) FaceAntiSpoofingActiveVerify(imgFar, imgMid, imgNear gocv.Mat, lmkFar, lmkMid, lmkNear *tensor.Dense) (*config.FaceAntiSpoofingVerify, error)
FaceAntiSpoofingActiveVerify verifies face from input face images and landmarks.
Inputs:
- imgFar (gocv.Mat): Capture far-distance face image.
- imgMid (gocv.Mat): Capture mid-distance face image.
- imgNear (gocv.Mat): Capture near-distance face image.
- lmkFar (*tensor.Dense): imgFar landmarks.
- lmkMid (*tensor.Dense): imgMid landmarks.
- lmkNear (*tensor.Dense): imgNear landmarks.
Outputs:
- scoreFM (*FaceAntiSpoofingVerify): face anti-spoofing result.
func (*EKYCPipeline) FaceAntiSpoofingPassiveVerify ¶
func (c *EKYCPipeline) FaceAntiSpoofingPassiveVerify(fImgFar, fImgMid, fImgNear gocv.Mat) (*config.FaceAntiSpoofingVerify, error)
FaceAntiSpoofingPassiveVerify verifies face from input face images.
Inputs:
- fImgFar (gocv.Mat): Capture far-distance face image.
- fImgMid (gocv.Mat): Capture mid-distance face image.
- fImgNear (gocv.Mat): Capture near-distance face image.
Outputs:
- scoreFM (*FaceAntiSpoofingVerify): face anti-spoofing result.
func (*EKYCPipeline) FaceQualityVerify ¶
func (c *EKYCPipeline) FaceQualityVerify(imgFar, imgMid, imgNear gocv.Mat, lmkFar, lmkMid, lmkNear *tensor.Dense) (float32, bool, error)
FaceQualityVerify checks for face obstructions
Inputs:
- imgFar (gocv.Mat): Capture far-distance face image.
- imgMid (gocv.Mat): Capture mid-distance face image.
- imgNear (gocv.Mat): Capture near-distance face image.
- lmkFar (*tensor.Dense): imgFar landmarks.
- lmkMid (*tensor.Dense): imgMid landmarks.
- lmkNear (*tensor.Dense): imgNear landmarks.
Outputs:
- maskScore (float32): Face mask score from model.
- isFaceMask (float32): Face mask decision.
func (*EKYCPipeline) GetFaceLandmarks5 ¶
GetFaceLandmarks5 returns the facial alndmarks of the input images. Inputs:
- images ([]gocv.Mat): input face images.
Outputs:
- batchLandmarks: ([]*tensor.Dense): Facial landmarks from the input images.
func (*EKYCPipeline) PersonIDCardVerify ¶
func (c *EKYCPipeline) PersonIDCardVerify(cardImg, ImgFar gocv.Mat, lmkFar *tensor.Dense) (float32, bool, error)
PersonIDCardVerify checks if the face on the id card matches with input face image
Inputs:
- cardImg (gocv.Mat): ID card with face.
- imgFar (gocv.Mat): Capture far-distance face image.
- lmkFar (*tensor.Dense): imgFar landmarks.
Outputs:
- scoreFM (*FaceAntiSpoofingVerify): face anti-spoofing result.