The Amazon Lookout for Vision Python SDK is an open-source library that allows data scientists and software developers to easily build, train and deploy computer vision (CV) models using Amazon Lookout for Vision.
- Computer Vision -
Comput vision is an interdisciplinary field that deals with how computers can be made to gain a high level understanding from digital images or videos <https://en.wikipedia.org/wiki/Computer_vision#Definition>
_ - Amazon Lookout for Vision - https://aws.amazon.com/lookout-for-vision/
The Amazon Lookout for Vision Python SDK enables you to do the following.
- Easily check your images for compliants (e.g. right size, shape, etc.)
- Easily rescale images to make them compliant
- Data upload to the necessary S3 structure
- Simple creation of manifest files (incl. upload to the correct location)
- Train a computer vision model using Amazon Lookout for Vision
- Deploy a computer vision model using Amazon Lookout for Vision
- (Batch) Predict using Amazon Lookout for Vision
- Stop the model hosting after you are done/whenever necessary
Getting Started With Sample Jupyter Notebooks <#getting-started-with-sample-jupyter-notebooks>
__Installing the Amazon Lookout for Vision Python SDK <#installing-the-amazon-lookout-for-vision-python-sdk>
__Further Readings <#further-readings>
__Licensing <#licensing>
__
The best way to quickly review how the Amazon Lookout for Vision Python SDK works is to review the related example notebooks. These notebooks provide code and descriptions for creating and running a full project in Amazon Lookout for Vision Using the Amazon Lookout for Vision Python SDK.
In Amazon SageMaker, upload the Jupyter notebook from the example/ folder of this repository.
- To run this example
Create a Notebook Instance <https://docs.aws.amazon.com/sagemaker/latest/dg/gs-setup-working-env.html>
__ in SageMaker. - Add an inline policy to your Amazon SageMaker role in IAM with the following JSON structure
::
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"lookoutvision:*"
],
"Resource": "*"
}
]
}
- Upload the Jupyter notebook from example/ folder.
- Bring your good and bad images and upload them to your notebook instance.
Note: Store the good images in a folder named good/ and the bad images in a folder named bad/.
To run theAmazon Lookout for Vision Python SDK example notebooks locally, download the sample notebook and open them in a working Jupyter instance.
-
Install Jupyter: https://jupyter.readthedocs.io/en/latest/install.html
-
Download the following files from: https://github.com/aws/amazon-lookout-for-vision-python-sdk/tree/master/example.
- :code:
lookout_for_vision_example.ipynb
- Open the files in Jupyter.
The Amazon Lookout for Vision Python SDK is built to PyPI and can be installed with pip as follows.
::
pip install lookoutvision
You can install from source by cloning this repository and running a pip install command in the root directory of the repository:
::
git clone https://github.com/aws/amazon-lookout-for-vision-python-sdk.git
cd amazon-lookout-for-vision-python-sdk
pip install .
The Amazon Lookout for Vision Python SDK supports Unix/Linux and Mac.
The Amazon Lookout for Vision Python SDK is tested on:
- Python 3.6
The Amazon Lookout for Vision Python SDK provides a Python API that enables you to create computer vision models using Amazon Lookout for Vision and directly in your Python code and Jupyter notebooks.
Using this SDK you can:
- Easily check your images for compliants (e.g. right size, shape, etc.)
- Easily rescale images to make them compliant
- Data upload to the necessay S3 structure
- Simple creation of manifest files (incl. upload to the correct location)
- Train a computer vision model using Amazon Lookout for Vision
- Deploy a computer vision model using Amazon Lookout for Vision
- (Batch) Predict using Amazon Lookout for Vision
- Stop the hosting of the model when you are done.
For a detailed API reference of the Amazon Lookout for Vision Python SDK, be sure to view this documentation on
Amazon Lookout for Vision is a machine learning (ML) service that spots defects and anomalies in visual representations using computer vision (CV). With Amazon Lookout for Vision, manufacturing companies can increase quality and reduce operational costs by quickly identifying differences in images of objects at scale. For example, Amazon Lookout for Vision can be used to identify missing components in products, damage to vehicles or structures, irregularities in production lines, miniscule defects in silicon wafers, and other similar problems. Amazon Lookout for Vision uses ML to see and understand images from any camera as a person would, but with an even higher degree of accuracy and at a much larger scale. Amazon Lookout for Vision allows customers to eliminate the need for costly and inconsistent manual inspection, while improving quality control, defect and damage assessment, and compliance. In minutes, you can begin using Amazon Lookout for Vision to automate inspection of images and objects–with no machine learning expertise required.
As a managed service, Amazon Lookout for Vision performs operations on your behalf on
AWS hardware that is managed by Amazon Lookout for Vision. Amazon Lookout for Vision can
perform only operations that the user permits. You can read more about which
permissions are necessary in the AWS Documentation <https://docs.aws.amazon.com/lookout-for-vision/latest/developer-guide/what-is.html>
.
The Amazon Lookout for Vision Python SDK should not require any additional permissions
aside from what is required for using .boto3. However, if you are
using an IAM role with a path in it, you should grant permission for
iam:GetRole
.
See https://github.com/aws-samples/amazon-lookout-for-vision-python-sdk/blob/main/CONTRIBUTING.md#security-issue-notifications for more information.
Amazon Lookout for Vision Python SDK is licensed under the Apache 2.0 License. It is copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. The license is available at: http://aws.amazon.com/apache2.0/