The Python script mediapipe_osc_server.py
runs the MediaPipe Holistic model and send its results through OSC. You will need to install the Python MediaPipe API following the official guide (I've tested it using Python 3.9.1) and the python-osc package.
Some comments about the mediapipe_osc_server.py
script:
- It sends the OSC messages to the localhost through the port 8000, you can change it in line 21
- It flips the input image before sending it to the model, which is nice when visualizing a selfie camera but makes the model get right and left mixed up. If you want to avoid it, just comment line 35.
- If you have several video capture devices you can choose which one you want to use in line 23
exampleOF_MediaPipeOSC
is a simple openframeworks example about how to read the OSC messages with the MediaPipe results to develop interactive applications. It needs the ofxOSC addon, which is included with the official installation.