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
f79b1875
Commit
f79b1875
authored
Jan 08, 2021
by
Abdullah Rashwan
Committed by
A. Unique TensorFlower
Jan 08, 2021
Browse files
Internal change
PiperOrigin-RevId: 350850704
parent
0c732162
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
6 deletions
+3
-6
official/vision/beta/configs/semantic_segmentation.py
official/vision/beta/configs/semantic_segmentation.py
+3
-2
official/vision/beta/dataloaders/segmentation_input.py
official/vision/beta/dataloaders/segmentation_input.py
+0
-4
No files found.
official/vision/beta/configs/semantic_segmentation.py
View file @
f79b1875
...
...
@@ -407,7 +407,8 @@ def seg_deeplabv3plus_cityscapes() -> cfg.ExperimentConfig:
decoder
=
decoders
.
Decoder
(
type
=
'aspp'
,
aspp
=
decoders
.
ASPP
(
level
=
level
,
dilation_rates
=
aspp_dilation_rates
)),
level
=
level
,
dilation_rates
=
aspp_dilation_rates
,
pool_kernel_size
=
[
512
,
1024
])),
head
=
SegmentationHead
(
level
=
level
,
num_convs
=
2
,
...
...
@@ -423,7 +424,7 @@ def seg_deeplabv3plus_cityscapes() -> cfg.ExperimentConfig:
train_data
=
DataConfig
(
input_path
=
os
.
path
.
join
(
CITYSCAPES_INPUT_PATH_BASE
,
'train_fine**'
),
output_size
=
[
1024
,
2048
],
output_size
=
[
512
,
1024
],
train_on_crops
=
True
,
is_training
=
True
,
global_batch_size
=
train_batch_size
,
...
...
official/vision/beta/dataloaders/segmentation_input.py
View file @
f79b1875
...
...
@@ -111,10 +111,6 @@ class Parser(parser.Parser):
image
,
label
=
self
.
_prepare_image_and_label
(
data
)
if
self
.
_train_on_crops
:
if
data
[
'image/height'
]
<
self
.
_output_size
[
0
]
or
data
[
'image/width'
]
<
self
.
_output_size
[
1
]:
raise
ValueError
(
'Image size has to be larger than crop size (output_size)'
)
label
=
tf
.
reshape
(
label
,
[
data
[
'image/height'
],
data
[
'image/width'
],
1
])
image_mask
=
tf
.
concat
([
image
,
label
],
axis
=
2
)
image_mask_crop
=
tf
.
image
.
random_crop
(
image_mask
,
...
...
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