Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions examples/vision/deeplabv3_plus.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Title: Multiclass semantic segmentation using DeepLabV3+
Author: [Soumik Rakshit](http://github.com/soumik12345)
Date created: 2021/08/31
Last modified: 2021/09/1
Last modified: 2023/01/06
Description: Implement DeepLabV3+ architecture for Multi-class Semantic Segmentation.
Accelerator: GPU
"""
Expand Down Expand Up @@ -80,7 +80,7 @@ def read_image(image_path, mask=False):
image = tf.image.decode_png(image, channels=3)
image.set_shape([None, None, 3])
image = tf.image.resize(images=image, size=[IMAGE_SIZE, IMAGE_SIZE])
image = image / 127.5 - 1
image = tf.keras.applications.resnet50.preprocess_input(image)
return image


Expand Down
4 changes: 2 additions & 2 deletions examples/vision/ipynb/deeplabv3_plus.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"\n",
"**Author:** [Soumik Rakshit](http://github.com/soumik12345)<br>\n",
"**Date created:** 2021/08/31<br>\n",
"**Last modified:** 2021/09/1<br>\n",
"**Last modified:** 2023/01/06<br>\n",
"**Description:** Implement DeepLabV3+ architecture for Multi-class Semantic Segmentation."
]
},
Expand Down Expand Up @@ -127,7 +127,7 @@
" image = tf.image.decode_png(image, channels=3)\n",
" image.set_shape([None, None, 3])\n",
" image = tf.image.resize(images=image, size=[IMAGE_SIZE, IMAGE_SIZE])\n",
" image = image / 127.5 - 1\n",
" image = tf.keras.applications.resnet50.preprocess_input(image)\n",
" return image\n",
"\n",
"\n",
Expand Down
4 changes: 2 additions & 2 deletions examples/vision/md/deeplabv3_plus.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

**Author:** [Soumik Rakshit](http://github.com/soumik12345)<br>
**Date created:** 2021/08/31<br>
**Last modified:** 2021/09/1<br>
**Last modified:** 2023/01/06<br>


<img class="k-inline-icon" src="https://colab.research.google.com/img/colab_favicon.ico"/> [**View in Colab**](https://colab.research.google.com/github/keras-team/keras-io/blob/master/examples/vision/ipynb/deeplabv3_plus.ipynb) <span class="k-dot">•</span><img class="k-inline-icon" src="https://github.com/favicon.ico"/> [**GitHub source**](https://github.com/keras-team/keras-io/blob/master/examples/vision/deeplabv3_plus.py)
Expand Down Expand Up @@ -96,7 +96,7 @@ def read_image(image_path, mask=False):
image = tf.image.decode_png(image, channels=3)
image.set_shape([None, None, 3])
image = tf.image.resize(images=image, size=[IMAGE_SIZE, IMAGE_SIZE])
image = image / 127.5 - 1
image = tf.keras.applications.resnet50.preprocess_input(image)
return image


Expand Down