This code pattern is part of the Getting started with IBM Maximo Visual Inspection learning path.
Level | Topic | Type |
---|---|---|
100 | Introduction to computer vision | Article |
101 | Introduction to IBM Maximo Visual Inspection | Article |
201 | Build and deploy an IBM Maximo Visual Inspection model and use it in an iOS app | Tutorial |
202 | Locate and count items with object detection | Code pattern |
203 | Object tracking in video with OpenCV and Deep Learning | Code pattern |
301 | Validate computer vision deep learning models | Code pattern |
302 | Develop analytical dashboards for AI projects with IBM Maximo Visual Inspection | Code pattern |
303 | Automate visual recognition model training | Code pattern |
304 | Load IBM Maximo Visual Inspection inference results in a dashboard | Code pattern |
305 | Build an object detection model to identify license plates from images of cars | Code pattern |
306 | Glean insights with AI on live camera streams and videos | Code pattern |
Summary
Training a visual recognition model can be repetitive and tedious. Users generally have to manually upload and label each individual image. This code pattern shows how to automate these repetitive tasks by monitoring a set of folders using a Python script. As images are added to each folder, they’ll be uploaded and labeled in IBM Maximo Visual Inspection. Once enough images have been uploaded, an image recognition model will be trained.
Description
This code pattern is targeted toward business users that utilize custom visual recognition models and would like to reduce the amount of time spent on manually tuning and retraining their models. This is accomplished through the use of a Python script that has the ability to monitor folders for changes. As images are added to each designated folder, the images are automatically uploaded to the IBM Maximo Visual Inspection service and labelled accordingly. This greatly simplifies the training process because you don’t have to use the UI to upload and label each individual image. This enables you to continuously update IBM Maximo Visual Inspection models without depending on a system administrator.
When you complete this code pattern, you’ll be able to:
- Automate categorizing and uploading of images to IBM Maximo Visual Inspection
- Automate model training in IBM Maximo Visual Inspection
Flow
- The user copies respective images to the category subfolders.
- The script counts the number of images added and determines if image count exceeds threshold.
- If image count exceeds “upload” threshold, the script executes a POST request and uploads images for each category.
- If image count exceeds “train” threshold, the script executes a POST request to begin training a model.
Instructions
Get the detailed instructions in the README file. These steps will show you how to:
- Clone the repository.
- Create the image folder and subfolders.
- Fill in the configuration file.
- Start and test the script.
Conclusion
This code pattern explained how to automate repetitive tasks by monitoring a set of folders using a Python script. The code pattern is part of the Getting started with IBM Maximo Visual Inspection learning path. To continue with the learning path, look at the next pattern Load IBM Maximo Visual Inspection inference results in a dashboard.