Giter Club home page Giter Club logo

gg-edge-inference's People

Contributors

fxgsell avatar shirkeyaws avatar wenming avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

gg-edge-inference's Issues

2-face-detection - make failure

make execution fails:

ec2-user:~/environment/GG-Edge-Inference/2-face-detection (master) $ make

echo "Zipping..."
Zipping...
rm -f package.zip
zip -rq package.zip greengrass_common  greengrass_ipc_python_sdk  greengrasssdk  *.py
echo "Uploading to Lambda"
Uploading to Lambda
aws --profile default --region us-east-1 lambda update-function-code --function-name  --zip-file fileb://`pwd`/package.zip
usage: aws [options] <command> <subcommand> [<subcommand> ...] [parameters]
To see help text, you can run:

  aws help
  aws <command> help
  aws <command> <subcommand> help
aws: error: argument --function-name: expected one argument
make: *** [deploy] Error 2

properties.mk

# Static
PROFILE=default
LAMBDA_ALIAS=latest
AWS_COMMAND=aws --profile $(PROFILE) --region $(REGION)

# Edit these values (where required)
REGION=us-east-1
GG_GROUP=ml-edge-workshop
BUCKET=ml-edge-workshop-shirkeys

Is function_name a value we need to pass? Assuming that could be changed during Lab 1, including it would make sense

2-face-detection - Deployment failing within make

  1. Deployment failing
  2. Deployment failing silently

make output

ec2-user:~/environment/GG-Edge-Inference/2-face-detection (master) $ make
echo "Zipping..."
Zipping...
rm -f package.zip
zip -rq package.zip greengrass_common  greengrass_ipc_python_sdk  greengrasssdk  *.py
echo "Uploading to Lambda"
Uploading to Lambda
aws --profile default --region us-east-1 lambda update-function-code --function-name ml-edge-workshop-lab-1 --zip-file fileb://`pwd`/package.zip
{
    "TracingConfig": {
        "Mode": "PassThrough"
    }, 
    "CodeSha256": "x4otKs1etleHIqP+H5tMfeRe9D5DUhGK44wQ4svy1tk=", 
    "FunctionName": "ml-edge-workshop-lab-1", 
    "CodeSize": 21229, 
    "MemorySize": 128, 
    "FunctionArn": "arn:aws:lambda:us-east-1:306280812807:function:ml-edge-workshop-lab-1", 
    "Version": "$LATEST", 
    "Role": "arn:aws:iam::306280812807:role/ml-edge-workshop-lab-1-role", 
    "Timeout": 3, 
    "LastModified": "2018-06-09T12:14:53.463+0000", 
    "Handler": "lambda_function.lambda_handler", 
    "Runtime": "python2.7", 
    "Description": ""
}
aws --profile default --region us-east-1 lambda publish-version --function-name ml-edge-workshop-lab-1 --query Version --output text  > LAMBDA_VERSION
aws --profile default --region us-east-1 lambda update-alias --name latest --function-name ml-edge-workshop-lab-1 --function-version `cat LAMBDA_VERSION`
{
    "AliasArn": "arn:aws:lambda:us-east-1:306280812807:function:ml-edge-workshop-lab-1:latest", 
    "FunctionVersion": "1", 
    "Name": "latest", 
    "Description": ""
}
rm LAMBDA_VERSION
echo "Deploying to GG"
Deploying to GG
aws --profile default --region us-east-1 greengrass list-groups --query "Groups[?Name=='ml-edge-workshop'].Id" --output text > GROUP_ID
aws --profile default --region us-east-1 greengrass list-groups --query "Groups[?Name=='ml-edge-workshop'].LatestVersion" --output text > GROUP_VERSION
aws --profile default --region us-east-1 greengrass create-deployment --group-id `cat GROUP_ID` --deployment-type NewDeployment --group-version-id `cat GROUP_VERSION` --query "DeploymentId" --output text > GROUP_DEPLOYMENT
aws --profile default --region us-east-1 greengrass get-deployment-status --group-id `cat GROUP_ID` --deployment-id `cat GROUP_DEPLOYMENT` --query "DeploymentStatus" --output text  > STATUS
Build in progress: Building
rm GROUP_ID GROUP_VERSION GROUP_DEPLOYMENT STATUS

manual steps to inspect output of deployment steps (ie. STATUS file before it is deleted)

ec2-user:~/environment/GG-Edge-Inference/2-face-detection (master) $ aws --profile default --region us-east-1 greengrass list-groups --query "Groups[?Name=='ml-edge-workshop'].Id" --output text > GROUP_ID                                 
ec2-user:~/environment/GG-Edge-Inference/2-face-detection (master) $ aws --profile default --region us-east-1 greengrass list-groups --query "Groups[?Name=='ml-edge-workshop'].LatestVersion" --output text > GROUP_VERSION
ec2-user:~/environment/GG-Edge-Inference/2-face-detection (master) $ aws --profile default --region us-east-1 greengrass create-deployment --group-id `cat GROUP_ID` --deployment-type NewDeployment --group-version-id `cat GROUP_VERSION` --query "DeploymentId" --output text > GROUP_DEPLOYMENT
ec2-user:~/environment/GG-Edge-Inference/2-face-detection (master) $ aws --profile default --region us-east-1 greengrass get-deployment-status --group-id `cat GROUP_ID` --deployment-id `cat GROUP_DEPLOYMENT` --query "DeploymentStatus" --output text  > STATUS
ec2-user:~/environment/GG-Edge-Inference/2-face-detection (master) $ cat ./STATUS 
Failure

Executing create-greengrass-config.py from Cloud9 environment is failing to sign the required URLs

ec2-user:~/environment/GG-Edge-Inference/1-greengrass-configuration (master) $ python3 create-greengrass-config.py --create-group ml-edge-workshop --bucket ml-edge-workshop-lab-1 --function ml-edge-workshop-lab-1
Creating IAM role for Greengrass
Traceback (most recent call last):
File "create-greengrass-config.py", line 294, in
state = create_group(args.group_name, args.bucket)
File "create-greengrass-config.py", line 182, in create_group
role, role_policy = create_gg_role(bucket, certificate['certificateArn'][-10:])
File "create-greengrass-config.py", line 125, in create_gg_role
AssumeRolePolicyDocument=json.dumps(assume_role_document)
File "/opt/c9/python3/local/lib/python3.6/dist-packages/botocore/client.py", line 314, in _api_call
return self._make_api_call(operation_name, kwargs)
File "/opt/c9/python3/local/lib/python3.6/dist-packages/botocore/client.py", line 612, in _make_api_call
raise error_class(parsed_response, operation_name)
botocore.exceptions.ClientError: An error occurred (InvalidClientTokenId) when calling the CreateRole operation: The security token included in the request is invalid

Missing attribute from static_config

$ python3 create-greengrass-config.py --create-group ml-edge-workshop --bucket ml-edge-workshop-lab-1 --function ml-edge-workshop-lab-1
Creating IAM role for Greengrass
Generating configuration package
Configuration and certificates generated: certificates.zip
Traceback (most recent call last):
File "create-greengrass-config.py", line 311, in
state = add_function(args.function_name, state)
File "create-greengrass-config.py", line 209, in add_function
function = static_config.FUNCTION_INITIAL_VERSION
AttributeError: module 'static_config' has no attribute 'FUNCTION_INITIAL_VERSION'

Face Recognition Precision

Hi, I wonder how to improve the precision in AWS Rekognition, since I recently tested with multiple people, but sadly returned with same face id.
Sometimes have to wait several minutes until the face was detected as a different one.

Is there any way to fix the code or set similarity threshold higher?
By the way, I am using Raspberry Pi 3 and a logitech c310 webcam.

Thank you!

Error in make for Lab 3 - hybrid

➜  3-hybrid-face-recognition git:(master) ✗ make
make -C function
zip -r hybrid-face-recognition.zip *
  adding: Makefile (deflated 8%)
  adding: lambda_function.py (deflated 61%)
aws cloudformation package \
		--template-file hybrid-face-recognition.yml \
		--s3-bucket my-bucket \
		--output-template-file hybrid-face-recognition-release.yml

Unable to upload artifact ./function/hybrid-face-recognition.zip referenced by CodeUri parameter of FaceRecognition resource.
An error occurred (AllAccessDisabled) when calling the PutObject operation: All access to this object has been disabled
make: *** [build] Error 255

greengrass error when stopping/starting on device

When stopping / starting per this page

where:

Restart the AWS Greengrass daemon by running the following commands in your core device terminal.
cd /greengrass/ggc/core/
sudo ./greengrassd stop
sudo ./greengrassd start

then, when executed on device:

nvidia@tegra-ubuntu:/greengrass/ggc/core$ sudo ./greengrassd stop
[sudo] password for nvidia:
nvidia@tegra-ubuntu:/greengrass/ggc/core$ sudo ./greengrassd start
Setting up greengrass daemon
Validating hardlink/softlink protection
Validating execution environment
Found cgroup subsystem: cpuset
Found cgroup subsystem: cpu
Found cgroup subsystem: cpuacct
Found cgroup subsystem: blkio
Found cgroup subsystem: memory
Found cgroup subsystem: devices
Found cgroup subsystem: freezer
Found cgroup subsystem: net_cls
Found cgroup subsystem: perf_event
Found cgroup subsystem: net_prio
Found cgroup subsystem: pids
Found cgroup subsystem: debug

Starting greengrass daemon


Greengrass daemon 11306 failed to start
Failed to parse config.json. err: UseSystemd [[yes|no]] is invalid, please use "yes" or "no"
nvidia@tegra-ubuntu:/greengrass/ggc/core$

and when catting config.json:

nvidia@tegra-ubuntu:/greengrass/ggc/core$ cat /greengrass/config/config.json
{
    "coreThing": {
        "caPath": "[ROOT_CA_PEM_HERE]",
        "certPath": "[CLOUD_PEM_CRT_HERE]",
        "keyPath": "[CLOUD_PEM_KEY_HERE]",
        "thingArn": "[THING_ARN_HERE]",
        "iotHost": "[HOST_PREFIX_HERE].iot.[AWS_REGION_HERE].amazonaws.com",
        "ggHost": "greengrass.iot.[AWS_REGION_HERE].amazonaws.com"
    },
    "runtime": {
        "cgroup": {
            "useSystemd": "[yes|no]"
        }
    },
    "managedRespawn": false
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.