keras icon indicating copy to clipboard operation
keras copied to clipboard

Add `ops.image.crop_images`

Open awsaf49 opened this issue 1 year ago • 1 comments

This PR will add crop_images image ops as discussed here (https://github.com/keras-team/keras/issues/18489). This will perform similar task as tf.image.crop_to_bounding_box but with some extra functionalities.

To-Do:

  • [ ] Add args like top_cropping, left_cropping, etc (similar to top_paddings in ops.image.pad_images)
  • [ ] Add tests

awsaf49 avatar Feb 07 '24 18:02 awsaf49

Codecov Report

Attention: 27 lines in your changes are missing coverage. Please review.

Comparison is base (c8700f4) 80.14% compared to head (7336ba7) 75.42%. Report is 38 commits behind head on master.

Files Patch % Lines
keras/ops/image.py 60.86% 15 Missing and 12 partials :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #19157      +/-   ##
==========================================
- Coverage   80.14%   75.42%   -4.73%     
==========================================
  Files         341      362      +21     
  Lines       36163    39112    +2949     
  Branches     7116     7580     +464     
==========================================
+ Hits        28982    29499     +517     
- Misses       5578     7973    +2395     
- Partials     1603     1640      +37     
Flag Coverage Δ
keras 75.27% <60.86%> (-4.72%) :arrow_down:
keras-jax 59.47% <60.86%> (-3.59%) :arrow_down:
keras-numpy 53.91% <60.86%> (-3.18%) :arrow_down:
keras-tensorflow 60.78% <60.86%> (-3.87%) :arrow_down:
keras-torch 60.09% <60.86%> (-3.78%) :arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov-commenter avatar Feb 07 '24 18:02 codecov-commenter

@fchollet I've aligned the crop_images to pad_images with similar arguments. Kindly let me know your feedback.

awsaf49 avatar Feb 17 '24 18:02 awsaf49