mediapipe
mediapipe copied to clipboard
How to stop (turn off) face tracking in JS based FaceMesh solution?
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?
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.
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.
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.
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.
Closing as stale. Please reopen if you'd like to work on this further.