Two years ago, we developed an AR application that allows users to try on different glasses in real time based on the shape of the face. Then the main difficulty was to accurately determine the shape of the head in order to give appropriate recommendations for the selection of the shape of the glasses. It was also necessary to implement a clear positioning of glasses on the face when the user moves his head.
Two years have passed. Technologies are actively developing. We decided to transfer the functionality of our application to the web using WebAR.
There are several reasons for this:
1. User-friendliness
The advantage of WebAR over an application is that nothing needs to be downloaded. The module can be integrated into any site and allow users to try on glasses in augmented reality right in the browser, using either a mobile or desktop computer. It is also convenient for the customer, since there is no need to develop an application separately for Android and iOS.
2. Recognition speed
Two years ago, facial recognition on the web was only possible at a low speed, about 5 frames per second, which made it almost impossible to develop solutions for it. For comparison, in applications, this figure was 30-40 frames per second. Currently, the recognition rate for the web is 30 frames per second. This is quite enough for correct operation.
3. Technology
Previously, there were few libraries that allow face recognition. Now there are new options you can choose. We used TensorFlow, namely two neural networks for specific tasks: tracking the position of the face and determining its shape. To do this, we developed our own algorithm that creates and predicts all the key points of the face and the distance between them, which allows the system to determine the shape of the face with an accuracy of 95.8%. It is based on the rules of facial geometry and proportions used by artists.
If you want to develop an AR solution for face recognition, human hands or other objects, then it is better to be done on the web. In addition to the fact that now there are all technological capabilities for this, you also make it easier for users to use your solution: there is no need to download and install applications, you can integrate it into any site as a separate module.