aws-samples / liveness-detection Goto Github PK
View Code? Open in Web Editor NEWBackend and a JavaScript frontend of a liveness detection application.
License: MIT No Attribution
Backend and a JavaScript frontend of a liveness detection application.
License: MIT No Attribution
I followed the instructions but it didn't work out of the box. I had to go to the S3 bucket with the static files and make them all public.
Hi team,
From what I can tell, this solution seems to load the media stream for the web client at raw dimensions regardless of the page size. In situations where the camera has high resolution relative to the screen size (e.g. mobile browsers) this causes the page to overflow and seems to somehow break the maths of the challenge in some cases - struggling to get to green box or recognise nose placed in the yellow box.
Observed on Android devices, emulated iPhone, and laptop Firefox and Chrome (by reducing the browser window to minimum width)
Hi folks,
I've been seeing an intermittent issue which manifests as NetworkError
in the front end, but the underlying cause seems to be an unhandled exception in the verification Lambda (because CORS headers don't get set on the error response through API Gateway, so the issue appears as a CORS/network issue on browser side).
Stack trace below but I haven't had chance to dig in to it yet - I wonder if there's something about the number of frames uploaded for the check that can affect the dimensionality of the variable in question?
[ERROR] TypeError: only size-1 arrays can be converted to Python scalars
Traceback (most recent call last):
File "/var/task/app.py", line 52, in lambda_handler
status_code, response = execute_if_token_is_valid(body['token'], challenge_id, verify_challenge, challenge_id)
File "/var/task/app.py", line 68, in execute_if_token_is_valid
return func(*args)
File "/var/task/app.py", line 143, in verify_challenge
state_manager.process(frame)
File "/var/task/states/manager.py", line 19, in process
success = self.current_state.process(frame)
File "/var/task/states/nose.py", line 66, in process
verified = self.verify_challenge(rek_landmarks, rek_pose, self.challenge_in_the_right)
File "/var/task/states/nose.py", line 92, in verify_challenge
trajectory_error = math.sqrt(residuals/len(self.nose_trajectory))
Hi guys, it would be great if you could provide other language reference implementations such as Java and .net.
By nature of the way the sample challenge works (split between challenge generation, on-device analytics, and Rekognition-based verification) there are multiple stages within the flow where failure can occur.
We'd like failure events (regardless of on-device vs in-cloud) to be logged in a centralized way independent of the failure reason - both for initial debugging of the app on new platforms, and for management of the challenge flows in production. For example if making changes to the generated challenges, to understand downstream impact on failure rates both for on-device and Rekognition.
hi I tried deploying your solution using the yaml in cloudformation but I get an error and it rollsback - 'CodeUri' is not a valid S3 Uri
Specification document. Number of errors found: 1. Resource with id [ChallengeFunction] is invalid. 'CodeUri' is not a valid S3 Uri of the form 's3://bucket/key' with optional versionId query parameter.. Rollback requested by user.
I would appreciate if you could point me in the right direction to resolve this please thanks
Hi Team,
I was checking this up and while replicating at the lab end i notice the npm error while installing the frontend.
Step 5: Run the comamand below to build the frontend:
npm install && npm run build
ERROR Failed to compile with 1 error
error in [internal]
INTERNAL ERROR(undefined,undefined) Cannot destructure property 'script' of 'result.descriptor' as it is undefined.
stack trace:
TypeError: Cannot destructure property 'script' of 'result.descriptor' as it is undefined.
at Object.parseComponent (/home/ec2-user/liveness-detection/client/node_modules/@vue/cli-plugin-typescript/vue-compiler-sfc-shim.js:6:13)
at Function.resolveScriptBlock (/home/ec2-user/liveness-detection/client/node_modules/fork-ts-checker-webpack-plugin/lib/VueProgram.js:196:35)
at Object.host.getSourceFile (/home/ec2-user/liveness-detection/client/node_modules/fork-ts-checker-webpack-plugin/lib/VueProgram.js:106:45)
at findSourceFile (/home/ec2-user/liveness-detection/client/node_modules/typescript/lib/typescript.js:101559:29)
at processImportedModules (/home/ec2-user/liveness-detection/client/node_modules/typescript/lib/typescript.js:101900:25)
at findSourceFile (/home/ec2-user/liveness-detection/client/node_modules/typescript/lib/typescript.js:101607:17)
at /home/ec2-user/liveness-detection/client/node_modules/typescript/lib/typescript.js:101436:85
at getSourceFileFromReferenceWorker (/home/ec2-user/liveness-detection/client/node_modules/typescript/lib/typescript.js:101403:34)
at processSourceFile (/home/ec2-user/liveness-detection/client/node_modules/typescript/lib/typescript.js:101436:13)
at processRootFile (/home/ec2-user/liveness-detection/client/node_modules/typescript/lib/typescript.js:101259:13)
ERROR Build failed with errors.
To get rid of the error just a quick workaround was to skip the dependency in the packages.json
file.
{
"name": "liveness-client",
"version": "1.0.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint"
},
"dependencies": {
"axios": "~0.21.1",
"core-js": "~3.6.5",
"face-api.js": "~0.22.2",
"js-logger": "~1.6.0",
"uuid": "~8.1.0",
"vue": "~2.6.11",
"vue-lottie": "~0.2.1"
},
"devDependencies": {
"@types/uuid": "~8.0.0",
"@typescript-eslint/eslint-plugin": "~2.33.0",
"@typescript-eslint/parser": "~2.33.0",
"@vue/cli-plugin-babel": "~4.4.0",
"@vue/cli-plugin-eslint": "~4.4.0",
"@vue/cli-plugin-typescript": "~4.4.0",
"@vue/cli-service": "~4.4.0",
"@vue/eslint-config-prettier": "~6.0.0",
"@vue/eslint-config-typescript": "~5.0.2",
"eslint": "~6.7.2",
"eslint-plugin-prettier": "~3.1.3",
"eslint-plugin-vue": "~6.2.2",
"prettier": "~1.19.1",
"typescript": "~3.9.3",
"vue-template-compiler": "~2.6.11"
}
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.