Skip to content

Remove Albumentations and replace with the Kornia#1096

Open
robmarkcole wants to merge 4 commits into
roboflow:developfrom
robmarkcole:issue-1073-replace-albumentations
Open

Remove Albumentations and replace with the Kornia#1096
robmarkcole wants to merge 4 commits into
roboflow:developfrom
robmarkcole:issue-1073-replace-albumentations

Conversation

@robmarkcole

Copy link
Copy Markdown

What does this PR do?

Address #1073

Implemented the Kornia-only training transform path. Codex generated this PR, i've scanned it but as I am unfamiliar with rf-detr this doesn't constitute understanding. The intention is to get feedback on this direction.

Key changes:

  • Removed albumentations from train deps and added kornia there in pyproject.toml (line 53).
  • Added dataset-time KorniaWrapper support for resize, multi-scale resize/crop, square resize, flips, masks, boxes, filtering, and supported Kornia augmentations in kornia_transforms.py (line 279).
  • Switched COCO transform builders to KorniaWrapper; YOLO continues through the same shared COCO builders in coco.py (line 443).
  • Reduced transforms.py (line 23) to Normalize, keeping export users intact.
  • Updated training/docs/agent guidance away from Albumentations.
  • Added dataset-transform coverage for resize, masks, boxes, invalid-box filtering, unsupported keys, and COCO val/square paths in test_kornia_transforms.py (line 710).

Type of Change

  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Testing

  • I have tested this change locally
  • I have added/updated tests for this change

Test details:

pytest tests/training/test_module_data.py::TestBackendResolution tests/training/test_module_data.py::TestOnAfterBatchTransfer tests/training/test_module_data.py::TestKorniaSetupDoneSentinel -q → 18 passed

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code where necessary, particularly in hard-to-understand areas
  • [] My changes generate no new warnings or errors
  • I have updated the documentation accordingly (if applicable)

Additional Context

@robmarkcole robmarkcole changed the title Implemented the Kornia-only training transform path. Remove Albumentations and replace with the Kornia Jun 9, 2026
@socket-security

socket-security Bot commented Jun 9, 2026

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addedpypi/​numpy@​2.4.67510010010070

View full report

@socket-security

socket-security Bot commented Jun 9, 2026

Copy link
Copy Markdown

Warning

Review the following alerts detected in dependencies.

According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.

Action Severity Alert  (click "▶" to expand/collapse)
Warn High
Obfuscated code: pypi numpy is 90.0% likely obfuscated

Confidence: 0.90

Location: Package overview

From: pyproject.tomlpypi/numpy@2.4.6

ℹ Read more on: This package | This alert | What is obfuscated code?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Packages should not obfuscate their code. Consider not using packages with obfuscated code.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore pypi/numpy@2.4.6. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

View full report

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant