Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix available keys #1807

Closed
4 tasks done
ternaus opened this issue Jun 19, 2024 · 0 comments
Closed
4 tasks done

Fix available keys #1807

ternaus opened this issue Jun 19, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@ternaus
Copy link
Collaborator

ternaus commented Jun 19, 2024

We need some checks to be sure that propper targets are sent to the Compose.

Possible scenarious

  • strict=True
    ImageOnly

will not trigger on

  • image
  • mask
  • masks
  • bboxes if bboxParams is specified
  • keypoints if KeypointParams is specified
  • parameters specified in transforms in def targets_as_params(self)

Dual
will not trigger on

  • image

  • mask

  • masks

  • bboxes if bboxParams is specified and all transforms support bboxes

  • keypoints if KeypointParams is specified and all transforms support keypoints

  • parameters specified in transforms in def targets_as_params(self)

  • strict=False, the same as True, but will allow any other keys, and they will not be affected by transforms

  • If bboxParams are specified and there are Dual that support bboxes and or ImageOnly, but we do not pass bboxes => we do not return bbox key

  • If keypointParams are specified and there are Dual that support keypoints and or ImageOnely, but we do not pass keypoints => we do not return bbox key

@ternaus ternaus added the bug Something isn't working label Jun 19, 2024
ayasyrev added a commit to ayasyrev/albumentations that referenced this issue Jun 22, 2024
ternaus added a commit that referenced this issue Jun 25, 2024
* add strict argument to Compose

* Fix available keys
Fixes #1807

---------

Co-authored-by: Vladimir Iglovikov <ternaus@users.noreply.github.com>
ternaus added a commit that referenced this issue Jun 25, 2024
* Megred

* adding image works

* Cand paste in random places

* Added an option to preprocess data

* Fix

* added_apply_to_mask

* Added apply_to_bboxes

* Tests pass

* Tests pass

* Added end2end test

* tests pass for Overlay Elements

* Update grid dropout (#1812)

* update_grid_dropout

* update_grid_dropout

* Cleanup

* Fix in tests

* Fix in tests

* Fix

* Fix

* Update random sun flare (#1813)

* Updated interfrace for RandomSunFlare

* Updated interfrace for RandomSunFlare

* Updated interfrace for RandomSunFlare

* Always_apply fix (#1815)

* declare `p` before `always_apply`

* fix ToRgb always_apply

* strict argument - fix for available keys #1807 (#1814)

* add strict argument to Compose

* Fix available keys
Fixes #1807

---------

Co-authored-by: Vladimir Iglovikov <ternaus@users.noreply.github.com>

* constants for keys to check (#1816)

* Fix compose check data post transform (#1817)

* constants for keys to check

* fix sequential check each transform

* fix test_core

* fix someof check data posttransform

* fix check data post transform when nested compose

---------

Co-authored-by: Vladimir Iglovikov <ternaus@users.noreply.github.com>

* temp commit

* Moved OverlayElements to mixing

* Updated dev requirements

* updated name for overlay images

* Temp commit

* Updated tests

* Updated tests to work with bboxes in Albumentations format

* Updated tests to work with bboxes in Albumentations format

* Fix in tests

* Added OverlayElements to Readme

* Downgraded pre-commit to work with python 3.8

---------

Co-authored-by: Andrei Yasyrev <46181683+ayasyrev@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant