Skip to content

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)

License

Notifications You must be signed in to change notification settings

react-declarative/react-face-kyc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

9dd2f31 · May 30, 2024

History

11 Commits
Apr 12, 2023
Apr 12, 2023
Apr 15, 2023
Apr 12, 2023
Apr 12, 2023
Apr 11, 2023
May 30, 2024
Apr 12, 2023
Apr 12, 2023
Apr 12, 2023

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

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

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