Cookie Consent by PrivacyPolicies.com
Quality Automation with AI and Relimetrics

Knowledge Hub

Explore & Learn ReliVision with Proven Use Cases

Detection and Classification of Characters on Metal Plates

This playbook demonstrates how to detect the alphanumeric characters A, F, 2, and 1 on metal plates and classify each detected character as OK or NOK. A detector first identifies the characters, followed by a classifier that assigns each character to the appropriate category. Both models are combined into a single inspection pipeline.

The dataset

The dataset contains 50 plates. Each character is labelled OK or NOK depending on whether it has a defect; good characters are shown in green boxes and defective ones in red below.

Metal plates with good characters in green boxes and defective characters in red.
Sample plates: good characters in green, defective in red.
Step 1 of 5 · Data curation

Load the annotated dataset

  1. Request access to ReliVision Learning Center and download the annotated dataset (LabelMe format).
  2. In ReliUI, import the image set with Import Data.
  3. Import the annotation file for each image folder with Import Annotated Dataset, choosing the LabelMe annotation format.
  4. Your annotated dataset is now available in the Gallery.
A metal plate with each character annotated with a rectangle.
A sample annotation of a metal plate.
Step 2 of 5 · Training

Train the character detector

The detector finds every character on the plate, whatever its state, and outputs a bounding box.

Prepare the training data

  1. Make a copy of the annotated dataset for detector training.
  2. Merge all character labels into a single class called Character.

Train the model

  1. In ReliTrainer, select Object Detection as the model type.
  2. Select the character detector training dataset you prepared.
  3. Split the data into train and test sets, automatically or manually, to hold back some data for validation.
  4. Set the hyperparameters and start training.

Hyperparameters used in this use case

  • Epochs: 20
  • X-Y resolution: 704 (default)
  • Learning rate: 0.0001 (default)
  • Momentum: 0.937 (default)
  • Weight decay: 0.0005
Training and validation loss and mAP curves for the character detector.
Character detector: training and validation loss and mAP curves.
Step 3 of 5 · Training

Train the character classifier

The classifier looks at one cropped character at a time and labels it OK or NOK.

Prepare the training data

  1. Extract the rectangle annotations with the ReliUI data curation functions, so each character becomes its own image.
  2. Keep the OK and NOK labels on the extracted images — this is your classification dataset.

Train the model

  1. In ReliTrainer, select Classification as the model type.
  2. Select the character classifier training dataset you prepared.
  3. Split the data into train and test sets, automatically or manually, to hold back some data for validation.
  4. Set the hyperparameters and start training.

Hyperparameters used in this use case

  • Epochs: 300 (default)
  • X-Y resolution: 224 (default)
  • Learning rate: 0.0001 (default)
  • Momentum: 0.99 (default)
  • Weight decay: 0.0005 (default)
Training and validation loss and accuracy curves for the character classifier.
Character classifier: training and validation curves.
Step 4 of 5 · Pipeline

Build and run the pipeline

Use the pipeline editor to chain the two models. The character detector finds each character and outputs a bounding box; the character classifier receives each cropped detection and decides whether it is OK or NOK. No basic (image-processing) blocks are needed.

  1. Open the pipeline editor.
  2. Add an input data source and point it at your raw metal plate image set.
  3. Add the character detector AI block and connect it after the input.
  4. Add the character classifier AI block and connect it after the detector.
  5. Add an Output Imageset or End Branch block, depending on the desired output: generate an Imageset file from the executed pipeline or proceed to the audit stage.
  6. Run the pipeline with the execute button at the top.
Pipeline editor with an input source, the character detector and the character classifier connected in series.
Input source → character detector → character classifier.
Step 5 of 5 · Results

Review the results

Review the results in the ReliUI data annotation interface. The pipeline saves its outputs as a separate set of annotations for each image it runs on, so you can compare predictions against your labels image by image.

Pipeline output with characters on a metal plate marked OK or NOK.
Sample output: each character detected and classified.

Related User Guide sections

Try it yourself

Download ReliVision to run this playbook on your own metal plate images, or browse the other use cases.

Download ReliVision
← All use cases