For example, at ENFINT we develop an automated service for retailers to control queues in stores in order to increase customer loyalty and reduce lost customers. The model is designed using a queue detection algorithm. The speed of response to the appearance of queues can be increased in three times. The algorithm for determining the queue has a number of advantages over the standard use of mounting cameras above the cash desks: ability to work in rooms with low ceilings, determination of groups of buyers (families) to avoid false positives, etc.