Object recognition is a branch of artificial vision and one of the pillars of machine vision. It consists in identifying the forms described in advance in a digital image and, in general, in a digital video stream. Although, as a rule, it is possible to perform recognition from video clips, the learning process is usually performed on images. In this paper, an algorithm for classifying and recognizing objects using convolutional neural networks is considered. The purpose of the work is to implement an algorithm for detecting and classifying various graphic objects fed from a webcam. The task is to first classify and recognize an object with high accuracy according to a given data set, and then demonstrate a way to generate images to increase the volume of the training data set by using a self-written generator. The classification and recognition algorithm used is invariant to transfer, shift and rotation. A significant novelty of this work is the creation of a self-written generator that allows using various types of augmentation (artificial increase in the volume of the training sample by modifying the training data) to form new groups of modified images each time. © 2023, The Author(s), under exclusive license to Springer Nature Switzerland AG.