Preparing custom models for deployment

Note: Starting in Maximo® Visual Inspection 8.7, custom models are not supported. Custom models are still supported in Maximo Visual Inspection 8.6 and earlier versions.

If you are deploying a custom model in the IBM® Maximo Visual Inspection framework, your custom model must meet specific requirements.

Requirements

  • The custom model must be TensorFlow or PyTorch based.
  • The custom model must conform to Python 3. Any trained custom models from releases before version 8.0.0 will not work if the custom model supports Python 2 only.
  • The custom model must implement the MyDeploy Python class.
    • The MyDeploy implementation must exist in a file that is named deploy.py in the highest level directory of the .zip file contents.
    • The following import must be added to the deploy.py file to define the deployment callbacks:
      from deploy_interface import DeployCallback
    • The class name must be MyDeploy.

"MyDeploy" Template

class MyDeploy(DeployCallback):
def __init__(self):
    pass
def onModelLoading(self, model_path, labels, workspace_path):
    pass
def onTest(self):
    pass
def onInference(self, image_url, params):
    pass
def onFailed(self, deploy_status, e, tb_message):
    pass

Importing and deploying the model

After the model is properly prepared, import it to IBM Maximo Visual Inspection by going to the Models page and clicking Import .zip file. To deploy the model, on the Models page, select the model and click Deploy model.