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
253ca4ab
"...nerf/git@developer.sourcefind.cn:OpenDAS/pytorch3d.git" did not exist on "af93f348341da0696e30299d390ad0c4f5d22499"
Commit
253ca4ab
authored
Sep 25, 2016
by
Chenyang Liu
Browse files
fix resize image throughout
parent
c5bb0543
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
4 deletions
+4
-4
inception/inception/image_processing.py
inception/inception/image_processing.py
+2
-2
slim/preprocessing/inception_preprocessing.py
slim/preprocessing/inception_preprocessing.py
+1
-1
slim/slim_walkthough.ipynb
slim/slim_walkthough.ipynb
+1
-1
No files found.
inception/inception/image_processing.py
View file @
253ca4ab
...
@@ -253,8 +253,8 @@ def distort_image(image, height, width, bbox, thread_id=0, scope=None):
...
@@ -253,8 +253,8 @@ def distort_image(image, height, width, bbox, thread_id=0, scope=None):
# fashion based on the thread number.
# fashion based on the thread number.
# Note that ResizeMethod contains 4 enumerated resizing methods.
# Note that ResizeMethod contains 4 enumerated resizing methods.
resize_method
=
thread_id
%
4
resize_method
=
thread_id
%
4
distorted_image
=
tf
.
image
.
resize_images
(
distorted_image
,
height
,
width
,
distorted_image
=
tf
.
image
.
resize_images
(
distorted_image
,
[
height
,
width
]
,
resize_method
)
method
=
resize_method
)
# Restore the shape since the dynamic slice based upon the bbox_size loses
# Restore the shape since the dynamic slice based upon the bbox_size loses
# the third dimension.
# the third dimension.
distorted_image
.
set_shape
([
height
,
width
,
3
])
distorted_image
.
set_shape
([
height
,
width
,
3
])
...
...
slim/preprocessing/inception_preprocessing.py
View file @
253ca4ab
...
@@ -212,7 +212,7 @@ def preprocess_for_train(image, height, width, bbox,
...
@@ -212,7 +212,7 @@ def preprocess_for_train(image, height, width, bbox,
num_resize_cases
=
1
if
fast_mode
else
4
num_resize_cases
=
1
if
fast_mode
else
4
distorted_image
=
apply_with_random_selector
(
distorted_image
=
apply_with_random_selector
(
distorted_image
,
distorted_image
,
lambda
x
,
method
:
tf
.
image
.
resize_images
(
x
,
height
,
width
,
method
),
lambda
x
,
method
:
tf
.
image
.
resize_images
(
x
,
[
height
,
width
]
,
method
=
method
),
num_cases
=
num_resize_cases
)
num_cases
=
num_resize_cases
)
tf
.
image_summary
(
'cropped_resized_image'
,
tf
.
image_summary
(
'cropped_resized_image'
,
...
...
slim/slim_walkthough.ipynb
View file @
253ca4ab
...
@@ -634,7 +634,7 @@
...
@@ -634,7 +634,7 @@
" \n",
" \n",
" # Preprocess the image for display purposes.\n",
" # Preprocess the image for display purposes.\n",
" image_raw = tf.expand_dims(image_raw, 0)\n",
" image_raw = tf.expand_dims(image_raw, 0)\n",
" image_raw = tf.image.resize_images(image_raw, height, width)\n",
" image_raw = tf.image.resize_images(image_raw,
[
height, width
]
)\n",
" image_raw = tf.squeeze(image_raw)\n",
" image_raw = tf.squeeze(image_raw)\n",
"\n",
"\n",
" # Batch it up.\n",
" # Batch it up.\n",
...
...
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