-
Notifications
You must be signed in to change notification settings - Fork 535
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support Thumbor smart cropping and available detectors #342
Comments
@Furytron thank you for your feedback. We will look into it and add it to our backlog. Meanwhile you can take a look at https://docs.aws.amazon.com/solutions/latest/serverless-image-handler/smart-cropping.html and https://docs.aws.amazon.com/solutions/latest/serverless-image-handler/content-moderation.html to see how you can apply smart cropping, please also refer to Step 2. Create and use image requests to see how to send the request. |
@fisenkodv Great, thanks for the docs. Unfortunately, our implementation of the Serverless Image Handler was initially designed with Thumbor style URLs, back in version 3.x. So we still have the requirement of using those URL style requests. We have not implemented the SharpJS method, which you have linked to. But good to know. Thanks! |
This issue has not received a response in a while. If you want to keep this issue open, please leave a comment below and auto-close will be canceled. |
keep open |
This issue has not received a response in a while. If you want to keep this issue open, please leave a comment below and auto-close will be canceled. |
Can you guys turn the auto-close off? It gives the impression no one cares about these issues |
This issue has not received a response in a while. If you want to keep this issue open, please leave a comment below and auto-close will be canceled. |
Any updates on this? Would be great to see this feature in one of the future versions of the Serverless Image Handler. |
Any update on this request? |
Hi @Furytron, @marco910, @tjegan While we support Thumbor style requests, those requests are converted (in the mapping code linked), to base64 encoded requests that primarily use Sharp to perform image manipulation. I can look at expanding Thumbor-style support to include the ability to use the Amazon Rekognition smart cropping currently available for base64 encoded requests. Let me know if that would be acceptable for your use cases. Thanks for your feedback, |
Hi @simonkrol We would really appreciate it if we could use smart cropping via Thumbor-styles. Because of the way our application works we're not able to use base64 encoded requests. Maybe it would work to add Feel free to let me know if you need more information on that :) |
Thanks @simonkrol . I would echo what @marco910 has said above and the examples given. A key part would be the ability to chain those smart croppings too, like #343. So taking @marco910 examples above, I would imagine the URLs to look like the below, note that I removed the starting "smart" part of the path, it seems redundant to me.
I'd also like to note that we should not require "fit-in" to be in the path for this functionality, similarly to #344. |
Additionally, if #521 is merged, you could end up with URLs combinations like the below, where there is chaining and no chaining, along with having one or multiple keywords:
|
We're working through an implementation for this now. To maintain consistency with the other filters available for Thumbor-style requests, our current plan is to implement a single filter called smart_crop, which would accept two comma delimited numbers as the value, representing the faceIndex and padding respectively. For the requests you created above, this would look something like:
A request could be made with just a padding specified (which would default to faceIndex 0) like:
Let me know if that would work for your use cases, |
Thanks @simonkrol. Using the "filters" keyword approach looks fine with me, and compliments the existing chaining solution. So would faceIndex be 0, or 1 from the examples above? As in, Will there only be a single detector available on release or multiple detectors? |
Hi @Furytron, So on release only the detection of faces would be available. We currently have no plans to expand smart_cropping beyond faces, though that can certainly change. Simon |
Hi @simonkrol, good to hear that you're planing to implement the feature into the supported Thumbor filters!
When I'm right there are not more options than the I'm excited to use this in production soon :) |
Thumbor is supported as far as I know through your mapping code: https://github.com/aws-solutions/serverless-image-handler/blob/develop/source/image-handler/thumbor-mapper.ts, however there is no case for "smart".
So would it be possible to implement the Thumbor style smart cropping using the URL path
/smart/
?Smart cropping documentation: https://thumbor.readthedocs.io/en/latest/usage.html#smart-cropping
It would also be great to allow the enabling of the smart cropping detectors through the URL as well.
Possibly using something like the below:
Thumbor detectors: https://thumbor.readthedocs.io/en/latest/detectors.html
The text was updated successfully, but these errors were encountered: