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.

CoarseDropout throws NotImplementedError: Method apply_to_bbox is not implemented in class CoarseDropout

See original GitHub issue

🐛 Bug

CoarseDropout throws NotImplementedError: Method apply_to_bbox is not implemented in class CoarseDropout

To Reproduce

Steps to reproduce the behavior:

  1. Add CoarseDropout augmentation to augmentation pipeline
  2. Pass an image and bounding boxes to the augmentation pipeline

Expected behavior

CoarseDropout should not modify bounding boxes, as Cutout augmentation does

Environment

  • Albumentations version 0.5.2
  • Python version 3.7
  • OS Ubuntu 20.04
  • Albumentations installed viaconda

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:1
  • Comments:8 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
berceanbogdancommented, Oct 25, 2022

Any update on this?

3reactions
BloodAxecommented, Dec 15, 2021

I have implemented a partial solution which is:

  • if the box entirely masked by dropout it is removed
  • if only one side of box is affected by cutout mask, box is trimmed to reflect the actual non-masked area
  • we can also think to have an overlap-based threshold when the 90%+ of box is masked out while it’s bbox still remains the same and drop such instances as well

This should land as a PR in a next few days

Read more comments on GitHub >

github_iconTop Results From Across the Web

class albumentations.augmentations.dropout.coarse_dropout ...
CoarseDropout of the rectangular regions in the image. Parameters: Name, Type, Description. max_holes, int. Maximum number of regions ...
Read more >
When to use 'raise NotImplementedError'? - Stack Overflow
As the documentation states,. In user defined base classes, abstract methods should raise this exception when they require derived classes ...
Read more >
Coarse Dropout and Cutout Augmentation GPU/TPU - Kaggle
Coarse Dropout and Cutout augmentation are techniques to prevent overfitting and encourage generalization. They randomly remove rectangles from training ...
Read more >
Is it conventional to raise a NotImplementedError for methods ...
I would consider it appropriate to raise a NotImplementedError exception if you haven't overridden a method in a base class yet (to satisfy ......
Read more >
imgaug.augmenters.arithmetic - Read the Docs
Its usage will not yet cause a deprecation warning, but it is still recommended to use ... CoarseDropout (p=(0.02, 0.1), size_px=None, size_percent=None, ...
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