mediapipe icon indicating copy to clipboard operation
mediapipe copied to clipboard

Incorrect behavior with Javascript GestureRecognizer.setOptions() as labeled in the documentation

Open noraatfedora opened this issue 1 year ago • 2 comments

Description of issue (what needs changing)

https://ai.google.dev/edge/api/mediapipe/js/tasks-vision.gesturerecognizer#gesturerecognizersetoptions

Clear description

The Javascript documentation says that "calling setOptions() with a subset of options only affects those options." This is false. Either the documentation needs to be changed or the code needs to be changed, because right now the setOptions method resets the numHands attribute to 1 even when it's not specified.

Correct links

No response

Parameters defined

No response

Returns defined

No response

Raises listed and defined

No response

Usage example

gestureRecognizer.setOptions({runningMode: "video"}) resets numHands to 1, even if numHands was specified as something different in its constructor.

Request visuals, if applicable

No response

Submit a pull request?

No response

noraatfedora avatar Jun 13 '24 17:06 noraatfedora

Hi @noraatfedora,

Thank you for bringing this to our attention. We agree that the documentation needs to be updated. I will work on this and inform you once it is corrected.

kuaashish avatar Jun 27 '24 09:06 kuaashish

Hi @noraatfedora,

Sorry for the delayed response. We are marking this as a documentation bug and sharing it with our team to ensure it stays on our radar. However, we cannot provide a timeline for the correction at this time.

Thank you!!

kuaashish avatar Jul 30 '24 08:07 kuaashish