1 | initial version |
I would suggest looking deeper into person detection using detection models. For example, the openCV interface supplies a Viola & Jones face detector, which has also a model for upperbody and full body detection. What I would suggest that you do is define a region where students are located, trying to exclude the teacher. Then apply the detection framework for the fullbody first, maybe the upperbody.
I am quite sure that people who are sitting down will not triger the model, but standing people will actually trigger it.
Give it a try, there are many topics out here on the subject of detection.