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

PadIfNeeded doesn't serialize position parameter #1568

Closed
margilt opened this issue Mar 6, 2024 · 2 comments
Closed

PadIfNeeded doesn't serialize position parameter #1568

margilt opened this issue Mar 6, 2024 · 2 comments
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@margilt
Copy link

margilt commented Mar 6, 2024

🐛 Bug

The PadIfNeeded transform doesn't serialize the position parameter.

To Reproduce

Steps to reproduce the behavior:

import albumentations as A
transform = A.PadIfNeeded(min_height=512, min_width=512, p=1, border_mode=0, value=[124, 116, 104], position="top_left")
transform.to_dict()

Output:

{'__version__': '1.4.1', 'transform': {'__class_fullname__': 'PadIfNeeded', 'always_apply': False, 'p': 1, 'min_height': 512, 'min_width': 512, 'pad_height_divisor': None, 'pad_width_divisor': None, 'border_mode': 0, 'value': [124, 116, 104], 'mask_value': None}}

Expected behavior

The position parameter should be included in the dict.

Environment

  • Albumentations version: 1.4.1
  • Python version: 3.8
  • OS: Linux
  • How you installed albumentations (conda, pip, source): pip
@ternaus ternaus added bug Something isn't working good first issue Good for newcomers labels Mar 7, 2024
@ternaus
Copy link
Collaborator

ternaus commented Mar 7, 2024

Thanks! Will look into it.

@ternaus
Copy link
Collaborator

ternaus commented Mar 9, 2024

Fixed in #1570

@margilt, would you consider becoming a sponsor for the library? Lowest tier is only $2 / month

https://github.com/sponsors/albumentations-team

@ternaus ternaus closed this as completed Mar 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants