Example of using MediaPipe for:
- Multi-modal LLM inference (Gemma 3n)
- Image classification (efficientnet-lite)
- Hand gesture recognition via streaming video
- Image-to-image generation
Everything works on-device.
This uses Gemma 3n, the 4B parameter version. You probably need a phone with 8GB RAM.
To make this work:
- Download Gemma 3n here: gemma-3n-E4B-it-int4.task
- Copy it to your device using ADB:
adb push gemma-3n-E4B-it-int4.task /data/local/tmp/llm/gemma3_4b.task
That location is specified in the init of TerriblePoemViewModel.
Open an issue if you have trouble. If you want to engage me to write something like this for your business, then I'm available as an Android freelancer or through my agency Apptaura.
Hello! I'm Tom Colvin, freelance Android app developer based in London.