Improving the accuracy

The code provided on Github (https://github.com/DoubangoTelecom/ultimateMICR-SDK) comes with default configuration to make everyone almost happy. You may want to increase the speed or accuracy to match your use case.

Detector

This section explains how to increase the accuracy for the detection layer.

Segmenter accuracy

As explained in the configuration section the segmenter accuracy accepts 5 values (JSON strings): veryhigh, high, medim, low, and verylow. The default value is high. If the SDK fails to detect some MICR lines then, consider using veryhigh accuracy. With veryhigh value the detection accuracy will increase but this comes with a cost: high CPU usage and slow detection. We recommend increasing the image resolution and making sure that the MICR lines are as straight as possible instead of changing the accuracy level.

Configuration entry: segmenter_accuracy

Backpropagation

Enable backpropagation to increase the recall score.

Configuration entry: backpropagation_enabled

Region of interest

Unlike other applications you can find on the market we don’t define a region of interest (ROI), the entire frame is processed to look for MICR lines. Setting a ROI could decrease the false-positives and improve the precision score without decreasing the recall value. The deep learning model used for the detection is very accurate (high precision and high recall) and should not output false-positives if you’re using the default recommended values.

Configuration entry: roi

Recognizer

This section explains how to increase the accuracy for the recognizer layer.

Interpolation

As explained in the configuration section, the interpolation operation accepts 3 values (JSON strings): bicubic, bilinear, and nearest. The default value is bilinear. The interpolation operations are used when pixels are scaled, deskewed or deslanted. bicubic offers the best quality but is slow as there is no SIMD or GPU acceleration yet. bilinear and nearest interpolations are multithreaded and SIMD accelerated.

For most scenarios bilinear interpolation is good enough to provide high accuracy/precision results while the code still runs very fast. Change the interpolation value to bicubic if you’re having low recognition score.

Configuration entry: interpolation

Recognition score threshold

The configuration section explains how to set the minimum recognition score.

  • If you have too many false-positives, then increase the detection score in order to increase the precision.

  • If you have too many false-negatives, then decrease the detection score in order to increase the recall.

Configuration entry: min_score

Restrictive score type

The configuration section explains the different supported score types: “min”, “mean”, “median”, “max” and “minmax”.

  • The “min” score type is the more restrictive one as it ensures that every character on the MICR line have at least the minimum target score.

  • The “max” score type is the less restrictive one as it only ensures that a least one of the characters on the MICR line have the minimum target score.

  • The “median” score type is a good trade-off between the “min” and “max” types.

We recommend using “min” score type.

Configuration entry: score_type