- Apply mediapipe on local video (mp4 etc.)
- Customize combine_with_previous_ratio value.
- Record Mediapipe rendered video.
- Save log in a file (Mediapipe runtime , Cpu & GPU details).
Download git repository
git clone https://github.com/afsaredrisy/SegmentationMediapipe.git
Download OpenCV prebuild binary files and generate arr file
Download the opencv .so file from this-link unzip the and copy the corrensponding .so file in app/src/main/jniLibs
Your project should look like this.
Create mediapipe arr file follow-this.
Build & Run
Now you can build the project in Android studio with gradle & can RUN.
How to change model
Prebuild binarypb is for following configration
input: [224,224]
output: [224,224]
Number of Channels: 3
You need to change input/output & chanel size in segmentation graph according to your tflite model,
To change model copy your tflite file in assets folder with name hair_segmentation.tflite
Note: The model added to this repository is just for demo and not the accurate one, must use your own tflite file.