-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Conversation
@@ -151,3 +151,23 @@ def __init__(self, max_brightness=0, max_contrast=0, max_saturation=0, max_hue=0 | |||
|
|||
def hybrid_forward(self, F, x): | |||
return F.image.random_color_jitter(x, *self._args) | |||
|
|||
|
|||
class AdjustLighting(HybridBlock): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't need this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK. Then I will directly call the operator in the testing code
|
||
|
||
class AdjustLighting(HybridBlock): | ||
def __init__(self, alpha_rgb=(0.0, 0.0, 0.0), eigval=(55.46, 4.794, 1.148), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what's alpha_rgb?
use base._Null for default arguments to avoid parsing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's (alpha_r, alpha_g, alpha_b)
float pca_g = alpha_r * eigvec[3] + alpha_g * eigvec[4] + alpha_b * eigvec[5]; | ||
float pca_b = alpha_r * eigvec[6] + alpha_g * eigvec[7] + alpha_b * eigvec[8]; | ||
for (int i = 0; i < H; i++) { | ||
for (int j = 0; j < W; j++) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
merge to one loop
* add random lighting * fix
* add random lighting * fix
* add random lighting * fix
* add random lighting * fix
* add random lighting * fix
* add random lighting * fix
* add random lighting * fix
Description
Add RandomLighting and AdjustLighting
#8556