Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ModelZoo
ResNet50_tensorflow
Commits
fee3ca79
Commit
fee3ca79
authored
Aug 20, 2021
by
Simon Geisler
Browse files
move color jitter
parent
d4053d80
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
official/vision/beta/dataloaders/classification_input.py
official/vision/beta/dataloaders/classification_input.py
+5
-5
No files found.
official/vision/beta/dataloaders/classification_input.py
View file @
fee3ca79
...
@@ -191,16 +191,16 @@ class Parser(parser.Parser):
...
@@ -191,16 +191,16 @@ class Parser(parser.Parser):
if
self
.
_aug_rand_hflip
:
if
self
.
_aug_rand_hflip
:
image
=
tf
.
image
.
random_flip_left_right
(
image
)
image
=
tf
.
image
.
random_flip_left_right
(
image
)
# Resizes image.
image
=
tf
.
image
.
resize
(
image
,
self
.
_output_size
,
method
=
tf
.
image
.
ResizeMethod
.
BILINEAR
)
image
.
set_shape
([
self
.
_output_size
[
0
],
self
.
_output_size
[
1
],
3
])
# Color jitter.
# Color jitter.
if
self
.
_color_jitter
>
0
:
if
self
.
_color_jitter
>
0
:
image
=
preprocess_ops
.
color_jitter
(
image
=
preprocess_ops
.
color_jitter
(
image
,
self
.
_color_jitter
,
self
.
_color_jitter
,
self
.
_color_jitter
)
image
,
self
.
_color_jitter
,
self
.
_color_jitter
,
self
.
_color_jitter
)
# Resizes image.
image
=
tf
.
image
.
resize
(
image
,
self
.
_output_size
,
method
=
tf
.
image
.
ResizeMethod
.
BILINEAR
)
image
.
set_shape
([
self
.
_output_size
[
0
],
self
.
_output_size
[
1
],
3
])
# Apply autoaug or randaug.
# Apply autoaug or randaug.
if
self
.
_augmenter
is
not
None
:
if
self
.
_augmenter
is
not
None
:
image
=
self
.
_augmenter
.
distort
(
image
)
image
=
self
.
_augmenter
.
distort
(
image
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment