Closed Narendra186 closed 3 years ago
Hi @Narendra186, Could you please provide your code changes to understand the issue much better. Thanks
Uh oh. I know what the issue is. I thought it was already fixed, but I will check and have a new version up in the next few days.
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.
I'm using @tensorflow-models/face-landmarks-detection npm package for detecting face landmarks
I'm facing a problem when I switch between images, even though the new image is sent for prediction, the API is returning the face landmarks which somewhat look like those of previous image. I'm attaching some screenshots, please refer those
I selected the first girl, got her face landmarks and drawn those, and then I've gone to second image by clicking on the arrow mark, basically I resize that image, draw it on a canvas and then send the canvas as an input to the API, I'm pretty sure that the new canvas which contains image of blue dressed girl is going for the prediction(I checked it), but somehow the face landmarks that are returned had characteristics of previous image landmarks.
I've checked the face-landmarks-detection github read me page and didn't find any configuration option related to this. When I checked an article on mediapipe website, there is a configuration option named "STATIC_IMAGE_MODE". I'm pasting the description of it.
STATIC_IMAGE_MODE If set to false, the solution treats the input images as a video stream. It will try to detect faces in the first input images, and upon a successful detection further localizes the face landmarks. In subsequent images, once all max_num_faces faces are detected and the corresponding face landmarks are localized, it simply tracks those landmarks without invoking another detection until it loses track of any of the faces. This reduces latency and is ideal for processing video frames. If set to true, face detection runs on every input image, ideal for processing a batch of static, possibly unrelated, images. Default to false.
This STATIC_IMAGE_MODE is available only for python API but not for javascript API