In manufacturing, visual quality inspection is critical for ensuring product reliability
and compliance. However, traditional approaches—whether manual review or custom-trained
computer vision models—are costly, slow to adapt, and difficult to scale across diverse
product lines.
This Jupyter notebook introduces a zero-training, no-dataset-required visual inspection
system using Amazon Nova Pro, a multimodal foundation model accessed via Amazon Bedrock.
Using only a Jupyter notebook, you can detect manufacturing defects in product images with structured
natural language prompts—no computer vision expertise or labeled data required.
By the end of this notebook, you'll be able to:
- Upload and analyze product images in a Jupyter notebook
- Detect visual defects using Amazon Nova Pro
- Automatically return bounding boxes, failure reasons, and QC status
- Visualize defect overlays on product images
For more background consult the Readme in the same repository.
This inspection pipeline operates entirely within a local Jupyter notebook and AWS Generative AI infrastructure:
- Image Capture: Use widgets in the notebook to upload a product image (and optionally a reference image).
- Image Preprocessing: Images are resized, converted to Base64, and prepared for inference.
- Generative AI Inference: Amazon Bedrock invokes Nova Pro to analyze the image and return structured defect data.
- Visualization: Bounding boxes and defect reasons are drawn using matplotlib.
User → Jupyter Notebook → Amazon Bedrock (Nova Pro) → JSON Defect Output → Matplotlib Overlay
There is a Cloudformation template available that will create an Amazon Sagemaker Ai Notebook and clones this repository. The output of the Cloudformation is a URl to open the Notebook.
Run this Cloudformation link and then open the link in the outputs.
If you manually run the notebook on an EC2 instance or your own laptop ensure the credentials you have can invoke the Amazon Nova models.
And also ensure you have granted access through the AWS Console:
Bedrock → Model Access → Modify model access
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": "bedrock:InvokeModel",
"Resource": "*"
}
]
}See CONTRIBUTING for more information.
This library is licensed under the MIT-0 License. See the LICENSE file.