Skip to content

I upgraded albumentations and transparent-background broke #102

@SapitoSucio

Description

@SapitoSucio
Traceback (most recent call last):
  File "D:\Descargas\testrembg.py", line 217, in <module>
    main()
  File "D:\Descargas\testrembg.py", line 210, in main
    t2 = test_transparent_background(INPUT_PATH, os.path.join(OUTPUT_DIR, "resultado_tb_stroke.jpg"))
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\Descargas\testrembg.py", line 170, in test_transparent_background
    from transparent_background import Remover
  File "C:\Python312\Lib\site-packages\transparent_background\__init__.py", line 1, in <module>
    from transparent_background.Remover import Remover, console
  File "C:\Python312\Lib\site-packages\transparent_background\Remover.py", line 15, in <module>
    import albumentations as A
  File "C:\Python312\Lib\site-packages\albumentations\__init__.py", line 18, in <module>
    from .augmentations import *
  File "C:\Python312\Lib\site-packages\albumentations\augmentations\__init__.py", line 1, in <module>
    from .blur.transforms import *
  File "C:\Python312\Lib\site-packages\albumentations\augmentations\blur\transforms.py", line 34, in <module>
    from albumentations.core.transforms_interface import (
  File "C:\Python312\Lib\site-packages\albumentations\core\transforms_interface.py", line 545, in <module>
    class DualTransform(BasicTransform):
  File "C:\Python312\Lib\site-packages\albumentations\core\transforms_interface.py", line 725, in DualTransform
    @batch_transform("spatial", has_batch_dim=False, has_depth_dim=True)
     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: batch_transform() got an unexpected keyword argument 'has_batch_dim'

I had to

PS D:\Descargas> pip uninstall albumentations -y
Found existing installation: albumentations 2.0.8
PS D:\Descargas> pip install transparent-background

And now it works again.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions