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

Set up environment - 'functools.partial' object has no attribute 'RandomGamma' #57

Open
AscheJan opened this issue Jun 3, 2024 · 1 comment

Comments

@AscheJan
Copy link

AscheJan commented Jun 3, 2024

In Google Colab when you start the set up environment you get the following error:

#@title Set up environment
#@markdown Please run this cell to get started (~1 minute)
from IPython.display import clear_output, HTML
!pip install -Uqq deepflash2
#!pip install git+https://github.com/matjesg/deepflash2.git@master
import deepflash2
from deepflash2.gui import GUI, _connect_to_drive
clear_output(wait=True)
display(HTML(f'Using deepflash2 version {deepflash2.version}'))
path=_connect_to_drive()


AttributeError Traceback (most recent call last)

in <cell line: 7>()
5 #!pip install git+https://github.com/matjesg/deepflash2.git@master
6 import deepflash2
----> 7 from deepflash2.gui import GUI, _connect_to_drive
8 clear_output(wait=True)
9 display(HTML(f'Using deepflash2 version {deepflash2.version}'))

3 frames

/usr/local/lib/python3.10/dist-packages/deepflash2/data.py in RandomTileDataset()
427 n_inp = 1
428 def init(self, *args, sample_mult=None, flip=True, rotation_range_deg=(0, 360), scale_range=(0, 0),
--> 429 albumentations_tfms=[A.RandomGamma()], min_length=400, **kwargs):
430 super().init(*args, **kwargs)
431 store_attr('sample_mult, flip, rotation_range_deg, scale_range, albumentations_tfms')

AttributeError: 'functools.partial' object has no attribute 'RandomGamma'

How can the error be fixed?
Bildschirmfoto vom 2024-06-03 18-43-21

matjesg added a commit that referenced this issue Jun 12, 2024
@matjesg
Copy link
Owner

matjesg commented Jun 12, 2024

Hi @AscheJan , thanks for raising the issue. The error was due to some version mismatches in the dependencies and should be fixed in the current master.

I currently cannot update the deepflash2 version on pypi, but the notebook is now changed to use the gitub master instead of the pypi version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants