mediapipe icon indicating copy to clipboard operation
mediapipe copied to clipboard

How to stop (turn off) face tracking in JS based FaceMesh solution?

Open Shubhambindal2017 opened this issue 3 years ago • 2 comments

System information (Please provide as much relevant information as possible)

  • MediaPipe version: Mediapipe FaceMesh 0.4.1633559619
  • Solution (e.g. FaceMesh, Pose, Holistic): FaceMesh
  • Programming Language and version ( e.g. C++, Python, Java): Javascript

Is there any way with which I can stop (turn off) face tracking in the javascript-based faceMesh solution, such that for every image input it gets - it first do the face detection and doesn't rely on the predictions of the previous image (face tracking)? I know in the Python-based solution, this can be done by setting static_img_mode to True, but I am not able to find any such parameter for the JS-based solution. One option is to create a new facemesh object for every image using Facemesh({locateFile:......}), but it seems it is too expensive. Is there any other way, I can achieve this?

Shubhambindal2017 avatar Jun 17 '22 09:06 Shubhambindal2017

Hi @Shubhambindal2017 , Present you can figure out mentioned here . you can comment out everything related to face_landmarks from:

/graphs/holistic_tracking/holistic_tracking_[X].pbtxt /graphs/holistic_tracking/holistic_tracking_to_render_data.pbtxt /modules/holistic_landmark/holistic_landmark_[X].pbtxt where [X] is cpu or gpu.

Probably a bit crude, but it works.

sureshdagooglecom avatar Jun 20 '22 07:06 sureshdagooglecom

Thanks, @sureshdagooglecom for your reply, but I am looking to off face tracking for the Javascript-based FaceMesh solution, and I am not sure whether above mentioned commenting out step can be done for it.

Shubhambindal2017 avatar Jun 20 '22 07:06 Shubhambindal2017

Hi @Shubhambindal2017 For the moment, we don't support the static_image_mode parameter and the tracking cannot be switched off for Javascript based solutions. To get more details on the Javascript API, please refer to this comment.

ayushgdev avatar Dec 14 '22 14:12 ayushgdev

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you.

google-ml-butler[bot] avatar Dec 21 '22 14:12 google-ml-butler[bot]

Closing as stale. Please reopen if you'd like to work on this further.

google-ml-butler[bot] avatar Dec 28 '22 15:12 google-ml-butler[bot]

Are you satisfied with the resolution of your issue? Yes No

google-ml-butler[bot] avatar Dec 28 '22 15:12 google-ml-butler[bot]