The article deals with the automatic selection of the binarization method using advanced methods of artificial intelligence. The input images to the algorithms are images of serial numbers from industrial environments, for example on iron and steel billets, slabs, etc. The surface of these products is in most cases severely damaged by industrial processes, such as traces of cut, rust, noise, surface roughness, etc. Text recognition is a very common topic nowadays. All investigated solutions are based on the fact that each image is binarized by a single defined method and the accuracy of recognition is given only by the quality of learning of the neural network. Especially in an industrial environment, it is difficult to create a universal method for unambiguous methods for text recognition. The innovation described in this article is the automatic selection of the binarization method (from the Bradley, Niblack, Sauvola methods etc.), which increases the accuracy already in the phase before the text recognition itself, which with the subsequent correct combination of filters leads to an overall increase in accuracy.