[FR] Snapshot/thumbnail crop padding
See original GitHub issueHello, I went through your PR for beta4 and saw you implemented the snapshots and thumbnails separately, which is awesome. Thank you for that.
If I may have one more request, it would be great when crop: True
on snapshots and thumbnails if we could add a padding in px to the crop region to make it a bit less cropped (to have higher field of view).
It has happened to me, that when the object is really close (high area), it crops too much and then the label above bounding box (with object type, score and area) is not visible on the snapshot (or in general I would like to see more of the image around the object). Not sure how much work this would be, but it is definitely a low priority request… just something nice to have.
Thank you again for your amazing work.
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (3 by maintainers)
Top GitHub Comments
My request is loosely related to this report: if @blakeblackshear prefer I can open another one. I’m using the thumbnails for notification on Android smartphones: the option to get the 2:1 aspect ratio is very useful but the black background of the square thumbnail is quite ugly. Would it be possible to get a 2:1 version cropping for the subject sides?
So that means the bigger (closer) the object is, the bigger the padding should be? Now if the object is far the crop has bigger padding (but I think this is due to the resolution of the snapshot as it doesn’t upscale, when the object is smaller in resolution than snapshot size it appears smaller)
But I get a lot of snapshots like this:
It would be nice if additional crop padding (or bounding box margin) could be configurable - either fixed px or additional percentage, to see more around the object. This would mean that small objects (that now appear small on the snapshot) would be unaffected (as the additional padding - well in this case it would be a margin around the bounding box would not push the crop further), but big objects which would fill the whole cropped image as shown on the snapshot here and it’s bounding box + additional margin would “push” the crop a bit further away from the actual object. I hope it makes sense.