swatimodi / portrait-segmentation-mediapipe Goto Github PK
View Code? Open in Web Editor NEWRealtime Portrait Segmentation with Tflite and MediaPipe
License: Apache License 2.0
Realtime Portrait Segmentation with Tflite and MediaPipe
License: Apache License 2.0
23: Message type "mediapipe.CalculatorGraphConfig.Node" has no field named "model_path".
@SwatiModi Thanks for such a nice work. I have a question related to the training model . I am working same sort of the problem , so I am using u2net segmentation Model for my solution . But it is really slow when I integrate it with my web-app code to run in the browser. Can you suggest me any way to improve my speed or can you provide your python training and testing script , So I can use it for my problem. Thanks
Hello Swati
I tried running your code but ran into some error
/mediapipe/mediapipe/examples/android/src/java/com/google/mediapipe/apps/portraitsegmentationgpu/BUILD:35:15: Merging manifest for //mediapipe/examples/android/src/java/com/google/mediapipe/apps/portraitsegmentationgpu:portraitsegmentationgpu failed (Exit 1): ResourceProcessorBusyBox failed: error executing command bazel-out/k8-opt-exec-50AE0418/bin/external/bazel_tools/src/tools/android/java/com/google/devtools/build/android/ResourceProcessorBusyBox --tool MERGE_MANIFEST -- --manifest ... (remaining 11 argument(s) skipped)
a person here had the same issue, so i tried the solution given to him about adding converterNumBuffers paramerter into the BUILD and was then able to build the APK.
However, the built APK is still not working ( it is asking for camera permission, but the screen is black the whole time).
Since, I don't have much knowledge about android, could you also help me in debugging this.
Hi Swati, Thank you so much for this awesome post.
Based on this - Link I have been trying to run the build command, but I have been getting some errors. Could you suggest some solution?
INFO: Repository local_execution_config_python instantiated at:
C:/users/gd19/pycharmprojects/mediapipe-custom/WORKSPACE:403:14: in
C:/users/gd19/_bazel_gd19/gyx2hd7f/external/org_tensorflow/tensorflow/workspace2.bzl:868:19: in workspace
C:/users/gd19/_bazel_gd19/gyx2hd7f/external/org_tensorflow/tensorflow/workspace2.bzl:91:27: in _tf_toolchains
C:/users/gd19/_bazel_gd19/gyx2hd7f/external/tf_toolchains/toolchains/remote_config/configs.bzl:6:28: in initialize_rbe_configs
C:/users/gd19/_bazel_gd19/gyx2hd7f/external/tf_toolchains/toolchains/remote_config/rbe_config.bzl:158:27: in _tensorflow_local_config
Repository rule local_python_configure defined at:
C:/users/gd19/_bazel_gd19/gyx2hd7f/external/org_tensorflow/third_party/py/python_configure.bzl:279:41: in
ERROR: An error occurred during the fetch of repository 'local_execution_config_python':
Traceback (most recent call last):
File "C:/users/gd19/_bazel_gd19/gyx2hd7f/external/org_tensorflow/third_party/py/python_configure.bzl", line 213, column 33, in _create_local_python_repository
python_lib = _get_python_lib(repository_ctx, python_bin)
File "C:/users/gd19/_bazel_gd19/gyx2hd7f/external/org_tensorflow/third_party/py/python_configure.bzl", line 130, column 21, in _get_python_lib
result = execute(repository_ctx, [python_bin, "-c", cmd])
File "C:/users/gd19/_bazel_gd19/gyx2hd7f/external/org_tensorflow/third_party/remote_config/common.bzl", line 230, column 13, in execute
fail(
Error in fail: Repository command failed
Python was not found; run without arguments to install from the Microsoft Store, or disable this shortcut from Settings > Manage App Execution Aliases.
ERROR: C:/users/gd19/pycharmprojects/mediapipe-custom/WORKSPACE:403:14: fetching local_python_configure rule //external:local_execution_config_python: Traceback (most recent call last):
File "C:/users/gd19/_bazel_gd19/gyx2hd7f/external/org_tensorflow/third_party/py/python_configure.bzl", line 213, column 33, in _create_local_python_repository
python_lib = _get_python_lib(repository_ctx, python_bin)
File "C:/users/gd19/_bazel_gd19/gyx2hd7f/external/org_tensorflow/third_party/py/python_configure.bzl", line 130, column 21, in _get_python_lib
result = execute(repository_ctx, [python_bin, "-c", cmd])
File "C:/users/gd19/_bazel_gd19/gyx2hd7f/external/org_tensorflow/third_party/remote_config/common.bzl", line 230, column 13, in execute
fail(
Error in fail: Repository command failed
Python was not found; run without arguments to install from the Microsoft Store, or disable this shortcut from Settings > Manage App Execution Aliases.
ERROR: Analysis of target '//mediapipe/examples/desktop/portrait_segmentation:portrait_segmentation_cpu' failed; build aborted: Repository command failed
Python was not found; run without arguments to install from the Microsoft Store, or disable this shortcut from Settings > Manage App Execution Aliases.
INFO: Elapsed time: 4.871s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (36 packages loaded, 11 targets configured)
Thank you so much.
I know this is outside the scope of your tutorial, but I am curious if you have any information that might help me with either creating my own or adding to their model. I have used TF ModelMaker to make a model of objects and after looking at my model and their object_detection_3d_sneakers tflite files in Netron I am assuming that the tf Model Maker file is a very basic format. I am new to ML in general so any guidance would be appreciated.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.