weecology / DeepForest

Python Package for Airborne RGB machine learning
https://deepforest.readthedocs.io/
MIT License
507 stars 172 forks source link

Getting issue while importing main from deepforest #282

Closed PravinM83 closed 2 years ago

PravinM83 commented 2 years ago

Describe the bug Hi, Deepforest is really helping us with our work on the detection of the tree crowns. So thank you for that. Currently, we are facing the below issue of importing main, when I tried using, ! pip install --upgrade deepforest albumentations==0.5.1 pyyaml Before one week it was working properly with the same version. image

To Reproduce Steps to reproduce the behavior: install deepforest 0.5.1 and import main.
! pip install --upgrade deepforest albumentations==0.5.1 pyyaml from deepforest import main

Environment (please complete the following information): I used Google Colab to execute the program.

Screenshots If applicable, add screenshots to help explain your problem.

Additional context Add any other context about the problem here.

ethanwhite commented 2 years ago

Hi @PravinM83 - we recently fixed the issue with newer versions of albumentations (see f6bef55db6ec7a03214902c8314653063c30e842 and 5debdb4f4aa44df0f0d49e7a1f4d407c56ed5511). Can you try an install without the fixed version for albumentations?

alaney87 commented 2 years ago

Evening @ethanwhite, forgive me - I'm very new to this space and highly under-qualified in all aspects. My background is in GIS and Remote Sensing. I've just started diving into Deep Learning Models and would love to give yours a go. However, I run into the exact same problem as PravinM83.

To Reproduce: pip install DeepForest from deepforest import main (errors are identical to OP)

Unfortunately I don't think it fixed the problem, however I may not know what I'm talking about and might need another step briefly explained to me? Also tried installing albumentations directly to get the newest version (pip install -U albumentations) and then tried importing main and the same error. Any guidance would be welcome. Thank you.

ethanwhite commented 2 years ago

Hi @alaney87 - thanks for this. I'm assuming that you're running on Google Colab as well, in which case your issue is that Colab has a bunch of (very) old versions of packages installed by default. I just tested the following install line to run in a new Colab notebook and everything works on my end:

!pip install --upgrade deepforest albumentations pyyaml opencv-python

Can you give that a try and see if it gets things working.

@PravinM83 - this also seems to suggest that your issue is with the old version of albumentations. Can you check and see if installing this way fixes things for you?

PravinM83 commented 2 years ago

@ethanwhite The issue was coming with the old version of argumentations, it is working fine with the new one - !pip install --upgrade deepforest albumentations pyyaml opencv-python

Thanks a lot for your help.

@alaney87 we can close this issue if it is working fine for your case as well.

PravinM83 commented 2 years ago

closing the issue as it is working fine with the new version of albumentations.

ethanwhite commented 2 years ago

Thanks @PravinM83!