Skip to content

react-declarative/react-face-kyc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

react-face-kyc

Quite useful react snippet for automatic photo capture with check of correct face position (KYC document face liveness)

It uses FaceWASM - face detection implementation based on Haar-cascades. This method is performant and can be trained instead of programmed

screenshot

Usage

npm install
npm start

Code sample

export const verifyCompleteEmitter = Source.multicast(() =>
    Source
        .join([
            stateEmitter,
            Source.fromInterval(1_000),
        ])
        .reduce((acm, [{ state: isValid }]) => {
            if (isValid) {
                return acm + 1;
            }
            return 0;
        }, 0)
        .tap((ticker) => {
            if (ticker === 1) {
                recorder.beginRecord();
            }
        })
        .filter((ticker) => ticker === CC_SECONDS_TO_VERIFY)
        .tap(() => {
            recorder.endRecord();
        })
);

About

Quite useful react snippet for automatic photo capture with check of correct face position. It uses Haar-cascade in WASM (performant and can be trained instead of programmed)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published