Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mediapipe Hair Color using Slider error #420

Closed
SwatiModi opened this issue Jan 29, 2020 · 7 comments
Closed

Mediapipe Hair Color using Slider error #420

SwatiModi opened this issue Jan 29, 2020 · 7 comments

Comments

@SwatiModi
Copy link

SwatiModi commented Jan 29, 2020

I was trying to do this, as suggested in your latest comment from this issue thread #18 ,by setting flip_vertically: true in the graph , I was able to fix the invert issue.

Also about the Color Slider, It does not work but when I set the r/g/b packets to hardcode a single color when calling addConsumablePacketToInputStream(). How to fix this ?

@PrinceP
Copy link

PrinceP commented Jan 30, 2020

@SwatiModi Fixed and working at https://github.com/PrinceP/mediapipe
Just modified #18 sandipan1 work.

@SwatiModi
Copy link
Author

It works, Thanks.

@LarryBrinzo
Copy link

@PrinceP @SwatiModi @mcclanahoochie Unable to find this repository on GitHub. Can you please help.

@SwatiModi
Copy link
Author

Hi @LarryBrinzo, I feel the orignal repo by @PrinceP has been deleted.
You can find the relevant files here

@LarryBrinzo
Copy link

Thanks a lot @SwatiModi

@khmaies5
Copy link

khmaies5 commented Jul 1, 2021

i added those files to the project and added ColorSliderCalculator.cc to the build folder but i got this error in android studio

ERROR: /home/khmaies/mediapipe/mediapipe/calculators/image/BUILD:212:24: no such target '//mediapipe/gpu:scale_mode_py_pb2_genproto': target 'scale_mode_py_pb2_genproto' not declared in package 'mediapipe/gpu' defined by /home/khmaies/mediapipe/mediapipe/gpu/BUILD and referenced by '//mediapipe/calculators/image:image_transformation_calculator_py_pb2_genproto' ERROR: /home/khmaies/mediapipe/mediapipe/calculators/image/BUILD:212:24: no such target '//mediapipe/gpu:scale_mode_py_pb2': target 'scale_mode_py_pb2' not declared in package 'mediapipe/gpu' defined by /home/khmaies/mediapipe/mediapipe/gpu/BUILD and referenced by '//mediapipe/calculators/image:image_transformation_calculator_py_pb2'

Update: the example now is working, at first i place ColorSliderCalculator.cc in calculators/image, i moved it to graphs/hair_segmentation/calculators and that solved the problem,
now the camera feed/ resolution is not correct how can i fix that?

@ya332
Copy link

ya332 commented Jan 12, 2022

Hi @LarryBrinzo, I feel the orignal repo by @PrinceP has been deleted. You can find the relevant files here

@SwatiModi , Can you share the repo?

I am getting the following error ColorSliderCalculator; Unable to find Calculator "ColorSliderCalculator" Tag "RGB_OUT" index 0 was not expected.

FATAL EXCEPTION: ExternalTextureConverter
01-11 20:52:37.352  8544  9546 E AndroidRuntime: Process: com.google.mediapipe.apps.hairsegmentationgpu, PID: 8544
01-11 20:52:37.352  8544  9546 E AndroidRuntime: com.google.mediapipe.framework.MediaPipeException: unknown: ValidatedGraphConfig Initialization failed.
01-11 20:52:37.352  8544  9546 E AndroidRuntime: No registered object with name: ColorSliderCalculator; Unable to find Calculator "ColorSliderCalculator"
01-11 20:52:37.352  8544  9546 E AndroidRuntime: RecolorCalculator::GetContract failed to validate: 
01-11 20:52:37.352  8544  9546 E AndroidRuntime: For input streams ValidatePacketTypeSet failed:
01-11 20:52:37.352  8544  9546 E AndroidRuntime: Tag "RGB_OUT" index 0 was not expected.
01-11 20:52:37.352  8544  9546 E AndroidRuntime: 	at com.google.mediapipe.framework.Graph.nativeStartRunningGraph(Native Method)
01-11 20:52:37.352  8544  9546 E AndroidRuntime: 	at com.google.mediapipe.framework.Graph.startRunningGraph(Graph.java:324)
01-11 20:52:37.352  8544  9546 E AndroidRuntime: 	at com.google.mediapipe.components.FrameProcessor.startGraph(FrameProcessor.java:553)
01-11 20:52:37.352  8544  9546 E AndroidRuntime: 	at com.google.mediapipe.components.FrameProcessor.maybeAcceptNewFrame(FrameProcessor.java:421)
01-11 20:52:37.352  8544  9546 E AndroidRuntime: 	at com.google.mediapipe.components.FrameProcessor.onNewFrame(FrameProcessor.java:439)
01-11 20:52:37.352  8544  9546 E AndroidRuntime: 	at com.google.mediapipe.components.ExternalTextureConverter$RenderThread.renderNext(ExternalTextureConverter.java:403)
01-11 20:52:37.352  8544  9546 E AndroidRuntime: 	at com.google.mediapipe.components.ExternalTextureConverter$RenderThread.lambda$onFrameAvailable$0$ExternalTextureConverter$RenderThread(ExternalTextureConverter.java:338)
01-11 20:52:37.352  8544  9546 E AndroidRuntime: 	at com.google.mediapipe.components.ExternalTextureConverter$RenderThread$$Lambda$0.run(Unknown Source:4)
01-11 20:52:37.352  8544  9546 E AndroidRuntime: 	at android.os.Handler.handleCallback(Handler.java:938)
01-11 20:52:37.352  8544  9546 E AndroidRuntime: 	at android.os.Handler.dispatchMessage(Handler.java:99)
01-11 20:52:37.352  8544  9546 E AndroidRuntime: 	at android.os.Looper.loop(Looper.java:246)
01-11 20:52:37.352  8544  9546 E AndroidRuntime: 	at com.google.mediapipe.glutil.GlThread.run(GlThread.java:141)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants