This is the repository for our paper Monitoring social distancing with single image depth estimation. Using monodepth neural networks, particular CNNs that learn to perform single image depth estimation, we are able to monitor social distancing in real time using a single camera setup.
As is monodepth estimation doesn't give any metric information of the estimated depth. To do so a scaling operation is needed. In our case a smartphone app powered by Google ARCore framework is used to obtain a sparse pointcloud of known dephts.
To register the 3D points acquired from the phone to the camera 3D reference system, a trasformation is computed using known points on the scene or a known pattern (a chessboard in this case).
This is an example of the output: On the image are drawn the distances between each person in the scene and the respective segmentation mask. The overlay is color coded by the higher risk zone for that person:
red
if the there is a distance < 1 meteryellow
if there is a distance between 1 and 2 metersgreen
if there is a distance > 2 meter
The dataset on which the tests were performed will be made available soon.
A. Mingozzi, A. Conti, F. Aleotti, M. Poggi, S. Mattoccia, “Monitoring social distancing with single image depth estimation”, accepted on IEEE Transactions on Emerging Topics in Computational Intelligence (TETCI), 2022
Arxiv version https://arxiv.org/abs/2204.01693