A C++ Mini-Tutorial on MediaPipe
A C++ Mini-Tutorial on MediaPipe

As we already explained, MediaPipe is a C++ pipeline library. It is very poorly documented, basically, the only documentation is the comments and docstrings in the MP source code. There are also examples, but they are not very readable. There is only one trivial “hello world” example, the rest is deep learning, which is counterproductive for learning basic MP concepts.  Moreover, these examples are artificially obscured by things like GLog and GFlags.

The Bizarre Google World: Bazel, ProtoBuf, and More
The Bizarre Google World: Bazel, ProtoBuf, and More

It was not easy at all to master MediaPipe. We thought little in C++ could surprise us. MP did. They say Google libraries do not work outside of Google. We can confirm this is the truth. The ways Google uses the C++ language are highly unusual from our point of view. Normally (at least where we come from) people use CMake, a nice cross-platform build system, for C++ projects.

Down the Rabbit Hole: Our Journey to the Land of MediaPipe and Other Google Technologies
Down the Rabbit Hole: Our Journey to the Land of MediaPipe and Other Google Technologies

In the ML/DL community you can often hear ”Nowadays you must know Google MediaPipe”, “It’s a cool framework”, and sometimes “It’s internally used by YouTube!” Videos with various computer vision tasks like this hand tracking often appear on LinkedIn and forums with the comment “This is MediaPipe”! At this point, we decided we could not ignore it anymore.