Skip to content

Latest commit

 

History

History
46 lines (37 loc) · 1.32 KB

README.md

File metadata and controls

46 lines (37 loc) · 1.32 KB

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

Contribute

Important

Made by using react-declarative to solve your problems. ⭐Star and 💻Fork It on github will be appreciated

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();
        })
);