OCR-decisions testing system by MIL Team

  1. The reason why building OCR — decisions testing system is not a trivial matter.
  2. The disadvantages of the existing testing systems.
  3. What decision our team proposes.

What’s wrong with existing libraries?

  1. Recognizes only the text boxes parallel to coordinate axes, in other words, doesn’t recognize oblique text.
  2. Uses quadratic pair search which works slowly in case of fair IOU counting and the presence of several hundred objects on the picture, i.e text documents.
  3. Doesn’t account for False Negative results which increases the counting by 2 times.

What do we suggest?

  1. Lib Shapely for honest IOU counting. It has a user-friendly interface and it allows to work with arbitrary convex polygons.
  2. KD-tree method implemented in sklearn for searching the point nearest to the given.
  1. Counting the centres of all predicted boxes and add them to KD-tree.
  2. Finding several neighbours predicted centres for every centre of the right box (5 is more than enough as the practice has shown).
  3. Looking at the closest neighbours for every centre of the right box and point the neighbour with the highest IOU, exceeding the threshold, as the pair of the centre.

Why does this method work?

  1. It helps to find the best pair as it comes as a proper heuristic which is excellent for the case when predicted boxes don’t cross.
  2. The same predicted box can’t go in a pair with the several correct ones when the threshold > 0.5. This directly goes from the IOU definition and meets our expectations. As for the case when the threshold < 0.5, changing matching algorithms would be the better option.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Machine Intelligence Laboratory

Machine Intelligence Laboratory

MIL. Team is the united and professional group of researchers, developers and engineers conducting R&D projects in the field of Artificial Intelligence.