## 6 Results and Discussion  
Table 4 provides a resume of errors, related evaluation criteria, fault identification and classification, causes of the faults, and proposed solutions, hierarchized and listed from the most preferable one (++) to the least preferable one (-) of the two test campaigns. The first test campaign highlighted the following issues:  
* Difficulty of the system in detecting two people entering in a room close together and/or quickly;
* Issues in the detection of two people walking in a corridor towards a sensor, since the person further away from the camera is not detected. The error occurs in all areas not covered by the fields of view of two cameras at the same time;
* Irregular detection of users with a continuous detection/disappearance of a moving user due to the high distance between the camera and the to-be-detected area. This issue was in fact detected mainly in areas far from the sensors. The identified issues are mainly due to the geometry of corridors, which are low ceiling, long, and narrow. Due to the limited height of the corridor, the cameras struggle in detecting people walking in groups or lined up (Figure 10). The issues led to an incorrect user detection affecting the displayed data in the online platform. However, while the possibility of having people walking lined up or in groups in corridors is relatively high, the probability of two or more people entering a room simultaneously is low, due to the standard dimensions of the doors, that allow the entrance of one person at a time. For this reason, it is possible to ignore these issues. To overcome the issue related to irregular detection of users due to the distance of areas from the camera, improvement in the deep learning algorithms for image recognition were implemented. Considering the online platform, a major issue was related to the values indicating the presence of people in the rooms showing a negative value or a high positive value. This means that, according to the collected data, many people were entering or leaving the room in a very short time. Automatic routines to solve and mitigate incorrect data have been implemented to the software:  
* Automatism that brings the count back to 0 when the displayed count is negative;
* Possibility to manually reset rooms that present a wrong count;
* Automatic routine that records the occupancy data after a minimum user presence (i.e., 5 min) for office spaces only. The improvement of the automatic routine solves the related problem of users' behavior that deceive the detection system, such as standing in front of the door when opening the office or talking right in front of the entry of a room. Figure 10: Location and orientation of camera-based sensors in corridor. After the modifications and improvements applied, data have been collected for a period of three months from July to October 2020, excluding August for lower building occupancy due to summer holidays, to verify the effectiveness of the strategies adopted. The qualitative analysis of the second dataset highlighted a general improvement in detection capabilities of the system, since technical issues were not identified anymore, but some faults occurred anyway. Therefore, a second real-time test campaign was carried out in November 2020, resulting in the following sensor-related issues:  
* Difficulty in detecting users at the end of the corridors due to the presence of windows. The intense natural light generates a high luminous contrast between the central part of the corridor and the terminal part. The light contrast of the two zones generates an unstable detection of users. The detecting issue related to lighting contrasts of different zones of the building was only discovered in the second test campaign and not during the previous test. Considering the location of the building (Milan, 45\({}^{\circ}\)28\({}^{\prime}\)46.8\({}^{\prime\prime}\) N 9\({}^{\circ}\)13\({}^{\prime}\)48.0\({}^{\prime\prime}\) E), the sun is low in the sky during the winter season.