Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/react-declarative/react-face-kyc
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)
https://github.com/react-declarative/react-face-kyc
computer-vision haar-cascade kyc liveness-detection mui opencv react reactive rxjs typescript wasm
Last synced: about 1 month ago
JSON representation
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)
- Host: GitHub
- URL: https://github.com/react-declarative/react-face-kyc
- Owner: react-declarative
- License: mit
- Created: 2023-04-11T21:52:26.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2023-04-15T23:19:40.000Z (over 1 year ago)
- Last Synced: 2024-05-04T00:17:52.141Z (8 months ago)
- Topics: computer-vision, haar-cascade, kyc, liveness-detection, mui, opencv, react, reactive, rxjs, typescript, wasm
- Language: TypeScript
- Homepage: https://github.com/react-declarative/react-declarative
- Size: 20.3 MB
- Stars: 7
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# react-face-kyc
> Quite useful react snippet for automatic photo capture with check of correct face position (KYC document face liveness)
It uses [FaceWASM](https://github.com/oriolmapu/FaceWASM) - face detection implementation based on [Haar-cascades](https://docs.opencv.org/3.4/d2/d99/tutorial_js_face_detection.html). This method is performant and [can be trained](https://docs.opencv.org/4.x/dc/d88/tutorial_traincascade.html) instead of programmed
![screenshot](./docs/screencast.gif)
## Contribute
> [!IMPORTANT]
> Made by using [react-declarative](https://github.com/react-declarative/react-declarative) to solve your problems. **⭐Star** and **💻Fork** It on github will be appreciated## Usage
```bash
npm install
npm start
```## Code sample
```tsx
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();
})
);
```