Scenario: Creating an inspection to inspect images and display inspection results
The goal of this scenario is to create an inspection that uses a trained model to detect radiator caps in images of engines.
You can fulfill this scenario by creating an inspection that runs in inspecting mode. You add an input source, such as a camera, to provide images of engines, choose a model that detects radiator caps in images, and configure rules to determine inspection results.
If you do not have a suitable model, work with your model builder to train a model in Maximo® Visual Inspection. See Scenario: Creating an inspection to collect images for model training for more information.
To complete this scenario, take the following steps:
- Set up an input source.
- Create a station.
- Create an inspection that runs in inspecting mode.
- Configure inspection rules.
- Review and enable the inspection.
- View the inspected images and their results.
Step 1: Set up an input source
Input sources provide images that are used in inspections. In this scenario, the input source is a fixed camera that is pointed at an engine assembly line. To set up the input source, complete the following steps:
- From the side bar, click Input sources.
- On the Input sources page, click +.
- In the dialog, in the Input source type field, select Camera.
- Enter the connection details. Optionally, click Test input source and verify that the connection works.
- Enter a name and description and click Add.
Step 2: Create a station
Stations are groups of inspections that belong together. You must create or select a station before you can create an inspection. Create a station by completing the following steps:
- From the side bar, click Stations.
- On the Stations page, click +.
- Enter a name and description and click Create.
Step 3: Create an inspection that runs in inspecting mode
Inspections run in collecting or inspecting mode. In inspecting mode, a trained model inspects images. To create an inspection that runs in inspecting mode, complete the following steps:
- On the Stations page, click the station that you created.
- Click + and enter a name and description for the new inspection.
- Click the new inspection to open it.
- In the Inspection mode field, choose Inspecting.
- In the Resources section, select the project and data set where you want to store images in Maximo Visual Inspection. Optionally, create a project and data set.
- In the Deployed model location field, select Training server to ensure that you see the models that are deployed in Maximo Visual Inspection.
- In the Deployed model field, choose a model that is trained to identify radiator caps.
- In the Minimum confidence score field, enter 0.75. This setting ensures that radiator caps are inspected only if the model identifies them with at least 75% confidence.
- In the Input source field, select the camera that you added.
- In the Time-based trigger field, enter 5. This setting ensures that the camera takes a photo every five seconds.
Step 4: Configure inspection rules
To determine whether an inspection’s result is a pass, a fail, or inconclusive, you configure rules. You specify a result for the rule and configure conditions that must be met for the rule to return that result. If one rule fails, the inspection fails.
Each rule is associated with an object, such as a radiator cap, that the model is trained to identify. Configure a rule for the radiator cap object by completing the following steps:
- In the inspection, click Add rule +.
- In the dialog, enter a name for the rule.
- In the Object field, select the radiator cap object.
-
In the
Rule conditions section, configure the rule conditions.
a. Choose the Match all conditions option.
b. Specify that the confidence score must be greater than 0.90.
c. Specify that the object count must be greater than zero. - In the Set result to field, select Pass.
- Optionally, enter alert messages that you want to send if the rule conditions are met. Specify an MQTT topic to send alerts to external systems. Specify a phone number to send alerts through the Twilio text messaging service.
- Save your changes.
Step 5: Review and enable the inspection
Click Review inspection to verify that the inspection is configured correctly. In the dialog, a test inspection is performed on an image so that you can review the results and fine-tune the configuration. The overall inspection result is displayed near the image.
Review the Detected objects section to see the number of radiator caps that the model identifies, the confidence scores, and the rule results. If the model identifies at least one radiator cap with more than 90% confidence, the rule that you configured passes and, because you created only one rule, the overall inspection passes.
If you are using an anomaly model, anomaly data is available for detected objects.
You can adjust rule configuration and click Check inspection to retest the configuration. When you are satisfied that the configuration is correct, click Enable inspection.
Step 6: View the inspected images and their results
Click the Images tab to view the images and their inspection results. Icons in images indicate the inspection results. A checkmark icon indicates a pass, an X indicates a fail, and a question mark indicates an inconclusive result.
You can filter, sort, and search images. When you select images, you can view their metadata, review the identified objects and confidence scores, and reset inspection results.
Next steps
Use the dashboard to see how the inspection performs. A high rate of inconclusive results might indicate that the model’s performance is poor, the rule configuration is incorrect, or the quality of the camera images is compromised.
Review image labels and results regularly to gauge the model's accuracy. Models must be constantly retrained to improve their accuracy. Labeled images are used to retrain models. Now that your inspection is active, it constantly adds labeled images into the data set. Work with your model builder to decide when enough images are gathered to retrain the model. After the model builder deploys the retrained model, update your inspection configuration to use it.