Replace Albumentations with Kornia#1230
Merged
Merged
Conversation
790c1bb to
d31aaa3
Compare
d31aaa3 to
b111fe3
Compare
b111fe3 to
108f9f8
Compare
108f9f8 to
a88ad05
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1230 +/- ##
==========================================
+ Coverage 87.57% 87.66% +0.08%
==========================================
Files 20 20
Lines 2608 2699 +91
==========================================
+ Hits 2284 2366 +82
- Misses 324 333 +9
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Collaborator
Author
|
re. codecov:
|
bw4sz
approved these changes
Dec 13, 2025
Collaborator
bw4sz
left a comment
There was a problem hiding this comment.
Great. I'm not concerned too much about the code coverage. I am merging and I going to be explore the zoom default settings with the CropModel BOEM classifier issues we discussed on thursday. I will add a PR if I think different defaults are useful.
bw4sz
pushed a commit
that referenced
this pull request
Jan 16, 2026
Integrate Kornia to replace Albumentations. Add zoom augmentations and a custom box checker. --------- Co-authored-by: henrykironde <henrykironde@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Supersedes #1169
Seems like a lot of changes, but a good chunk is new docs + re-implementations of some augmentations that
korniadoesn't support out of the box.Fully replaces
albumentationswithkornia. On the user end, very little changes except to removingRandomSizedBBoxSafeCrop, but we have a mostly equivalent crop operation and we can handle empty training inputs.One gotcha is
korniadoesn't do any output filtering after transforming. It composes its pipeline into a transformation that's applied to all geometries, but we need to check if those lie within the image or not. There's a new dataset function to do this, though perhaps in the future could be rolled into the recent box validation function instead (we need to return to filter and not just flag).I also put some notes about zoom transforms, as
DownScaleis poorly named in Albumentations, with some guidelines for reproducing the effect through a doubleRescaleif it's important.Example transformations included in the commit.