Giter VIP home page Giter VIP logo

awslabs / sagemaker-defect-detection Goto Github PK

View Code? Open in Web Editor NEW
46.0 9.0 24.0 6.21 MB

Detect Defects in Products from their Images using Amazon SageMaker

Home Page: https://awslabs.github.io/sagemaker-defect-detection/

License: Apache License 2.0

Python 50.22% Jupyter Notebook 45.31% Shell 4.47%
deep-learning computer-vision sagemaker sagemaker-pytorch sagemaker-deployment defect-detection quality-control

sagemaker-defect-detection's People

Contributors

amazon-auto avatar anrikus avatar ehsanmok avatar jinyoung-lim avatar tao2020 avatar

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sagemaker-defect-detection's Issues

[General] AWS SageMaker Launch Error

Hi, I am a student trying to do this "Product Defect Detection" solution. I tried 0_demo.iynb
but I got in a Error problem. I can't start this solution because of the CloudFormation issue.
How can I do this github code?? Could you teach me how to make a cloudformation stack with a yaml file???
I really need to run this code ...
Thank you

[Bug] TypeError: <lambda>() got multiple values for keyword argument 'allow_pickle'

Describe the bug
A clear and concise description of what the bug is.
In 0_demo.ipynb, the cell that performs the prediction would fail in SageMaker Studio with SageMaker JumpStart PyTorch 1.0 kernel with the following error message:

%%time
# SageMaker 1.x doesn't allow_pickle=True by default
np_load_old = np.load
np.load = lambda *args, **kwargs: np_load_old(*args, allow_pickle=True, **kwargs)
demo_predictions = demo_detector.predict(input)
np.load = np_load_old
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<timed exec> in <module>

/opt/conda/envs/sagemaker-soln/lib/python3.7/site-packages/sagemaker/predictor.py in predict(self, data, initial_args, target_model, target_variant)
    121         request_args = self._create_request_args(data, initial_args, target_model, target_variant)
    122         response = self.sagemaker_session.sagemaker_runtime_client.invoke_endpoint(**request_args)
--> 123         return self._handle_response(response)
    124 
    125     def _handle_response(self, response):

/opt/conda/envs/sagemaker-soln/lib/python3.7/site-packages/sagemaker/predictor.py in _handle_response(self, response)
    130         response_body = response["Body"]
    131         content_type = response.get("ContentType", "application/octet-stream")
--> 132         return self.deserializer.deserialize(response_body, content_type)
    133 
    134     def _create_request_args(self, data, initial_args=None, target_model=None, target_variant=None):

/opt/conda/envs/sagemaker-soln/lib/python3.7/site-packages/sagemaker/deserializers.py in deserialize(self, stream, content_type)
    223                 return np.array(json.load(codecs.getreader("utf-8")(stream)), dtype=self.dtype)
    224             if content_type == "application/x-npy":
--> 225                 return np.load(io.BytesIO(stream.read()), allow_pickle=self.allow_pickle)
    226         finally:
    227             stream.close()

<timed exec> in <lambda>(*args, **kwargs)

TypeError: <lambda>() got multiple values for keyword argument 'allow_pickle'

To Reproduce
Steps to reproduce the behavior and error details
In SageMaker Studio, open JumpStart solution browser, launch a Product Defect Detection in Images solution, use SageMaker JumpStart PyTorch 1.0 kernel, execute all cells in the 0_demo.ipynb notebook.

Expected behavior
A clear and concise description of what you expected to happen.
The cell should execute, and return values to demo_predictions variable.

Additional context
Add any other context about the problem here.
The sagemaker python sdk version: 2.18.0.

[Feature] Upgrade pytorch-lightning to 1.x

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

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.