Advanced
Casting Defect Detection using Computer Vision
This application demonstrates the usage of the Kelvin SDK to implement a solution to detect manufacturing defects using computer vision and machine learning.
Code
The full code is hosted in the Kelvin App Samples repository on GitHub here.
Repository contents
- README.md: contains a short description.
- main.py: the application entrypoint and core logic.
- requirements.txt: Python dependencies.
- Dockerfile: used to build a Docker image for deployment.
- .dockerignore: used to exclude files from Docker builds.
- app.yaml: application manifest/config for deploying to a Kelvin Instance.
- model/ (directory): Contains the COmputer Vision model used for categorizing the images.
Basic Code Explanation
The solution consists of two main components:
The following diagram illustrates the architecture of the solution:
- Camera Connector ( ../../importers/camera-connector ): Simulates image capture from a camera and publishes the image in base64 format to the Kelvin Platform. In production environments, it would interface directly with live camera feeds to acquire real-time images.
- Casting Defect Detection: Processes the acquired images to identify casting defects using a pre-trained TensorFlow machine learning model. It evaluates the images for any anomalies and reports the findings back to the Kelvin Platform for further analysis.

