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.

Refactoring `ColorJitter` and `ColorJiggle` into smaller components

See original GitHub issue

🚀 Feature

ColorJitter and ColorJiggle currently are too packed. It is better to develop smaller components and rewrite these as compositions of smaller components.

Motivation

Smaller components can be applied individually. For e.g., brightness and contrast jitterings are applicable to gray images, but currently they are under ColorJitter and ColorJiggle which are not applicable to gray images.

Pitch

class BrightnessJitter(...):
    ...


class ContrastJitter(...):
    ...


class HueJitter(...):
    ...


class ColorJitter(nn.Sequential):
    def __init__(...):
        self.brightness_jitter = BrightnessJitter(...)
        self.contrast_jitter  = ContrastJitter(...)
        self.hue_jitter = HueJitter(...)
        ...

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
justanhduccommented, Aug 29, 2022

@edgarriba I think I can work on a PR if it’s not too urgent.

1reaction
edgarribacommented, Aug 26, 2022

I like the names such RandomBrightness , RandomContrast, etc. it goes according with other ops in the module

Read more comments on GitHub >

github_iconTop Results From Across the Web

ColorJitter — Torchvision main documentation
Randomly change the brightness, contrast, saturation and hue of an image. If the image is torch Tensor, it is expected to have […,...
Read more >
Programming PyTorch for Deep Learning [Book]
The idea is quite simple: over the course of an epoch, start out with a small learning rate and increase to a higher...
Read more >
kornia.augmentation - Read the Docs
This module implements in a high level logic. The main features of this module, and similar to the rest of the library, is...
Read more >
kornia - githubmemory
Refactoring `ColorJitter` and `ColorJiggle` into smaller components ... Make software development more efficient, Also welcome to join our telegram.
Read more >
[FEATURE] Add Yapf as pre-commit hook,about kornia/kornia ...
We should have a script to pre-format the code before sending a pull request: ... Refactoring `ColorJitter` and `ColorJiggle` into smaller components HOT...
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