Generate thumbnails using smart crop sometimes fail miserably when using eg animals #1146
Replies: 1 comment
-
Both smart crop and advanced smart crop are not content-aware. They both work on the pixel level using different techniques. This means that they don't see any difference between a car, a tree, a fox, or a wall. The only thing that matters is if the pixels meet the requirements. For example, here's the features map of the fox photo: As you can see, the asphalt under the fox's paws is noisy, so it catches the detector's attention. Such algorithms are doing a good job when you're dealing with images containing objects on a quite solid background or photos with good bokeh. But when the entropy of a whole image is uniform, such algorithms will most probably fail. If you want a content-aware crop, you should probably take a look at the object detection feature. Though the default model that is delivered with imgproxy Pro is trained only on faces, you can use any pre-trained DarkNet YOLOv4 model with imgproxy or you can train your own. Drop us an email if you need any help with object detection. |
Beta Was this translation helpful? Give feedback.
-
We have this media library and I want to create good looking thumbnails for most of the images that are uploaded. I have activated advanced smart crop in my container and this is the parameters I'm using
/w:240/h:135/dpr:2/rt:fill/q:35/gravity:sm/
The result with this source looks like this.
This view is from our library and it does not do a good job. The first image has a car in the picture but that is not visible at all. Is it possible to fix this using some other parameters or do you have any other suggestions?
Beta Was this translation helpful? Give feedback.
All reactions