Based on the YOLOv8 from Ultralytics, this version tracks each person in the FOV. Even if the person is occluded or left the FOV for few seconds and returns to be clearly visualized and detected, then the model will be able to continue detecting the person and keep the same ID. In addition, the program will also provide you the total number of detected people, which will be located over the bounding box as well as in the background, at the terminal.
In case any doubt: guillosanti@live.com