We tackle the issue of measuring and ana- lyzing the visitors’ dynamics in crowded museums. We propose an IoT-based system – supported by artificial intelligence models – to reconstruct the visitors’ tra- jectories throughout the museum spaces. Thanks to this tool, we are able to gather wide ensembles of vis- itors’ trajectories, allowing useful insights for the facil- ity management and the preservation of the art pieces. Our contribution comes with one successful use case: the Galleria Borghese in Rome, Italy.