Support Blog

Support Article Filter

Search Support Articles

Ask Multipix a Question Back to Support

How to get the best from Classification and OCR tools in HALCON

A recommended practice for setting up classification tasks and OCR: Regularly review your growing set of training data with the HDevelop OCR Training File Browser – while devel­oping the segmen­tation part, but also at further development steps. It is quick and convenient. Although it does not solve the classification task itself, it helps with almost no extra effort to avoid segmentation mistakes and others. In addition, it also points out possible classification issues.

View all samples of your classes

 

You are setting up a classification or an OCR solution. Not to mention, you have potentially laboriously collected and labeled sample images. If only a few samples are labeled wrongly or segmented badly, your classification result might already be skewed. To prevent this, make use of the HDevelop OCR Training File Browser:

  • Get an overview of your data with a few clicks within the training file browser: Have you got the right samples and enough of them? Have you got a balanced class distribution?
  • Review your data more in-depth and correct it:
    • Instantaneously spot labeling mistakes and drag&drop the wrongly labeled samples to their correct class
    • Spot bad samples and remove them.
    • Spot segmentation mistakes and correspondingly improve your segmentation code
  • Boost your training data with the generation of sample variation data.

By looking at the classification confidences (a field within the Sample Inspection Window), instantaneously spot rough weaknesses of the classifier. Also, exclude (rare) cases like when the training for the classifier has run into a wrong minimum, etc.

When to use the training file browser?
After each and every code change of the segmentation, after a manual segmentation, after any setting and adjustment of the classification parameters, etc.

What does it take?
Simply write each image and segmented region to a training file, open the OCR assistant (Visualisation ⇒ Tools ⇒ OCR Training File Browser) and load the training file and the classifier, as soon as there is one.

write_ocr(regions, image, ClassName, TraininingFileName)  // at the first occurrence

append_ocr_file(regions, image, TrainingFileName) // afterwards

What are the limitations?

  • Not applicable for COLOUR classifications
  • Only suitable for datasets of moderate size (<1.000 samples)

Find out more about HALCON


Rules

All questions are moderated before they are published on this website. Once we receive your question, we will review and decide whether to email you directly or publish the solution to help other users.

Ask Multipix a Question

Your email address will not be published. Required fields are marked *

  • FingerLake Instruments
  • Basler
  • IO Industries
  • Moritex
  • Euresys
  • Imperx