A naive Algorithm that uses People Detection and Convex Hull as subroutines to solve this problem: "Given an image of people standing randomly, how many people can be a part of some queue {Q}. A queue {Q} is basically a line(y = mx + c) that minimises a custom loss function. "
Repository from Github https://github.comjalotra/Queue-Detection