I will suggest also to take a look at:

  

      Trajectory Prediction
  

  
    

SimAug: Learning Robust Representations from Simulation for Trajectory... 1

  This paper studies the problem of predicting future trajectories of people in unseen cameras of novel scenarios and views.


  

  
    
    
  

  


And more in general to some adopted solution, available implementations, and benchmark in trajectory prediction at:

  

      paperswithcode.com
  

  
    

Papers with Code - Trajectory Prediction 1

  **Trajectory Prediction** is the problem of predicting the short-term (1-3 seconds) and long-term (3-5 seconds) spatial coordinates of various road-agents such as cars, buses, pedestrians, rickshaws, and animals, etc. These road-agents have different...


  

  
    
    
  

  


If your cameras are fully calibrated and you have a 2d perimeter representation of the rooms you can project the position in the 2d plane on the floor and you can make a simply point in polygon test 1 to check if a person is inside a specific room perimeter.