Giter Club home page Giter Club logo

awslabs / aws-ai-solution-kit Goto Github PK

View Code? Open in Web Editor NEW
145.0 21.0 25.0 83.04 MB

Machine Learning APIs for common use cases, include: General OCR (Simplified/Traditional Chinese), Custom OCR, Image Similarity, Object Recognition, Face Detection, Face Comparison, Human Image Segmentation, Human Attribute Recognition, Pornography Detection, Image Super Resolution, Text Similarity, Car License Plate, etc.

License: Apache License 2.0

JavaScript 1.52% Python 74.94% TypeScript 12.94% Dockerfile 0.05% Makefile 0.09% Go 5.50% Jupyter Notebook 1.75% Shell 0.30% HTML 2.62% CSS 0.30%
car-license-plate-recognition chinese-ocr deep-learning face-recognition human-segmentation image-similarity machine-learning ocr ocr-recognition optical-character-recognition

aws-ai-solution-kit's People

Stargazers

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

Watchers

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

aws-ai-solution-kit's Issues

No operations defined in spec!

Expected Behavior

I expected the cloudformation template to launch the API for use

Current Behavior

With APIExplorer seeing No operations defined in spec!

Possible Solution

Look into the deployed api?

How to reproduce (for bugs)

Run the cloudformation template in any us-east-1

Fail to deploy Lite OCR - Traditional Chinese

Dear Yan,

I encountered an issue while attempting to deploy the "Yes: Lite OCR - Traditional Chinese" solution.

image

Regrettably, the deployment process encountered a failure. Could you kindly assist me in identifying any oversights on my part?

The CloudFormation event status indicates the following:

Embedded stack arn:aws:cloudformation:us-east-1:xxxxxxxxxxxxxx:stack/AI-Solution-Kit-GeneralOCRTraditionalChineseNestedStackGeneralOCRTraditionalChineseNes-1VM9U651N5ADC/345f22c0-b5a7-11ee-9f27-12bf2aef6c25 was not successfully created. The following resource(s) failed to create: [generalocrtraditionalchinesegeneralocrtraditionalchineseApp89CAEB4E].

I appreciate your prompt attention to this matter and any assistance you can provide in resolving the deployment issue.

Best regards,
TC

Reporting a vulnerability

Hello!

I hope you are doing well!

We are a security research team. Our tool automatically detected a vulnerability in this repository. We want to disclose it responsibly. GitHub has a feature called Private vulnerability reporting, which enables security research to privately disclose a vulnerability. Unfortunately, it is not enabled for this repository.

Can you enable it, so that we can report it?

Thanks in advance!

PS: you can read about how to enable private vulnerability reporting here: https://docs.github.com/en/code-security/security-advisories/repository-security-advisories/configuring-private-vulnerability-reporting-for-a-repository

go 1.x runtime is no longer supported

Expected Behavior

Being able to deploy the template.

Current Behavior

CloudFormation errors out because of deprecated go1.x runtime.

Possible Solution

Move to provided.al2 or provided.al2023 runtimes.

Simply changing the value in the template does not seem to work though as the bootstrap handler is not found then.

Error: Couldn't find valid bootstrap(s): [/var/task/bootstrap /opt/bootstrap] Runtime.InvalidEntrypoint

How to reproduce (for bugs)

image super-resolution timeout / internal error

Use super-resolution with inf1 instance, I tried inf1.xlarge and inf1.6xlarge.

When super-resolution a large pixel image(4000x3000), got below errors,

  • internal error when using inf1.xlarge instance
  • timeout when using inf1.6xlarge instance

If the resolution of image can not be supported, pls give the friendly error message, like http status 4xx with proper information.

No method found matching route super-resolution/ for http method POST.

I've tried deploying this with and without authentication. I can get other endpoints to work (like pornography detection), however this endpoint (although it shows up in the "output" section) always returns this error:

{
    "message": "No method found matching route super-resolution/ for http method POST."
}

Stack fails on PornographyDetection installation

Expected Behavior

Template should create stack

Current Behavior

Template fails

Possible Solution

How to reproduce (for bugs)

Import template and create stack with PornographyDetection | yes-lambda enabled

Stack creation fails with the following error, no other info provided.
Embedded stack arn:aws:cloudformation:us-east-1:948320724766:stack/AIImageDetector-PornographyDetectionNestedStackPornographyDetectionNestedStackResource-36PDX2AQZ7GR/b095a010-8c33-11ed-8a72-1232682a975b was not successfully created: The following resource(s) failed to create: [pornographydetectionpornographydetectionAppDCBBB4C1].

Image Super Resolution 502

Execution log for request 410b4f79-3c8a-480e-9e29-25625f3d9784
Tue Nov 16 02:15:30 UTC 2021 : Starting execution for request: 410b4f79-3c8a-480e-9e29-25625f3d9784
Tue Nov 16 02:15:30 UTC 2021 : HTTP Method: POST, Resource Path: /resolution
Tue Nov 16 02:15:30 UTC 2021 : Method request path: {}
Tue Nov 16 02:15:30 UTC 2021 : Method request query string: {}
Tue Nov 16 02:15:30 UTC 2021 : Method request headers: {Content-Type= application/json}
Tue Nov 16 02:15:30 UTC 2021 : Method request body before transformations: {
  "url":"https://aikits.demo.solutions.aws.a2z.org.cn/img/sr-5.jpg"
}
Tue Nov 16 02:15:30 UTC 2021 : Endpoint request URI: https://lambda.us-east-1.amazonaws.com/2015-03-31/functions/arn:aws:lambda:us-east-1:958422602275:function:AIKitsSuperResolutionStac-humanseglambdaapp53B7B52-GJ7ESt0qZRFk/invocations
Tue Nov 16 02:15:30 UTC 2021 : Endpoint request headers: {X-Amz-Date=20211116T021530Z, x-amzn-apigateway-api-id=0pnzq370l8, Accept=application/json, User-Agent=AmazonAPIGateway_0pnzq370l8, Host=lambda.us-east-1.amazonaws.com, X-Amz-Content-Sha256=1bdcc6bde9e33fd77f3d296ea43d47fa25b680e764ca93656c0a069cce3dad0b, X-Amzn-Trace-Id=Root=1-61931442-e702479ee55d643149b8511a, x-amzn-lambda-integration-tag=410b4f79-3c8a-480e-9e29-25625f3d9784, Authorization=*********************************************************************************************************************************************************************************************************************************************************************************************************************************************635988, X-Amz-Source-Arn=arn:aws:execute-api:us-east-1:958422602275:0pnzq370l8/test-invoke-stage/POST/resolution, X-Amz-Security-Token=IQoJb3JpZ2luX2VjEMv//////////wEaCXVzLWVhc3QtMSJGMEQCIAcmMk7QzZrMp6fIOpqhIQSluMQRyi3sO5CHQwApdtvrAiAX+u55Xg9QMxMd3LERM0Aa1v/+gIWWvrdaCK [TRUNCATED]
Tue Nov 16 02:15:30 UTC 2021 : Endpoint request body after transformations: {"resource":"/resolution","path":"/resolution","httpMethod":"POST","headers":{"Content-Type":" application/json"},"multiValueHeaders":{"Content-Type":[" application/json"]},"queryStringParameters":null,"multiValueQueryStringParameters":null,"pathParameters":null,"stageVariables":null,"requestContext":{"resourceId":"pk31mf","resourcePath":"/resolution","httpMethod":"POST","extendedRequestId":"I4AabEFooAMFTEg=","requestTime":"16/Nov/2021:02:15:30 +0000","path":"/resolution","accountId":"958422602275","protocol":"HTTP/1.1","stage":"test-invoke-stage","domainPrefix":"testPrefix","requestTimeEpoch":1637028930564,"requestId":"410b4f79-3c8a-480e-9e29-25625f3d9784","identity":{"cognitoIdentityPoolId":null,"cognitoIdentityId":null,"apiKey":"test-invoke-api-key","principalOrgId":null,"cognitoAuthenticationType":null,"userArn":"arn:aws:iam::958422602275:user/fayland","apiKeyId":"test-invoke-api-key-id","userAgent":"aws-internal/3 aws-sdk-java/1.12.76 Linux/5.4.147-83.259.amzn [TRUNCATED]
Tue Nov 16 02:15:30 UTC 2021 : Sending request to https://lambda.us-east-1.amazonaws.com/2015-03-31/functions/arn:aws:lambda:us-east-1:958422602275:function:AIKitsSuperResolutionStac-humanseglambdaapp53B7B52-GJ7ESt0qZRFk/invocations
Tue Nov 16 02:15:30 UTC 2021 : Received response. Status: 200, Integration latency: 218 ms
Tue Nov 16 02:15:30 UTC 2021 : Endpoint response headers: {Date=Tue, 16 Nov 2021 02:15:30 GMT, Content-Type=application/json, Content-Length=1278, Connection=keep-alive, x-amzn-RequestId=9f578431-af11-4687-9cfb-dc93c457120b, X-Amz-Function-Error=Unhandled, x-amzn-Remapped-Content-Length=0, X-Amz-Executed-Version=$LATEST, X-Amzn-Trace-Id=root=1-61931442-e702479ee55d643149b8511a;sampled=0}
Tue Nov 16 02:15:30 UTC 2021 : Endpoint response body before transformations: {"errorMessage": "[ONNXRuntimeError] : 7 : INVALID_PROTOBUF : Load model from /mnt/lambda/Real_ESRGAN_x2.onnx failed:Protobuf parsing failed.", "errorType": "InvalidProtobuf", "stackTrace": ["  File \"/var/lang/lib/python3.8/imp.py\", line 234, in load_module\n    return load_source(name, filename, file)\n", "  File \"/var/lang/lib/python3.8/imp.py\", line 171, in load_source\n    module = _load(spec)\n", "  File \"<frozen importlib._bootstrap>\", line 702, in _load\n", "  File \"<frozen importlib._bootstrap>\", line 671, in _load_unlocked\n", "  File \"<frozen importlib._bootstrap_external>\", line 843, in exec_module\n", "  File \"<frozen importlib._bootstrap>\", line 219, in _call_with_frames_removed\n", "  File \"/var/task/super_resolution_app.py\", line 21, in <module>\n    ort_session_x2 = onnxruntime.InferenceSession(access_point + '/Real_ESRGAN_x2.onnx')\n", "  File \"/opt/onnxruntime/capi/onnxruntime_inference_collection.py\", line 283, in __init__\n     [TRUNCATED]
Tue Nov 16 02:15:30 UTC 2021 : Lambda execution failed with status 200 due to customer function error: [ONNXRuntimeError] : 7 : INVALID_PROTOBUF : Load model from /mnt/lambda/Real_ESRGAN_x2.onnx failed:Protobuf parsing failed.. Lambda request id: 9f578431-af11-4687-9cfb-dc93c457120b
Tue Nov 16 02:15:30 UTC 2021 : Method completed with status: 502

just build from the template and tested in apigateway. not working. please advise

I can't create any service

Expected Behavior

I tested it many times, but it couldn't be used. I don't know what the problem is

Current Behavior

Unable to create any ai-solution-kit services, such as OCR, target recognition, etc.

The error:

Embedded stack arn:aws:cloudformation:us-east-1:975049896832:stack/AI-Solution-Kit-ObjectRecognitionSageMakerNestedStackObjectRecognitionSageMakerNestedS-1XG6MAPB45FLV/3590e2b0-f6e7-11ee-b785-12db9a32952b was not successfully created: The following resource(s) failed to create: [objectrecognitionconstructsagemakerEndpointEA8278DB].

image

Possible Solution

How to reproduce (for bugs)

from this url:

https://us-east-1.console.aws.amazon.com/cloudformation/home?region=us-east-1#/stacks/create/template?stackName=AI-Solution-Kit&templateURL=https://aws-gcr-solutions.s3.amazonaws.com/Aws-gcr-ai-solution-kit/latest/AI-Solution-Kit.template

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.