Face gravity transformation, false positives?
Hi There,
Brand new to cloudinary and just having a play with the face recognition.
In my project I build a URL (using the Vue sdk) to transform an image by cropping to a face if it's found, but to simply fit the image to dimensions if no face is found.
So far the image recognition seems great, but for images with no face, I'm often (1:10) finding that it crops to a non-face.
Any ideas on what I might do differently?
image/upload/if_fc_gt_0/c_thumb,g_face,h_200,w_200/if_else/c_fill,h_200,w_200/if_end/r_10/v1/
image/upload/if_fc_gt_0/c_thumb,h_200,w_200/if_else/c_fill,h_200,w_200/if_end/r_10/v1/
Apologies if this has already been discussed a lot.
Answers
-
Hi there,
This seems expected;
c_fill,h_200,w_200/
- In the "else" block applies a fill crop (c_fill
) to ensure the image fills a 200x200-pixel area. It may result in cropping the image to fit the specified dimensions if the image is larger. If you don't want the image to be cropped, just get rid of the "else" part.Regards,
Tamara
0 -
Hi Tamara,
Thanks for getting back to me!
If there is no face, I do want the image to crop but still to show the maximum it can within the dimensions specified.
See the second example above that still has the 'else' option but with only the 'g_face' option removed from the url and how it has only cropped the image slightly. No scaling has occurred in the second option just copping which is what I want.
Like I say, 9:10 times it works fine, it's just the odd image like the one above where it doesn't seem to work.
Thanks again for your help!
Ben
0 -
Hi Ben jammin :),
To more thoroughly investigate, could you please submit a support ticket at https://support.cloudinary.com and include full URLs and specifically mention the ones that are working as intended and the ones which aren't? It is easier to discuss these things with specific examples and describing what is the intended result. Thanks!
Regards,
Victor
0