China’s ride-hailing giant Didi has adopted artificial intelligence (AI) and facial recognition technology to detect if its drivers are wearing masks, aiming to ensure the safety of both drivers and passengers amid the coronavirus epidemic, the company announced on Wednesday.

Based on facial recognition algorithms, the new mask detection software can identify drivers who are not wearing face masks, also signaling chauffeurs that are not wearing masks properly. The model was trained on a dataset of 200,000 samples, said Didi.

Didi has started to apply this detection technology via cameras installed inside the vehicles, with an accuracy of 98%, said Didi, adding that drivers who fail to wear masks will be warned and even suspended from their shifts. The firm did not specify in which cities the new technology has been used.

The firm is also asking its drivers in 43 cities to upload a picture of themselves wearing a mask every day before the beginning of their shift. Drivers will be able to start their shifts only after their images pass the mask detection check, which has a 99.5% accuracy, according to Didi. 

Didi has also opened the source code of its facial recognition technology to developers for free, said the firm, adding that it could have potential uses in other sectors.

To diminish the spread of the coronavirus disease, Didi has required its drivers to wear masks all the time during trips, get their temperatures measured regularly, disinfect vehicles on a regular basis, and open the vehicles’ windows after every shift.

Didi has also started to install protective sheets between front and back seats in its ride-hailing vehicles in different cities including Wuhan, Luoyang, and Dalian. It plans to invest approximately RMB 100 million (USD 14.3 million) for this safety measure in collaboration with millions of drivers, said the company.

The virus, officially named Covid-19 by the World Health Organization, has killed 2,122 people and sickened 74,677 in China as of Thursday. Outside Hubei province, the epicenter of the disease, the number of new confirmed cases has dropped for 16 consecutive days.