Face Detection on Web(TFLite, Wasm, SIMD) | Introduction

Yongeun Lee
Eyedid SDK Tech Blog
2 min readAug 9, 2021

--

Face Detection on Web Browser with TFLite, Wasm, SIMD and CMake

Run Mediapipe Face Detection on Web Browser

Last year, our team (seeso.io) was focused on implementing eye-tracking software on iOS and Android. However, we were met with continuous requests to support more platforms, including the web and Windows. After lots of research on the plausibility and time it would take to develop an online eye-tracker, it was determined that VisualCamp should provide its online eye-tracking software on the web. As a majority of our software was programmed in C++, porting to the web using Emscripten didn’t seem very difficult.

However, we were met with various problems when we first tried to run the CNN model on the web by compiling the C++ source code using Emscripten. Most of these problems arised from trying to compile third-party libraries used in our software.

When we tackled these challenges, it was almost impossible to find relevant and well-organized material on the subject. As a result, I will write a blog post briefly describing the process and issues we experienced with the aim of helping those trying to solve similar problems.

Unfortunately, I can not fully disclose the details of our proprietary software that runs a complex eye-tracking pipeline including multiple CNN models and additional processes. However, our pipeline does include Google’s Mediapipe Face Detection model which I will use as an example.

This series will consist of all the processes required to run the face detection model on the web. The following topics will be addressed in future blog posts:

  1. Building TFLite and OpenCV using Emscripten
  2. Opening the camera in JS to get the image and passing it to the C++ code
  3. Inferring Mediapipe’s face detection model in C++ code using image passed from JS
  4. Using CMake as a build system

It looks like writing about all the above topics is going to take some time. Also, it doesn’t seem like a topic that the majority of developers would be interested in, but I’ll try my best to write informative blog posts for the small collective few who would be interested.

About us

SeeSo is an AI-based eye-tracking SDK that is free for individual developers. It is the state-of-the-art eye-tracking SDK with the simplest (1 or 5 points) calibration among free, commercial, and open-source libraries/SDKs.

You can experience SeeSo’s technology with its web demo if you are on a laptop or desktop with a webcam. Because of some issues with the PC environment, the mobile versions are much accurate and convenient to use than Web/Windows SDK.

Check out seeso.io!

Written by Elon, engineer of Team SeeSo

--

--