question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

AttributeError: module 'albumentations' has no attribute 'BboxParams'

See original GitHub issue

Hi folks, I am literally just executing the advanced guide in Colab (GPU) line by line. When I execute train_tfm = AlbuTransform([A.Flip()]) I get:

AttributeError                            Traceback (most recent call last)
<ipython-input-19-2627af07b24b> in <module>()
----> 1 train_tfm = AlbuTransform([A.Flip()])

/usr/local/lib/python3.6/dist-packages/mantisshrimp/transforms/albu_transform.py in __init__(self, tfms)
     10         import albumentations as A
     11 
---> 12         self.bbox_params = A.BboxParams(format="pascal_voc", label_fields=["labels"])
     13         super().__init__(tfms=A.Compose(tfms, bbox_params=self.bbox_params))
     14 

AttributeError: module 'albumentations' has no attribute 'BboxParams'

More than happy to dig further if you guys have any guidelines!

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

5reactions
oke-adityacommented, Jul 28, 2020

I found the problem. The problem is Colab uses an old version of albumentations by default in their VMs. This causes an issue. This feature was not there in old version of albumentations I guess. Just run ! pip install --upgrade albumentations before and it would run fine.

After upgrading albumentations the code ran fine. I will update this in docs as well. Nice catch @FraPochetti

Here is the Colab notebook I ran.

Do let me know if it works. Cheers !!

0reactions
valentinag4commented, May 18, 2022

To be honest i was trying your solutions and was Impossible, you can follow this article by Albumentations official site, it works really good https://albumentations.ai/docs/getting_started/installation/

Read more comments on GitHub >

github_iconTop Results From Across the Web

AttributeError: module 'albumentations' has no attribute ' ...
Hi folks, I am literally just executing the advanced guide in Colab (GPU) line by line. When I execute train_tfm = AlbuTransform([A.Flip()]) ...
Read more >
module 'albumentations' has no attribute 'SomeOf' - ...
When I upload my backend code to Google Colaboratory. Up until now, I can't find the SomeOf attribute. It says : module 'albumentations'...
Read more >
Installation - Albumentations Documentation
installed in your Python environment, you can force Albumentations to use it by providing the --no-binary qudida,albumentations argument to pip, e.g.
Read more >
Using Albumentations to augment bounding boxes ...
Using Albumentations to augment bounding boxes for object detection tasks.
Read more >
class albumentations.augmentations.transforms. Blur
Parameters: blur_limit (int) – maximum kernel size for blurring the input image. Default: 7. p (float) – probability of applying the transform. Default:...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found