Version 3.0.0
The task is to detect imprinted alphanumeric characters “A”, “F”, “1”, “2“ and “4” on metal plates and classify them as “OK", “NOK-Scratch”, “NOK-Bubble” or “NOK-DeShape”. This is a Detection followed by a Classification task and can be realized as a pipeline composed of a detector followed by a classifier.
The dataset contains 384 metal plates each with an imprinted sequence of alphanumeric characters. The characters “A”, “F”, “1”, “2“ and “4” are subject to inspection and are labeled as “OK", “NOK-Scratch” , “NOK-Bubble” or “NOK-DeShape”. A sample metal plate is shown below.
You have 2 options:
We will be building a pipeline that is composed of a series connected character detector and a character classifier. The character detector will be responsible for detecting the characters , if there is any, and outputting a bounding box. The classifier will be fed with character detection results (the cropped images of the characters detected) and will decide on the type of the character (OK, NOK-Scratch , NOK-Bubble or NOK-DeShape).
1. Prepare your data for character detector training: In order to train a character detection model, you need to have training images in which all characters, of all types, are annotated with a common label, such as “character”. Merge your labels into a single class called “Character”. Visit ReliVision Knowledge Hub User Guide to see how to do this (Edit ROI States).
2. Follow the ReliVision Knowledge Hub User Guide (ReliTrainer: Models) to train your AI model for metal nut defect detection. The main steps, detailed in the User Guide, include
Sample training and validation loss and accuracy curves as a function of epochs are as follows:
1. Prepare your data for character classifier training: In order to train a character classifier model, you need to have training images of individual (cropped) characters with labels . The dataset provided has rectangle annotations with 4 labels corresponding to different label types. The best option is to
Extract the rectangle annotations using the ReliVision data curation functions. See ReliVision Knowledge Hub User Guide to see how to do this.
2. Follow the ReliVision Knowledge Hub User Guide (ReliTrainer: Models) to train your AI model for whole image classification (OK, NOK-Scratch , NOK-Bubble or NOK-DeShape). The main steps, detailed in the User Guide, include
Sample training and validation loss and accuracy curves as a function of epochs are as follows:
Building and Running the Pipeline:
Use the pipeline editor to build your pipeline by dragging and dropping the AI/Basic blocks. For this specific case, we do not need any Basic Block (Digital signal/image processing - DSP/DIP - functions). You will need to select an input data source (your raw image set), a detection AI Block (the defect detector you trained) and a defect classifier (the classifier you trained) connected in series as depicted below. Follow the ReliVision Knowledge Hub User Guide (ReliTrainer: Models / AI Pipeline).
Simply run your pipeline using the execute button at the top. Visit the ReliVision Knowledge Hub User Guide (ReliTrainer: Models / AI Pipeline) for more details. You can review your results using the ReliTrainer data annotation interface. Your pipeline’s outputs will be saved as a separate set of annotations for each image it is run on. Visit the ReliVision Knowledge Hub User Guide (ReliTrainer: Data) for more details. Here is an output example:
Follow the ReliVision Knowledge Hub User Guide (ReliTrainer: Models) to test your AI model for X-Ray object detection. Testing involves running the trained model on a given dataset using the “Prediction” tab. Each image in your test dataset will be augmented/annotated with your AI model’s output mask. Sample output masks are as follows: