The task of recognizing the bank cards on images is considered in this paper. This task is motivated by premoderation of images in social networks in order to avoid leakage of personal data. An example of such data is the number of bank card. Detection algorithm based on convolutional neural networks is applied for this task. A number of experiments were conducted to develop the most optimal neural network architecture, which took into account the speed and accuracy of recognition. In the course of the experiments, the recognition accuracy of 91% and the processing speed of 25 images per second were achieved.